/* ============================================================================
   site.css - LE GABARIT COMMUN DU SITE v3 (maquette, 2026-09-15).
   Tout est en jetons : une valeur change ici, elle change partout.
   Deux registres : les pages SOBRES (papier, encre) et les pages de NUIT
   (`html[data-theme="nuit"]` : le selecteur et la home fidelite).
   Regles (PLAN-SITE-v3 § 9) : alignement a gauche, trois amplitudes d espace,
   un seul objet fort par page, aucun sur-titre en capitales, pas de trois
   cartes identiques, contraste 4,5:1, cibles de 44 px, lisible sans JS.
   ========================================================================== */
@font-face { font-family: Satoshi; font-weight: 400; font-display: swap; src: url("../../_commun/fonts/satoshi-400.woff2") format("woff2"); }
@font-face { font-family: Satoshi; font-weight: 500; font-display: swap; src: url("../../_commun/fonts/satoshi-500.woff2") format("woff2"); }
@font-face { font-family: Satoshi; font-weight: 700; font-display: swap; src: url("../../_commun/fonts/satoshi-700.woff2") format("woff2"); }
@font-face { font-family: Satoshi; font-weight: 900; font-display: swap; src: url("../../_commun/fonts/satoshi-900.woff2") format("woff2"); }
@font-face { font-family: Fraunces; font-style: italic; font-weight: 400 700; font-display: swap; src: url("../../home-film/fonts/fraunces-italic.woff2") format("woff2"); }

:root {
  /* les couleurs */
  --papier: #f5f2ec;          /* le fond des pages sobres */
  --papier-2: #ebe6dc;        /* un cadre, une ligne pleine */
  --encre: #17161a;
  --encre-2: #57545e;
  --encre-3: #8a8791;
  --ligne: #dcd7cc;
  --accent: #3b2e6f;          /* l encre violette de la carte « Encre » */
  --accent-2: #5a4a99;
  --accent-clair: #e6e0f6;
  --accent-texte: #2f2459;
  --ok: #2d6a4f;
  --alerte: #8a3b2b;
  --nuit: #0e0d0b;
  --nuit-2: #1a1917;
  --nuit-texte: #f1ede6;
  --nuit-texte-2: rgba(241, 237, 230, .66);
  --nuit-ligne: rgba(241, 237, 230, .14);
  /* la typographie : Satoshi, echelle 1,25 sur 17 px */
  --police: Satoshi, system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-accent: Fraunces, Georgia, serif;
  --t-0: 15px; --t-1: 17px; --t-2: 20px; --t-3: clamp(24px, 2.4vw, 30px);
  --t-4: clamp(30px, 3.4vw, 42px); --t-5: clamp(38px, 5vw, 64px);
  /* les espaces : trois amplitudes */
  --e-1: 40px; --e-2: 64px; --e-3: 104px;
  --rayon: 12px; --rayon-2: 20px;
  --largeur: 1120px; --marge: 24px;
  --barre-h: 64px;
  --ombre: 0 10px 30px rgba(23, 22, 26, .10);
  --transition: .22s ease;
}
html[data-theme="nuit"] {
  --papier: var(--nuit); --papier-2: var(--nuit-2);
  --encre: var(--nuit-texte); --encre-2: var(--nuit-texte-2); --encre-3: rgba(241, 237, 230, .45);
  --ligne: var(--nuit-ligne); --accent-clair: rgba(217, 207, 240, .16); --accent-texte: #d9cff0;
  --ombre: 0 18px 50px rgba(0, 0, 0, .55);
}

/* ------------------------------------------------------------------ socle */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 400 var(--t-1)/1.55 var(--police); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
html[data-theme="nuit"] a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-clair); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.08; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--t-5); }
h2 { font-size: var(--t-4); }
h3 { font-size: var(--t-3); letter-spacing: -.012em; }
h4 { font-size: var(--t-2); letter-spacing: 0; }
p, li { max-width: 68ch; }
p { margin: 0 0 1em; }
em.accent, .accent { font-family: var(--police-accent); font-style: italic; font-weight: 500; color: var(--accent-texte); letter-spacing: 0; }
small, .petit { font-size: var(--t-0); color: var(--encre-2); }
hr { border: 0; border-top: 1px solid var(--ligne); margin: var(--e-1) 0; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: var(--papier-2); padding: .1em .35em; border-radius: 5px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.conteneur { width: min(100% - 2 * var(--marge), var(--largeur)); margin-inline: auto; }
.conteneur--etroit { width: min(100% - 2 * var(--marge), 760px); margin-inline: auto; }

/* ------------------------------------------------------------- la barre */
.barre {
  position: sticky; top: 0; z-index: 50; height: var(--barre-h);
  background: color-mix(in srgb, var(--papier) 86%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ligne);
}
.barre .conteneur { height: 100%; display: flex; align-items: center; gap: 22px; }
.barre-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin-right: 6px; }
.barre-logo svg { width: 26px; height: 26px; color: var(--accent); }
html[data-theme="nuit"] .barre-logo svg { color: #9baed4; }
.barre-nav { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; flex: 1; }
.barre-nav a, .barre-nav .tiroir-bouton {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 8px;
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--encre); background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.barre-nav a:hover, .barre-nav .tiroir-bouton:hover, .barre-nav a[aria-current="page"] { background: var(--accent-clair); color: var(--encre); }
.barre-nav a[aria-current="page"] { font-weight: 700; }
.tiroir { position: relative; }
.tiroir-bouton svg { width: 12px; height: 12px; transition: transform var(--transition); }
.tiroir-bouton[aria-expanded="true"] svg { transform: rotate(180deg); }
.tiroir-liste {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: var(--papier); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre);
}
.tiroir-liste[hidden] { display: none; }
.tiroir-liste a { display: flex; width: 100%; padding: 0 12px; }
.barre-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.barre-acces { font-size: 14px; color: var(--encre-2); text-decoration: none; padding: 0 6px; min-height: 44px; display: inline-flex; align-items: center; }
.barre-acces:hover { color: var(--encre); text-decoration: underline; }
.barre-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--ligne); border-radius: 10px; background: none; cursor: pointer; align-items: center; justify-content: center; }
.barre-burger svg { width: 20px; height: 20px; }
.barre-reglages { display: flex; gap: 6px; }
.barre-reglages button { min-height: 36px; padding: 0 10px; font-size: 13px; border-radius: 999px; border: 1px solid var(--ligne); background: none; cursor: pointer; color: var(--encre-2); }
.barre-reglages button[aria-pressed="true"] { color: var(--encre); border-color: var(--encre-3); }

/* le menu plein ecran (telephone) */
.menu { position: fixed; inset: 0; z-index: 60; background: var(--papier); overflow: auto; padding: 24px var(--marge) 40px; }
.menu[hidden] { display: none; }
.menu-haut { display: flex; align-items: center; justify-content: space-between; height: var(--barre-h); margin-bottom: 12px; }
.menu-fermer { width: 44px; height: 44px; border: 1px solid var(--ligne); border-radius: 10px; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul > li { border-top: 1px solid var(--ligne); }
.menu a { display: block; padding: 14px 0; font-size: 20px; font-weight: 700; text-decoration: none; }
.menu ul ul a { font-size: 17px; font-weight: 500; padding: 10px 0 10px 18px; color: var(--encre-2); }
.menu-groupe { padding: 14px 0 4px; font-size: 20px; font-weight: 700; }
.menu-pied { margin-top: 24px; display: grid; gap: 12px; }

@media (max-width: 1100px) {
  .barre-nav, .barre-acces { display: none; }
  .barre-burger { display: inline-flex; }
}
@media (max-width: 1100px) { .barre .conteneur { gap: 12px; } .barre-actions .bouton { padding: 0 14px; } }
@media (max-width: 480px) { .barre-actions .bouton { display: none; } .barre-reglages { display: none; } }

/* ------------------------------------------------------------- les boutons */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--encre); background: none; color: var(--encre);
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.bouton:hover { background: var(--accent-clair); color: var(--encre); }
.bouton--plein { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.bouton--plein:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-theme="nuit"] .bouton--plein { background: var(--nuit-texte); color: var(--nuit); border-color: var(--nuit-texte); }
html[data-theme="nuit"] .bouton--plein:hover { background: #fff; color: var(--nuit); border-color: #fff; }
.bouton--petit { min-height: 38px; padding: 0 14px; font-size: 14px; }
.bouton svg { width: 18px; height: 18px; }
.lien-fleche { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.lien-fleche::after { content: "→"; transition: transform var(--transition); }
.lien-fleche:hover::after { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }

/* -------------------------------------------------------------- les sections */
.section { padding-block: var(--e-3); }
.section--serre { padding-block: var(--e-2); }
.section--court { padding-block: var(--e-1); }
.section--cadre { background: var(--papier-2); }
.section + .section { padding-top: 0; }
.section--ligne { border-top: 1px solid var(--ligne); }
.surtitre { display: block; margin: 0 0 14px; font-size: var(--t-0); font-weight: 500; color: var(--accent-texte); }
.chapeau { font-size: var(--t-2); line-height: 1.45; color: var(--encre-2); max-width: 58ch; }
.entete { padding-block: var(--e-3) var(--e-2); }
.entete h1 { max-width: 20ch; }
.entete .chapeau { margin-top: 18px; }
.revision { font-size: var(--t-0); color: var(--encre-3); margin-top: 18px; }
.sommaire { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 20px 0 0; list-style: none; font-size: var(--t-0); }
.sommaire a { color: var(--encre-2); }

/* ------------------------------------------------------------- les grilles */
.grille { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grille--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.deux-colonnes { display: grid; gap: 48px; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
.deux-colonnes--inverse { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
@media (max-width: 840px) { .deux-colonnes, .deux-colonnes--inverse { grid-template-columns: 1fr; gap: 32px; } }
.colle { position: sticky; top: calc(var(--barre-h) + 24px); }

/* ---------------------------------------------------------- les composants */
.encadre { padding: 24px 26px; border: 1px solid var(--ligne); border-radius: var(--rayon-2); background: color-mix(in srgb, var(--papier-2) 55%, var(--papier)); }
.encadre h3, .encadre h4 { margin-top: 0; }
.encadre--accent { border-color: var(--accent-2); background: var(--accent-clair); }
.encadre--alerte { border-left: 4px solid var(--alerte); border-radius: 8px; }
.note { font-size: var(--t-0); color: var(--encre-2); border-left: 2px solid var(--ligne); padding-left: 14px; }
.proposition { font-size: 14px; color: var(--accent-texte); background: var(--accent-clair); border-radius: 8px; padding: 10px 14px; }
.proposition strong { font-weight: 700; }

/* la frise : des etapes numerotees, parce que la sequence est reelle */
.frise { list-style: none; margin: 0; padding: 0; counter-reset: etape; display: grid; gap: 0; }
.frise > li { position: relative; padding: 18px 0 18px 58px; border-top: 1px solid var(--ligne); counter-increment: etape; }
.frise > li:last-child { border-bottom: 1px solid var(--ligne); }
.frise > li::before {
  content: counter(etape); position: absolute; left: 0; top: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--encre); display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.frise h3, .frise h4 { margin-bottom: .3em; }
.frise p:last-child { margin-bottom: 0; }

/* les questions : de vraies questions, chacune sur sa page */
.questions { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ligne); }
.questions > li { border-bottom: 1px solid var(--ligne); }
.questions details summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 700; font-size: var(--t-2); line-height: 1.3;
}
.questions details summary::-webkit-details-marker { display: none; }
.questions details summary::after { content: "+"; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ligne); display: grid; place-items: center; font-weight: 500; transition: transform var(--transition); }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details > *:not(summary) { padding-bottom: 20px; }
.questions details p:last-child { margin-bottom: 0; }
.questions details p:first-of-type strong:first-child { color: var(--accent-texte); }

/* les listes de faits */
.liste { padding-left: 1.2em; margin: 0 0 1em; }
.liste li { margin-bottom: .4em; }
.liste--coches { list-style: none; padding: 0; }
.liste--coches li { position: relative; padding-left: 26px; }
.liste--coches li::before { content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.liste--non li::before { border: 0; width: 12px; height: 2px; background: var(--alerte); transform: none; top: .75em; left: 2px; }

/* les tableaux (dans un conteneur qui defile) */
.tableau { overflow-x: auto; margin: 0 0 1em; }
.tableau table { border-collapse: collapse; width: 100%; font-size: var(--t-0); }
.tableau th, .tableau td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.tableau th { font-weight: 700; }

/* l objet : une seule image forte par page, jamais une image de banque */
.objet { border-radius: var(--rayon-2); background: var(--papier-2); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; position: relative; }
.objet--carre { aspect-ratio: 1; }
.objet--nuit { background: radial-gradient(70% 60% at 50% 40%, #2a2740 0%, var(--nuit) 75%); color: var(--nuit-texte); }
.objet--carte { background: radial-gradient(70% 60% at 55% 45%, #2a2440 0%, #0f0e14 78%); }

/* la carte Wallet plate - la vraie anatomie d un pass (5b § 2.1), jamais la carte-objet 3D */
.pass { --pass-fond: #36255c; --pass-encre: #f2eef9; width: min(100%, 360px); aspect-ratio: 1.586; border-radius: 14px; padding: 18px 20px; background: var(--pass-fond); color: var(--pass-encre); display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 14px 34px rgba(0, 0, 0, .28); font-family: var(--police); }
.pass--claire { --pass-encre: #17161a; }
.pass-haut { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pass-nom { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.pass-marque { font-size: 12px; opacity: .8; }
.pass-tampons { display: flex; gap: 7px; flex-wrap: wrap; }
.pass-tampons i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; display: inline-block; }
.pass-tampons i.x { background: currentColor; opacity: 1; position: relative; }
.pass-tampons i.x::after { content: ""; position: absolute; left: 6px; top: 5px; width: 8px; height: 5px; border-left: 2px solid var(--pass-fond); border-bottom: 2px solid var(--pass-fond); transform: rotate(-45deg); }
.pass-bas { display: flex; justify-content: space-between; align-items: end; gap: 12px; font-size: 13px; }
.pass-bas strong { display: block; font-size: 15px; }
.pass-qr { width: 40px; height: 40px; border-radius: 6px; background: #f4f2ee; background-image: linear-gradient(90deg, #0b0b0f 3px, transparent 3px), linear-gradient(0deg, #0b0b0f 3px, transparent 3px); background-size: 8px 8px; background-position: 4px 4px; }

/* le telephone (DOM) : un cadre, un ecran noir - decision 3 */
.telephone { width: min(100%, 300px); aspect-ratio: 9 / 19.2; border-radius: 40px; background: #0c0c12; padding: 10px; box-shadow: 0 30px 60px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .12); position: relative; }
.telephone-ecran { position: absolute; inset: 10px; border-radius: 32px; background: #000; overflow: hidden; }
.telephone-ilot { position: absolute; top: 20px; left: 50%; width: 92px; height: 26px; border-radius: 999px; background: #000; transform: translateX(-50%); z-index: 3; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }

/* ------------------------------------------------------------------ le pied */
.pied { border-top: 1px solid var(--ligne); padding: var(--e-2) 0 var(--e-1); font-size: var(--t-0); color: var(--encre-2); background: var(--papier-2); }
.pied-presentation { max-width: 70ch; margin: 0 0 var(--e-1); color: var(--encre); }
.pied-colonnes { display: grid; gap: 28px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .pied-colonnes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pied-colonnes { grid-template-columns: 1fr; } }
.pied-colonnes h2 { font-size: 15px; letter-spacing: 0; margin-bottom: 12px; color: var(--encre); }
.pied-colonnes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pied-colonnes a { text-decoration: none; }
.pied-colonnes a:hover { text-decoration: underline; }
.pied-identite { margin-top: var(--e-1); padding-top: 22px; border-top: 1px solid var(--ligne); display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pied-identite strong { color: var(--encre); font-weight: 700; }

/* ------------------------------------------------------------- l apparition */
html[data-anim="on"] [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
html[data-anim="on"] [data-reveal].is-vu { opacity: 1; transform: none; }

/* ------------------------------------------------------------ l impression */
@media print {
  .barre, .pied-colonnes, .menu, .actions, .barre-reglages { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .questions details { open: true; }
  .questions details > *:not(summary) { display: block; }
}
