The invention relates to a cosmetic process for caring for or making up keratin materials, comprising the topical application to the keratin materials of a cosmetic composition comprising a phosphonic polymer derived from the polymerization of: (a) 45% to 95% by weight of ethylenic monomer bearing an at least C8 linear or branched alkyl group (b) 5% to 25% by weight of vinylphosphonic acid monomer (c) 0 to 50% by weight of additional monomer chosen from linear or branched C1C6 alkyl (meth)acrylates, C6-C12 cycloalkyl (meth)acrylates, and polydimethylsiloxanes bearing a mono(meth)acryloyloxy end group, optionally combined with an additional compound chosen from polyamine compounds bearing several primary amine and/or secondary amine groups, aminosilanes, salts of divalent or trivalent metal ions, clays and metal oxides. The process makes it possible to obtain a film-forming deposit that has good resistance to water, to oil and to sebum. The film is also non-tacky and transfer-resistant. The invention also relates to polymers containing the three monomers (a), (b) and (c).