The present invention relates to a composition comprising: —(i) one or more cellulose-based thickening polymers; —(ii) one or more cationic or nonionic fixing polymers other than (i); —(iii) one or more silanes corresponding to formula (I) below and/or oligomers thereof: R1Si(OR2)z(R3)x(OH)y (I); the cellulose-based thickening polymer(s) being present in a concentration greater than or equal to 0.5% by weight relative to the total weight of the composition.