The present application relates to cosmetic compositions comprising, in a physiologically acceptable medium, a copolymer having a (thio)urethane/(thio)urea polymer skeleton, resulting from the reaction:of a first monomer having at least two polymerizable groups, which may be identical or different, chosen from —N═C═O and —N═C═S,of a monomer (b1) having at least two polymerizable groups with a labile hydrogen,of a monomer (b2), different from monomer (b1), having at least two polymerizable groups with a labile hydrogen,with at least one of these monomers comprising at least one junction group (A), capable of forming at least 3 hydrogen bonds.The disclosure also relates to a method of cosmetic treatment of keratinous materials, comprising the application of a cosmetic composition as defined above on said materials.