The invention relates to a cosmetic process for treating keratin fibers, comprising a step of applying, to the keratin fibers, a first cosmetic composition comprising an amino polymer comprising a primary amine group, followed by a step of applying a second cosmetic composition comprising an activated ester of formula R—C(O)OA1 in which R denotes a C5-C21 alkyl group, and A1 denotes a particular reactive group and in particular a succinimide group.The invention also relates to a kit comprising a first cosmetic composition comprising said amino polymer and a second cosmetic composition comprising said activated ester, the first and second compositions each been packaged in a separate packaging assembly.The process gives the treated damaged fiber a long-lasting hydrophobic surface state, the hydrophobicity effect being persistent after one or more shampoo washes, while at the same time affording a good cosmetic feel.