The present invention relates to a cosmetic composition, especially a hair composition, comprising: —one or more associative nonionic polymers especially of polyurethane polyether type in an amount ranging from 2.5% to 60% by weight relative to the total weight of the composition, and —one or more amphoteric surfactants. The invention also relates to a cosmetic treatment process using the said composition, especially a hair treatment process in particular for cleansing the hair and/or the scalp.