Cosmetic composition comprising: i) at least one direct dye having a disulphide, thiol or protected thiol functional group of formula: A- p -C sat -S-U the salts thereof with an organic or inorganic acid, the optical or geometric isomers thereof, the tautomers thereof, and the solvates thereof, such as the hydrates, in which formula: • U represents a radical chosen from: a) -S-C' sat -(X') p' -A'; and b) - Y; • A and A', which are identical or different, represent a radical comprising at least one quaternized cationic chromophore or at least one chromophore carrying a quaternized or quaternizable cationic group; • Y represents i) a hydrogen atom or ii) a protective group for the thiol functional group; • X and X', which are identical or different, represent a saturated or unsaturated and linear or branched divalent C 1 -C 30 hydrocarbon chain which is optionally interrupted and/or optionally terminated at one or both of its ends by one or more divalent groups or their combinations chosen from: -N -, -N + -, -O-, -S-, -CO- or -SO 2 - with R, which are identical or different, chosen from a hydrogen, a C 1 -C 4 alkyl radical, a hydroxyalkyl radical or an aminoalkyl radical; a fused or nonfused, saturated or unsaturated and aromatic or nonaromatic (hetero)cyclic radical which optionally comprises one or more identical or different heteroatoms and which is optionally substituted; • p and p', which are identical or different, have the value 0 or 1; • C sat and C' sat, which are identical or different, represent a linear or branched C 1 -C 18 alkylene chain which is optionally substituted and optionally cyclic; ii) at least one thickening organic polymer; iii) at least one (poly)ethoxylated fatty alcohol and/or at least one nonionic surfactant; iv) at least one alkaline agent comprising at least one amino group; and v) at least one reducing agent. i) at least one direct dye having a disulphide, thiol or protected thiol functional group of formula: A- p -C sat -S-U the salts thereof with an organic or inorganic acid, the optical or geometric isomers thereof, the tautomers thereof, and the solvates thereof, such as the hydrates, in which formula: • U represents a radical chosen from: a) -S-C' sat -(X') p' -A'; and b) - Y; • A and A', which are identical or different, represent a radical comprising at least one quaternized cationic chromophore or at least one chromophore carrying a quaternized or quaternizable cationic group; • Y represents i) a hydrogen atom or ii) a protective group for the thiol functional group; • X and X', which are identical or different, represent a saturated or unsaturated and linear or branched divalent C 1 -C 30 hydrocarbon chain which is optionally interrupted and/or optionally terminated at one or both of its ends by one or more divalent groups or their combinations chosen from: -N -, -N + -, -O-, -S-, -CO- or -SO 2 - with R, which are identical or different, chosen from a hydrogen, a C 1 -C 4 alkyl radical, a hydroxyalkyl radical or an aminoalkyl radical; a fused or nonfused, saturated or unsaturated and aromatic or nonaromatic (hetero)cyclic radical which optionally comprises one or more identical or different heteroatoms and which is optionally substituted; • p and p', which are identical or different, have the value 0 or 1; • C sat and C' sat, which are identical or different, represent a linear or branched C 1 -C 18 alkylene chain which is optionally substituted and optionally cyclic; • U represents a radical chosen from: a) -S-C' sat -(X') p' -A'; and b) - Y; a) -S-C' sat -(X') p' -A'; and b) - Y; • A and A', which are identical or different, represent a radical comprising at least one quaternized cationic chromophore or at least one chromophore carrying a quaternized or quaternizable cationic group; • Y represents i) a hydrogen atom or ii) a protective group for the thiol functional group; • X and X', which are identical or different, represent a saturated or unsaturated and linear or branched divalent C 1 -C 30 hydrocarbon chain which is optionally interrupted and/or optionally terminated at one or both of its ends by one or more divalent groups or their combinations chosen from: -N -, -N + -, -O-, -S-, -CO- or -SO 2 - with R, which are identical or different, chosen from a hydrogen, a C 1 -C 4 alkyl radical, a hydroxyalkyl radical or an aminoalkyl radical; a fused or nonfused, saturated or unsaturated and aromatic or nonaromatic (hetero)cyclic radical which optionally comprises one or more identical or different heteroatoms and which is optionally substituted; -N -, -N + -, -O-, -S-, -CO- or -SO 2 - with R, which are identical or different, chosen from a hydrogen, a C 1 -C 4 alkyl radical, a hydroxyalkyl radical or an aminoalkyl radical; a fused or nonfused, saturated or unsaturated and aromatic or nonaromatic (hetero)cyclic radical which optionally comprises one or more identical or different heteroatoms and which is optionally substituted; • p and p', which are identical or different, have the value 0 or 1; • C sat and C' sat, which are identical or different, represent a linear or branched C 1 -C 18 alkylene chain which is optionally substituted and optionally cyclic; ii) at least one thickening organic polymer; iii) at least one (poly)ethoxylated fatty alcohol and/or at least one nonionic surfactant; iv) at least one alkaline agent comprising at least one amino group; and v) at least one reducing agent.