/* Site public de carbonlab.ch : direction artistique « Lagon » de l'application (turquoise),
   mêmes jetons que static/css/cl-v2.css et templates/login.html.
   Écarts assumés, pour le contraste AA (4,5:1 sur le petit texte) :
   - --tx2 #36646d au lieu de #4a8088 (4,35:1 sur le fond, sous le seuil) ;
   - --lien #00705b pour le texte d'accent (le turquoise de marque #01b894 ne donne que 2,5:1) ;
   - bouton principal : texte sombre sur turquoise (5,9:1), le blanc ne donnait que 2,5:1.
   Thème : clair par défaut, quel que soit le réglage du système du visiteur. Le thème sombre
   s'active par [data-theme="dark"] sur <html>, posé par site.js (bouton de l'en-tête, choix gardé
   dans localStorage). Il ne vaut qu'à l'écran : une page imprimée reste claire. Aucune ressource
   externe. */

:root {
  --bg: #f1fffb; --bg2: #dff8f0; --srf: #ffffff; --srf2: #e9faf6; --srf3: #cef6eb;
  --tx: #0b3948; --tx2: #36646d; --tx3: #86b0b3;
  --ln: rgba(1, 160, 130, .18); --ln2: rgba(1, 160, 130, .32);
  --p: #01b894; --ps: #019a7c; --pp: rgba(2, 255, 205, .18);
  --lien: #00705b; --btn: #01b894; --btn-h: #02d4a8; --btn-tx: #03262e;
  --sombre: #0b3948; --sombre-tx: #ffffff;
  --s1: #f59f0a; --s2: #0ea5e9; --s3: #6d7df5; --vert: #16a34a;
  --panneau: #0b3948; --panneau-2: #0f4a59; --panneau-tx: #ffffff; --panneau-tx2: #c4e3e2; --panneau-acc: #5ff2cf;
  --ombre: 0 24px 60px rgba(11, 57, 72, .12); --ombre-douce: 0 8px 24px rgba(11, 57, 72, .08);
  --rayon: 22px; --police: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --titres: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  color-scheme: light;
}
@media screen {
  :root[data-theme="dark"] {
    --bg: #071016; --bg2: #0b1820; --srf: #10202a; --srf2: #132734; --srf3: #193240;
    --tx: #e6f2ee; --tx2: #a9c1c7; --tx3: #6c8792;
    --ln: rgba(230, 242, 238, .10); --ln2: rgba(230, 242, 238, .22);
    --p: #34d399; --ps: #1bb985; --pp: rgba(52, 211, 153, .16);
    --lien: #5eead4; --btn: #34d399; --btn-h: #6ee7b7; --btn-tx: #04231c;
    --sombre: #e6f2ee; --sombre-tx: #071016;
    --s1: #fbbf24; --s2: #38bdf8; --s3: #818cf8; --vert: #4ade80;
    --panneau: #0f2a33; --panneau-2: #123844; --panneau-tx: #f0faf7; --panneau-tx2: #b5d4d4; --panneau-acc: #5ff2cf;
    --ombre: 0 24px 60px rgba(0, 0, 0, .40); --ombre-douce: 0 8px 24px rgba(0, 0, 0, .30);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--police); font-size: 1rem; line-height: 1.6; color: var(--tx);
  background:
    radial-gradient(1100px 600px at 8% -6%, rgba(2, 255, 205, .16), transparent 60%),
    radial-gradient(900px 520px at 100% 12%, rgba(14, 165, 233, .10), transparent 60%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--lien); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--p); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titres); color: var(--tx); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.enveloppe { width: min(100% - 48px, 1180px); margin-inline: auto; }
.ic { width: 20px; height: 20px; flex: none; }
.saut { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--sombre); color: var(--sombre-tx); font-weight: 700; text-decoration: none; }
.saut:focus { top: 12px; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.entete { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--ln); }
.entete-ligne { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.marque { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tx); font-family: var(--titres); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.marque img { width: 34px; height: 34px; }
.marque b { color: var(--p); font-weight: 700; }
.nav-principale { display: flex; gap: 26px; margin-left: 28px; }
.nav-principale a { color: var(--tx2); font-weight: 600; font-size: .93rem; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-principale a:hover { color: var(--tx); border-bottom-color: var(--p); }
.entete-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.langues { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--ln); border-radius: 999px; background: color-mix(in srgb, var(--srf) 70%, transparent); }
.langues a { font-size: .76rem; font-weight: 800; letter-spacing: .04em; color: var(--tx2); text-decoration: none; padding: 5px 9px; border-radius: 999px; line-height: 1.2; }
.langues a:hover { color: var(--tx); background: var(--srf2); }
.langues a[aria-current] { background: var(--sombre); color: var(--sombre-tx); }
.langues-menu { display: none; position: relative; }
.langues-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 7px 10px; border: 1px solid var(--ln2); border-radius: 999px; font-size: .8rem; font-weight: 800; color: var(--tx); }
.langues-menu summary::-webkit-details-marker { display: none; }
.langues-menu summary .ic { width: 17px; height: 17px; }
.langues-menu .ic-chevron { width: 14px; height: 14px; transition: transform .2s ease; }
.langues-menu[open] .ic-chevron { transform: rotate(180deg); }
.langues-menu ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; min-width: 160px; background: var(--srf); border: 1px solid var(--ln2); border-radius: 14px; box-shadow: var(--ombre); }
.langues-menu li a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--tx); text-decoration: none; font-weight: 600; font-size: .92rem; }
.langues-menu li a:hover { background: var(--srf2); }
.langues-menu li a[aria-current] { color: var(--lien); font-weight: 800; }
/* Bouton de thème : masqué sans JavaScript (il ne ferait rien), affiché dès que site.js a posé
   data-theme, donc avant le premier affichage. L'icône montre le thème vers lequel il mène. */
.theme-bascule { display: none; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ln2); border-radius: 999px; background: color-mix(in srgb, var(--srf) 70%, transparent); color: var(--tx); cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
:root[data-theme] .theme-bascule { display: inline-grid; }
.theme-bascule:hover { border-color: var(--p); background: var(--srf2); }
.theme-bascule .ic { width: 18px; height: 18px; }
.theme-bascule .ic-soleil, :root[data-theme="dark"] .theme-bascule .ic-lune { display: none; }
:root[data-theme="dark"] .theme-bascule .ic-soleil { display: block; }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 14px; font-weight: 800; font-size: .98rem; text-decoration: none; line-height: 1.2; border: 1px solid transparent; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-principal { background: var(--btn); color: var(--btn-tx); box-shadow: 0 10px 24px rgba(1, 184, 148, .28); }
.btn-principal:hover { background: var(--btn-h); }
.btn-contour { background: color-mix(in srgb, var(--srf) 80%, transparent); color: var(--tx); border-color: var(--ln2); }
.btn-contour:hover { border-color: var(--p); background: var(--srf); }
.btn-sombre { background: var(--sombre); color: var(--sombre-tx); }
.btn-sombre:hover { box-shadow: var(--ombre-douce); }
.btn-petit { padding: 9px 16px; font-size: .88rem; border-radius: 12px; }
.boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.boutons-centre { justify-content: center; }

/* ── Titres de section ───────────────────────────────────────────────────── */
.surtitre { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lien); margin-bottom: 14px; }
.surtitre::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--p); box-shadow: 0 0 0 4px var(--pp); }
.surtitre-clair { color: var(--panneau-acc); }
.tete-section { max-width: 760px; margin-bottom: 40px; }
.tete-section h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); margin-bottom: 14px; }
.tete-section > p:last-child { color: var(--tx2); font-size: 1.08rem; }
section { scroll-margin-top: 84px; }

/* ── Ouverture ───────────────────────────────────────────────────────────── */
.ouverture { padding: 72px 0 64px; }
.ouverture-grille { display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
.ouverture h1 { font-size: clamp(2.15rem, 1.25rem + 3vw, 3.55rem); line-height: 1.07; letter-spacing: -.032em; margin-bottom: 22px; }
.chapeau { font-size: 1.14rem; color: var(--tx2); max-width: 58ch; margin-bottom: 30px; }
.note-suisse { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; color: var(--tx2); font-weight: 700; font-size: .92rem; text-decoration: none; }
.note-suisse .ic { color: var(--p); }
.note-suisse:hover { color: var(--tx); }
.ouverture-visuel { position: relative; margin: 0; }
.ouverture-visuel .ill-tableau { filter: drop-shadow(0 30px 50px rgba(11, 57, 72, .16)); }
.ouverture-visuel .ill-mini { position: absolute; width: 40%; left: -6%; bottom: -38px; filter: drop-shadow(0 18px 30px rgba(11, 57, 72, .18)); }

/* ── Illustrations SVG ───────────────────────────────────────────────────── */
.ill { width: 100%; height: auto; }
.ill-carte { fill: var(--srf); stroke: var(--ln); }
.ill-tuile { fill: var(--srf2); }
.ill-pastille { fill: var(--srf2); stroke: var(--ln); }
.ill-sq { fill: color-mix(in srgb, var(--tx) 13%, transparent); }
.ill-sq-fort { fill: color-mix(in srgb, var(--tx) 30%, transparent); }
.ill-sq-blanc { fill: rgba(255, 255, 255, .92); }
.ill-sq-blanc-clair { fill: rgba(255, 255, 255, .55); }
.ill-p { fill: var(--p); }
.ill-s1 { fill: var(--s1); } .ill-s2 { fill: var(--s2); } .ill-s3 { fill: var(--s3); }
.ill-anneau { fill: none; stroke: var(--srf2); stroke-width: 22; }
.ill-seg { fill: none; stroke-width: 22; stroke-linecap: butt; }
.ill-seg-s1 { stroke: var(--s1); } .ill-seg-s2 { stroke: var(--s2); } .ill-seg-s3 { stroke: var(--s3); }
.ill-piste { fill: var(--srf2); }
.ill-txt { fill: var(--tx2); font-family: var(--police); font-size: 12px; font-weight: 700; }
.ill-txt-petit { font-size: 10.5px; }
.ill-txt-fort { fill: var(--tx); font-weight: 800; }
.ill-unite { fill: var(--tx2); font-family: var(--police); font-size: 12px; font-weight: 700; }
.ill-trait { fill: none; stroke: var(--ln2); stroke-width: 2; }
.ill-axe { stroke: color-mix(in srgb, var(--tx) 30%, transparent); stroke-width: 1; }
.ill-grille { stroke: var(--ln); stroke-width: 1; }
.ill-chemin { fill: none; stroke: var(--tx2); stroke-width: 2.4; stroke-dasharray: .018 .014; }
.ill-plan { fill: none; stroke: var(--p); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.ill-plan-aire { fill: var(--pp); }
.ill-point { fill: var(--p); stroke: var(--srf); stroke-width: 3; }
.ill-point-chemin { fill: var(--tx2); }
.ill-page { fill: var(--srf); stroke: var(--ln2); }
.ill-bande { fill: var(--panneau); }
.ill-logo { fill: var(--panneau-acc); }
.legende-traj { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 14px 0 0; padding: 0; font-size: .86rem; font-weight: 700; color: var(--tx2); }
.legende-traj li { display: inline-flex; align-items: center; gap: 8px; }
.trait { width: 26px; height: 0; border-top: 3px solid var(--p); }
.trait-chemin { border-top: 2px dashed var(--tx2); }

/* ── Bandeau 100 % suisse ────────────────────────────────────────────────── */
.suisse { padding: 24px 0 88px; }
.suisse-panneau { position: relative; overflow: hidden; border-radius: 30px; padding: 56px 56px 120px; color: var(--panneau-tx); background: radial-gradient(700px 360px at 90% 0%, rgba(95, 242, 207, .20), transparent 60%), linear-gradient(140deg, var(--panneau), var(--panneau-2)); box-shadow: var(--ombre); }
.suisse-tete { max-width: 760px; position: relative; z-index: 1; }
.suisse-tete h2 { color: var(--panneau-tx); font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.9rem); line-height: 1.1; margin-bottom: 18px; }
.suisse-tete p { color: var(--panneau-tx2); font-size: 1.1rem; }
.suisse-points { position: relative; z-index: 1; list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.suisse-points li { padding: 22px; border-radius: 18px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.suisse-points h3 { color: var(--panneau-tx); font-size: 1.08rem; margin: 14px 0 6px; }
.suisse-points p { color: var(--panneau-tx2); font-size: .95rem; }
.suisse-points .pastille-ic { background: rgba(95, 242, 207, .16); color: var(--panneau-acc); }
.alpes { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 120px; }
.alpes-loin { fill: rgba(95, 242, 207, .10); }
.alpes-pres { fill: rgba(95, 242, 207, .16); }
/* Carte de la Suisse (templates/site/_carte_suisse.html, produite par tools/carte_suisse.py). Arrivée
   sur la section : le contour se dessine, la trame de points apparaît, puis le point s'allume et
   pulse. Sans JavaScript, la carte se dessine au chargement ; « réduire les animations » la montre
   d'emblée, complète et immobile. */
.suisse-haut { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 430px); gap: 28px 56px; align-items: center; }
.suisse-carte { margin: 0; }
.carte-suisse { width: 100%; height: auto; }
.carte-fond { fill: url(#carte-trame); }
.carte-trame-fond { fill: var(--panneau-acc); fill-opacity: .07; }
.carte-trame-point { fill: var(--panneau-acc); fill-opacity: .45; }
.carte-contour { fill: none; stroke: var(--panneau-acc); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1 1; filter: drop-shadow(0 0 7px rgba(95, 242, 207, .5)); }
.carte-point { fill: var(--panneau-acc); stroke: var(--panneau); stroke-width: 3; transform-box: fill-box; transform-origin: center; }
.carte-onde { fill: none; stroke: var(--panneau-acc); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
@keyframes carte-trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes carte-apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes carte-allume { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes carte-onde { from { transform: scale(1); opacity: .8; } to { transform: scale(3.8); opacity: 0; } }
.carte-contour { animation: carte-trace 2.6s cubic-bezier(.45, 0, .2, 1) .3s both; }
.carte-fond { animation: carte-apparait 1s ease 2.2s both; }
.carte-point { animation: carte-allume .6s cubic-bezier(.34, 1.56, .64, 1) 2.7s both; }
.carte-onde { animation: carte-onde 2.6s cubic-bezier(.22, 1, .36, 1) 3.2s infinite; }
.carte-onde-2 { animation-delay: 4.5s; }

/* ── Modules ─────────────────────────────────────────────────────────────── */
.modules { padding: 40px 0 88px; }
.grille-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.carte-module { --acc: var(--p); position: relative; padding: 28px 26px 26px; border-radius: var(--rayon); background: var(--srf); border: 1px solid var(--ln); box-shadow: var(--ombre-douce); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.carte-module::before { content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: var(--acc); }
.carte-module:hover { transform: translateY(-3px); border-color: var(--ln2); box-shadow: var(--ombre); }
.ton-s1 { --acc: var(--s1); } .ton-s2 { --acc: var(--s2); } .ton-s3 { --acc: var(--s3); } .ton-vert { --acc: var(--vert); }
.pastille-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--tx); background: color-mix(in srgb, var(--acc, var(--p)) 18%, transparent); }
.pastille-ic .ic { width: 23px; height: 23px; }
.carte-module h3 { font-size: 1.2rem; margin: 18px 0 8px; }
.carte-module > p { color: var(--tx2); font-size: .97rem; margin-bottom: 16px; }
.liste-coches { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.liste-coches li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; line-height: 1.45; }
.liste-coches .ic { width: 18px; height: 18px; margin-top: 1px; color: var(--lien); stroke-width: 2.4; }
/* Encart des modules sur mesure : mis en avant sous la grille des modules, avec son propre bouton. */
.sur-mesure-encart { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 26px; margin-top: 26px; padding: 30px 34px; border-radius: var(--rayon); border: 1px solid color-mix(in srgb, var(--p) 50%, transparent); background: radial-gradient(520px 240px at 0% 0%, var(--pp), transparent 72%), linear-gradient(120deg, color-mix(in srgb, var(--p) 16%, var(--srf)), var(--srf) 72%); box-shadow: var(--ombre); }
.sur-mesure-ic { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; background: var(--p); color: var(--btn-tx); box-shadow: 0 10px 24px rgba(1, 184, 148, .3); }
.sur-mesure-ic .ic { width: 30px; height: 30px; stroke-width: 2; }
.sur-mesure-texte h3 { font-size: clamp(1.25rem, 1rem + .8vw, 1.55rem); margin-bottom: 6px; }
.sur-mesure-texte p { color: var(--tx2); font-size: 1.04rem; max-width: 60ch; }
.sur-mesure-encart .btn { white-space: nowrap; }

/* ── Rangées détaillées ──────────────────────────────────────────────────── */
.rangees { padding: 24px 0 64px; }
.rangee { display: grid; grid-template-columns: .92fr 1.08fr; gap: 64px; align-items: center; padding: 48px 0; }
.rangee-inverse .rangee-texte { order: 2; }
.rangee-texte h2 { font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.25rem); margin-bottom: 16px; }
.rangee-texte > p { color: var(--tx2); font-size: 1.05rem; margin-bottom: 22px; }
.rangee-visuel { margin: 0; }
.rangee-visuel .ill { filter: drop-shadow(0 22px 40px rgba(11, 57, 72, .12)); }

/* ── Pour la santé ───────────────────────────────────────────────────────── */
.mesure { padding: 88px 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg2) 70%, transparent) 18%, color-mix(in srgb, var(--bg2) 70%, transparent) 82%, transparent); }
.mesure-grille { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.mesure-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.mesure-points li { padding: 24px; border-radius: var(--rayon); background: var(--srf); border: 1px solid var(--ln); }
.mesure-points h3 { font-size: 1.08rem; margin: 14px 0 6px; }
.mesure-points p { color: var(--tx2); font-size: .95rem; }
.parcours-carte { padding: 26px; border-radius: var(--rayon); background: var(--srf); border: 1px solid var(--ln); box-shadow: var(--ombre-douce); }
.parcours-carte h3 { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; margin-bottom: 18px; }
.parcours-carte h3 .ic { color: var(--lien); }
.parcours { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.parcours::before { content: ""; position: absolute; left: 15px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--p), var(--s3)); opacity: .55; }
.parcours li { position: relative; display: flex; align-items: center; gap: 14px; font-weight: 600; }
.parcours-num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--srf); border: 2px solid var(--p); font-family: var(--titres); font-weight: 700; font-size: .88rem; color: var(--tx); }

/* ── Référentiels ────────────────────────────────────────────────────────── */
.referentiels { padding: 72px 0 40px; }
.referentiels h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); margin-bottom: 24px; }
.ref-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ref-liste li { padding: 18px 20px; border-radius: 16px; border: 1px dashed var(--ln2); background: color-mix(in srgb, var(--srf) 60%, transparent); }
.ref-liste strong { display: block; font-family: var(--titres); font-size: 1.05rem; margin-bottom: 4px; }
.ref-liste span { color: var(--tx2); font-size: .9rem; }
.ref-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; color: var(--tx2); font-size: .92rem; }
.ref-note .ic { width: 18px; height: 18px; margin-top: 2px; color: var(--lien); }

/* ── Appel final ─────────────────────────────────────────────────────────── */
.final { padding: 56px 0 96px; }
.final-carte { text-align: center; padding: 56px 32px; border-radius: 30px; border: 1px solid var(--ln2); background: radial-gradient(520px 260px at 50% 0%, var(--pp), transparent 70%), var(--srf); box-shadow: var(--ombre); }
.final-carte h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.35rem); max-width: 22ch; margin: 0 auto 14px; }
.final-carte > p { color: var(--tx2); font-size: 1.06rem; max-width: 56ch; margin: 0 auto 28px; }
.final-carte .final-ou { margin: 22px auto 0; font-size: .92rem; }

/* ── Pied de page ────────────────────────────────────────────────────────── */
.pied { border-top: 1px solid var(--ln); background: color-mix(in srgb, var(--srf) 55%, transparent); padding: 56px 0 28px; }
.pied-grille { display: grid; grid-template-columns: 1.6fr 1fr 1.1fr 1fr; gap: 32px; }
.pied-marque p { color: var(--tx2); font-size: .92rem; margin-top: 14px; max-width: 40ch; }
.pied-marque .pied-suisse { display: flex; gap: 8px; align-items: center; color: var(--tx); font-weight: 700; }
.pied-suisse .ic { color: var(--p); width: 18px; height: 18px; }
.pied-col h2 { font-family: var(--police); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tx2); margin-bottom: 14px; }
.pied-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pied-col a { color: var(--tx); text-decoration: none; font-weight: 600; font-size: .94rem; }
.pied-col a:hover { color: var(--lien); text-decoration: underline; }
.pied-col a[aria-current] { color: var(--lien); }
.lien-icone { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.lien-icone span { overflow-wrap: anywhere; min-width: 0; }
.pied-grille > * { min-width: 0; }
.lien-icone .ic { width: 17px; height: 17px; color: var(--lien); }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--ln); color: var(--tx2); font-size: .86rem; }

/* ── Pages juridiques ────────────────────────────────────────────────────── */
.juridique { padding: 56px 0 88px; }
.juridique-grille { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px 56px; }
.juridique-tete { grid-column: 1 / -1; max-width: 800px; margin-bottom: 18px; }
.juridique-tete h1 { font-size: clamp(2rem, 1.3rem + 2.2vw, 2.9rem); margin-bottom: 10px; }
.juridique-date { color: var(--tx2); font-size: .92rem; font-weight: 600; }
.juridique-intro { margin-top: 18px; font-size: 1.08rem; color: var(--tx2); max-width: 70ch; }
.sommaire { position: sticky; top: 92px; align-self: start; padding: 20px; border-radius: 18px; background: var(--srf); border: 1px solid var(--ln); }
.sommaire h2 { font-family: var(--police); font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--tx2); margin-bottom: 12px; }
.sommaire ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; font-size: .9rem; }
.sommaire a { color: var(--tx); text-decoration: none; font-weight: 600; }
.sommaire a:hover { color: var(--lien); text-decoration: underline; }
.juridique-corps { max-width: 760px; }
.juridique-corps section { padding: 26px 0; border-bottom: 1px solid var(--ln); scroll-margin-top: 92px; }
.juridique-corps section:first-child { padding-top: 0; }
.juridique-corps h2 { font-size: 1.4rem; margin-bottom: 14px; }
.juridique-corps h3 { font-size: 1.04rem; margin: 18px 0 8px; }
.juridique-corps p, .juridique-corps li { color: var(--tx); font-size: 1rem; line-height: 1.7; }
.juridique-corps p + p { margin-top: 12px; }
.juridique-corps ul { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.juridique-corps strong { font-weight: 800; }
.encadre { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--srf2); border-left: 3px solid var(--p); }
.voir-aussi { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-top: 30px; font-weight: 700; }
.voir-aussi span { color: var(--tx2); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }

/* ── Page introuvable ────────────────────────────────────────────────────── */
.introuvable { padding: 96px 0 120px; text-align: center; }
.introuvable-code { font-family: var(--titres); font-size: clamp(4rem, 3rem + 6vw, 7.5rem); font-weight: 700; line-height: 1; color: var(--p); opacity: .5; }
.introuvable h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin: 18px 0 12px; }
.introuvable p:not(.introuvable-code) { color: var(--tx2); margin-bottom: 28px; }

/* ── Animations (sobres, désactivées si l'utilisateur le demande) ───────── */
@keyframes entree { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pousse { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes monte { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes trace { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes anneau { from { stroke-dasharray: 0 402.1; } }
.entree { animation: entree .8s cubic-bezier(.22, 1, .36, 1) both; }
.e2 { animation-delay: .08s; } .e3 { animation-delay: .16s; } .e4 { animation-delay: .24s; } .e5 { animation-delay: .32s; }
.ill-seg { animation: anneau 1.4s cubic-bezier(.22, 1, .36, 1) .35s both; }
.ill-barre, .ill-pousse { transform-box: fill-box; transform-origin: left center; animation: pousse 1.1s cubic-bezier(.22, 1, .36, 1) .45s both; }
.ill-d2 { animation-delay: .55s; } .ill-d3 { animation-delay: .65s; } .ill-d4 { animation-delay: .75s; } .ill-d5 { animation-delay: .85s; }
.ill-tuile-g { animation: entree .8s cubic-bezier(.22, 1, .36, 1) .3s both; }
.ill-trace { stroke-dasharray: 1 1; animation: trace 1.6s cubic-bezier(.45, 0, .2, 1) .5s both; }
.ill-chemin.ill-trace { stroke-dasharray: .018 .014; animation: none; }
.ill-trace-lent { animation-duration: 2.2s; }
.ill-colonne { transform-box: fill-box; transform-origin: center bottom; animation: monte .9s cubic-bezier(.22, 1, .36, 1) .3s both; }
.ill-page-g { animation: entree .9s cubic-bezier(.22, 1, .36, 1) .2s both; }
/* Sous la ligne de flottaison, les animations attendent l'arrivée du bloc à l'écran. */
.anime .revele { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.22, 1, .36, 1); }
.anime .revele.vu { opacity: 1; transform: none; }
.anime .revele:not(.vu) .carte-suisse *, .anime .revele:not(.vu) .ill-barre, .anime .revele:not(.vu) .ill-pousse, .anime .revele:not(.vu) .ill-colonne,
.anime .revele:not(.vu) .ill-trace, .anime .revele:not(.vu) .ill-page-g { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Écrans moyens et petits ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav-principale { display: none; }
  .grille-modules { grid-template-columns: repeat(2, 1fr); }
  .ref-liste { grid-template-columns: repeat(2, 1fr); }
  .pied-grille { grid-template-columns: 1.4fr 1fr 1fr; }
  .pied-marque { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .ouverture { padding: 40px 0 48px; }
  .ouverture-grille, .rangee, .mesure-grille { grid-template-columns: 1fr; gap: 36px; }
  .rangee { padding: 32px 0; }
  .rangee-inverse .rangee-texte { order: 0; }
  .suisse-panneau { padding: 40px 28px 110px; }
  .suisse-points { grid-template-columns: 1fr; }
  .suisse-haut { grid-template-columns: 1fr; }
  .suisse-carte { width: 100%; max-width: 440px; justify-self: center; }
  .juridique-grille { grid-template-columns: 1fr; }
  .sommaire { position: static; }
}
@media (max-width: 640px) {
  .enveloppe { width: calc(100% - 32px); }
  .entete-ligne { gap: 10px; min-height: 60px; }
  .marque { font-size: 1.08rem; gap: 8px; }
  .marque img { width: 30px; height: 30px; }
  .entete-actions { gap: 6px; }
  .theme-bascule { width: 34px; height: 34px; }
  .langues { display: none; }
  .langues-menu { display: block; }
  .btn-petit { padding: 8px 12px; font-size: .84rem; }
  .ouverture h1 { font-size: 2.05rem; }
  .chapeau { font-size: 1.04rem; }
  .boutons .btn { width: 100%; }
  .ouverture-visuel .ill-mini { display: none; }
  .grille-modules, .mesure-points, .ref-liste { grid-template-columns: 1fr; }
  .pied-grille { grid-template-columns: 1fr; gap: 26px; }
  .suisse { padding-bottom: 64px; }
  .modules, .mesure { padding: 56px 0; }
  .final-carte { padding: 40px 20px; }
  .sur-mesure-encart { grid-template-columns: 1fr; padding: 26px 22px; }
  .sur-mesure-encart .btn { width: 100%; white-space: normal; }
}
/* Téléphones : le bouton de thème prend la place du globe, le menu « FR » reste explicite.
   Connecté, le bouton dit déjà « Ouvrir CarbonLab » : le logo seul suffit à côté. */
@media (max-width: 480px) {
  .langues-menu summary > .ic:first-child { display: none; }
}
@media (max-width: 430px) {
  .entete-connecte .marque span { display: none; }
}
@media (max-width: 400px) {
  .entete-ligne { gap: 8px; }
  .marque { font-size: 1rem; gap: 6px; }
  .marque img { width: 28px; height: 28px; }
  .entete-actions { gap: 5px; }
  .langues-menu summary { padding: 6px 8px; }
  .theme-bascule { width: 32px; height: 32px; }
  .entete-actions .btn-petit { padding: 8px 10px; font-size: .8rem; }
}
@media (max-width: 340px) {
  .entete .marque span { display: none; }
}
@media print {
  .entete, .langues-menu, .sommaire, .ouverture-visuel, .alpes { display: none; }
  body { background: #fff; }
  .anime .revele { opacity: 1 !important; transform: none !important; }
}
