/* ==========================================================================
   FEUILLE DE BASE — variables, typographie, mise en page, composants.
   Thème CLAIR et sobre (décision de Guillaume, 26/11/2026) : fond presque blanc, texte presque noir, traits fins,
   aucune ombre décorative, aucun dégradé, aucune animation de décor.
   Les couleurs ont un seul rôle chacune :
     - l'ENCRE (--accent) : l'action principale (boutons), les liens, le repère de la page en cours ;
     - le VERT (--gain) : l'argent gagné (une marge positive), et rien d'autre ;
     - le ROUGE (--perte) : une erreur de formulaire ou une alerte, et rien d'autre ;
     - le BLEU (--info) : une information neutre.
   Une marge nulle ou négative s'écrit en gris neutre, jamais en rouge.
   Le menu est LATÉRAL : un tiroir qui sort de la gauche au téléphone et à la tablette (moins de 64 rem),
   une colonne fixe à gauche sur grand écran. Il marche sans JavaScript (une case à cocher cachée, voir MiseEnPage.tsx).
   Mobile d'abord : tout est pensé pour 390 px, puis s'élargit.
   Aucune couleur en dur dans les feuilles des zones (public, compte, admin, consentement) : utilisez les variables.
   Seule exception : l'encre et le papier de l'impression (consentement.css, section 5).
   ========================================================================== */

/* --- Polices auto-hébergées (copiées depuis @fontsource par `npm run polices`) --- */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url('/polices/bricolage-grotesque-latin-ext-standard-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url('/polices/bricolage-grotesque-latin-standard-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/polices/hanken-grotesk-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/polices/hanken-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: italic; font-display: swap; font-weight: 100 900;
  src: url('/polices/hanken-grotesk-latin-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* --- Variables --- */
:root {
  /* couleurs (contrastes mesurés le 27/11/2026 : texte 16,98:1 sur le fond ; texte doux 5,86:1 au pire ; bord fort 3,40:1 au pire ; vert 4,79:1 au pire ; rouge 5,85:1 au pire) */
  --fond: #fafaf8;            /* le fond de la page */
  --surface: #ffffff;         /* cartes, champs, menu */
  --surface-haute: #f1f3ef;   /* survols, bandeau, encarts */
  --bord: #e2e5df;            /* trait fin */
  --bord-fort: #7d857f;       /* bord des champs et des boutons secondaires : 3:1 au moins sur le fond, les cartes et les encarts */
  --texte: #151917;           /* presque noir */
  --texte-doux: #55605a;      /* texte secondaire : 4,5:1 au moins sur le fond, les cartes et les encarts */
  --accent: #151917;          /* L'ENCRE : action principale, liens, repère de la page en cours */
  --accent-vif: #2c332f;      /* survol de l'encre */
  --encre: #ffffff;           /* texte posé sur l'encre */
  --gain: #0a7a41;            /* vert : l'argent gagné (une marge positive) SEULEMENT */
  --gain-fond: #e7f4ec;       /* fond doux du vert */
  --perte: #b3261e;           /* rouge : erreur de formulaire ou alerte SEULEMENT */
  --info: #1d5c9c;            /* bleu : information neutre */
  /* formes : modestes */
  --rayon: 12px;
  --rayon-moyen: 10px;
  --rayon-petit: 8px;
  --trait: 1px solid var(--bord);
  /* typographie */
  --police-titre: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --police-texte: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-petit: 0.875rem;
  --t-texte: 1.0625rem;       /* 17 px : lisible au téléphone */
  --t-chapeau: 1.1875rem;
  --t-h3: 1.25rem;
  --t-h2: clamp(1.6rem, 1.2rem + 1.9vw, 2.25rem);
  --t-h1: clamp(2.05rem, 1.35rem + 3.4vw, 3.6rem);
  /* espaces */
  --e-1: 0.25rem; --e-2: 0.5rem; --e-3: 0.75rem; --e-4: 1rem; --e-5: 1.5rem; --e-6: 2rem; --e-7: 3rem; --e-8: 4.5rem;
  --marge-page: 1.125rem;
  --largeur: 70rem;
  --largeur-texte: 42rem;
  --hauteur-entete: 3.5rem;   /* la barre du haut (téléphone et tablette) ; elle n'existe plus sur grand écran */
  --largeur-menu: 15.5rem;    /* 248 px : la colonne du menu sur grand écran */
  --tactile: 2.75rem;         /* 44 px */
  color-scheme: light;
}
/* grand écran : plus de barre du haut, le menu est une colonne fixe à gauche */
@media (min-width: 64rem) { :root { --hauteur-entete: 0px; } }

/* --- Remise à zéro légère --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hauteur-entete) + 1rem); }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police-texte); font-size: var(--t-texte); line-height: 1.55;
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh; }
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--police-titre); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 var(--e-4); text-wrap: balance; font-stretch: 92%; }
h1 { font-size: var(--t-h1); font-weight: 760; letter-spacing: -0.028em; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.005em; }
h4 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: 0; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 var(--e-4); }
p, li { max-width: var(--largeur-texte); text-wrap: pretty; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: var(--e-2); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-vif); text-decoration-thickness: 2px; }
strong { font-weight: 650; }
small, .petit { font-size: var(--t-petit); }
hr { border: 0; border-top: var(--trait); margin: var(--e-6) 0; }
::selection { background: var(--accent); color: var(--encre); }

/* focus clavier toujours visible */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-seul { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lien-evitement { position: absolute; left: var(--e-3); top: -5rem; z-index: 100; background: var(--accent); color: var(--encre); padding: var(--e-3) var(--e-4); border-radius: var(--rayon-petit); font-weight: 650; }
.lien-evitement:focus { top: var(--e-3); color: var(--encre); }

/* chiffres : toujours tabulaires pour les prix */
.chiffre, .prix, .marge__montant, td.num, th.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
.doux { color: var(--texte-doux); }
.gain { color: var(--gain); }
.perte { color: var(--perte); }
.neutre { color: var(--texte-doux); }
.centre { text-align: center; }
.chapeau { font-size: var(--t-chapeau); color: var(--texte-doux); max-width: 38rem; }

/* --- Structure de page --- */
/* la colonne de la page : tout ce qui n'est pas le menu. Sur grand écran, le menu fixe occupe la gauche. */
.coque { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; min-width: 0; }
@media (min-width: 64rem) { .coque { margin-left: var(--largeur-menu); } }
.conteneur { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--marge-page); }
.conteneur--large { max-width: 88rem; }
.conteneur--etroit { max-width: 34rem; }
.principal { flex: 1; padding-block: var(--e-6) var(--e-8); }
.section { padding-block: var(--e-7); }
.section + .section { border-top: var(--trait); }
.pile > * + * { margin-top: var(--e-4); }
.pile--large > * + * { margin-top: var(--e-6); }
.rangee { display: flex; flex-wrap: wrap; gap: var(--e-3); align-items: center; }
.rangee--entre { justify-content: space-between; }
.grille { display: grid; gap: var(--e-4); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grille--2, .grille--3, .grille--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .grille--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grille--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.entete-page { margin-bottom: var(--e-6); }
.entete-page h1 { font-size: var(--t-h2); margin-bottom: var(--e-3); }
.entete-page--hero h1 { font-size: var(--t-h1); }
.entete-page__actions { margin-top: var(--e-4); }

/* --- Bandeau d'annonce : une ligne claire, un trait dessous --- */
.bandeau { background: var(--surface-haute); color: var(--texte); border-bottom: var(--trait); font-size: var(--t-petit); font-weight: 600; text-align: center; padding: var(--e-2) var(--marge-page); line-height: 1.35; }
.bandeau a { color: var(--texte); text-decoration: underline; }
.bandeau p { margin: 0 auto; max-width: none; }

/* --- (bloc 398, C2) La bannière du calendrier : bêta, pause de janvier, lancement ; au-dessus du bandeau, sobre, l'encre sur le vert doux --- */
.banniere-calendrier { background: var(--gain-fond); color: var(--texte); border-bottom: var(--trait); font-size: var(--t-petit); text-align: center; padding: var(--e-2) var(--marge-page); line-height: 1.4; }
.banniere-calendrier p { margin: 0 auto; max-width: var(--largeur-texte); }

/* --- (bloc 398, C1) Le prorata du mois d'ouverture, EN GROS --- */
.prorata-en-gros { background: var(--gain-fond); border-radius: var(--rayon-moyen); padding: var(--e-3) var(--e-4); margin: 0 0 var(--e-3); }
.prorata-en-gros__titre { font-family: var(--police-titre); font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700; line-height: 1.15; color: var(--gain); margin: 0 0 var(--e-2); }
.prorata-en-gros__calcul, .prorata-en-gros__suite { font-size: var(--t-petit); margin: 0 0 var(--e-1); }

/* --- (bloc 398, C3) Les trois prix de revente et le petit guide d'une fiche --- */
.trois-prix { background: var(--surface); border: var(--trait); border-radius: var(--rayon); padding: var(--e-3) var(--e-4); margin: var(--e-4) 0; }
.trois-prix__liste { margin: 0; }
.trois-prix__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: var(--e-2); padding: var(--e-2) 0; border-bottom: var(--trait); }
.trois-prix__ligne dt { font-weight: 600; }
.trois-prix__ligne dd { margin: 0; font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.trois-prix__ligne--conseille dd { color: var(--gain); }
.trois-prix__aide { font-weight: 400; color: var(--texte-doux); font-size: var(--t-petit); }
.trois-prix__gain { margin: var(--e-3) 0 var(--e-1); }
.trois-prix__perte { color: var(--perte); font-weight: 600; margin: 0 0 var(--e-2); }
.trois-prix__guide h3 { font-size: var(--t-texte); margin: var(--e-3) 0 var(--e-1); }
.trois-prix__guide ul { margin: 0; padding-left: 1.2em; font-size: var(--t-petit); }

/* --- La barre du haut : mince, téléphone et tablette seulement (moins de 64 rem) ---
   Un bouton « Menu » (44 px), le logo, UNE action à droite. Aucun lien de navigation ici. */
.entete { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: var(--trait); }
.entete__barre { display: flex; align-items: center; gap: var(--e-3); min-height: var(--hauteur-entete); }
.entete__actions { margin-left: auto; display: flex; align-items: center; gap: var(--e-2); }
.marque { display: inline-flex; align-items: center; gap: var(--e-2); color: var(--texte); text-decoration: none; font-family: var(--police-titre); font-weight: 760; font-size: 1.2rem; letter-spacing: -0.02em; min-height: var(--tactile); min-width: var(--tactile); }
.marque:hover { color: var(--texte); }
.marque__logo { height: 2rem; width: auto; display: none; }
.marque__symbole { height: 2.25rem; width: 2.25rem; }
.marque--pied .marque__logo { display: block; height: 2.25rem; }
@media (min-width: 26rem) { .entete .marque__logo { display: block; } .entete .marque__symbole { display: none; } }
@media (min-width: 64rem) { .entete { display: none; } }

/* --- Le bouton « Menu » et la case cachée qui le commande (aucun script nécessaire) --- */
.menu__case { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); opacity: 0; }
.menu__bouton { display: inline-flex; align-items: center; gap: var(--e-2); min-height: var(--tactile); min-width: var(--tactile); padding: 0 var(--e-3); background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); color: var(--texte); font-weight: 650; font-size: 0.9375rem; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.menu__bouton:hover { background: var(--surface-haute); }
body:has(.menu__case:checked) .menu__bouton { background: var(--surface-haute); }
body:has(.menu__case:focus-visible) .menu__bouton { outline: 3px solid var(--accent); outline-offset: 3px; }
.menu__icone { width: 1.125rem; height: 0.8rem; border-block: 2px solid currentColor; position: relative; flex: none; }
.menu__icone::after { content: ''; position: absolute; inset: calc(50% - 1px) 0 auto 0; border-top: 2px solid currentColor; }

/* --- LE MENU LATÉRAL --- */
.menulat { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(84vw, 20rem); display: flex; flex-direction: column; gap: var(--e-3); padding: var(--e-3) var(--e-3) calc(var(--e-5) + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-right: var(--trait); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-100%); visibility: hidden; transition: transform 0.18s ease, visibility 0s linear 0.18s; }
.menu__case:checked ~ .menulat { transform: none; visibility: visible; transition: transform 0.18s ease; box-shadow: 0 0 1.5rem color-mix(in srgb, var(--texte) 14%, transparent); }
.menu__voile { display: none; position: fixed; inset: 0; z-index: 75; background: color-mix(in srgb, var(--texte) 40%, transparent); cursor: pointer; }
.menu__case:checked ~ .menu__voile { display: block; }
body:has(.menu__case:checked) { overflow: hidden; }

.menulat__tete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); min-height: var(--tactile); }
.menulat__tete .marque__logo { display: block; }
.menulat__tete .marque__symbole { display: none; }
.menulat__fermer { display: inline-flex; align-items: center; justify-content: center; width: var(--tactile); height: var(--tactile); flex: none; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); background: var(--surface); color: var(--texte); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.menulat__fermer:hover { background: var(--surface-haute); }
.menulat__fermer svg { width: 1.25rem; height: 1.25rem; }
.menulat ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menulat li { margin: 0; max-width: none; }
.menulat__titre { margin: var(--e-2) var(--e-3) 0; font-size: var(--t-petit); font-weight: 650; color: var(--texte-doux); max-width: none; }
.menulat li > a, .menulat__lien { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); min-height: var(--tactile); padding: var(--e-2) var(--e-3); border-radius: var(--rayon-petit); border: 0; background: none; color: var(--texte-doux); font: inherit; font-size: 1rem; font-weight: 560; line-height: 1.25; text-decoration: none; text-align: left; width: 100%; cursor: pointer; }
.menulat li > a:hover, .menulat__lien:hover { background: var(--surface-haute); color: var(--texte); text-decoration: none; }
/* la page en cours : fond d'encart, gras, et un trait d'encre à gauche (jamais la couleur seule) */
.menulat li > a[aria-current='page'] { background: var(--surface-haute); color: var(--texte); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.menulat li > a:focus-visible, .menulat__lien:focus-visible { outline-offset: -3px; }
.menulat__trait { border: 0; border-top: var(--trait); margin: var(--e-1) var(--e-3); }
.menulat form { margin: 0; }
.menulat__nombre { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem; border-radius: 999px; background: var(--accent); color: var(--encre); font-size: 0.8125rem; font-weight: 750; font-variant-numeric: tabular-nums; }
/* en bas du menu (grand écran seulement) : l'action du moment pour un visiteur */
.menulat__action { display: none; margin-top: auto; padding-top: var(--e-4); }

@media (min-width: 64rem) {
  .menulat { z-index: 40; width: var(--largeur-menu); padding: var(--e-4) var(--e-3) var(--e-5); transform: none; visibility: visible; transition: none; }
  .menu__case:checked ~ .menulat { box-shadow: none; }
  .menu__voile, .menu__case:checked ~ .menu__voile, .menulat__fermer, .menu__bouton { display: none; }
  body:has(.menu__case:checked) { overflow: visible; }
  .menulat__tete { margin-bottom: var(--e-3); }
  .menulat__action { display: block; }
}

/* --- Pied de page --- */
.pied { border-top: var(--trait); background: var(--surface); padding-block: var(--e-7) var(--e-6); font-size: 0.9688rem; }
.pied__colonnes { display: grid; gap: var(--e-6); grid-template-columns: 1fr 1fr; }
.pied__marque { grid-column: 1 / -1; }
.pied__marque p { color: var(--texte-doux); max-width: 26rem; margin-top: var(--e-3); }
.pied h2 { font-size: 0.9688rem; font-family: var(--police-texte); font-weight: 650; letter-spacing: 0; color: var(--texte); margin-bottom: var(--e-2); font-stretch: 100%; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin: 0; }
.pied li a, .pied li button { color: var(--texte-doux); text-decoration: none; display: inline-flex; align-items: center; min-height: 2.5rem; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.pied li a:hover, .pied li button:hover { color: var(--texte); text-decoration: underline; }
.pied__lignes { margin-top: var(--e-6); padding-top: var(--e-5); border-top: var(--trait); color: var(--texte-doux); font-size: var(--t-petit); display: grid; gap: var(--e-2); }
.pied__lignes p { margin: 0; max-width: 48rem; }
.pied__bas { margin-top: var(--e-4); color: var(--texte-doux); display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); justify-content: space-between; }
.pied__bas p { margin: 0; max-width: none; }
@media (min-width: 62rem) { .pied__colonnes { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .pied__marque { grid-column: auto; } }

/* --- Boutons : l'action principale est à l'encre, jamais au vert --- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2); min-height: var(--tactile); padding: 0.55rem 1.15rem; border-radius: var(--rayon-moyen); border: 1px solid transparent; font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: background-color 0.12s, border-color 0.12s; }
.bouton--principal { background: var(--accent); color: var(--encre); }
.bouton--principal:hover { background: var(--accent-vif); color: var(--encre); text-decoration: none; }
.bouton--secondaire { background: var(--surface); color: var(--texte); border-color: var(--bord-fort); }
.bouton--secondaire:hover { background: var(--surface-haute); color: var(--texte); border-color: var(--texte-doux); text-decoration: none; }
.bouton--discret { background: transparent; color: var(--accent); padding-inline: var(--e-2); border-radius: var(--rayon-petit); text-decoration: underline; text-underline-offset: 0.18em; }
.bouton--discret:hover { background: var(--surface-haute); }
.bouton--danger { background: var(--surface); color: var(--perte); border-color: var(--perte); }
.bouton--danger:hover { background: color-mix(in srgb, var(--perte) 8%, var(--surface)); color: var(--perte); text-decoration: none; }
.bouton--grand { min-height: 3.25rem; padding-inline: 1.5rem; font-size: 1.0625rem; }
/* petit par le texte et le remplissage, jamais par la hauteur : toute cible tactile fait 44 px (--tactile) */
.bouton--petit { min-height: var(--tactile); padding: 0.3rem 0.9rem; font-size: 0.9063rem; }
.bouton--plein { width: 100%; }
.bouton[disabled], .bouton[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }

/* --- Cartes : fond blanc, trait fin, rayon modeste, aucune ombre --- */
.carte { background: var(--surface); border: var(--trait); border-radius: var(--rayon); padding: var(--e-5); position: relative; min-width: 0; }
.carte > :last-child { margin-bottom: 0; }
.carte__titre { font-size: var(--t-h3); margin-bottom: var(--e-3); }
.carte__pied { margin-top: var(--e-5); padding-top: var(--e-4); border-top: var(--trait); }
.carte--accent { border-color: var(--accent); }
.carte--creuse { background: transparent; }
.carte--lien { text-decoration: none; color: inherit; display: block; transition: border-color 0.12s; }
.carte--lien:hover { border-color: var(--bord-fort); color: inherit; text-decoration: none; }
@media (min-width: 40rem) { .carte { padding: var(--e-6); } .carte--serree { padding: var(--e-5); } }

/* --- UNE MARGE S'ÉCRIT SOBREMENT : son libellé, puis le montant. Vert si elle est positive (l'argent gagné) ;
       gris neutre si elle est nulle ou négative, avec son signe (jamais en rouge, jamais la couleur seule). --- */
.marge { display: inline-flex; flex-direction: column; gap: 0.1rem; line-height: 1.15; }
.marge__nom { font-size: var(--t-petit); font-weight: 600; color: var(--texte-doux); }
.marge__montant { font-family: var(--police-titre); font-stretch: 90%; font-size: 1.625rem; font-weight: 760; letter-spacing: -0.02em; white-space: nowrap; color: var(--texte-doux); }
.marge--gain .marge__montant { color: var(--gain); }
.marge--petite .marge__nom { font-size: 0.8125rem; }
.marge--petite .marge__montant { font-size: 1.1875rem; }
.marge--grande .marge__nom { font-size: 0.9375rem; }
.marge--grande .marge__montant { font-size: clamp(2.1rem, 1.7rem + 2vw, 2.9rem); }
/* le gain haut de la fourchette (« jusqu'à +124,10 € ») : sous le gain bas, plus petit, du même vert */
.marge__haut { font-size: var(--t-petit); font-weight: 600; color: var(--texte-doux); line-height: 1.3; }
.marge__haut-montant { font-weight: 760; color: var(--texte-doux); }
.marge--gain .marge__haut-montant { color: var(--gain); }
.marge--petite .marge__haut { font-size: 0.8125rem; }
.marge--grande .marge__haut { font-size: 1rem; }
.bloc-marge__mesure { margin: var(--e-2) 0 0; font-size: var(--t-petit); color: var(--texte-doux); }

/* --- LE GAIN D'UNE PIÈCE EN UNE LIGNE (bloc 414, P9) : les deux chiffres en gros, « estimé » en petit à côté ; la couleur du texte, jamais le vert d'une phrase --- */
.gain-ligne { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.4rem; line-height: 1.15; }
.gain-ligne__chiffres { font-family: var(--police-titre); font-stretch: 90%; font-size: 1.625rem; font-weight: 760; letter-spacing: -0.02em; white-space: nowrap; color: var(--texte); }
.gain-ligne__estime { font-size: 0.8125rem; font-weight: 600; color: var(--texte-doux); }
.gain-ligne--petite .gain-ligne__chiffres { font-size: 1.1875rem; }
.gain-ligne--grande .gain-ligne__chiffres { font-size: clamp(2.1rem, 1.7rem + 2vw, 2.9rem); }
.gain-ligne--grande .gain-ligne__estime { font-size: 0.9375rem; }

/* le repère « Exemple » : une petite pastille posée à plat, au trait */
.pastille { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); background: var(--surface-haute); color: var(--texte); font-weight: 650; font-size: 0.8125rem; line-height: 1.5; text-align: center; }

/* --- Prix --- */
.prix { font-family: var(--police-titre); font-weight: 720; letter-spacing: -0.02em; white-space: nowrap; font-stretch: 90%; }
.prix--grand { font-size: 2rem; }
.prix--moyen { font-size: 1.375rem; }
.prix__legende { display: block; font-family: var(--police-texte); font-size: var(--t-petit); font-weight: 450; color: var(--texte-doux); letter-spacing: 0; white-space: normal; }

/* --- Formulaires --- */
.formulaire { display: grid; gap: var(--e-5); }
.champ { display: grid; gap: var(--e-2); }
.champ__libelle { font-weight: 620; font-size: 1rem; }
.champ__facultatif { font-weight: 450; color: var(--texte-doux); }
.champ__aide { font-size: var(--t-petit); color: var(--texte-doux); margin: 0; }
.champ__saisie { width: 100%; min-height: 3rem; padding: 0.6rem 0.85rem; background: var(--surface); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: var(--rayon-petit); font: inherit; font-size: 1.0625rem; /* 17 px : pas de zoom sur iPhone */ }
.champ__saisie::placeholder { color: var(--texte-doux); opacity: 0.85; }
.champ__saisie:hover { border-color: var(--texte-doux); }
.champ__saisie:focus-visible { outline-offset: 1px; border-color: var(--accent); }
textarea.champ__saisie { min-height: 7rem; resize: vertical; line-height: 1.45; }
select.champ__saisie { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--texte-doux) 50%), linear-gradient(135deg, var(--texte-doux) 50%, transparent 50%); background-position: calc(100% - 1.15rem) 50%, calc(100% - 0.8rem) 50%; background-size: 0.35rem 0.35rem; background-repeat: no-repeat; padding-right: 2.2rem; }
.champ--erreur .champ__saisie { border-color: var(--perte); }
.champ__erreur { color: var(--perte); font-size: 0.9375rem; font-weight: 600; margin: 0; }
.case { display: grid; grid-template-columns: auto 1fr; gap: var(--e-3); align-items: start; min-height: var(--tactile); padding-block: var(--e-2); cursor: pointer; }
.case input { width: 1.5rem; height: 1.5rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.case__texte { font-size: 1rem; }
.case__texte .champ__erreur { margin-top: var(--e-1); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 650; padding: 0; margin-bottom: var(--e-2); }

/* --- Alertes : un trait de couleur à gauche, le fond reste clair --- */
.alerte { border: var(--trait); border-left: 4px solid var(--info); border-radius: var(--rayon-petit); background: var(--surface); padding: var(--e-4); }
.alerte > :last-child { margin-bottom: 0; }
.alerte__titre { font-family: var(--police-texte); font-size: 1.0625rem; font-weight: 680; margin-bottom: var(--e-1); letter-spacing: 0; font-stretch: 100%; }
.alerte--succes { border-left-color: var(--accent); }
.alerte--attention { border-left-color: var(--accent); background: var(--surface-haute); }
.alerte--erreur { border-left-color: var(--perte); background: color-mix(in srgb, var(--perte) 6%, var(--surface)); }
.alerte--simule { border: 2px dashed var(--bord-fort); border-radius: var(--rayon-moyen); text-align: center; }

/* --- Badges : au trait, sur fond clair ; le vert ne sert que pour de l'argent gagné --- */
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 650; line-height: 1.5; border: 1px solid var(--bord-fort); color: var(--texte); background: var(--surface-haute); white-space: nowrap; }
.badge--accent { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.badge--gain { color: var(--gain); border-color: color-mix(in srgb, var(--gain) 55%, transparent); background: var(--gain-fond); }
.badge--perte { color: var(--perte); border-color: color-mix(in srgb, var(--perte) 55%, transparent); background: var(--surface); }
.badge--info { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); background: var(--surface); }

/* --- Tableaux --- */
.tableau-cadre { overflow-x: auto; border: var(--trait); border-radius: var(--rayon-moyen); background: var(--surface); -webkit-overflow-scrolling: touch; }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.9688rem; margin: 0; }
.tableau caption { text-align: left; padding: var(--e-3) var(--e-4); color: var(--texte-doux); font-size: var(--t-petit); }
.tableau th, .tableau td { padding: 0.7rem var(--e-4); text-align: left; border-bottom: var(--trait); vertical-align: top; }
.tableau thead th { font-weight: 650; color: var(--texte-doux); font-size: var(--t-petit); white-space: nowrap; background: var(--surface-haute); }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau td.num, .tableau th.num { text-align: right; white-space: nowrap; }
.tableau__vide { padding: var(--e-6) var(--e-4); text-align: center; color: var(--texte-doux); }

/* --- Pagination : la page en cours a un cadre d'encre épais et du gras --- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--e-2); margin-top: var(--e-5); }
.pagination a, .pagination span { min-width: var(--tactile); min-height: var(--tactile); display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--e-3); border-radius: var(--rayon-petit); border: var(--trait); background: var(--surface); text-decoration: none; color: var(--texte); font-variant-numeric: tabular-nums; }
.pagination a:hover { background: var(--surface-haute); }
.pagination [aria-current='page'] { background: var(--surface-haute); color: var(--texte); border: 2px solid var(--accent); font-weight: 700; }
.pagination .pagination__trou { border: 0; background: none; min-width: 1rem; color: var(--texte-doux); }

/* --- État vide --- */
.etat-vide { border: 1px dashed var(--bord-fort); border-radius: var(--rayon); padding: var(--e-7) var(--e-5); text-align: center; background: var(--surface); }
.etat-vide h2, .etat-vide h3 { font-size: var(--t-h3); margin-bottom: var(--e-2); }
.etat-vide p { margin-inline: auto; color: var(--texte-doux); max-width: 30rem; }
.etat-vide .bouton { margin-top: var(--e-3); }

/* --- Fil d'étapes --- */
.etapes { list-style: none; padding: 0; margin: 0; counter-reset: etape; display: grid; gap: 0; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 var(--e-5) 3rem; margin: 0; max-width: none; }
.etapes li::before { content: counter(etape); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--police-titre); font-weight: 720; font-size: 0.9375rem; font-variant-numeric: tabular-nums; border: 1px solid var(--bord-fort); color: var(--texte-doux); background: var(--surface); }
.etapes li::after { content: ''; position: absolute; left: calc(1rem - 0.5px); top: 2.25rem; bottom: 0.25rem; border-left: 1px solid var(--bord); }
.etapes li:last-child { padding-bottom: 0; }
.etapes li:last-child::after { display: none; }
.etapes__titre { font-weight: 650; display: block; padding-top: 0.2rem; }
.etapes__texte { color: var(--texte-doux); font-size: 0.9688rem; display: block; margin-top: 0.15rem; }
.etapes li.est-faite::before { background: var(--surface-haute); color: var(--texte); border-color: var(--texte-doux); }
.etapes li.est-faite::after { border-left-color: var(--texte-doux); }
.etapes li.est-courante::before { background: var(--accent); color: var(--encre); border-color: transparent; }
.etapes li.est-courante .etapes__titre { color: var(--texte); font-weight: 750; }
.etapes li.est-a-venir .etapes__titre { color: var(--texte-doux); }

/* --- Accordéon natif --- */
.accordeon { border: var(--trait); border-radius: var(--rayon-moyen); background: var(--surface); overflow: hidden; }
.accordeon details + details { border-top: var(--trait); }
.accordeon summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); min-height: 3.25rem; padding: var(--e-3) var(--e-4); font-weight: 620; }
.accordeon summary::-webkit-details-marker { display: none; }
.accordeon summary::after { content: ''; flex: none; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
.accordeon details[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.accordeon summary:hover { background: var(--surface-haute); }
.accordeon summary:focus-visible { outline-offset: -3px; }
.accordeon__contenu { padding: 0 var(--e-4) var(--e-4); color: var(--texte-doux); }
.accordeon__contenu > :last-child { margin-bottom: 0; }

/* --- Liste de définitions (détail d'un calcul, fiche technique) --- */
/* les deux colonnes peuvent rétrécir et les valeurs longues (une adresse e-mail) reviennent à la ligne : rien ne déborde à 390 px */
.definitions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 0; margin: 0; max-width: 100%; }
.definitions dt, .definitions dd { padding: 0.55rem 0; border-bottom: var(--trait); margin: 0; min-width: 0; overflow-wrap: anywhere; }
.definitions dt { color: var(--texte-doux); padding-right: var(--e-4); }
.definitions dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.definitions .definitions__total { border-bottom: 0; color: var(--texte); font-weight: 700; }

/* --- Nos photos : une image que l'appareil avait notée « à tourner » (voir classeOrientation, services/photos) --- */
.photo--tournee-90 { transform: rotate(90deg); }
.photo--tournee-180 { transform: rotate(180deg); }
.photo--tournee-270 { transform: rotate(-90deg); }

/* --- Texte long (pages légales, contenus Markdown) --- */
.prose { max-width: var(--largeur-texte); }
.prose h2 { font-size: 1.5rem; margin-top: var(--e-7); }
.prose h3 { margin-top: var(--e-6); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9688rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: var(--trait); padding: var(--e-2) var(--e-3); text-align: left; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: var(--e-4); margin-left: 0; color: var(--texte-doux); }
.prose code { background: var(--surface-haute); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.92em; }
.prose pre { background: var(--surface); border: var(--trait); border-radius: var(--rayon-petit); padding: var(--e-4); overflow-x: auto; font-size: 0.875rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }

/* --- Pages d'identification --- */
.page-auth { max-width: 30rem; margin-inline: auto; }
.page-auth h1 { font-size: var(--t-h2); }
.messages-flash { margin-bottom: var(--e-5); }

/* --- Page de démonstration /_ui --- */
.ui-exemple { border: 1px dashed var(--bord); border-radius: var(--rayon-moyen); padding: var(--e-5); margin-bottom: var(--e-4); }
.ui-nuancier { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--e-3); }
.ui-nuance { border: var(--trait); border-radius: var(--rayon-petit); padding: 2.2rem var(--e-3) var(--e-2); font-size: 0.75rem; }
.ui-nuance--fond { background: var(--fond); } .ui-nuance--surface { background: var(--surface); } .ui-nuance--surface-haute { background: var(--surface-haute); }
.ui-nuance--accent { background: var(--accent); color: var(--encre); } .ui-nuance--gain-fond { background: var(--gain-fond); }
.ui-nuance--gain { background: var(--gain); color: var(--encre); } .ui-nuance--perte { background: var(--perte); color: var(--encre); }
.ui-nuance--texte { background: var(--texte); color: var(--encre); } .ui-nuance--texte-doux { background: var(--texte-doux); color: var(--encre); }

/* --- DÉBUT : L'écran d'attente (bloc 370, 29/11/2026, mots de Guillaume : « un petit t-shirt en 3D qui tourne ») ---
   La SEULE animation du site : elle ne se montre que quand le site attend vraiment (src/ui/attente.tsx, public/js/base.js).
   Le vert est celui du logo. « Réduire les animations » : l'image reste fixe, de face (règle plus bas, et celle de tout le site). */
.attente { display: inline-flex; flex-direction: column; align-items: center; gap: var(--e-2); color: var(--gain); vertical-align: middle; }
.attente__scene { position: relative; display: block; width: 1.75rem; height: 2rem; perspective: 10rem; }
.attente--grand .attente__scene { width: 4.5rem; height: 5.25rem; perspective: 22rem; }
.attente__tshirt { position: absolute; inset: 0 0 12% 0; transform-style: preserve-3d; animation: attente-tourne 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.attente__face, .attente__couche { position: absolute; inset: 0; display: block; }
.attente__face { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.attente__face--devant { transform: translateZ(2px); }
.attente__face--dos { transform: rotateY(180deg) translateZ(2px); }
.attente__couche--1 { transform: translateZ(0.7px); }
.attente__couche--2 { transform: translateZ(-0.7px); }
.attente svg { display: block; width: 100%; height: 100%; overflow: visible; }
.attente__couche path { fill: var(--gain); }
.attente__corps { fill: var(--gain-fond); stroke: var(--gain); stroke-width: 2.6; stroke-linejoin: round; }
.attente__trait { fill: none; stroke: var(--gain); stroke-width: 1.8; stroke-linecap: round; }
.attente__sol { position: absolute; left: 22%; right: 22%; bottom: 0; height: 7%; border-radius: 50%; background: var(--bord); animation: attente-sol 2.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.attente__texte { font-size: var(--t-petit); font-weight: 600; color: var(--texte-doux); }
@keyframes attente-tourne { to { transform: rotateY(360deg); } }
@keyframes attente-sol { 25%, 75% { transform: scaleX(0.45); } }
/* l'écran de la page : un voile clair sur toute la page, le t-shirt au milieu ; il ne bloque rien (le doigt passe au travers) */
.attente-page { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; pointer-events: none; }
.attente-page::before { content: ''; position: absolute; inset: 0; background: var(--fond); opacity: 0.92; }
.attente-page > .attente { position: relative; padding: var(--e-5) var(--e-7); background: var(--surface); border: var(--trait); border-radius: var(--rayon); }
.attente-page[hidden] { display: none; }
/* une attente de quelques instants dans la page (calcul, suggestions) : le t-shirt n'apparaît que si elle dure plus de 0,4 s */
.attente--differee { visibility: hidden; }
[aria-busy='true'] .attente--differee { visibility: visible; transition: visibility 0s 0.4s; }
.attente--differee[hidden], .attente[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .attente__tshirt, .attente__sol { animation: none !important; transform: none; }
}
@media print { .attente-page, .attente { display: none !important; } }
/* --- FIN : L'écran d'attente --- */

/* --- Mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --- Impression (reçus, annonces) : la page claire telle quelle, sans le menu ni la barre --- */
@media print {
  body { background: var(--surface); color: var(--texte); overflow: visible !important; }
  .bandeau, .entete, .pied, .bouton, .menulat, .menu__voile, .menu__case { display: none !important; }
  .coque { margin-left: 0; }
  .carte, .tableau-cadre { border-color: var(--bord-fort); background: var(--surface); }
  a { color: var(--texte); }
}
