Polyelectrolyte resulting from polymerization, for 100 mol %, of: a) a molar ratio ≧50% and ≦99% of monomer units originating from at least one cationic monomer b) a molar ratio >1% and ≦50% of monomer units originating from at least one monomer including a fully or partially salified free weak acid function c) optionally a molar ratio >0 mol % and ≦5 mol % of monomer units originating from at least one monomer of formula A-C(═O)—O—[(CH2—CH(R)—O]n—R (I), where n is, independently, a number from 1 to 50, A is a monovalent unsaturated aliphatic radical having 2 to 6 carbon atoms, R1 is a hydrogen atom, a methyl radical, or an ethyl radical, and R is a linear or branched, saturated or unsaturated aliphatic hydrocarbon radical having 8 to 30 carbon atoms and d) optionally a molar ratio >0% and ≦1% of a diethylene or polyethylene cross-linking monomer.