/* ============================================================================
   paiement — LA FEUILLE DES DEUX LANGUES.

   Le CSS n'a pas de langue. Cette feuille etait ecrite DEUX FOIS : une dans
   paiement.html, une recopiee a la main dans en/paiement.html. Reunies le 09/09/2026 —
   une retouche se fait desormais a UN seul endroit.

   Preuve du deplacement : tools/empreinte-styles.py, qui compare le style
   CALCULE de chaque element avant et apres, aux deux largeurs et dans les
   deux themes.
   ============================================================================ */

  /* ================================================================
     IV Pay — la page de paiement.
     ⚠️ RESPONSIVE : tout est vérifié à 375 px ET à 1280 px. Rien ne doit
     déborder latéralement — on fait TENIR le contenu, on ne le fait pas
     défiler de côté (règle du site, CHARTE.md).
     ================================================================ */
  .pay-page { max-width: 620px; margin: 0 auto; padding-bottom: 40px; }

  /* ---- Le fil des trois étapes ---- */
  .pay-fil { display: flex; list-style: none; margin: 0 0 22px; padding: 0; gap: 6px; }
  .pay-fil li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs);
    font-weight: 600; color: var(--muted); padding: 9px 6px; border-radius: var(--r-sm);
    background: #F4F1F0; min-width: 0; }
  .pay-fil li span { flex: none; width: 21px; height: 21px; border-radius: 50%;
    /* 09/09 : du blanc sur ce gris pale ne donne que 1,43:1 — les etapes
       2 et 3, pas encore atteintes, etaient des pastilles VIDES. */
    background: #DDD6D4; color: #4A4240; display: grid; place-items: center;
    font-size: var(--fs-xs); font-weight: 700; }
  .pay-fil li.on { background: #FDECEA; color: var(--red-dark); }
  .pay-fil li.on span { background: var(--red-fond); color: #fff; }
  .pay-fil li.fait { background: #E8F5EE; color: #1B7A4C; }
  .pay-fil li.fait span { background: var(--teal, #1B7A4C); }
  /* Sur téléphone, trois libellés côte à côte ne tiennent pas (illisibles à
     3 mots par colonne, et ils pousseraient la page en largeur). Depuis le
     13/10 : les étapes faites et à venir gardent leur seul numéro, l'étape EN
     COURS garde son libellé — on sait toujours où l'on est. */
  @media (max-width: 560px) {
    .pay-fil li { flex: 0 0 auto; font-size: 0; gap: 0; justify-content: center; padding: 8px 10px; }
    .pay-fil li span { font-size: var(--fs-xs); }
    .pay-fil li.on { flex: 1 1 auto; font-size: var(--fs-sm); gap: 8px; justify-content: flex-start; padding: 8px 12px; }
  }
  /* Une étape faite porte une coche, plus son numéro (le chiffre sombre sur le
     vert ne se lisait pas). */
  .pay-fil li.fait span { font-size: 0; color: #fff; }
  .pay-fil li.fait span::before { content: '✓'; font-size: var(--fs-sm); font-weight: 700; }

  /* ---- La carte ---- */
  .pay-carte { background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
    padding: 22px; box-shadow: var(--shadow); }
  @media (min-width: 700px) { .pay-carte { padding: 28px; } }

  .pay-chargement { color: var(--muted); font-size: var(--fs-sm); text-align: center; padding: 14px 0; }

  /* ---- Le produit acheté ---- */
  .pay-produit { border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px;
    margin-bottom: 20px; background: #FAFAF9; }
  .pay-produit h2 { font-size: var(--fs-md); color: var(--navy-dark); margin: 0 0 5px; line-height: 1.35; }
  .pay-produit .pay-prix { font-family: Sora, sans-serif; font-weight: 700;
    font-size: var(--fs-xl); color: var(--red-dark); line-height: 1.2; }
  .pay-produit ul { list-style: none; margin: 10px 0 0; padding: 10px 0 0;
    border-top: 1px solid var(--line); }
  .pay-produit li { font-size: var(--fs-sm); color: var(--ink); padding: 3px 0 3px 18px;
    position: relative; line-height: 1.45; }
  .pay-produit li::before { content: '✓'; position: absolute; left: 0;
    color: var(--teal, #1B7A4C); font-weight: 700; }

  /* ---- Les champs ---- */
  .pay-champs { display: flex; flex-direction: column; gap: 16px; }
  .pay-champs label { font-size: var(--fs-sm); font-weight: 600; color: var(--navy-dark);
    display: flex; flex-direction: column; gap: 6px; }
  /* ⚠️ SANS CETTE LIGNE, « Version de l'IELTS » RESTE AFFICHÉ SUR UN ACHAT TCF.
     Le navigateur cache un élément « hidden » avec une règle de priorité
     minimale ; la ligne au-dessus, qui vise une CLASSE, la bat. Le script
     posait donc bien hidden, et le bloc restait visible — 118 px mesurés. */
  .pay-champs [hidden] { display: none !important; }
  .pay-champs input, .pay-champs select {
    /* ⚠️ 16px MINIMUM sur mobile : en dessous, iOS zoome tout seul au clic
       dans le champ et casse la mise en page. */
    font-family: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
    padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    background: var(--white); width: 100%; box-sizing: border-box; }
  .pay-champs input:focus, .pay-champs select:focus {
    outline: none; border-color: var(--red); box-shadow: var(--shadow-sm); }
  .pay-champs small { font-size: var(--fs-xs); font-weight: 400; color: var(--muted); line-height: 1.45; }

  /* ---- Le montant ---- */
  .pay-montant { text-align: center; padding: 18px 14px; background: #FDECEA;
    border-radius: var(--r); margin-bottom: 16px; }
  .pay-montant span { display: block; font-size: var(--fs-xs); font-weight: 600;
    color: var(--red-dark); text-transform: uppercase; letter-spacing: .7px; }
  .pay-montant b { display: block; font-family: Sora, sans-serif; font-weight: 700;
    font-size: 2rem; color: var(--red-dark); line-height: 1.2; margin: 4px 0 2px;
    /* Un montant en FCFA peut être long : il doit rétrécir, pas déborder. */
    word-break: break-word; }
  .pay-montant em { font-style: normal; font-size: var(--fs-sm); color: var(--ink); }

  /* ---- La référence ---- */
  .pay-ref { border: 2px dashed var(--navy-dark); border-radius: var(--r);
    padding: 14px 15px; margin-bottom: 18px; text-align: center; }
  .pay-ref > span { display: block; font-size: var(--fs-xs); font-weight: 600;
    color: var(--muted); margin-bottom: 6px; }
  .pay-ref > div { display: flex; align-items: center; justify-content: center;
    gap: 10px; flex-wrap: wrap; }
  .pay-ref b { font-family: Sora, sans-serif; font-size: var(--fs-lg); letter-spacing: .5px;
    color: var(--navy-dark); word-break: break-all; }
  .pay-copier { font-family: inherit; font-size: var(--fs-xs); font-weight: 600;
    padding: 6px 12px; border: 1px solid var(--navy-dark); border-radius: var(--r-sm);
    background: var(--white); color: var(--navy-dark); cursor: pointer; flex: none; }
  .pay-copier:hover { background: var(--navy-dark); color: #fff; }
  .pay-copier.ok { background: #E8F5EE; border-color: #1B7A4C; color: #1B7A4C; }
  /* Le champ et son bouton « Coller » sur une seule ligne. Le champ prend
     ce qui reste ; le bouton garde sa taille et sa cible de 44 px. */
  /* ---- « Créez votre compte ensuite » (02/09) ----
     Encadré d'INFORMATION, pas d'alerte : le candidat n'a rien raté, on lui
     dit ce qui vient après. D'où le bleu-vert du site et non le rouge, qui
     signale une erreur et l'inquiéterait au pire moment — juste avant qu'il
     parte payer. */
  .pay-compte-apres { border: 1px solid #BFE3D6; background: #F0FAF6;
    border-radius: var(--r); padding: 15px 16px; margin-bottom: 16px; }
  .pay-compte-apres h2, .pay-compte-apres h3 { font-size: var(--fs-base); color: #12664F; margin: 0 0 7px; }
  .pay-compte-apres p { font-size: var(--fs-sm); line-height: 1.6; color: var(--ink); margin: 0 0 10px; }
  .pay-compte-apres p:last-child { margin-bottom: 0; }
  .pay-compte-apres .btn { min-height: 44px; display: inline-flex; align-items: center; }

  .pay-champ-coller { display: flex; gap: 8px; align-items: stretch; }
  .pay-champ-coller input { flex: 1 1 auto; min-width: 0; }
  .pay-champ-coller .pay-copier { flex: 0 0 auto; min-height: 44px; }

  /* ---- Les moyens de paiement ---- */
  .pay-moyen { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 15px;
    margin-bottom: 10px; }
  .pay-moyen h3 { font-size: var(--fs-base); color: var(--navy-dark); margin: 0 0 8px;
    display: flex; align-items: center; gap: 8px; }
  .pay-moyen .pay-code { font-family: Sora, sans-serif; font-weight: 700;
    font-size: var(--fs-lg); color: var(--red-dark); letter-spacing: 1px;
    display: block; margin: 4px 0 6px; word-break: break-all; }
  .pay-moyen p { font-size: var(--fs-sm); color: var(--ink); line-height: 1.55; margin: 0; }
  .pay-moyen ol { margin: 8px 0 0; padding-left: 20px; }
  .pay-moyen li { font-size: var(--fs-sm); color: var(--ink); line-height: 1.55; margin-bottom: 4px; }
  /* Le code tout prêt : un bouton au téléphone Android, le code à copier ailleurs. */
  .pay-moyen .pay-composer { display: flex; width: 100%; min-height: 48px; margin: 6px 0 8px;
    justify-content: center; }
  .pay-moyen .pay-composer-aide { color: var(--muted); margin-bottom: 8px; }
  .pay-composer-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
  .pay-composer-code .pay-code { margin: 0; font-size: var(--fs-md); letter-spacing: .5px; white-space: nowrap;
    word-break: normal; max-width: 100%; overflow-x: auto; }
  .pay-composer-code .pay-copier { min-height: 44px; }


  /* ---- Boutons ---- */
  .pay-bouton { width: 100%; margin-top: 18px; }
  /* ---------- Mode caisse (25/08) : cette page ne propose rien d'autre ----------
   Le menu du site et son pied de page ont été retirés : on ne présente pas
   d'autres produits à quelqu'un qui est en train d'en payer un. */
.pay-barre { border-bottom: 1px solid var(--line); background: var(--white); }
.pay-barre .container { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px; }
.pay-barre .brand { display: flex; align-items: center; gap: 10px; }
.pay-barre .brand img { width: 40px; height: 40px; object-fit: contain; }
.pay-barre .brand-name { font-family: 'Sora', sans-serif; font-weight: 700; color: var(--navy-dark);
  line-height: 1.2; display: flex; flex-direction: column; }
.pay-barre .brand-name small { font-weight: 500; font-size: var(--fs-xs); color: var(--muted); }
.pay-retour { font-size: var(--fs-sm); font-weight: 600; color: var(--red-dark); white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center; }
.pay-retour:hover { text-decoration: underline; }
.pay-pied { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0 34px;
  background: var(--bg); }
.pay-pied .container { display: flex; flex-direction: column; gap: 10px; align-items: center;
  text-align: center; font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }
.pay-pied a { color: var(--red-dark); font-weight: 600; }
@media (max-width: 620px) {
  .pay-barre .brand-name small { display: none; }
}
.pay-note { font-size: var(--fs-sm); color: var(--muted); text-align: center;
    margin: 14px 0 0; line-height: 1.55; }
  .pay-erreur { background: #FDECEA; border: 1px solid #F5C6C2; border-radius: var(--r-sm);
    padding: 11px 13px; font-size: var(--fs-sm); color: #A3231B; margin: 16px 0 0;
    line-height: 1.5; }

  /* ---- L'attente et l'ouverture ---- */
  .pay-etat { text-align: center; padding: 8px 0; }
  .pay-etat h2 { font-size: var(--fs-lg); color: var(--navy-dark); margin: 14px 0 10px; line-height: 1.35; }
  .pay-etat p { font-size: var(--fs-sm); color: var(--ink); line-height: 1.6; margin: 0 0 10px; }
  .pay-refrappel { font-size: var(--fs-sm); color: var(--muted); margin-top: 16px !important;
    padding-top: 14px; border-top: 1px solid var(--line); }

  .pay-sablier { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%;
    border: 3px solid #F0DFA8; border-top-color: #D9A400; animation: payTourne 1s linear infinite; }
  @keyframes payTourne { to { transform: rotate(360deg); } }
  /* Respect du réglage système : une animation qui tourne sans fin peut
     gêner, et certains la coupent volontairement. */
  @media (prefers-reduced-motion: reduce) {
    .pay-sablier { animation: none; border-top-color: #F0DFA8; }
  }

  .pay-coche { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
    background: #E8F5EE; color: #1B7A4C; display: grid; place-items: center;
    font-size: 1.9rem; font-weight: 700; }

  .pay-secours { text-align: center; font-size: var(--fs-sm); color: var(--muted);
    margin: 22px auto 0; max-width: 520px; line-height: 1.6; }

  /* Le nom qui s'affichera sur le téléphone du candidat. Discret mais
     visible : c'est ce qui l'empêche de croire qu'il paie un inconnu. */
  .pay-benef { background: #FFF8E6; border: 1px solid #F0DFA8; border-radius: var(--r-sm);
    padding: 9px 11px; margin: 8px 0 0 !important; font-size: var(--fs-sm) !important;
    line-height: 1.5; }

  /* ⚠️ UNE ADRESSE E-MAIL NE SE COUPE PAS TOUTE SEULE.
     « candidat.avec.une.longue.adresse@exemple.com » n'a aucun espace : le
     navigateur ne sait pas où la couper, et elle pousse la page entière en
     largeur. Mesuré : 386 px dans un écran de 375. Les adresses longues sont
     la règle, pas l'exception — Gmail en fabrique tous les jours.
     `anywhere` autorise la coupure n'importe où, faute de mieux. */
  #payEmailRappel, .pay-note b, .pay-etat b {
    overflow-wrap: anywhere;
  }


  /* 07/09 — Le guichet en theme sombre. Mesure : « 2 Le paiement » tombait a
     2,2:1 et les pastilles a 1,4:1 — du clair sur du clair. Ces fonds sont
     ecrits en dur ici : on leur donne leur equivalent sombre. */
  /* 11/09/2026 : thème nuit par attribut (voir css/styles.css, « LE THÈME NUIT OBÉIT À UN ATTRIBUT »). */
  :where(:root[data-theme="nuit"]) .pay-fil li { background: #1E2840; }
  :where(:root[data-theme="nuit"]) .pay-fil li span { background: #3A4666; color: #EAEFF7; }
  :where(:root[data-theme="nuit"]) .pay-fil li.on { background: #3C2030; color: #FF8A82; }
  :where(:root[data-theme="nuit"]) .pay-fil li.on span { background: #B31410; color: #FFFFFF; }
  :where(:root[data-theme="nuit"]) .pay-montant { background: #33202E; }
  :where(:root[data-theme="nuit"]) .pay-erreur { background: #33202E; border-color: #63313F; }
  /* Le bloc de commande gardait un fond clair ecrit en dur : le lien
     « Voir nos offres » y tombait a 3,2:1. */
  :where(:root[data-theme="nuit"]) .pay-produit { background: var(--white); }
  /* 28/09/2026 — les vert et ambre clairs qui restaient (Alex : « des zones
     grises en mode nuit ») : l'étape faite, la coche, le compte créé, le nom
     du bénéficiaire. Encres vertes éclaircies avec eux. */
  :where(:root[data-theme="nuit"]) .pay-fil li.fait { background: var(--teal-light); color: var(--teal-ink); }
  :where(:root[data-theme="nuit"]) .pay-copier.ok { background: var(--teal-light); border-color: var(--teal-ink); color: var(--teal-ink); }
  :where(:root[data-theme="nuit"]) .pay-compte-apres { background: var(--teal-light); border-color: #1F4A3F; }
  :where(:root[data-theme="nuit"]) .pay-compte-apres :is(h2, h3) { color: var(--teal-ink); }
  :where(:root[data-theme="nuit"]) .pay-coche { background: var(--teal-light); color: var(--teal-ink); }
  :where(:root[data-theme="nuit"]) .pay-benef { background: var(--amber-light); border-color: #5A4A20; }

  /* 08/09 — L'OPERATEUR DECLARE. Sans lui, un versement MTN partait en
     « orange_money » et faussait le rapprochement du cabinet. */
  .pay-moyen-choix { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; }
  .pay-moyen-choix legend { padding: 0 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
  .pay-moyen-choix label { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-base); cursor: pointer; }
  .pay-moyen-choix input { width: 20px; height: 20px; accent-color: var(--red-dark); }


/* ============================================================================
   13/10/2026 — REFONTE DE LA PRISE EN MAIN (lot 5).
   Téléphone : le parcours d'abord, puis « ce que vous devez savoir ».
   Ordinateur (960 px et plus) : deux colonnes — le parcours à gauche, la
   colonne de confiance à droite, collée en haut de l'écran pendant qu'on
   remplit. Le titre de la page s'aligne sur le parcours.
   ============================================================================ */
.pay-page { padding-top: var(--sp-6); }
.pay-flux { min-width: 0; }
@media (min-width: 960px) {
  .pay-tete .container { max-width: 1060px; }
  .pay-page { max-width: 1060px; display: grid; grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--sp-8); align-items: start; }
  .pay-cote { position: sticky; top: var(--sp-5); }
}

/* ---- Le récapitulatif de l'étape 2 : montant et référence ---- */
.pay-recap { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.pay-recap .pay-montant, .pay-recap .pay-ref { margin-bottom: 0; }
.pay-recap .pay-ref { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 600px) { .pay-recap { grid-template-columns: 1fr 1fr; } }
/* Taramoney encaisse : pas de référence à indiquer, le montant seul (16/10). */
@media (min-width: 600px) { .pay-recap.pay-recap-seul { grid-template-columns: 1fr; } }

/* ---- Les deux temps de l'étape 2 : payer, puis coller le numéro ---- */
.pay-titre-etape { font-size: var(--fs-md); color: var(--navy-dark); margin: 0 0 var(--sp-3);
  line-height: 1.35; text-wrap: balance; }
.pay-declaration { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); }

/* Les gestes numérotés : pastilles rosées, la dernière en rouge plein
   (CHARTE.md, « Étapes »). Quatre ronds rouges d'affilée criaient. */
.pay-moyen ol.pay-gestes li::before { background: var(--blush); color: var(--red-dark); }
.pay-moyen ol.pay-gestes li:last-child::before { background: var(--red-fond); color: var(--sur-couleur); }

/* La promesse de l'e-mail : une vraie icône, plus un émoji. */
.pay-promesses { display: flex; gap: var(--sp-3); align-items: flex-start; }
.pay-promesses svg { flex: none; width: 18px; height: 18px; margin-top: 2px; stroke: var(--muted); }

/* ---- « J'ai payé avec » : deux choix en tuiles, toute la tuile se touche ---- */
.pay-moyen-choix { border: 0; padding: 0; margin: 0; min-width: 0; }
.pay-moyen-choix legend { padding: 0; margin: 0 0 var(--sp-2); font-size: var(--fs-sm);
  font-weight: 600; color: var(--navy-dark); }
.pay-moyen-options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.pay-champs .pay-moyen-choix label { flex-direction: row; align-items: center; gap: var(--sp-2);
  min-height: 48px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--white); font-size: var(--fs-sm); line-height: 1.3;
  cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.pay-champs .pay-moyen-choix label:hover { border-color: var(--red-dark); }
.pay-champs .pay-moyen-choix label:has(input:checked) { border-color: var(--red-dark);
  background: var(--blush); box-shadow: inset 0 0 0 1px var(--red-dark); }
.pay-moyen-choix input { flex: none; margin: 0; }

/* ---- Revenir à la commande : un lien, pas un second gros bouton ---- */
.pay-revenir { display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 44px; margin-top: var(--sp-2); border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; }
.pay-revenir:hover { color: var(--red-dark); }

/* ---- Les boutons « Copier » / « Coller » : 44 px au doigt ---- */
@media (max-width: 767px) { .pay-copier { min-height: 44px; padding: 8px 14px; font-size: var(--fs-sm); } }

/* ---- La colonne de confiance ---- */
.pay-cote { margin-top: var(--sp-6); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--sp-5); }
@media (min-width: 960px) { .pay-cote { margin-top: 0; } }
.pay-cote h2 { font-size: var(--fs-lg); color: var(--navy-dark); margin: 0 0 var(--sp-4);
  line-height: 1.3; text-wrap: balance; }
.pay-cote .pay-confiance-liste li { font-size: var(--fs-sm); line-height: 1.6; }
.pay-cote a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.pay-cote .pay-confiance-preuve { font-size: var(--fs-sm); }
.pay-officiel { display: flex; gap: var(--sp-3); align-items: flex-start; margin: var(--sp-5) 0 0;
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--white); font-size: var(--fs-sm); line-height: 1.55; color: var(--ink); }
.pay-officiel svg { flex: none; width: 18px; height: 18px; margin-top: 2px; stroke: var(--red-dark); }

/* ---- Payer maintenant, par Taramoney (15/10) ----
   Le chemin le plus court passe devant le code marchand : il se distingue par
   sa teinte, pas par un cadre plus épais. Les teintes partent des jetons du
   site, donc suivent le mode nuit toutes seules. */
.pay-direct { border-color: color-mix(in srgb, var(--red) 32%, var(--line));
  background: color-mix(in srgb, var(--red) 5%, var(--white)); }
.pay-direct-bouton { display: flex; width: 100%; min-height: 48px; margin-top: var(--sp-3);
  align-items: center; justify-content: center; gap: var(--sp-2); }
.pay-direct-bouton svg, .pay-reprise svg { flex: none; width: 18px; height: 18px; }
.pay-direct .pay-erreur { margin: var(--sp-2) 0 0; }
.pay-ou { font-size: var(--fs-sm); color: var(--muted); margin: var(--sp-4) 0 var(--sp-2); }
.pay-reprise { margin: var(--sp-4) 0 0; }
.pay-reprise .btn { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; }
