/* ==========================================================================
   Le Guide du Viager — feuille de style
   Direction : encyclopédie moderne / design suisse.
   Blanc pur, noir profond, une couleur signal (bleu électrique #0033FF),
   grille 12 colonnes, grotesque néo-suisse (Schibsted Grotesk) + mono (IBM Plex Mono).
   ========================================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
  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: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap;
  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: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
  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;
}

:root {
  --ink: #0a0a0a;
  --paper: #ffffff;
  --signal: #0033ff;        /* 7,2:1 sur blanc */
  --signal-ink: #ffffff;
  --muted: #555555;         /* 7,46:1 sur blanc */
  --line: #0a0a0a;
  --hair: #d9d9d6;
  --surface: #f4f4f2;
  --surface-2: #ebebe7;
  --max: 1360px;
  --gutter: clamp(16px, 2.2vw, 32px);
  --col-gap: clamp(16px, 2vw, 28px);
  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1.06rem, 1.02rem + 0.2vw, 1.19rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.8vw, 3.1rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.4vw, 4.8rem);
  --step-5: clamp(2.9rem, 1.6rem + 6vw, 7.6rem);
  --radius: 0;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt"; font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--signal); color: #fff; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-weight: 750; letter-spacing: -0.025em; text-wrap: balance; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 8px; color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
.mono, .label { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.4; }
.label { display: inline-flex; gap: 0.6em; align-items: center; }
.label--signal { color: var(--signal); }
.num { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.rule { border: 0; border-top: 2px solid var(--line); margin: 0; }
.rule--hair { border-top: 1px solid var(--hair); }
.muted { color: var(--muted); }
.sq { display: inline-block; width: 0.62em; height: 0.62em; background: var(--signal); vertical-align: 0.04em; }

/* ---------- Barre de progression ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.96); border-bottom: 2px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .site-header { background: rgba(255,255,255,0.88); backdrop-filter: saturate(1.4) blur(10px); } }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; letter-spacing: -0.03em; font-size: 1.12rem; line-height: 1; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand__mark { width: 34px; height: 34px; background: var(--signal); color: #fff; display: grid; place-items: center; font-size: 0.95rem; font-weight: 800; letter-spacing: -0.04em; flex: none; }
.brand__name small { display: block; font-family: var(--mono); font-weight: 500; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 12px; position: relative; }
.nav a[aria-current="page"]::after, .nav a:hover::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: currentColor; }
.nav a[aria-current="page"] { color: var(--signal); }
.search-btn { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--line); background: var(--paper); padding: 7px 10px 7px 12px; cursor: pointer; font-weight: 600; font-size: 0.92rem; min-height: 40px; }
.search-btn:hover { background: var(--ink); color: #fff; }
.search-btn kbd { font-family: var(--mono); font-size: 0.7rem; border: 1px solid currentColor; padding: 1px 5px; opacity: 0.8; }
.menu-btn { display: none; border: 2px solid var(--line); background: var(--paper); min-width: 44px; min-height: 40px; cursor: pointer; font-weight: 700; padding: 0 12px; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .site-header .wrap { gap: 10px; }
  .search-btn { margin-left: auto; }
  .search-btn kbd { display: none; }
}
@media (max-width: 420px) {
  .brand__name small { display: none; }
  .search-btn span.txt { display: none; }
  .brand { font-size: 1rem; }
}
.mobile-nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--paper); border-top: 2px solid var(--line); overflow-y: auto; padding: 8px var(--gutter) 40px; }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: flex; justify-content: space-between; align-items: baseline; text-decoration: none; font-size: var(--step-2); font-weight: 750; letter-spacing: -0.03em; padding: 14px 0; border-bottom: 1px solid var(--hair); }
.mobile-nav a .num { font-size: 0.8rem; color: var(--muted); }
body.nav-open { overflow: hidden; }

/* ---------- Fil d'Ariane ---------- */
.crumbs { padding-top: 22px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 10px; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--signal); text-decoration: underline; }

/* ---------- Boutons & liens ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 2px solid var(--line); background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; cursor: pointer; }
.btn:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); }
.arrow-link { font-weight: 700; text-decoration: none; display: inline-flex; gap: 8px; align-items: baseline; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.arrow-link::after { content: "→"; transition: transform .2s; }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Accueil : la une ---------- */
.masthead { padding: clamp(32px, 6vw, 88px) 0 0; }
.masthead__kicker { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 12px; margin-bottom: clamp(24px, 4vw, 56px); }
.masthead h1 { font-size: var(--step-5); line-height: 0.92; letter-spacing: -0.055em; font-weight: 800; grid-column: 1 / span 12; }
.masthead h1 em { font-style: normal; color: var(--signal); }
.masthead__lede { grid-column: 1 / span 7; font-size: var(--step-1); line-height: 1.45; margin-top: clamp(20px, 3vw, 40px); max-width: 38ch; }
.masthead__search { grid-column: 8 / span 5; align-self: end; margin-top: 24px; }
.bigsearch { display: flex; border: 2px solid var(--line); background: var(--paper); }
.bigsearch input { flex: 1; min-width: 0; border: 0; padding: 16px 16px; font-size: 1.1rem; background: transparent; }
.bigsearch input:focus { outline: none; }
.bigsearch:focus-within { outline: 3px solid var(--signal); outline-offset: 3px; }
.bigsearch button { border: 0; border-left: 2px solid var(--line); background: var(--ink); color: #fff; padding: 0 20px; font-weight: 700; cursor: pointer; min-width: 48px; }
.bigsearch button:hover { background: var(--signal); }
.facts { display: flex; gap: clamp(16px, 3vw, 48px); margin-top: 18px; flex-wrap: wrap; }
.facts div { display: flex; flex-direction: column; }
.facts b { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.facts span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (max-width: 900px) {
  .masthead__lede, .masthead__search { grid-column: 1 / -1; }
}

.az { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); margin-top: clamp(32px, 5vw, 72px); }
.az a, .az span { display: grid; place-items: center; min-height: 64px; font-weight: 800; font-size: clamp(1rem, 1.6vw, 1.6rem); text-decoration: none; border-right: 1px solid var(--hair); letter-spacing: -0.02em; }
.az > :last-child { border-right: 0; }
.az a:hover, .az a:focus-visible { background: var(--signal); color: #fff; }
.az span { color: #b4b4b0; font-weight: 600; }
@media (max-width: 760px) { .az { grid-template-columns: repeat(13, minmax(0, 1fr)); } .az a, .az span { min-height: 48px; border-bottom: 1px solid var(--hair); } }

.section { padding: clamp(48px, 7vw, 112px) 0 0; }
.section__head { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--col-gap); align-items: end; border-bottom: 2px solid var(--line); padding-bottom: 14px; margin-bottom: clamp(20px, 3vw, 40px); }
.section__head .label { grid-column: 1 / span 3; }
.section__head h2 { grid-column: 4 / span 6; font-size: var(--step-3); letter-spacing: -0.04em; }
.section__head .arrow-link { grid-column: 10 / span 3; justify-self: end; font-size: 0.95rem; }
@media (max-width: 760px) {
  .section__head { display: block; }
  .section__head h2 { margin: 8px 0 10px; }
}

/* Terme à la une */
.feature-term { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--col-gap); background: var(--ink); color: #fff; padding: clamp(24px, 4vw, 56px); }
.feature-term .label { grid-column: 1 / span 12; color: #c8d0ff; margin-bottom: 18px; }
.feature-term h3 { grid-column: 1 / span 5; font-size: var(--step-5); letter-spacing: -0.06em; line-height: 0.9; }
.feature-term .def { grid-column: 7 / span 6; font-size: var(--step-1); line-height: 1.45; align-self: end; }
.feature-term .def p:last-child { margin: 0; }
.feature-term a { color: #fff; }
.feature-term a:hover { color: #c8d0ff; }
@media (max-width: 900px) { .feature-term h3, .feature-term .def { grid-column: 1 / -1; } .feature-term .def { margin-top: 20px; } }

/* Dossiers */
.dossiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--line); border-left: 1px solid var(--line); }
.dossier-card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 22px 26px; text-decoration: none; display: flex; flex-direction: column; gap: 14px; min-height: 260px; position: relative; }
.dossier-card .num { font-size: var(--step-3); color: var(--signal); line-height: 1; letter-spacing: -0.02em; }
.dossier-card h3 { font-size: var(--step-2); letter-spacing: -0.035em; }
.dossier-card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.dossier-card .count { margin-top: auto; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .05em; }
.dossier-card:hover { background: var(--signal); color: #fff; }
.dossier-card:hover .num, .dossier-card:hover p { color: #fff; }
@media (max-width: 960px) { .dossiers { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .dossiers { grid-template-columns: 1fr; } .dossier-card { min-height: 0; } }

/* Liste éditoriale numérotée */
.index-list { list-style: none; border-top: 2px solid var(--line); }
.index-list li { border-bottom: 1px solid var(--hair); }
.index-list a { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 18px 0; text-decoration: none; }
.index-list .num { color: var(--muted); font-size: 0.85rem; }
.index-list strong { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.index-list .meta { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.index-list a:hover strong { color: var(--signal); text-decoration: underline; text-decoration-thickness: 2px; }
.index-list p { margin: 6px 0 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 640px) { .index-list a { grid-template-columns: 2.6rem minmax(0,1fr); } .index-list .meta { grid-column: 2; } }

/* Grille de termes */
.terms-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--line); }
.term-card { padding: 20px 20px 22px 0; border-bottom: 1px solid var(--hair); text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.terms-grid .term-card:not(:nth-child(4n+1)) { padding-left: 20px; border-left: 1px solid var(--hair); }
.term-card h3 { font-size: var(--step-1); letter-spacing: -0.025em; }
.term-card p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.term-card .label { color: var(--signal); }
.term-card:hover h3 { color: var(--signal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
@media (max-width: 1000px) { .terms-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .terms-grid .term-card:not(:nth-child(4n+1)) { padding-left: 0; border-left: 0; } .terms-grid .term-card:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--hair); } }
@media (max-width: 560px) { .terms-grid { grid-template-columns: 1fr; } .terms-grid .term-card:nth-child(2n) { padding-left: 0; border-left: 0; } }

/* Schéma vedette */
.figure { margin: 0; border-top: 2px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0 18px; }
.figure figcaption { display: flex; gap: 14px; margin-top: 14px; font-size: 0.92rem; color: var(--muted); }
.figure figcaption .label { color: var(--ink); flex: none; }
.diagram { width: 100%; height: auto; color: var(--ink); }
.diagram text { font-family: var(--sans); fill: currentColor; }
.diagram .d-mono { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.diagram .d-signal { fill: var(--signal); }
.diagram .d-stroke-signal { stroke: var(--signal); }
.diagram .d-paper { fill: #fff; }
.diagram .d-surface { fill: var(--surface); }

/* Vidéos (cartes) */
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--col-gap); }
.video-card { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.video-card .thumb { position: relative; aspect-ratio: 16/9; background: var(--ink); overflow: hidden; border: 2px solid var(--line); }
.video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .thumb::after { content: "▶"; position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--signal); color: #fff; font-size: 1rem; }
.video-card h3 { font-size: 1.08rem; letter-spacing: -0.015em; line-height: 1.3; font-weight: 700; }
.video-card:hover h3 { color: var(--signal); text-decoration: underline; }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }

/* Encarts partenaires */
.partner { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 24px; align-items: center; border: 2px solid var(--line); padding: clamp(18px, 3vw, 32px); background: var(--paper); }
.partner__mark { width: 64px; height: 64px; background: var(--signal); display: grid; place-items: center; color: #fff; }
.partner h2, .partner h3 { font-size: var(--step-2); letter-spacing: -0.035em; margin-bottom: 6px; }
.partner p { margin: 0; color: var(--muted); }
.partner--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.partner--dark p { color: #d6d6d6; }
.partner--dark .btn { background: #fff; color: var(--ink); border-color: #fff; }
.partner--dark .btn:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
@media (max-width: 760px) { .partner { grid-template-columns: 1fr; } .partner__mark { width: 48px; height: 48px; } }

/* ---------- Pages de contenu ---------- */
.page-head { padding: clamp(24px, 4vw, 56px) 0 clamp(20px, 3vw, 40px); border-bottom: 2px solid var(--line); }
.page-head__kicker { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: clamp(16px, 2.5vw, 32px); }
.page-head h1 { font-size: var(--step-4); letter-spacing: -0.05em; line-height: 0.98; font-weight: 800; max-width: 22ch; }
.page-head--term h1 { font-size: var(--step-5); max-width: none; letter-spacing: -0.06em; line-height: 0.9; }
.page-head .lede { font-size: var(--step-1); line-height: 1.5; max-width: 52ch; margin: clamp(16px, 2.5vw, 28px) 0 0; }
.page-head .lede p:last-child { margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.meta-row b { color: var(--ink); font-weight: 500; }

.article-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); padding-top: clamp(28px, 4vw, 56px); }
.article-layout > .toc-col { grid-column: 1 / span 3; }
.article-layout > .content-col { grid-column: 4 / span 6; min-width: 0; }
.article-layout > .side-col { grid-column: 10 / span 3; }
@media (max-width: 1180px) {
  .article-layout > .toc-col { grid-column: 1 / span 3; }
  .article-layout > .content-col { grid-column: 4 / span 9; }
  .article-layout > .side-col { grid-column: 4 / span 9; margin-top: 40px; }
}
@media (max-width: 860px) {
  .article-layout > .toc-col, .article-layout > .content-col, .article-layout > .side-col { grid-column: 1 / -1; }
}

.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 8px; }
.toc .label { display: block; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 2.1rem minmax(0,1fr); padding: 9px 0; border-bottom: 1px solid var(--hair); text-decoration: none; font-size: 0.93rem; line-height: 1.35; font-weight: 550; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 0.72rem; color: var(--muted); padding-top: 2px; }
.toc a[aria-current="true"] { color: var(--signal); }
.toc a[aria-current="true"]::before { color: var(--signal); }
.toc details summary { display: none; }
@media (max-width: 860px) {
  .toc { position: static; max-height: none; border: 2px solid var(--line); padding: 0 16px; margin-bottom: 28px; }
  .toc details summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; }
  .toc details summary::-webkit-details-marker { display: none; }
  .toc details summary::after { content: "+"; font-size: 1.4rem; line-height: 1; }
  .toc details[open] summary::after { content: "−"; }
  .toc .label { display: none; }
  .toc ol { padding-bottom: 10px; }
}

/* Prose */
.prose { font-size: var(--step-0); line-height: 1.68; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: var(--step-2); letter-spacing: -0.035em; margin: 2.4em 0 0.7em; padding-top: 14px; border-top: 2px solid var(--line); display: grid; grid-template-columns: auto minmax(0,1fr); gap: 14px; align-items: baseline; }
.prose h2 .h-num { font-family: var(--mono); font-weight: 500; font-size: 0.8rem; color: var(--signal); letter-spacing: .02em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); letter-spacing: -0.02em; margin: 1.8em 0 0.5em; line-height: 1.2; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin: 0.35em 0; padding-left: 0.2em; }
.prose ul li::marker { content: "■  "; color: var(--signal); font-size: 0.7em; }
.prose ol li::marker { font-family: var(--mono); font-weight: 500; color: var(--signal); font-size: 0.85em; }
.prose a { color: var(--signal); text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; color: var(--ink); }
.prose strong { font-weight: 700; }
.prose .table-wrap { overflow-x: auto; margin: 1.6em 0; border-top: 2px solid var(--line); -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; line-height: 1.45; min-width: 520px; }
.prose th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 0.74rem; text-transform: uppercase; letter-spacing: .04em; padding: 12px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.prose td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.prose td:first-child { font-weight: 650; }

/* Encadrés */
.box { margin: 1.8em 0; padding: 20px 22px 6px; position: relative; font-size: 0.98em; }
.box__label { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: .05em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.box__label::before { content: ""; width: 10px; height: 10px; background: currentColor; flex: none; }
.box--definition { border-left: 6px solid var(--ink); background: var(--surface); }
.box--definition .box__title { font-size: var(--step-1); font-weight: 750; letter-spacing: -0.02em; display: block; margin-bottom: 6px; }
.box--exemple { border: 2px solid var(--line); }
.box--exemple .box__label { color: var(--signal); }
.box--attention { background: var(--ink); color: #fff; }
.box--attention a { color: #fff; }
.box--attention .box__label { color: #c8d0ff; }
.box--note { border-top: 2px solid var(--signal); padding-left: 0; padding-right: 0; }
.box--note .box__label { color: var(--signal); }
.box p:last-child, .box ul:last-child { margin-bottom: 14px; }

.lede-box { border-top: 2px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0 6px; margin-bottom: 2.2em; display: grid; grid-template-columns: 7.5rem minmax(0,1fr); gap: 16px; }
.lede-box .label { color: var(--signal); padding-top: 6px; }
.lede-box p { font-size: var(--step-1); line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; }
@media (max-width: 560px) { .lede-box { grid-template-columns: 1fr; gap: 4px; } }

/* FAQ */
.faq { border-top: 2px solid var(--line); margin-top: 0.6em; }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font-weight: 700; font-size: 1.06rem; line-height: 1.35; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.6rem; font-weight: 400; color: var(--signal); }
.faq details[open] summary::after { content: "−"; }
.faq .faq__a { padding: 0 0 12px; }

/* Lecteur vidéo (chargement au clic) */
.player { margin: 2em 0; border: 2px solid var(--line); background: var(--ink); }
.player__frame { position: relative; aspect-ratio: 16/9; }
.player__frame img, .player__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player__btn { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: flex-end; justify-content: flex-start; padding: 16px; }
.player__btn span { display: inline-flex; align-items: center; gap: 10px; background: var(--signal); color: #fff; font-weight: 700; padding: 12px 16px; }
.player__btn:hover span, .player__btn:focus-visible span { background: #fff; color: var(--ink); }
.player__cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; color: #fff; font-size: 0.9rem; border-top: 1px solid #333; }
.player__cap a { color: #fff; }

/* Colonne latérale */
.side-col .side-block + .side-block { margin-top: 36px; }
.side-block > .label { display: block; border-bottom: 2px solid var(--line); padding-bottom: 8px; margin-bottom: 4px; }
.side-terms { list-style: none; }
.side-terms li { border-bottom: 1px solid var(--hair); padding: 12px 0; }
.side-terms a { font-weight: 700; text-decoration: none; }
.side-terms a:hover { color: var(--signal); text-decoration: underline; }
.side-terms p { margin: 4px 0 0; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.side-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 1180px) { .side-sticky { position: static; } }

/* Cartes "à lire ensuite" */
.next-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border-top: 2px solid var(--line); }
.next-card { padding: 20px 20px 24px 0; text-decoration: none; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--hair); }
.next-grid .next-card + .next-card { padding-left: 20px; border-left: 1px solid var(--hair); }
.next-card h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.22; }
.next-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.next-card:hover h3 { color: var(--signal); text-decoration: underline; }
@media (max-width: 860px) { .next-grid { grid-template-columns: 1fr; } .next-grid .next-card + .next-card { padding-left: 0; border-left: 0; } }

/* ---------- Glossaire ---------- */
.gl-tools { position: sticky; top: var(--header-h); z-index: 20; background: var(--paper); border-bottom: 2px solid var(--line); padding: 14px 0 0; }
.gl-tools .bigsearch input { padding: 13px 14px; }
.gl-az { display: flex; flex-wrap: wrap; margin-top: 12px; }
.gl-az a, .gl-az span { min-width: 38px; min-height: 40px; display: grid; place-items: center; font-weight: 800; text-decoration: none; font-size: 0.98rem; }
.gl-az a:hover, .gl-az a:focus-visible { background: var(--signal); color: #fff; }
.gl-az span { color: #b4b4b0; font-weight: 500; }
.gl-status { font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 12px; min-height: 1.2em; }
.gl-letter { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--col-gap); border-top: 2px solid var(--line); padding-top: 18px; margin-top: 36px; }
.gl-letter > h2 { grid-column: 1 / span 2; font-size: clamp(3.4rem, 7vw, 6.5rem); line-height: 0.85; letter-spacing: -0.06em; color: var(--signal); font-weight: 800; position: sticky; top: calc(var(--header-h) + 150px); align-self: start; }
.gl-letter > .gl-entries { grid-column: 3 / span 10; }
@media (max-width: 760px) { .gl-letter { display: block; } .gl-letter > h2 { position: static; font-size: 3.2rem; margin-bottom: 8px; } }
.gl-entry { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); column-gap: var(--col-gap); padding: 18px 0 20px; border-bottom: 1px solid var(--hair); }
.gl-entry:first-child { padding-top: 0; }
.gl-entry h3 { font-size: var(--step-2); letter-spacing: -0.035em; line-height: 1.05; }
.gl-entry h3 a { text-decoration: none; }
.gl-entry h3 a:hover { color: var(--signal); text-decoration: underline; text-decoration-thickness: 2px; }
.gl-entry .gl-alias { margin-top: 8px; font-size: 0.88rem; color: var(--muted); }
.gl-entry .gl-badge { display: inline-block; margin-top: 10px; background: var(--signal); color: #fff; font-family: var(--mono); font-size: 0.68rem; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; }
.gl-entry .gl-body > p:first-child { font-weight: 550; }
.gl-entry .gl-body p { margin-bottom: 0.7em; }
.gl-entry .gl-body .box { margin: 0.8em 0; padding: 12px 16px 2px; }
.gl-related { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 0.9rem; }
.gl-related b { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gl-related a { color: var(--signal); }
.gl-entry[hidden], .gl-letter[hidden] { display: none; }
.gl-entry:target { background: linear-gradient(90deg, var(--surface), transparent); }
mark { background: #dfe5ff; color: inherit; padding: 0 1px; }
@media (max-width: 760px) { .gl-entry { grid-template-columns: 1fr; } .gl-entry .gl-body { margin-top: 10px; } }

.term-nav { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--line); margin-top: clamp(40px, 5vw, 72px); }
.term-nav a { padding: 18px 0; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.term-nav a + a { text-align: right; border-left: 1px solid var(--hair); padding-left: 18px; }
.term-nav strong { font-size: var(--step-1); letter-spacing: -0.02em; }
.term-nav a:hover strong { color: var(--signal); }
.term-number { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* Barre de filtres (articles) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.chips a { border: 2px solid var(--line); padding: 7px 12px; text-decoration: none; font-weight: 650; font-size: 0.92rem; }
.chips a:hover, .chips a[aria-current="true"] { background: var(--ink); color: #fff; }

/* ---------- Recherche (dialogue) ---------- */
.search-dialog { border: 0; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: min(78vh, 720px); margin: 10vh auto auto; background: var(--paper); color: var(--ink); border: 2px solid var(--line); box-shadow: 12px 12px 0 var(--ink); }
.search-dialog::backdrop { background: rgba(10,10,10,0.55); }
.search-dialog form { display: flex; border-bottom: 2px solid var(--line); }
.search-dialog input { flex: 1; min-width: 0; border: 0; padding: 18px; font-size: 1.2rem; }
.search-dialog input:focus { outline: none; }
.search-dialog .close { border: 0; border-left: 2px solid var(--line); background: var(--paper); padding: 0 16px; cursor: pointer; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; }
.search-dialog .close:hover { background: var(--ink); color: #fff; }
.search-results { list-style: none; overflow-y: auto; max-height: calc(min(78vh, 720px) - 70px); }
.search-results li a { display: grid; grid-template-columns: 6.5rem minmax(0,1fr); gap: 12px; padding: 12px 18px; text-decoration: none; border-bottom: 1px solid var(--hair); }
.search-results li a .k { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding-top: 4px; }
.search-results li a strong { display: block; font-size: 1.04rem; }
.search-results li a span.d { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.4; margin-top: 2px; }
.search-results li a[aria-selected="true"], .search-results li a:hover { background: var(--signal); color: #fff; }
.search-results li a[aria-selected="true"] .k, .search-results li a[aria-selected="true"] span.d, .search-results li a:hover .k, .search-results li a:hover span.d { color: #e6e9ff; }
.search-empty { padding: 18px; color: var(--muted); }
@media (max-width: 560px) { .search-dialog { margin-top: 12px; max-height: 88vh; } .search-results li a { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Newsletter (chargement au clic) ---------- */
.newsletter { border: 2px solid var(--line); padding: clamp(18px, 3vw, 28px); }
.newsletter h2 { font-size: var(--step-2); letter-spacing: -0.035em; margin-bottom: 8px; }
.newsletter .nl-frame iframe { width: 100%; min-height: 420px; border: 0; margin-top: 16px; background: #fff; }
.newsletter small { display: block; color: var(--muted); margin-top: 12px; font-size: 0.85rem; line-height: 1.45; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: clamp(64px, 9vw, 140px); background: var(--ink); color: #fff; padding: clamp(40px, 6vw, 80px) 0 28px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #c8d0ff; text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--col-gap); row-gap: 36px; }
.footer-brand { grid-column: 1 / span 4; }
.footer-brand .big { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; }
.footer-brand p { color: #cfcfcf; margin-top: 16px; max-width: 34ch; font-size: 0.98rem; }
.footer-col { grid-column: span 2; }
.footer-col--wide { grid-column: span 4; }
.footer-col h2 { font-family: var(--mono); font-weight: 500; font-size: 0.74rem; letter-spacing: .06em; text-transform: uppercase; color: #bdbdbd; border-bottom: 1px solid #3a3a3a; padding-bottom: 8px; margin-bottom: 8px; line-height: 1.4; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 5px 0; font-size: 0.95rem; }
.footer-col li small { display: block; color: #bdbdbd; font-size: 0.82rem; line-height: 1.4; }
.footer-az { display: flex; flex-wrap: wrap; gap: 0; margin-top: 44px; border-top: 1px solid #3a3a3a; border-bottom: 1px solid #3a3a3a; }
.footer-az a, .footer-az span { min-width: 36px; min-height: 40px; display: grid; place-items: center; font-weight: 700; }
.footer-az span { color: #8a8a8a; font-weight: 500; }
.footer-az a:hover { background: var(--signal); text-decoration: none; color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 24px; font-size: 0.85rem; color: #bdbdbd; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 1000px) { .footer-brand { grid-column: 1 / -1; } .footer-col, .footer-col--wide { grid-column: span 6; } }
@media (max-width: 560px) { .footer-col, .footer-col--wide { grid-column: 1 / -1; } }

/* ---------- Divers ---------- */
.legal .prose { max-width: 72ch; }
.notfound { padding: clamp(48px, 10vw, 140px) 0; }
.notfound .big { font-size: clamp(6rem, 22vw, 18rem); font-weight: 800; letter-spacing: -0.07em; line-height: 0.8; color: var(--signal); }
.sitemap-cols { columns: 3 260px; column-gap: var(--col-gap); }
.sitemap-cols section { break-inside: avoid; margin-bottom: 28px; }
.sitemap-cols h2 { font-size: var(--step-1); border-top: 2px solid var(--line); padding-top: 10px; margin-bottom: 8px; }
.sitemap-cols ul { list-style: none; }
.sitemap-cols li { padding: 4px 0; font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toc-col, .side-col, .progress, .player, .partner, .search-dialog { display: none !important; }
  .article-layout > .content-col { grid-column: 1 / -1; }
  body { font-size: 11pt; }
  .prose a { color: inherit; }
}
.diagram .d-white { fill: #fff; }
/* Variantes de mise en page sans style inline (CSP style-src 'self') */
.article-layout > .content-col[data-wide] { grid-column: 1 / span 8; }
.article-layout > .side-col[data-narrow] { grid-column: 10 / span 3; }
.legal .article-layout > .content-col[data-wide], .article-layout > .content-col[data-wide].solo { grid-column: 1 / span 9; }
.video-grid[data-single] { grid-template-columns: 1fr; }
@media (max-width: 1180px) { .article-layout > .content-col[data-wide] { grid-column: 1 / -1; } .article-layout > .side-col[data-narrow] { grid-column: 1 / -1; } .video-grid[data-single] { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px) { .video-grid[data-single] { grid-template-columns: 1fr; } }
.side-more { margin-top: 14px; }
.nf-title { font-size: var(--step-4); letter-spacing: -.05em; margin-top: 24px; max-width: 20ch; }
.notfound .lede { font-size: var(--step-1); max-width: 46ch; margin-top: 16px; }
.nf-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
/* Ajustements après revue visuelle */
.masthead h1 { font-size: clamp(3.2rem, 1rem + 9.2vw, 10.5rem); }
.section > .figure .diagram { max-width: 1040px; }
.lede-box .label { align-self: start; }
.side-sticky { max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 6px; }
@media (max-width: 1180px) { .side-sticky { max-height: none; overflow: visible; } }
.gl-entry.is-name-hit h3, .gl-entry.is-name-hit h3 a { color: var(--signal); }
.masthead h1 { font-size: clamp(3.4rem, 0.5rem + 11.2vw, 10.5rem); }
@media (max-width: 700px) {
  .figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .figure .diagram { min-width: 640px; }
  .figure figcaption { position: sticky; left: 0; max-width: calc(100vw - 2 * var(--gutter)); }
  .facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .facts b { font-size: 1.7rem; }
  .facts span { font-size: 0.62rem; }
}
@media (max-width: 600px) { .masthead h1 { font-size: 17vw; } }
