The present invention provides a system and method for detecting a target in a sample. In one aspect, a collection device includes a collection chamber, a test chamber, a passageway between the collection chamber and the test chamber, and a detection system positioned within the test chamber. The detection system includes at least one of a spiropyran, a molecularly imprinted polymer and a nonimprinted polymer.La présente invention concerne un système et un procédé pour détecter une cible dans un échantillon. Dans un aspect, linvention concerne un dispositif de collecte qui comprend une chambre de collecte, une chambre de test, une voie de passage entre la chambre de collecte et la chambre de test, et un système de détection placé à lintérieur de la chambre de test. Le système de détection comprend au moins un composé parmi un spiropyrane, un polymère à empreinte moléculaire et un polymère sans empreinte.