Disclosed herein are cosmetic compositions comprising:at least one non-ionic surfactant chosen from alkylpolyglycosides and mono- and polyglycerolated surfactants, andat least one vinylformamide/vinylamine copolymer comprising:from 10 to 90 mol % of units of following formula A:and from 90 to 10 mol % of units of following formula B:and a method for treating keratinous substances using said composition.