/* Lot REFONTE-B-PAGES-3 (09/11/2026, C456, C460, C461, C462) : /inscription, /connexion et leur parcours en direction B, mise en forme seulement. Feuille servie seulement drapeau ouvert.
 * Tout est sous body.rfb-p3 (posee par pageCompte, voir src/utils/refonte-b-compte.js) ; jetons de rf-refonte-b.css. Aucun texte, aucun champ, aucun comportement. Pas d'image, pas d'animation, ni pastille ni badge (C462).
 * Bandeau des cookies : meme place qu'avant (INSCRIPTION-FIXE : dans la colonne, il ne recouvre pas la carte), seules les couleurs changent. Le logo et le bouton Google ne changent pas. */
html:has(> body.rfb-p3) { background: #060912; }
body.rfb.rfb-p3 {
  --trait-champ: #7388AC; --blanc-2: #E3EAF8; --erreur-b: #FFC2C2; --rouge-b: #FF9A9A; --succes-b: #BFF3E0; --info-b: #DCE8FF;
  --sombre-texte: var(--blanc); --tirage-trait: var(--trait); color-scheme: dark;
  background: var(--nuit); background-image: radial-gradient(900px 620px at 72% -8%, rgba(47, 128, 255, .24), transparent 70%);
  background-repeat: no-repeat; font-size: 16px; line-height: var(--interligne); /* interligne d'origine : /connexion garde sa hauteur (C404-405) */
}
body.rfb.rfb-p3 .compte-scene::before { display: none; }
/* Lot COMPTE-MISE-EN-PAGE (C473, C474) : carte centree, voir la fin de cette feuille. Anciennes regles (carte calee en haut de sa colonne) :
 * body.rfb.rfb-p3 .compte-volet { align-items: flex-start; }
 * body.rfb.rfb-p3.compte-connexion .compte-scene { align-content: start; }
 * @media (min-width: 900px) { body.rfb.rfb-p3 .compte-volet { padding-top: clamp(32px, 7vh, 96px); } } */

/* Panneau : logo, accroche, frise. Texte et ordre inchanges, sans pastille */
body.rfb.rfb-p3 .compte-panneau { background: transparent; color: var(--blanc); border-right: 1px solid var(--trait); }
body.rfb.rfb-p3 .compte-panneau::before { display: none; }
body.rfb.rfb-p3 .compte-accroche { color: var(--blanc); font-weight: 640; letter-spacing: -.03em; text-wrap: balance; }
@media (min-width: 900px) { body.rfb.rfb-p3 .compte-accroche { font-size: clamp(32px, 2.4vw + 10px, 46px); line-height: 1.08; } }
body.rfb.rfb-p3 .compte-accroche-2 { color: var(--doux); }
body.rfb.rfb-p3 .cote { justify-content: flex-start; gap: 8px; padding-top: 0; margin-top: 8px; flex-wrap: wrap; }
body.rfb.rfb-p3 .cote::before, body.rfb.rfb-p3 .cote li::before, body.rfb.rfb-p3 .cote li::after { display: none; }
body.rfb.rfb-p3 .cote li { color: var(--doux); font-size: 15px; font-weight: 500; }
body.rfb.rfb-p3 .cote li:not(:first-child)::before { display: inline; content: "·"; position: static; width: auto; height: auto; background: none; margin-right: 8px; border-radius: 0; }

/* Carte du formulaire : surface unie, pas de verre (PRINCIPES § 4) */
body.rfb.rfb-p3 .carte-compte {
  --texte: var(--blanc); --texte-2: var(--doux); --texte-3: var(--doux); --texte-secondaire: var(--doux); --texte-tertiaire: var(--doux);
  --carte: var(--nuit-2); --surface: var(--nuit-2); --fond: rgba(143, 187, 255, .12);
  --bordure: var(--trait); --bordure-forte: var(--trait-champ); --bordure-champ: var(--trait-champ);
  --primaire-texte: var(--ciel); --primaire-clair: rgba(143, 187, 255, .2); --lien: var(--ciel); --focus-anneau: var(--ciel); --primaire: var(--ciel);
  --erreur: var(--rouge-b); --danger: var(--rouge-b); --erreur-texte: var(--erreur-b); --erreur-fond: rgba(255, 138, 138, .14);
  --succes: var(--vert); --succes-texte: var(--succes-b); --succes-fond: rgba(43, 217, 160, .13);
  --info: var(--ciel); --info-texte: var(--info-b); --info-fond: rgba(143, 187, 255, .13); --alerte: #F4C266;
  color: var(--blanc); background: var(--nuit-2); background-image: none; border: 0; border-radius: 18px;
  box-shadow: 0 0 0 1px var(--trait), 0 24px 70px rgba(0, 0, 0, .55); animation: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
body.rfb.rfb-p3 .carte-compte::before { display: none; }
body.rfb.rfb-p3 .compte-panneau-corps { animation: none; }
body.rfb.rfb-p3 .carte-compte h1 { color: var(--blanc); font-weight: 640; letter-spacing: -.03em; text-wrap: balance; }
body.rfb.rfb-p3 .carte-compte .sous-titre { color: var(--doux); }
body.rfb.rfb-p3 .carte-compte :focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; }
body.rfb.rfb-p3 .carte-compte a:not(.btn) { color: var(--ciel); text-underline-offset: 3px; }
body.rfb.rfb-p3 .carte-compte a:not(.btn):hover { color: var(--blanc); }
body.rfb.rfb-p3 .carte-compte .form-group > label, body.rfb.rfb-p3 .carte-compte .form-case label { color: var(--blanc-2); }
body.rfb.rfb-p3 .carte-compte .form-aide, body.rfb.rfb-p3 .carte-compte .form-legende { color: var(--doux); }

/* Champs : texte blanc, bordure a 4,9:1 sur la carte, focus et erreur nets */
body.rfb.rfb-p3 .carte-compte .form-control { background: #080E1B; color: var(--blanc); caret-color: var(--ciel); border: 1px solid var(--trait-champ); border-radius: 12px; font-size: 16px; }
body.rfb.rfb-p3 .carte-compte .form-control::placeholder { color: #A9B6CE; opacity: 1; }
body.rfb.rfb-p3 .carte-compte .form-control:focus { outline: 2px solid var(--ciel); outline-offset: 0; border-color: var(--ciel); }
body.rfb.rfb-p3 .carte-compte .form-control:disabled, body.rfb.rfb-p3 .carte-compte .form-control[readonly] { background: var(--nuit-3); color: var(--doux); }
body.rfb.rfb-p3 .carte-compte .form-erreur .form-control { border-color: var(--rouge-b); box-shadow: inset 0 0 0 1px var(--rouge-b); }
body.rfb.rfb-p3 .carte-compte .form-erreur .form-control:focus { outline-color: var(--rouge-b); }
body.rfb.rfb-p3 .carte-compte .form-message-erreur, body.rfb.rfb-p3 .carte-compte .requis, body.rfb.rfb-p3 .carte-compte .mdp-confirmation-etat[data-etat="different"] { color: var(--erreur-b); }
/* Saisie automatique des navigateurs : fond sombre et texte blanc, l'erreur et le focus restent visibles */
body.rfb.rfb-p3 .carte-compte .form-control:is(:-webkit-autofill, :autofill),
body.rfb.rfb-p3 .carte-compte .form-control:is(:-webkit-autofill, :autofill):hover,
body.rfb.rfb-p3 .carte-compte .form-control:is(:-webkit-autofill, :autofill):focus {
  -webkit-text-fill-color: var(--blanc); caret-color: var(--ciel); -webkit-box-shadow: 0 0 0 1000px #17243D inset; box-shadow: 0 0 0 1000px #17243D inset; transition: background-color 9999s linear 0s;
}
body.rfb.rfb-p3 .carte-compte .form-erreur .form-control:is(:-webkit-autofill, :autofill),
body.rfb.rfb-p3 .carte-compte .form-erreur .form-control:is(:-webkit-autofill, :autofill):focus {
  -webkit-box-shadow: inset 0 0 0 1px var(--rouge-b), 0 0 0 1000px #17243D inset; box-shadow: inset 0 0 0 1px var(--rouge-b), 0 0 0 1000px #17243D inset;
}
body.rfb.rfb-p3 .carte-compte .form-case input[type="checkbox"] { accent-color: var(--ciel); }
/* Indicateur de robustesse : sa place est reservee (rendu masque, sans contenu pour un lecteur d'ecran) ; le script du mot de passe le revele sans decaler les champs dessous (CLS 0). Le fond sombre ne le cache plus derriere l'entree animee de la carte, retiree ici */
body.rfb.rfb-p3 .carte-compte .mdp-force[hidden] { display: block !important; visibility: hidden; }
/* Bouton Afficher du mot de passe */
body.rfb.rfb-p3 .carte-compte .mdp-voir { background: rgba(143, 187, 255, .14); color: var(--ciel); }
body.rfb.rfb-p3 .carte-compte .mdp-voir:hover, body.rfb.rfb-p3 .carte-compte .mdp-voir[aria-pressed="true"] { background: rgba(143, 187, 255, .28); }

/* Boutons : pilule blanche de la direction B, reduite a la taille d'un formulaire ; contour clair pour le second */
body.rfb.rfb-p3 .carte-compte .btn-primary { background: var(--blanc); background-image: none; color: var(--nuit); border: 0; border-radius: 99px; font-weight: 620; box-shadow: 0 8px 30px rgba(47, 128, 255, .3); transition: transform 130ms cubic-bezier(.23, 1, .32, 1); }
body.rfb.rfb-p3 .carte-compte .btn-primary:hover { background: #FFFFFF; background-image: none; color: var(--nuit); }
body.rfb.rfb-p3 .carte-compte .btn-primary:active { transform: scale(.97); }
body.rfb.rfb-p3 .carte-compte .btn-primary:disabled { background: #2A3752; color: #C4CFE2; box-shadow: none; opacity: 1; }
body.rfb.rfb-p3 .carte-compte a.btn-primary { color: var(--nuit); }
body.rfb.rfb-p3 .carte-compte .btn-outline { background: transparent; color: var(--blanc); border: 1px solid rgba(143, 187, 255, .55); border-radius: 99px; }
body.rfb.rfb-p3 .carte-compte .btn-outline:hover { background: rgba(143, 187, 255, .14); color: var(--blanc); }

/* Messages : memes textes, fonds sombres teintes, jamais la couleur seule (le texte dit quoi faire) */
body.rfb.rfb-p3 .carte-compte .alert { border-radius: 12px; }
body.rfb.rfb-p3 .carte-compte .alert-error { background: var(--erreur-fond); color: var(--erreur-b); border-color: rgba(255, 154, 154, .5); }
body.rfb.rfb-p3 .carte-compte .alert-success { background: var(--succes-fond); color: var(--succes-b); border-color: rgba(43, 217, 160, .45); }
body.rfb.rfb-p3 .carte-compte .alert-info { background: var(--info-fond); color: var(--info-b); border-color: rgba(143, 187, 255, .4); }

/* « Ce qui vous attend » : simple section sous le formulaire, pas de carte dans la carte */
body.rfb.rfb-p3 .carte-compte .compte-etapes { background: transparent; border: 0; border-top: 1px solid var(--trait); border-radius: 0; padding: var(--e5) 0 0; }
body.rfb.rfb-p3 .carte-compte .compte-etapes h2 { color: var(--blanc); font-weight: 620; }
body.rfb.rfb-p3 .compte-pied, body.rfb.rfb-p3 .compte-pied .partenaire { color: var(--doux); }
body.rfb.rfb-p3 .compte-pied { border-top: 1px solid var(--trait); }

/* Turnstile : widget d'origine (theme clair) ; sa place est reservee pour ne rien decaler a son arrivee */
body.rfb.rfb-p3 .cf-turnstile { min-height: 65px; }

/* Double authentification, telephone : encadres de la feuille de la page */
body.rfb.rfb-p3 .secu-conseil { background: var(--info-fond); color: var(--info-b); border-color: rgba(143, 187, 255, .4); }

/* Bandeau des cookies : contenu et place d'origine, couleurs B */
body.rfb.rfb-p3 .rfc { --rfc-fond: var(--nuit-2); --rfc-texte: var(--blanc); --rfc-bleu: var(--ciel); --rfc-bord: var(--trait); border-top: 1px solid rgba(143, 187, 255, .35); }
body.rfb.rfb-p3 .rfc-btn { background: var(--blanc); color: var(--nuit); border-color: var(--blanc); border-radius: 99px; }
body.rfb.rfb-p3 .rfc-btn.rfc-btn-trois { background: transparent; color: var(--blanc); border-color: rgba(143, 187, 255, .55); }
body.rfb.rfb-p3 .rfc a { color: var(--ciel); }
body.rfb.rfb-p3 .rfc-case { color: var(--blanc); }

/* Telephone : en-tete en deux lignes, le formulaire remonte. /connexion tient sur un ecran (C404-405) : sous 740 px de haut, ses regles compactes (login.js) s'appliquent, seule la couleur change */
@media (max-width: 899px) {
  body.rfb.rfb-p3 { background-image: radial-gradient(520px 320px at 50% -60px, rgba(47, 128, 255, .24), transparent 70%); }
  body.rfb.rfb-p3 .compte-panneau { border-right: 0; border-bottom: 1px solid var(--trait); }
  body.rfb.rfb-p3 .cote { margin: 0; gap: 2px 8px; }
  body.rfb.rfb-p3 .cote li { font-size: 14px; line-height: 1.3; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-accroche { font-weight: 500; letter-spacing: 0; color: var(--doux); text-wrap: wrap; }
  body.rfb.rfb-p3.compte-connexion .compte-accroche { font-weight: 640; color: var(--blanc); }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-panneau { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 2px; padding: calc(6px + env(safe-area-inset-top)) 16px 6px; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-panneau-corps { display: contents; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-panneau .marque { grid-column: 1; grid-row: 1; align-self: center; min-height: 44px; display: flex; align-items: center; }
  body.rfb.rfb-p3 .compte-panneau .marque-logo { height: 26px; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-accroche { grid-column: 2; grid-row: 1; font-size: 14px; line-height: 1.2; }
  body.rfb.rfb-p3:not(.compte-connexion) .cote { grid-column: 1 / -1; grid-row: 2; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-volet { padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); align-items: flex-start; }
  body.rfb.rfb-p3:not(.compte-connexion) .carte-compte { padding: 16px !important; border-radius: 16px; } /* !important : l'en-tete compact des petits ecrans (bandeau ouvert) ne change plus la marge, donc rien ne bouge a l'arrivee du bandeau */
  body.rfb.rfb-p3:not(.compte-connexion) .carte-compte h1 { font-size: 26px; margin-bottom: 4px; }
  body.rfb.rfb-p3:not(.compte-connexion) .carte-compte .sous-titre { margin-bottom: 14px; }
}
/* Petit ecran : la frise (masquee d'origine des que le bandeau apparait, sur ces hauteurs) reste masquee des le depart, l'en-tete garde sa taille, le formulaire ne bouge pas a l'arrivee du bandeau */
@media (max-width: 899px) and (max-height: 680px) {
  body.rfb.rfb-p3:not(.compte-connexion) .cote { display: none; }
  body.rfb.rfb-p3:not(.compte-connexion) .compte-panneau { padding: calc(4px + env(safe-area-inset-top)) 16px 4px !important; }
}
@media (prefers-reduced-motion: reduce) { body.rfb.rfb-p3 .carte-compte .btn-primary { transition: none; } }

/* Lot COMPTE-MISE-EN-PAGE (09/11/2026, C473, C474) : la page tient dans l'ecran, carte centree ; mise en forme seulement, rien d'autre ne change.
 * Hauteur : 100dvh, hauteur visible reelle (Safari : 100vh depasse de la barre d'adresse, d'ou le defilement pour rien) ; 100vh reste pour les navigateurs sans dvh. Ce n'est qu'un minimum : si le contenu depasse, la page defile normalement et la carte reste en haut, sans vide apres elle.
 * Bandeau des cookies ouvert : le padding bas de <html> pose par le script du bandeau (lot BANDEAU-COOKIES-BAS) n'est ni remis a zero, ni compte dans cette hauteur : la carte ne bouge pas a la fermeture du bandeau. */
html:has(> body.rfb-p3) { overscroll-behavior-y: none; } /* pas de rebond sur une page qui ne defile pas */
body.rfb.rfb-p3, body.rfb.rfb-p3 .main { min-height: 0; } /* obtp-ui.css : min-height 100vh sur body et .main, la cause du defilement pour rien sur iPhone */

/* Reprise 1 (B1) : carte centree mais immobile quand le HTML arrive en plusieurs fois. Centree, une carte encore incomplete serait dessinee au milieu, puis remonterait en grandissant (decalage, CLS).
 * Le volet (et la carte qu'il contient) reste donc invisible tant que le document n'a pas depasse <main> : la colonne vide compte elle-meme dans le CLS. .toasts, emis par coquillePublic juste apres </main>, prouve que la carte est complete. Pas de place reservee, rien ne bouge : elle apparait une seule fois, a sa place definitive.
 * Sans :has() (navigateur ancien), la regle est ignoree : carte visible, comme avant. Aucune animation (C462) : la carte attend la fin du document, sans minuterie. */
body.rfb.rfb-p3:not(:has(> .toasts)) .compte-volet { visibility: hidden; }

/* Ordinateur : deux colonnes bornees au centre de la page, sur la meme ligne mediane */
@media (min-width: 900px) {
  body.rfb.rfb-p3 .compte-scene { --rfb-marge: clamp(12px, 2.5vh, 40px); box-sizing: border-box; min-height: 100vh; min-height: 100dvh; grid-template-columns: minmax(0, 480px) minmax(min(100%, 420px), 460px); justify-content: center; align-content: center; align-items: center; column-gap: clamp(40px, 7vw, 120px); padding: var(--rfb-marge) clamp(24px, 4vw, 48px); }
  /* Colonne de gauche : hauteur d'ecran, contenu centre : meme ligne mediane que la carte quand tout tient ; page longue (/inscription), elle reste au milieu de l'ecran pendant le defilement (INSCRIPTION-STICKY) */
  body.rfb.rfb-p3 .compte-panneau { position: sticky; top: var(--rfb-marge); align-self: start; height: calc(100vh - 2 * var(--rfb-marge)); height: calc(100dvh - 2 * var(--rfb-marge)); max-height: none; overflow-y: auto; justify-content: center; gap: clamp(20px, 4vh, 36px); padding: 4px; border-right: 0; }
  body.rfb.rfb-p3 .compte-panneau-corps { margin-top: 0; }
  body.rfb.rfb-p3 .compte-volet { padding: 0; }
}
/* Ordinateur peu haut (portable, barres du navigateur) : la carte de connexion se resserre pour tenir sans defilement */
@media (min-width: 900px) and (max-height: 760px) {
  body.rfb.rfb-p3.compte-connexion .carte-compte { padding-block: 20px; }
  body.rfb.rfb-p3.compte-connexion .carte-compte .sous-titre { margin-bottom: 12px; }
  body.rfb.rfb-p3.compte-connexion .compte-pied { margin-top: 12px; padding-top: 10px; }
}
/* Sauf le paysage tactile bas de la creation de compte (INSCRIPTION-FIXE : colonnes a hauteur d'ecran, carte defilante) */
@media screen and (min-width: 900px) and (max-height: 500px) and (min-height: 300px) and (pointer: coarse) {
  body.rfb.rfb-p3.compte-inscription-fixe .compte-scene { min-height: 0; padding-block: 0; align-content: stretch; align-items: stretch; }
  body.rfb.rfb-p3.compte-inscription-fixe .compte-panneau { position: static; align-self: stretch; height: 100%; max-height: 100%; justify-content: flex-start; }
  body.rfb.rfb-p3.compte-inscription-fixe .compte-volet { padding-block: var(--e4); }
}

/* Telephone et tablette : en-tete en haut, carte centree dans l'espace restant, marges egales */
@media (max-width: 899px) {
  body.rfb.rfb-p3:not(.compte-inscription-fixe) .compte-scene { display: flex; flex-direction: column; align-content: normal; min-height: 100vh; min-height: 100dvh; }
  body.rfb.rfb-p3:not(.compte-inscription-fixe) .compte-panneau { flex: none; }
  body.rfb.rfb-p3:not(.compte-inscription-fixe) .compte-volet { flex: 1 0 auto; align-items: center; justify-content: center; padding-block: 8px calc(8px + env(safe-area-inset-bottom)); }
  /* Parcours fixe (INSCRIPTION-FIXE) : la carte reste centree par ses marges automatiques ; seul le volet defile si elle depasse ; memes marges en haut et en bas */
  body.rfb.rfb-p3.compte-inscription-fixe .compte-volet { padding-block: 8px calc(8px + env(safe-area-inset-bottom)); }
}
/* Petit ecran : marges reduites, la carte de 620 a 640 px de haut tient sans defilement */
@media (max-width: 899px) and (max-height: 680px) {
  body.rfb.rfb-p3:not(.compte-inscription-fixe) .compte-volet { padding-block: 4px calc(4px + env(safe-area-inset-bottom)); }
}

/* Lot L-COMPTE-2 (10/11/2026, C460-C462, C466, C470, C479) : gabarit G05, pages de compte hors parcours d'entree (page 500, nouvelle adresse, invitations, desinscription, annulation de suppression, retours banque, plateforme et abonnement, parrainage, suppression du compte, compte cree, mes cookies), mise en forme seulement.
 * Tout est sous body.rfb-g05 (posee par pageCompte, code G05 dans REFONTE_B_GABARITS, voir refonte-b-compte.js) : aucune regle du parcours d'entree n'est touchee. Rythme du texte des pages sans formulaire, listes, boutons a pleine largeur comme le bouton principal. Ni pastille ni badge (C462), aucune animation. */
body.rfb.rfb-g05 .carte-compte h2 { color: var(--blanc); font-size: 19px; font-weight: 620; line-height: 1.25; letter-spacing: -.015em; text-wrap: balance; margin: 28px 0 10px; }
body.rfb.rfb-g05 .carte-compte > p:not(.sous-titre):not(.compte-pied) { margin: 0 0 12px; }
body.rfb.rfb-g05 .carte-compte :is(ol, ul) { margin: 0 0 14px; padding-left: 22px; }
body.rfb.rfb-g05 .carte-compte li { margin: 0 0 8px; }
body.rfb.rfb-g05 .carte-compte li > :is(ol, ul) { margin: 8px 0 0; }
body.rfb.rfb-g05 .carte-compte li::marker { color: var(--doux); }
body.rfb.rfb-g05 .carte-compte :is(.btn-primary, .btn-outline) { box-sizing: border-box; width: 100%; white-space: normal; text-align: center; } /* libelle long (Revenir à la page Banque connectée) : il revient a la ligne dans la pilule a 320 px au lieu d'en sortir */
body.rfb.rfb-g05 .carte-compte .btn-outline { justify-content: center; }
/* (fin du bloc Lot L-COMPTE-2) */
