/* ==========================================================================
   CARNET — vitrine · feuille partagée (« Le carnet ouvert »)
   --------------------------------------------------------------------------
   Aucune ressource externe (CSP : style-src 'self', font-src 'self').
   Thèmes : une palette = une surcharge des 7 JETONS couleur, jamais une règle
   de composant par palette. Hex UNIQUEMENT dans les blocs de jetons ci-dessous.
     <html>                         -> mode « comme l'appareil » + Sarcelle
     <html data-theme="light|dark"> -> mode forcé (clé localStorage carnet-theme)
     <html data-palette="argile|prune|ardoise"> (clé carnet-palette ; absent = sarcelle)
   Spécificité : tout est préfixé par :root pour que le bloc le plus précis gagne
     :root (0,1,0) < :root[data-theme=dark] = :root:not([data-theme=light]) (0,2,0)
     = :root[data-palette=x] (0,2,0) < :root[data-palette=x][data-theme=dark] (0,3,0)
   ========================================================================== */

/* ---------- Polices (OFL — voir assets/fonts/LICENCES.txt) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  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: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin-ext.woff2") format("woff2");
  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;
}
/* Italique : fichier « wght » seul (pas d'axe SOFT ni opsz) ; latin seulement. */
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-italic-latin.woff2") format("woff2");
  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: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/sourcesans3-latin.woff2") format("woff2");
  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: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/sourcesans3-latin-ext.woff2") format("woff2");
  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;
}

/* ==========================================================================
   JETONS — 4 palettes × clair/sombre (bg · surface · fg · muted · accent · accent-fg · line)
   ========================================================================== */

/* --- Sarcelle clair (défaut, marque) + jetons non colorés --- */
:root {
  --bg: #f7f5f0;
  --surface: #fffdf8;
  --fg: #1c2321;
  --muted: #4f5b57;
  --accent: #0f766e;
  --accent-fg: #ffffff;
  --line: #ddd7cb;

  /* Pastilles du sélecteur (identité fixe de chaque palette, tous modes) */
  --pastille-sarcelle: #0f766e;
  --pastille-argile: #9a3f22;
  --pastille-prune: #7a2e6b;
  --pastille-ardoise: #25507a;

  color-scheme: light;
  --ombre: 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .08);
  --ombre-forte: 0 2px 4px rgb(0 0 0 / .08), 0 18px 44px rgb(0 0 0 / .12);
  --grain-op: 3%;

  --accent-voile: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-doux: color-mix(in srgb, var(--accent) 22%, var(--surface));
  --surface-2: color-mix(in srgb, var(--fg) 4%, var(--surface));
  --entete-fond: color-mix(in srgb, var(--bg) 85%, transparent);

  --rayon: 14px;
  --rayon-petit: 10px;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px; --e8: 64px;
  --gouttiere: 16px;
  --largeur: 72rem;
  --mesure: 66ch;
  --entete-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --f-titre: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-texte: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Sarcelle sombre (sert aussi de socle sombre : ombres, grain, color-scheme) --- */
:root[data-theme="dark"] {
  --bg: #0f1a19;
  --surface: #162524;
  --fg: #ece8df;
  --muted: #a9b8b3;
  --accent: #5eead4;
  --accent-fg: #06201d;
  --line: #2a3b39;
  color-scheme: dark;
  --ombre: 0 1px 2px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .4);
  --ombre-forte: 0 2px 4px rgb(0 0 0 / .4), 0 18px 44px rgb(0 0 0 / .5);
  --grain-op: 0%;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1a19;
    --surface: #162524;
    --fg: #ece8df;
    --muted: #a9b8b3;
    --accent: #5eead4;
    --accent-fg: #06201d;
    --line: #2a3b39;
    color-scheme: dark;
    --ombre: 0 1px 2px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .4);
    --ombre-forte: 0 2px 4px rgb(0 0 0 / .4), 0 18px 44px rgb(0 0 0 / .5);
    --grain-op: 0%;
  }
}

/* --- Argile (terre cuite) --- */
:root[data-palette="argile"] {
  --bg: #faf5ef; --surface: #fffcf7; --fg: #2a1f1a; --muted: #5e4f46;
  --accent: #9a3f22; --accent-fg: #ffffff; --line: #e6d8ca;
}
:root[data-palette="argile"][data-theme="dark"] {
  --bg: #1c1512; --surface: #271d19; --fg: #f3e9e0; --muted: #c3b1a4;
  --accent: #f0a07c; --accent-fg: #2a120a; --line: #3d2f28;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="argile"]:not([data-theme="light"]) {
    --bg: #1c1512; --surface: #271d19; --fg: #f3e9e0; --muted: #c3b1a4;
    --accent: #f0a07c; --accent-fg: #2a120a; --line: #3d2f28;
  }
}

/* --- Prune --- */
:root[data-palette="prune"] {
  --bg: #f8f5f8; --surface: #fffcfe; --fg: #241a26; --muted: #574a5a;
  --accent: #7a2e6b; --accent-fg: #ffffff; --line: #e3d8e2;
}
:root[data-palette="prune"][data-theme="dark"] {
  --bg: #181219; --surface: #231a25; --fg: #efe6ef; --muted: #bcaabd;
  --accent: #e3a6d6; --accent-fg: #2a0f25; --line: #3a2c3c;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="prune"]:not([data-theme="light"]) {
    --bg: #181219; --surface: #231a25; --fg: #efe6ef; --muted: #bcaabd;
    --accent: #e3a6d6; --accent-fg: #2a0f25; --line: #3a2c3c;
  }
}

/* --- Ardoise (bleu-gris) --- */
:root[data-palette="ardoise"] {
  --bg: #f4f6f8; --surface: #ffffff; --fg: #18202a; --muted: #4c5866;
  --accent: #25507a; --accent-fg: #ffffff; --line: #d6dde5;
}
:root[data-palette="ardoise"][data-theme="dark"] {
  --bg: #10151c; --surface: #18202a; --fg: #e6ebf1; --muted: #a8b4c2;
  --accent: #8fb8e8; --accent-fg: #0b1a2c; --line: #2b3644;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="ardoise"]:not([data-theme="light"]) {
    --bg: #10151c; --surface: #18202a; --fg: #e6ebf1; --muted: #a8b4c2;
    --accent: #8fb8e8; --accent-fg: #0b1a2c; --line: #2b3644;
  }
}

/* --- Impression : encre noire sur papier blanc, quelle que soit la palette --- */
@media print {
  :root {
    --bg: #ffffff !important; --surface: #ffffff !important; --fg: #000000 !important;
    --muted: #333333 !important; --accent: #000000 !important; --accent-fg: #ffffff !important;
    --line: #999999 !important;
    --ombre: none !important; --ombre-forte: none !important; --grain-op: 0% !important;
    color-scheme: light !important;
  }
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--entete-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(color-mix(in srgb, var(--fg) var(--grain-op), transparent) 1px, transparent 1.2px),
    radial-gradient(color-mix(in srgb, var(--fg) var(--grain-op), transparent) 1px, transparent 1.2px);
  background-size: 5px 5px, 7px 7px;
  background-position: 0 0, 2px 3px;
  color: var(--fg);
  font-family: var(--f-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
html.pret body { transition: background-color .25s ease, color .25s ease; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 {
  font-family: var(--f-titre);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  color: var(--fg);
  margin: 0 0 var(--e4);
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw + 1rem, 4.25rem); line-height: 1.05; letter-spacing: -0.015em; font-weight: 600; }
h2 { font-size: clamp(1.8rem, 3vw + 1rem, 2.75rem); line-height: 1.15; letter-spacing: -0.01em; font-weight: 600; }
h3 { font-size: 1.375rem; line-height: 1.3; font-weight: 500; }
h4 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; font-family: var(--f-texte); font-variation-settings: normal; }
p, ul, ol, dl, blockquote, figure, table { margin: 0 0 var(--e4); }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: var(--e1); }
small, .petit { font-size: .9375rem; }
strong, b { font-weight: 600; }
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--e6) 0; }
code, kbd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92em; }
::selection { background: var(--accent); color: var(--accent-fg); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

.tabnum, .prix-chiffre, time { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.centre { text-align: center; }
.mesure { max-width: var(--mesure); }
.sr, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Lien d'évitement : premier élément focusable */
.skip {
  position: absolute; left: var(--e4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-fg); padding: var(--e3) var(--e4);
  border-radius: var(--rayon-petit); font-weight: 600; text-decoration: none;
}
.skip:focus { top: var(--e3); }

/* ==========================================================================
   GABARIT
   ========================================================================== */
.wrap { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere); }
@media (min-width: 720px) { :root { --gouttiere: 32px; } }

.sec { padding-block: clamp(4rem, 10vw, 8rem); }
.sec-serre { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.sec-alt { background: color-mix(in srgb, var(--surface) 70%, transparent); border-block: 1px solid var(--line); }
.sec-tete { max-width: 44rem; margin-bottom: var(--e7); }
.sec-tete.centre { margin-inline: auto; }
.sec-tete p { color: var(--muted); font-size: 1.125rem; }
.surtitre {
  display: inline-block; margin: 0 0 var(--e3);
  font-size: .875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.accroche { font-family: var(--f-titre); font-style: italic; font-weight: 400; font-size: 1.25rem; line-height: 1.45; color: var(--muted); }

.grille { display: grid; gap: var(--e5); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grille { gap: var(--e6); }
  .grille-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grille-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px) and (max-width: 959px) { .grille-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==========================================================================
   EN-TÊTE  header.top > .wrap
   ========================================================================== */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--entete-fond);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
header.top.defile { border-bottom-color: var(--line); }
header.top > .wrap { display: flex; align-items: center; gap: var(--e4); min-height: var(--entete-h); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-family: var(--f-titre); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600; font-size: 1.375rem; letter-spacing: -0.01em;
  color: var(--fg); text-decoration: none; margin-right: auto;
}
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .logo-fond { fill: var(--accent); }
.brand .logo-trait { stroke: var(--accent-fg); }
.brand:hover { text-decoration: none; }
header.top nav { display: flex; align-items: center; gap: var(--e1); }
header.top nav > a, .nav-liens a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--e3);
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: .9875rem; border-radius: 999px;
}
header.top nav > a:hover, .nav-liens a:hover { background: var(--accent-voile); }
/* Page courante : texte --fg + soulignement accent (l'accent sur --accent-voile tombe à 4.28:1 en Sarcelle clair). */
header.top nav > a[aria-current], .nav-liens a[aria-current] {
  color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.nav-liens { display: flex; align-items: center; gap: var(--e1); }
.outils { display: flex; align-items: center; gap: var(--e1); }

/* Sélecteur de langue  details.lang (balisage de scripts/pages-langues.mjs) */
details.lang { position: relative; }
details.lang > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; min-height: 44px; padding: 0 var(--e3);
  border-radius: 999px; font-weight: 600; font-size: .9375rem; color: var(--fg);
}
details.lang > summary::-webkit-details-marker { display: none; }
details.lang > summary::after {
  content: ""; width: 6px; height: 6px; margin-left: 4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
details.lang > summary:hover, details.lang[open] > summary { background: var(--accent-voile); }
details.lang ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: 6px; list-style: none; width: max-content; max-width: min(280px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rayon-petit); box-shadow: var(--ombre);
}
details.lang li + li { margin-top: 0; }
details.lang a {
  display: flex; align-items: center; min-height: 44px; padding: 0 var(--e3); border-radius: 8px;
  color: var(--fg); text-decoration: none; font-size: .9375rem;
}
details.lang a:hover { background: var(--accent-voile); }
details.lang a[aria-current] { color: var(--accent); font-weight: 600; }
details.lang small { display: block; color: var(--muted); font-size: .8125rem; }

/* Bouton de thème + panneau */
button.themebtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--fg); cursor: pointer;
}
button.themebtn:hover, button.themebtn[aria-expanded="true"] { background: var(--accent-voile); }
button.themebtn svg { width: 20px; height: 20px; }
/* Icônes soleil/lune : compatibles avec l'enveloppe légale (.sun/.moon) */
.themebtn .sun { display: none; }
:root[data-theme="dark"] .themebtn .sun { display: block; }
:root[data-theme="dark"] .themebtn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .themebtn .sun { display: block; }
  :root:not([data-theme="light"]) .themebtn .moon { display: none; }
}
/* Sans JS, le bouton à panneau ne sert à rien : le thème suit l'appareil. */
html:not(.js) .themebtn[aria-controls] { display: none; }

.themepanel {
  /* [popover] (couche supérieure) avec repli [hidden] */
  position: fixed; inset: auto; top: calc(var(--entete-h) + 4px); right: var(--gouttiere);
  margin: 0; width: min(320px, calc(100vw - 32px));
  padding: var(--e5); border: 1px solid var(--line); border-radius: var(--rayon);
  background: var(--surface); color: var(--fg); box-shadow: var(--ombre-forte); z-index: 70;
}
.themepanel[hidden] { display: none; }
.themepanel fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.themepanel fieldset + fieldset { margin-top: var(--e5); }
.themepanel legend { padding: 0; margin-bottom: var(--e3); font-weight: 600; font-size: .9375rem; }
.choix-mode { display: grid; gap: var(--e1); }
.choix-mode label {
  display: flex; align-items: center; gap: var(--e3); min-height: 44px; padding: 0 var(--e3);
  border-radius: var(--rayon-petit); cursor: pointer;
}
.choix-mode label:hover { background: var(--accent-voile); }
.choix-mode input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.choix-palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--e2); }
.choix-palette label {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 44px; padding: var(--e2) 0; border-radius: var(--rayon-petit);
  font-size: .8125rem; font-weight: 600; cursor: pointer; text-align: center;
}
.choix-palette input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pastille {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--muted); box-shadow: inset 0 0 0 3px var(--surface);
  background: var(--pastille);
}
/* La pastille montre l'accent CLAIR de chaque palette (jetons --pastille-*), sans texte dessus. */
.pastille-sarcelle { --pastille: var(--pastille-sarcelle); }
.pastille-argile   { --pastille: var(--pastille-argile); }
.pastille-prune    { --pastille: var(--pastille-prune); }
.pastille-ardoise  { --pastille: var(--pastille-ardoise); }
.choix-palette input:checked + .pastille { border-color: var(--fg); outline: 2px solid var(--accent); outline-offset: 2px; }
.choix-palette input:focus-visible + .pastille { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Menu mobile : details.menu (plein écran sous 760 px) */
details.menu { display: none; }
details.menu > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px; color: var(--fg);
}
details.menu > summary::-webkit-details-marker { display: none; }
details.menu > summary:hover, details.menu[open] > summary { background: var(--accent-voile); }
details.menu > summary svg { width: 22px; height: 22px; }
details.menu .ferme { display: none; }
details.menu[open] .ouvre { display: none; }
details.menu[open] .ferme { display: block; }
.menu-panneau {
  position: fixed; left: 0; right: 0; top: var(--entete-h); bottom: 0; z-index: 55;
  overflow-y: auto; padding: var(--e5) var(--gouttiere) var(--e7);
  background: var(--bg); border-top: 1px solid var(--line);
}
.menu-panneau ul { list-style: none; margin: 0; padding: 0; }
.menu-panneau li + li { margin-top: 0; border-top: 1px solid var(--line); }
.menu-panneau a:not(.btn):not(.btn2) {
  display: flex; align-items: center; min-height: 56px;
  font-family: var(--f-titre); font-variation-settings: "SOFT" 100, "WONK" 0;
  font-size: 1.5rem; font-weight: 500; color: var(--fg); text-decoration: none;
}
.menu-panneau .btn { margin-top: var(--e5); width: 100%; }
.menu-panneau .btn-abo { margin-top: var(--e3); width: 100%; }
html.menu-ouvert { overflow: hidden; }
/* backdrop-filter fait de l'en-tête le bloc conteneur des descendants fixes : on le retire
   menu ouvert pour que le panneau couvre tout l'écran. */
html.menu-ouvert header.top, header.top:has(details.menu[open]) {
  -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg);
}
@media (max-width: 759.98px) {
  header.top .nav-liens { display: none; }
  details.menu { display: block; }
}
@media (min-width: 760px) { details.menu { display: none !important; } }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.btn, .btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e2);
  min-height: 48px; padding: 0 var(--e5); border-radius: 999px;
  font-family: var(--f-texte); font-weight: 600; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s ease;
}
.btn { background: var(--accent); color: var(--accent-fg); border: 0; box-shadow: var(--ombre); }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--ombre-forte); }
.btn2 { background: transparent; color: var(--fg); border: 1.5px solid var(--muted); }
.btn2:hover { text-decoration: none; background: var(--accent-voile); border-color: var(--fg); }
.btn svg, .btn2 svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3) var(--e5); }

/* « Je m'abonne » (10.2026) : le chemin vers l'abonnement, doux et répété. Contour (.btn2), jamais plein : il
   accompagne « Essayer » sans lui disputer la place. Dans l'en-tête étroit, l'icône seule (le libellé reste lu par
   les lecteurs d'écran et sert d'infobulle) ; texte entier dans le panneau du menu et dans les rappels. Entre 760 et
   1200 px, les liens de navigation reviennent dans l'en-tête : l'icône seule, là aussi. */
.btn-abo svg { flex: none; }
header.top .outils > .btn-abo { min-height: 40px; padding: 0 var(--e4); gap: 6px; font-size: .9375rem; box-shadow: none; white-space: nowrap; }
@media (max-width: 559.98px), (min-width: 760px) and (max-width: 1199.98px) {
  header.top .outils > .btn-abo { width: 40px; padding: 0; }
  header.top .outils > .btn-abo .btn-abo-texte {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
/* Très petits écrans (360 px) : on resserre les espaces de l'en-tête, jamais les cibles de 44 px. */
@media (max-width: 399.98px) {
  header.top > .wrap { gap: var(--e1); }
  header.top .outils .btn-entete, header.top .outils .btn.essayer { padding: 0 var(--e2); margin-inline-start: 0; }
  header.top details.lang > summary { padding: 0 var(--e2); }
}
/* Tablette (760-1200 px) : les liens reviennent dans l'en-tête à côté des boutons ; on resserre leurs marges. */
@media (min-width: 760px) and (max-width: 1199.98px) {
  header.top > .wrap { gap: var(--e3); }
  header.top nav > a, header.top .nav-liens a { padding: 0 var(--e2); }
}
/* Écran large : le libellé entier ; les liens restent sur une ligne, un peu plus serrés jusqu'à 1440 px. */
@media (min-width: 1200px) { header.top .nav-liens a { white-space: nowrap; } }
@media (min-width: 1200px) and (max-width: 1439.98px) { header.top .nav-liens a { padding: 0 var(--e2); } }
/* Le rappel : une ligne, le bouton. Même forme partout (accueils, prix, guides, bêta). */
.rappel-abo {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--e3) var(--e6);
  margin-top: var(--e7); padding-top: var(--e5); border-top: 1px solid var(--line); text-align: left;
}
.rappel-abo p { margin: 0; }
hr + .rappel-abo { margin-top: 0; padding-top: 0; border-top: 0; }
.rappel-abo small { display: block; margin-top: 2px; color: var(--muted); font-size: .9375rem; }
.final .rappel-abo { justify-content: center; text-align: center; }
.lien-fleche { font-weight: 600; text-decoration: none; }
.lien-fleche::after { content: " →"; }
.lien-fleche:hover { text-decoration: underline; }

/* Ligne « Bêta et accès anticipé » */
.etiquette {
  display: inline-flex; align-items: center; gap: var(--e2);
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-voile); color: var(--fg); font-size: .875rem; font-weight: 600;
}
.etiquette::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ==========================================================================
   HÉROS
   ========================================================================== */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 8vw, 6rem); overflow-x: clip; }
.hero-grille { display: grid; gap: var(--e7); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grille { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: var(--e8); } }
.hero h1 { max-width: 14ch; }
.hero .chapeau { font-size: clamp(1.125rem, 1vw + .9rem, 1.3125rem); color: var(--muted); max-width: 36ch; margin-bottom: var(--e5); }
.hero .actions { margin-bottom: var(--e5); }
/* Accueils : la bande de preuves colle au héros (plus de zones mortes de ~190 px à 1280 px). */
.hero#top { padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero#top + .sec-serre { padding-block: 0 clamp(1rem, 3vw, 2rem); }
.hero#top + .sec-serre + .sec { padding-top: clamp(3rem, 6vw, 5rem); }

/* Cadre de téléphone en CSS (aucune forme de marque) */
.telephone {
  position: relative; width: min(320px, 100%); margin-inline: auto;
  border: 10px solid color-mix(in srgb, var(--fg) 90%, transparent);
  border-radius: 36px; background: var(--surface); box-shadow: var(--ombre-forte);
  padding: var(--e5) var(--e4) var(--e6);
  transform: rotate(-1deg);
}
.telephone::before { /* simple encoche neutre */
  content: ""; position: absolute; top: 8px; left: 50%; width: 72px; height: 6px; margin-left: -36px;
  border-radius: 999px; background: color-mix(in srgb, var(--fg) 18%, transparent);
}
.maquette-titre { font-family: var(--f-titre); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 600; font-size: 1.25rem; margin: var(--e3) 0 var(--e1); }
.maquette-sous { font-size: .875rem; color: var(--muted); margin-bottom: var(--e4); }
.tournee { list-style: none; margin: 0; padding: 0; }
.tournee li {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: var(--e3);
  padding: var(--e3) 0; margin: 0; border-top: 1px solid var(--line); font-size: .9375rem;
}
.tournee li:first-child { border-top: 0; }
.tournee .heure { font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tournee .qui { font-weight: 600; line-height: 1.3; }
.tournee .quoi { display: block; font-weight: 400; color: var(--muted); font-size: .8125rem; }
/* Case cochée : état FINAL par défaut (vu tel quel sans animation) */
.coche {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-fg);
}
.coche svg { width: 14px; height: 14px; }
.maquette-legende { margin-top: var(--e4); font-size: .9375rem; color: var(--muted); text-align: center; }

/* Maquette générique (grille 2×2) */
.maquette {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: var(--e5); overflow: hidden;
}
.maquette .ligne { display: flex; justify-content: space-between; gap: var(--e3); padding: var(--e2) 0; border-top: 1px solid var(--line); font-size: .9375rem; }
.maquette .ligne:first-of-type { border-top: 0; }
.figure-legende { margin-top: var(--e3); color: var(--muted); font-size: .9375rem; }

/* ==========================================================================
   BANDE DE PREUVES
   ========================================================================== */
.preuves { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--e3); }
.preuves li {
  display: inline-flex; align-items: center; gap: var(--e2); margin: 0;
  min-height: 44px; padding: 0 var(--e4); border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .9375rem;
}
.preuves svg { color: var(--accent); }

/* Pictos SVG au trait */
.picto { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.picto-grand { width: 32px; height: 32px; }
.picto-rond {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent-voile); color: var(--accent); margin-bottom: var(--e4);
}

/* ==========================================================================
   CARTE « PAGE DE CARNET »
   ========================================================================== */
.page {
  position: relative; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: clamp(24px, 3vw, 28px) clamp(24px, 3vw, 28px) clamp(24px, 3vw, 28px) calc(clamp(24px, 3vw, 28px) + 12px);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .25s ease;
}
.page::before { /* filet de marge du cahier */
  content: ""; position: absolute; top: 0; bottom: 0; left: 20px; width: 3px; background: var(--accent-voile);
}
a.page, .page-lien { color: inherit; text-decoration: none; display: block; }
.page:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.page h3 { margin-bottom: var(--e2); }
.page p:last-child, .page ul:last-child { margin-bottom: 0; }
.page .muted { font-size: 1rem; }
.points { list-style: none; padding: 0; }
.points li { position: relative; padding-left: 28px; }
.points li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* ==========================================================================
   PRIX
   ========================================================================== */
.prix-cartes { display: grid; gap: var(--e5); grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 720px) { .prix-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e6); } }
.carte-prix { display: flex; flex-direction: column; }
.carte-prix .actions { margin-top: auto; padding-top: var(--e5); }
.carte-prix-vedette { outline: 2px solid var(--accent); outline-offset: -2px; }
.prix-chiffre { font-family: var(--f-titre); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 600; font-size: 2.25rem; line-height: 1.1; }
.ornement {
  font-family: var(--f-titre); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 600;
  font-size: clamp(3.5rem, 10vw, 6rem); line-height: .9; letter-spacing: -0.02em;
  color: var(--accent); font-variant-numeric: tabular-nums; margin: var(--e2) 0 var(--e4);
}
.discret { font-size: .9375rem; color: var(--muted); }

/* Tableau défilant (grille des pays, pages légales) */
.defile-x, .tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--e5); border: 1px solid var(--line); border-radius: var(--rayon-petit); }
.defile-x table, .tablewrap table { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; vertical-align: top; padding: var(--e2) var(--e3); border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--surface-2); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.etat { color: var(--muted); font-size: .8125rem; }

/* ==========================================================================
   FAQ / details génériques
   ========================================================================== */
.faq { max-width: 48rem; }
.faq details, details.pli { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary, details.pli > summary {
  list-style: none; cursor: pointer; position: relative;
  display: flex; align-items: center; min-height: 56px; padding: var(--e4) 40px var(--e4) 0;
  font-weight: 600; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker, details.pli > summary::-webkit-details-marker { display: none; }
.faq summary::after, details.pli > summary::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); transition: transform .2s var(--ease);
}
.faq details[open] > summary::after, details.pli[open] > summary::after { transform: rotate(45deg); }
.faq details > :not(summary), details.pli > :not(summary) { margin-top: 0; padding-bottom: var(--e4); color: var(--fg); }
.faq summary:hover, details.pli > summary:hover { color: var(--accent); }

/* ==========================================================================
   PAROLE (« Fait par un infirmier ») : une citation seule, sans portrait
   ========================================================================== */
.parole { max-width: 46rem; }
.citation { font-family: var(--f-titre); font-style: italic; font-weight: 400; font-size: clamp(1.25rem, 1.2vw + 1rem, 1.625rem); line-height: 1.4; margin: 0 0 var(--e4); }
.parole .citation { border-left: 3px solid var(--accent); padding-left: var(--e5); margin-block: var(--e5) var(--e4); }
.parole .citation p { margin: 0; }
.citation-signature { font-weight: 600; color: var(--muted); }
.parole .citation-signature { padding-left: calc(var(--e5) + 3px); }
/* Le cœur du pied « avec ❤ » : un caractère de texte, jamais l'émoji en couleur. */
.coeur { font-variant-emoji: text; }

/* Appel final */
.final { text-align: center; }
.final h2 { max-width: 20ch; margin-inline: auto; }
.final .actions { justify-content: center; }

/* ==========================================================================
   PIED  footer.foot
   ========================================================================== */
footer.foot { border-top: 1px solid var(--line); padding-block: var(--e7) var(--e6); color: var(--muted); font-size: .9375rem; }
footer.foot a { color: var(--fg); text-decoration-color: var(--line); }
footer.foot a:hover { color: var(--accent); text-decoration-color: currentColor; }
.foot-cols { display: grid; gap: var(--e6); grid-template-columns: 1fr; margin-bottom: var(--e6); }
@media (min-width: 720px) { .foot-cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot-cols h2 { font-family: var(--f-texte); font-variation-settings: normal; font-size: .875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); margin-bottom: var(--e3); }
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li + li { margin-top: var(--e2); }
.foot-bas { display: flex; flex-wrap: wrap; gap: var(--e2) var(--e5); padding-top: var(--e5); border-top: 1px solid var(--line); }
/* Enveloppe légale actuelle : <footer class="foot"><div class="wrap"><span>…</span><span>…</span> */
footer.foot > .wrap > span { display: block; }
footer.foot > .wrap > span + span { margin-top: var(--e2); }

/* ==========================================================================
   PAGES DE TEXTE (légales, confiance, relève…)
   ========================================================================== */
.prose, main > .wrap > article {
  max-width: 68ch; font-size: 1.125rem; line-height: 1.65;
  margin-inline: auto; padding-block: var(--e7) var(--e8);
}
.prose h1, main > .wrap > article h1 { font-size: clamp(2.1rem, 3.5vw + 1rem, 3.25rem); }
.prose h2, main > .wrap > article h2 { font-size: clamp(1.5rem, 1.6vw + 1rem, 2rem); margin-top: var(--e7); }
.prose h3, main > .wrap > article h3 { margin-top: var(--e6); }
.prose li, main > .wrap > article li { margin-top: var(--e2); }
.essentiel {
  background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: var(--e5) var(--e5) var(--e5) calc(var(--e5) + 12px); position: relative; margin-bottom: var(--e7);
}
.essentiel::before { content: ""; position: absolute; top: 0; bottom: 0; left: 20px; width: 3px; background: var(--accent); }
.essentiel > :first-child { margin-top: 0; }
.essentiel > :last-child { margin-bottom: 0; }
/* Sommaire : latéral collant dès 1100 px (nav.sommaire-lat), plié en dessous (details.sommaire) */
.doc-grille { display: block; }
.sommaire-lat { display: none; }
details.sommaire { margin: var(--e5) 0; border: 1px solid var(--line); border-radius: var(--rayon-petit); padding: 0 var(--e4); background: var(--surface); }
details.sommaire > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
details.sommaire ol, .sommaire-lat ol { padding-left: 1.2em; font-size: .9375rem; }
@media (min-width: 1100px) {
  .doc-grille { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: var(--e7); align-items: start; }
  .sommaire-lat { display: block; position: sticky; top: calc(var(--entete-h) + 24px); max-height: calc(100vh - var(--entete-h) - 48px); overflow-y: auto; padding-top: var(--e7); font-size: .9375rem; }
  .sommaire-lat a { color: var(--muted); text-decoration: none; }
  .sommaire-lat a:hover { color: var(--accent); text-decoration: underline; }
  .doc-grille details.sommaire { display: none; }
  .doc-grille .prose, .doc-grille article { margin-inline: 0; }
}

/* ==========================================================================
   MOUVEMENT — le contenu n'est caché que si le JS tourne (.js)
   ========================================================================== */
.js .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .ornement.reveal { transform: translateY(24px); transition-duration: .9s; }
.js .ornement.reveal.is-visible { transform: none; }

/* Héros : la maquette arrive (fondu + -1.5° → -1°), puis les soins se cochent un à un, une seule fois. */
@media (prefers-reduced-motion: no-preference) {
  .js .telephone { animation: arrivee .8s var(--ease) both; }
  .js .tournee .coche { animation: coche-fond .3s var(--ease) both; animation-delay: calc(.9s + var(--n, 0) * .3s); }
  .js .tournee .coche svg { animation: coche-trait .3s var(--ease) both; animation-delay: calc(.9s + var(--n, 0) * .3s); }
}
.tournee li:nth-child(1) { --n: 0; }
.tournee li:nth-child(2) { --n: 1; }
.tournee li:nth-child(3) { --n: 2; }
.tournee li:nth-child(4) { --n: 3; }
@keyframes arrivee {
  from { opacity: 0; transform: translateY(16px) rotate(-1.5deg); }
  to   { opacity: 1; transform: rotate(-1deg); }
}
@keyframes coche-fond {
  from { background: transparent; }
  to   { background: var(--accent); }
}
@keyframes coche-trait {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: none; }
}

/* Mouvement réduit : RIEN ne bouge, tout est visible, la tournée est cochée d'emblée. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal, .js .ornement.reveal, .reveal { opacity: 1 !important; transform: none !important; }
  .page:hover, .btn:hover { transform: none; }
}

/* Couleurs forcées (contraste élevé du système) */
@media (forced-colors: active) {
  body { background-image: none; }
  .page::before, .essentiel::before { background: CanvasText; }
  .btn, .btn2, .preuves li, .etiquette { border: 1px solid ButtonText; }
  .coche { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .pastille { forced-color-adjust: none; }
}

/* ==========================================================================
   IMPRESSION — sobre, sans chrome, lisible en noir et blanc
   ========================================================================== */
@media print {
  body { background: none; font-size: 11pt; line-height: 1.45; }
  header.top, .skip, .themepanel, details.menu, button.themebtn, details.lang, .actions, .btn, .btn2, .rappel-abo, .telephone, .maquette, .preuves { display: none !important; }
  .sec, .hero { padding-block: 12pt; }
  .sec-alt { background: none; border: 0; }
  .page, .essentiel, .carte-prix { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; transform: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  h1, h2, h3 { break-after: avoid; }
  a { color: inherit; text-decoration: underline; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
  footer.foot { border-top: 1px solid var(--line); }
  .sommaire-lat, details.sommaire { display: none !important; }
}
