/* Lot REFONTE-B-L-OUTILS (10/11/2026, C460-C462, C466) : simulateurs et outils de calcul (G09) en direction B. Mise en forme seulement : texte, champs, calculs et scripts inchanges. Toutes les regles sous body.rfb-g09. Aucune couleur nouvelle : jetons de rf-refonte-b.css et jetons d'etat du site (--erreur-fond, --succes-fond, --alerte-fond), inchanges.
 * Les scripts /static/outils-*.js posent leurs styles en <style id="outils-styles"> (.outil*, .jauge*) : les regles ci-dessous les recouvrent par leur specificite, sans toucher aux scripts. Aucune pastille, aucun badge (C462). */

/* ---- Colonne de la page ---- */
body.rfb-g09 :is(.fil, .hero, .corps) { max-width: 860px; }
body.rfb-g09 .hero h1 { max-width: none; font-size: clamp(30px, 7.8vw, 46px); line-height: 1.1; letter-spacing: -.03em; }
body.rfb-g09 .hero > p { max-width: 700px; font-size: 18px; line-height: 1.6; color: var(--doux); }
body.rfb-g09 .hero > p:has(> em:only-child) { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
body.rfb-g09 em { font-style: normal; }
body.rfb-g09 .hero .encadre { max-width: none; }
body.rfb-g09 .encadre { margin: 22px 0 0; padding: 18px 22px; background: var(--nuit-2); border: 1px solid var(--trait); border-radius: 16px; }
body.rfb-g09 .encadre p { margin: 0; line-height: 1.6; }
body.rfb-g09 .encadre strong { color: var(--blanc); font-weight: 600; }
body.rfb-g09 .encadre p + ul { margin-top: 10px; }
body.rfb-g09 .encadre ul { margin: 0; padding-left: 20px; }
body.rfb-g09 .encadre li { margin: 0 0 8px; line-height: 1.55; }
body.rfb-g09 .encadre li:last-child { margin-bottom: 0; }

body.rfb-g09 .corps { line-height: 1.65; }
body.rfb-g09 .corps > :is(p, ul, ol, dl, .faq) { max-width: 700px; }
body.rfb-g09 .corps h2 { margin-top: 60px; margin-bottom: 14px; font-size: clamp(26px, 5.6vw, 32px); line-height: 1.18; letter-spacing: -.022em; scroll-margin-top: 88px; }
body.rfb-g09 .corps > h2#calculateur { margin-top: 32px; }
body.rfb-g09 .corps h3 { margin-top: 28px; margin-bottom: 8px; font-size: 19px; }
body.rfb-g09 .corps > :is(ul, ol) { margin-bottom: 20px; padding-left: 24px; }
body.rfb-g09 .corps > :is(ul, ol) > li { margin-bottom: 10px; }
body.rfb-g09 .corps ol > li::marker { color: var(--ciel); font-variant-numeric: tabular-nums; }
body.rfb-g09 .corps strong { font-weight: 600; }
body.rfb-g09 .corps a:not(.btn) { text-decoration-thickness: 1px; }
/* Lot FINITIONS-2 (C486, G2) : survol sous (hover: hover), ici pour les liens du corps */
@media (hover: hover) and (pointer: fine) { body.rfb-g09 .corps a:not(.btn):hover { color: var(--blanc); } }
body.rfb-g09 .corps a.plus { font-weight: 600; }
body.rfb-g09 .faq { padding: 14px 0 16px; }
body.rfb-g09 .faq-q { margin: 0 0 6px; }
body.rfb-g09 .faq-r { margin: 0; }

/* ---- Tableaux : le cadre defile sur telephone, la page jamais ---- */
body.rfb-g09 .tableau {
  margin: 18px 0 22px;
  background:
    linear-gradient(90deg, var(--nuit-2) 45%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(270deg, var(--nuit-2) 45%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(90deg, var(--trait), transparent) left / 12px 100% no-repeat scroll,
    linear-gradient(270deg, var(--trait), transparent) right / 12px 100% no-repeat scroll,
    var(--nuit-2);
}
body.rfb-g09 .tableau table { font-variant-numeric: tabular-nums; line-height: 1.5; }
body.rfb-g09 .tableau th, body.rfb-g09 .tableau td { padding: 12px 16px; }
body.rfb-g09 .tableau thead th { font-weight: 600; font-size: 15px; }
body.rfb-g09 .tableau td { white-space: normal; }

/* ---- Le formulaire ---- */
body.rfb-g09 form.outil { color-scheme: dark; max-width: none; margin: 20px 0 16px; padding: 24px; background: var(--nuit-2); border: 1px solid var(--trait); border-radius: 16px; font-size: 16px; line-height: 1.45; color: var(--blanc); }
body.rfb-g09 .outil-champ { margin: 0 0 18px; }
body.rfb-g09 .outil-champ label { margin: 0 0 6px; font-weight: 600; color: var(--blanc); }
body.rfb-g09 p.outil-aide { margin: 0 0 8px; font-size: 15px; line-height: 1.45; color: var(--doux); }
body.rfb-g09 .outil-aide a { color: var(--ciel); }

body.rfb-g09 .outil :is(input[type=text], input[type=date], select) {
  max-width: 360px; min-height: 48px; padding: 8px 14px; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--blanc); background: var(--nuit);
  border: 1px solid var(--doux); border-color: color-mix(in srgb, var(--doux) 66%, var(--nuit)); border-radius: 10px;
}
body.rfb-g09 .outil .outil-ligne :is(input[type=text], input[type=date], select) { max-width: none; }
body.rfb-g09 .outil input::placeholder { color: var(--doux); opacity: 1; }
body.rfb-g09 .outil :is(input[type=text], input[type=date], select):focus { outline: 2px solid var(--ciel); outline-offset: 1px; border-color: var(--ciel); border-radius: 10px; }
body.rfb-g09 .outil :is(input[type=text], input[type=date]):is(:-webkit-autofill, :autofill) { -webkit-text-fill-color: var(--blanc); box-shadow: 0 0 0 1000px var(--nuit) inset; caret-color: var(--blanc); }
@media (hover: hover) and (pointer: fine) {
  body.rfb-g09 .outil :is(input[type=text], input[type=date], select):hover:not(:focus) { border-color: var(--doux); }
}

/* Groupes : un filet au-dessus, pas de boite dans la boite */
body.rfb-g09 .outil-groupe { margin: 0 0 22px; padding: 16px 0 0; border: 0; border-top: 1px solid var(--trait); border-radius: 0; min-width: 0; }
body.rfb-g09 .outil-groupe > legend { float: left; width: 100%; margin: 0 0 12px; padding: 0; font-weight: 620; font-size: 18px; line-height: 1.3; letter-spacing: -.01em; color: var(--blanc); }
body.rfb-g09 .outil-groupe > legend + * { clear: both; }
body.rfb-g09 .outil-groupe .outil-groupe { padding-top: 0; border-top: 0; }
body.rfb-g09 .outil-groupe .outil-groupe > legend { font-size: 16px; font-weight: 600; letter-spacing: 0; }
body.rfb-g09 .outil > .outil-groupe:first-child { padding-top: 0; border-top: 0; }
body.rfb-g09 .outil-ligne { gap: 0 20px; }

body.rfb-g09 .outil :is(.outil-choix, .outil-case) label { align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; font-weight: 400; color: var(--blanc); }
body.rfb-g09 .outil :is(input[type=radio], input[type=checkbox]) { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ciel); }
body.rfb-g09 .outil :is(input[type=radio], input[type=checkbox]):focus-visible { outline: 2px solid var(--ciel); outline-offset: 2px; }
body.rfb-g09 .outil-choix p.outil-aide { margin: -6px 0 8px 34px; }

body.rfb-g09 .outil-reglages { margin: 0 0 20px; padding: 0 16px; border: 1px solid var(--trait); border-radius: 12px; }
body.rfb-g09 .outil-reglages summary { min-height: 48px; font-weight: 600; color: var(--blanc); }
body.rfb-g09 .outil-reglages summary:focus-visible { border-radius: 6px; }
body.rfb-g09 .outil-itineraire { margin: 0 0 8px; }

/* Boutons : un seul plein par formulaire ; meme forme que les pages deja en B */
body.rfb-g09 :is(.outil, .outil-resultat) .btn { min-height: 48px; margin: 6px 12px 6px 0; padding: 0 22px; font-size: 16px; font-weight: 600; border-radius: 99px; background-image: none; transition: transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 150ms ease, border-color 150ms ease; }
body.rfb-g09 .outil .btn-primaire { min-height: 52px; padding: 0 28px; box-shadow: none; background: var(--blanc); color: var(--nuit) !important; border: 1px solid var(--blanc); font-weight: 620; }
body.rfb-g09 :is(.outil, .outil-resultat) .btn-contour { background: transparent; color: var(--blanc) !important; border: 1px solid var(--doux); border-color: color-mix(in srgb, var(--doux) 66%, var(--nuit)); }
/* Lot FINITIONS-2 (C486, G2) : survols des boutons sous (hover: hover), plus de bouton colle apres un appui au telephone */
@media (hover: hover) and (pointer: fine) {
  body.rfb-g09 .outil .btn-primaire:hover { background: var(--ciel); border-color: var(--ciel); }
  body.rfb-g09 :is(.outil, .outil-resultat) .btn-contour:hover { background: var(--nuit-3); border-color: var(--doux); }
}
body.rfb-g09 :is(.outil, .outil-resultat) .btn:active { transform: scale(.97); }
/* Lot FINITIONS-2 (C486, G4) : bouton desactive distinct du bouton actif, sans baisser le contraste du texte (fond retire, texte secondaire, bord en pointilles) ; apres les regles de survol et d'appui */
body.rfb-g09 :is(.outil, .outil-resultat) .btn:disabled { background: transparent; color: var(--doux) !important; border: 1px dashed var(--trait); box-shadow: none; opacity: 1; cursor: not-allowed; transform: none; }
body.rfb-g09 .outil-statut { color: var(--doux); }
body.rfb-g09 .outil-statut:empty { margin: 0; }

/* ---- Le resultat ---- */
body.rfb-g09 .outil-resultat { max-width: none; font-size: 16px; line-height: 1.55; font-variant-numeric: tabular-nums; scroll-margin-top: 88px; }
body.rfb-g09 .outil-resultat:not(:empty) { margin: 0 0 32px; padding: 22px 24px; background: var(--nuit-3); border: 1px solid var(--ciel); border-color: color-mix(in srgb, var(--ciel) 45%, var(--nuit-3)); border-radius: 16px; }
body.rfb-g09 .outil-resultat:focus { outline: 2px solid var(--ciel); outline-offset: 3px; }
body.rfb-g09 .outil-resultat :is(p, li, dd) { color: var(--blanc); }
body.rfb-g09 .outil-resultat p > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }
body.rfb-g09 .outil-resultat strong { font-weight: 640; }
body.rfb-g09 .outil-resultat h3 { margin: 22px 0 8px; font-size: 18px; color: var(--blanc); }
body.rfb-g09 .outil-resultat ul { padding-left: 22px; }
body.rfb-g09 p.outil-titre-resultat { margin: 0 0 10px; font-size: 20px; font-weight: 640; line-height: 1.3; letter-spacing: -.012em; color: var(--blanc); }
body.rfb-g09 p.outil-conseil { margin: 16px 0 0; font-size: 18px; font-weight: 640; line-height: 1.4; color: var(--blanc); }
body.rfb-g09 .outil-resultat p.outil-mention { font-style: normal; font-size: 15px; line-height: 1.5; color: var(--doux); }
body.rfb-g09 .outil-resultat p.outil-statut { font-size: 15px; color: var(--doux); }
body.rfb-g09 .outil-resultat .tableau {
  background:
    linear-gradient(90deg, var(--nuit-2) 45%, transparent) left / 36px 100% no-repeat local,
    linear-gradient(270deg, var(--nuit-2) 45%, transparent) right / 36px 100% no-repeat local,
    linear-gradient(90deg, var(--trait), transparent) left / 12px 100% no-repeat scroll,
    linear-gradient(270deg, var(--trait), transparent) right / 12px 100% no-repeat scroll,
    var(--nuit-2);
}
body.rfb-g09 .outil-resultat .tableau td { white-space: nowrap; color: var(--blanc); }
body.rfb-g09 .outil-total :is(th, td) { font-weight: 640; color: var(--blanc); }
body.rfb-g09 .outil-actions { margin-top: 18px; gap: 8px 12px; }
body.rfb-g09 .outil-actions .btn { margin: 0; }

/* Erreur : le titre, la liste et le cadre changent ; jamais la couleur seule (le titre dit l'erreur) */
body.rfb-g09 .outil-resultat:has(> ul.outil-erreurs) { background: var(--nuit-2); border: 2px solid var(--erreur-fond); }
body.rfb-g09 .outil-erreurs, body.rfb-g09 .outil-resultat .outil-erreurs li, body.rfb-g09 .outil-resultat p.outil-erreurs { color: var(--erreur-fond); font-weight: 500; }
body.rfb-g09 ul.outil-erreurs { padding-left: 22px; }
body.rfb-g09 .outil-erreurs li { margin: 0 0 6px; }

/* Jauge du cout de deplacement : verdict en toutes lettres, sans pastille */
body.rfb-g09 .jauge-barre { border-color: color-mix(in srgb, var(--doux) 66%, var(--nuit)); }
body.rfb-g09 .jauge-repere { background: var(--nuit); box-shadow: 0 0 0 1px var(--blanc); }
body.rfb-g09 .outil-resultat p.jauge-verdict { display: block; margin: 12px 0 0; padding: 0; border-radius: 0; background: none; font-weight: 640; font-size: 18px; }
body.rfb-g09 .outil-resultat p.jauge-rentable { color: var(--succes-fond); }
body.rfb-g09 .outil-resultat p.jauge-surveiller { color: var(--alerte-fond); }
body.rfb-g09 .outil-resultat p.jauge-coute { color: var(--erreur-fond); }

/* ---- Appel de fin de page ---- */
body.rfb-g09 .corps > .ctas { flex-direction: column; align-items: flex-start; gap: 14px; max-width: none; margin: 44px 0 0; padding: 24px; background: var(--nuit-2); border: 1px solid var(--trait); border-radius: 16px; }
body.rfb-g09 .corps > .ctas .btn { min-height: 56px; height: auto; padding: 12px 26px; box-shadow: none; background: var(--blanc); background-image: none; color: var(--nuit) !important; border: 0; border-radius: 99px; font-size: 18px; font-weight: 620; line-height: 1.25; text-align: center; transition: transform 140ms cubic-bezier(.23, 1, .32, 1), background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { body.rfb-g09 .corps > .ctas .btn:hover { background: var(--ciel); color: var(--nuit) !important; } } /* Lot FINITIONS-2 (C486, G2) */
body.rfb-g09 .corps > .ctas .btn:active { transform: scale(.97); }
body.rfb-g09 .corps > .ctas .cta-note { font-size: 15px; line-height: 1.5; }

/* ---- Decalage au chargement : avant que le script pose le formulaire, la suite de la page reste sous l'ecran (seulement avec JavaScript ; rien n'est masque). CLS 0 ---- */
/* Lot FINITIONS-2 (C486, G3) : reserve portee par une animation a valeur constante de 6 s (avant : margin-top: 100vh permanent) : si le script ne pose jamais le formulaire, la marge reprend sa valeur normale au bout de 6 s, au lieu de laisser un ecran vide ; des que le formulaire arrive, la regle ne s'applique plus */
@media (scripting: enabled) {
  body.rfb-g09 .corps:not(:has(form.outil)) > h2#calculateur ~ h2:not(h2#calculateur ~ h2 ~ h2) { animation: rfb-g09-reserve 6s linear !important; } /* Lot RESERVES-G (14/11/2026, P8, G1 de FINITIONS-2) : !important, pour que le mouvement reduit (obtp-public.css, « animation: none !important ») ne retire pas la reserve ; valeur constante, rien ne bouge a l'oeil. Avant : sans !important */
  @keyframes rfb-g09-reserve { from, to { margin-top: 100vh; } }
}

/* ---- Telephone ---- */
@media (max-width: 600px) {
  body.rfb-g09 .hero > p { font-size: 17px; }
  body.rfb-g09 form.outil { padding: 18px 16px; }
  body.rfb-g09 .outil-resultat:not(:empty) { padding: 18px 16px; }
  body.rfb-g09 .encadre { padding: 16px 18px; }
  body.rfb-g09 .corps > .ctas { padding: 18px 16px; }
  body.rfb-g09 .corps > .ctas .btn { width: 100%; }
  body.rfb-g09 .outil :is(input[type=text], input[type=date], select) { max-width: none; }
  body.rfb-g09 .outil .btn-primaire { width: 100%; margin-right: 0; }
  body.rfb-g09 .outil-actions .btn { flex: 1 1 140px; }
  body.rfb-g09 .tableau th, body.rfb-g09 .tableau td { padding: 10px 12px; font-size: 15px; }
  body.rfb-g09 .corps h2 { margin-top: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  body.rfb-g09 :is(.outil, .outil-resultat, .ctas) .btn { transition: none; }
  body.rfb-g09 :is(.outil, .outil-resultat, .ctas) .btn:active { transform: none; }
}

/* ---- Impression (bouton « Imprimer » des outils) : encre sur papier, jamais du blanc sur blanc ---- */
@media print {
  body.rfb-g09 { color-scheme: light; color: CanvasText; background: Canvas; }
  body.rfb-g09 :is(main, main *) { color: CanvasText !important; background: none !important; box-shadow: none !important; }
  body.rfb-g09 .outil-resultat:not(:empty) { margin: 0 0 16pt; padding: 0; border: 0; border-radius: 0; }
  body.rfb-g09 .tableau { border: 1px solid CanvasText; overflow: visible; }
  body.rfb-g09 .tableau :is(th, td) { border-bottom: 1px solid CanvasText; }
  body.rfb-g09 .corps > .ctas { display: none; }
  body.rfb-g09 .jauge-barre { border-color: CanvasText; }
  body.rfb-g09 .outil-resultat .tableau :is(th, td) { white-space: normal; padding-left: 8px; padding-right: 8px; } /* Lot FINITIONS-2 (C486, G1) : le tableau tient dans la feuille A4 (avant : nowrap et marges de l'ecran) */
  body.rfb-g09 .outil-resultat:focus { outline: none; }
}
