The invention relates to a detergent composition containing, in a cosmetically acceptable aqueous medium, at least one anionic surfactant and at least one amphoteric surfactant chosen from (C8-C24)alkylamido(C3-C8)alkylbetaines, sulfobetaines, (C8-C24)alkylamido(C6-C8)alkylsulfobetaines, (C8-C24)alkyl amphomonoacetates, (C8-C24)alkyl amphodiacetates, (C8-C24)alkyl amphomonopropionates, (C8-C24)alkyl amphodipropionates and phosphobetaines, in an anionic surfactant(s)/amphoteric surfactant(s) weight ratio of less than or equal to 1 at least one cationic polymer with a cationic charge density of greater than 5 meq/g, and at least 1% by weight, relative to the total weight of the composition, of at least one mineral or organic water-soluble salt, the anion of this salt comprising from 1 to 7 carbon atoms, the total amount of surfactants in the composition being less than or equal to 18% by weight relative to the total weight of the composition. This composition is especially used for washing and conditioning keratin materials, for example the hair.