/* Explique.online — feuille de style unique. */

:root {
  --paper: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe6;
  --ink: #17202c;
  --ink-soft: #4c5768;
  --ink-faint: #6f7a8b;
  --line: #e2dbcf;
  --line-strong: #cfc6b6;
  --accent: #0f4c81;
  --accent-hover: #0b3a63;
  --accent-soft: #e8f0f8;
  --warm: #a8431c;
  --warm-soft: #fbeee7;
  --green: #1f6b4a;
  --shadow: 0 1px 2px rgba(23, 32, 44, .05), 0 8px 24px -14px rgba(23, 32, 44, .22);
  --radius: 10px;
  --wrap: 1180px;
  --measure: 68ch;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11151c;
    --surface: #171d26;
    --surface-2: #1d2531;
    --ink: #e9e7e2;
    --ink-soft: #b3bcc8;
    --ink-faint: #8d97a5;
    --line: #2a3341;
    --line-strong: #3a4553;
    --accent: #8ab8e8;
    --accent-hover: #a9cdf3;
    --accent-soft: #1b2836;
    --warm: #e79a72;
    --warm-soft: #2a2018;
    --green: #6fc59b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px -16px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.012em; margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- en-tête */

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(140%) blur(6px);
}
.head-row { display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 5px; flex: 0 0 auto;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent) 48%, var(--warm) 48%, var(--warm) 100%);
}
.brand-name { font-family: var(--serif); font-size: 1.24rem; font-weight: 700; letter-spacing: -.02em; }
.brand-tld { color: var(--ink-faint); font-weight: 400; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 8px 11px; border-radius: 7px;
  color: var(--ink-soft); text-decoration: none; font-size: .935rem; font-weight: 500;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
    font: inherit; font-size: .9rem; font-weight: 600; padding: 7px 13px; border-radius: 8px; cursor: pointer;
  }
  .nav-toggle-bars { width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; }
  .site-nav { flex-basis: 100%; margin: 0; display: none; padding-bottom: 12px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 11px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
}

/* ------------------------------------------------------ fil d'Ariane */

.crumbs { border-bottom: 1px solid var(--line); background: var(--surface); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 11px 0; font-size: .85rem; color: var(--ink-faint); }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ----------------------------------------------------------------- hero */

.hero { padding: 74px 0 58px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--surface) 0%, var(--paper) 100%); }
.hero-eyebrow { margin: 0 0 14px; font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--warm); }
.hero h1 { font-size: clamp(2.4rem, 6.2vw, 4rem); line-height: 1.05; max-width: 16ch; }
.hero-dek { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-stats { margin: 26px 0 0; font-size: .9rem; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 16px; max-width: 70ch; }

.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 600; font-size: .96rem;
  text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #0d1620; } }

/* --------------------------------------------------------------- sections */

.section { padding: 52px 0; }
.section + .section { border-top: 1px solid var(--line); }
.sec-title { font-size: 1.6rem; margin: 0 0 10px; }
.sec-title a { text-decoration: none; color: inherit; }
.sec-title a:hover { color: var(--accent); }
.sec-intro { margin: 0 0 26px; color: var(--ink-soft); max-width: 66ch; }
.band { background: var(--surface); }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
}
.card:hover { border-color: var(--line-strong); }
.card-kicker { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warm); }
.card h3 { font-size: 1.17rem; line-height: 1.28; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card-dek { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card-meta { margin: auto 0 0; padding-top: 6px; font-size: .82rem; color: var(--ink-faint); }
.card-topic h3 { font-size: 1.26rem; }

.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 3px; }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a { font-weight: 600; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }
.link-list span { color: var(--ink-faint); font-size: .9rem; }
.link-list-dates li { flex-direction: row; justify-content: space-between; gap: 16px; align-items: baseline; }
@media (max-width: 620px) { .link-list-dates li { flex-direction: column; } }
.more { margin: 22px 0 0; font-weight: 600; }
.empty { color: var(--ink-faint); font-style: italic; }

.hub-head { padding-bottom: 12px; }
.hub-head h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); max-width: 22ch; }
.hub-head .dek { font-size: 1.1rem; color: var(--ink-soft); max-width: 66ch; margin: 16px 0 0; }
.kicker { margin: 0 0 12px; font-size: .78rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: var(--warm); }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

.sub-list { display: flex; flex-direction: column; gap: 38px; }
.sub-block { display: grid; grid-template-columns: 300px 1fr; gap: 28px; }
@media (max-width: 860px) { .sub-block { grid-template-columns: 1fr; gap: 12px; } }
.sub-head h3 { font-size: 1.3rem; margin: 0 0 6px; }
.sub-head h3 a { text-decoration: none; color: var(--ink); }
.sub-head h3 a:hover { color: var(--accent); }
.sub-head p { margin: 0; color: var(--ink-faint); font-size: .93rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 34px; } }
.trust dl { margin: 0; }
.trust dt { font-weight: 700; margin-top: 16px; }
.trust dd { margin: 4px 0 0; color: var(--ink-soft); }

/* -------------------------------------------------------------- article */

.article-head { padding: 40px 0 26px; max-width: 860px; }
.article-head h1 { font-size: clamp(2rem, 4.8vw, 3rem); line-height: 1.13; max-width: 24ch; }
.article-head .dek { font-size: 1.19rem; line-height: 1.55; color: var(--ink-soft); margin: 18px 0 0; max-width: 60ch; }
.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-faint); }
.byline-author { font-weight: 700; color: var(--ink-soft); }
.badge-check { color: var(--green); font-weight: 600; }
.badge-check::before { content: "✓ "; }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 54px; padding-bottom: 70px; align-items: start; }
@media (max-width: 1000px) { .article-grid { grid-template-columns: 1fr; gap: 0; } .col-side { display: none; } }
.col-main { min-width: 0; }
.side-sticky { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }

.answer {
  background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 26px;
}
.answer h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-family: var(--sans); color: var(--accent); margin: 0 0 8px; }
.answer p { margin: 0; font-size: 1.05rem; }
.answer p + p { margin-top: 10px; }

.keypoints { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 26px; box-shadow: var(--shadow); }
.keypoints h2 { font-size: 1.1rem; margin: 0 0 12px; }
.keypoints ul { margin: 0; padding-left: 20px; }
.keypoints li { margin: 9px 0; color: var(--ink-soft); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc-title { margin: 0 0 10px; font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.toc ol { margin: 0; padding-left: 20px; font-size: .89rem; }
.toc li { margin: 7px 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--accent); text-decoration: underline; }
.toc-mobile { display: none; margin: 0 0 26px; }
.toc-mobile .toc { border: 0; padding: 12px 0 0; }
@media (max-width: 1000px) { .toc-mobile { display: block; } }
.toc-mobile summary { cursor: pointer; font-weight: 700; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.side-box { background: var(--surface-2); border-radius: var(--radius); padding: 18px; }
.side-title { margin: 0 0 6px; font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.side-text { margin: 0 0 10px; font-size: .9rem; color: var(--ink-soft); }
.side-link { font-weight: 600; font-size: .92rem; }

/* ------------------------------------------------------------------ prose */

.prose { max-width: var(--measure); font-size: 1.06rem; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: 1.72rem; margin-top: 2.1em; line-height: 1.2; scroll-margin-top: 84px; }
.prose h3 { font-size: 1.26rem; margin-top: 1.7em; scroll-margin-top: 84px; }
.prose h2 + p, .prose h3 + p { margin-top: .6em; }
.prose p { margin: 0; }
.prose ul, .prose ol { margin: 1.1em 0 0; padding-left: 26px; }
.prose li { margin: .5em 0; }
.prose li > ul, .prose li > ol { margin-top: .4em; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: 2px 5px; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--warm);
  font-family: var(--serif); font-size: 1.18rem; line-height: 1.45; color: var(--ink);
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .6em; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
caption { text-align: left; padding: 12px 14px 0; color: var(--ink-faint); font-size: .85rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-weight: 700; font-size: .84rem; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }

.callout {
  margin: 1.7em 0; padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line); font-size: .99rem;
}
.callout > * + * { margin-top: .8em; }
.callout p { margin: 0; }
.callout ul, .callout ol { margin: .6em 0 0; padding-left: 22px; }
.callout-title { font-weight: 700; font-family: var(--serif); font-size: 1.08rem; }
.callout-attention { background: var(--warm-soft); border-color: var(--warm); }
.callout-attention .callout-title { color: var(--warm); }
.callout-attention .callout-title::before { content: "⚠ "; }
.callout-etapes { background: var(--accent-soft); border-color: var(--accent); }
.callout-etapes .callout-title { color: var(--accent); }
.callout-exemple .callout-title::before { content: "→ "; }

/* ---------------------------------------------------- FAQ, sources, suite */

.faq, .sources, .related { max-width: var(--measure); margin-top: 3.4em; }
.faq h2, .sources h2, .related h2 { font-size: 1.5rem; margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 1.04rem; list-style: none; position: relative; padding-right: 32px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 13px; font-size: 1.4rem; color: var(--ink-faint); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { margin: 0 0 15px; color: var(--ink-soft); }
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.src-pub { font-weight: 700; color: var(--ink); }
.src-pub::after { content: " —"; }
.src-note { color: var(--ink-faint); font-size: .88rem; display: block; }
.sources-note { margin-top: 14px; font-size: .85rem; color: var(--ink-faint); }
.related { max-width: none; }
.related h2 { max-width: var(--measure); }

/* -------------------------------------------------------------- glossaire */

.glossary-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.field span { font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); width: 100%;
}
.field-big input { font-size: 1.15rem; padding: 15px 17px; }
.glo-count { font-size: .87rem; color: var(--ink-faint); margin: 0; }
.alpha { display: flex; flex-wrap: wrap; gap: 4px; }
.alpha a { display: inline-block; min-width: 27px; text-align: center; padding: 4px 5px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-size: .84rem; font-weight: 600; background: var(--surface); }
.glo-group { margin-bottom: 34px; }
.glo-letter { font-size: 1.5rem; color: var(--warm); border-bottom: 2px solid var(--line); padding-bottom: 6px; margin: 0 0 6px; scroll-margin-top: 84px; }
.glo-dl { margin: 0; }
.glo-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.glo-item dt { font-weight: 700; font-size: 1.04rem; scroll-margin-top: 84px; }
.glo-aka { font-weight: 400; color: var(--ink-faint); font-size: .9rem; }
.glo-item dd { margin: 5px 0 0; color: var(--ink-soft); max-width: 76ch; }
.glo-more { font-weight: 600; white-space: nowrap; }

/* -------------------------------------------------------------- recherche */

.results { margin-top: 22px; display: flex; flex-direction: column; }
.result { padding: 16px 0; border-bottom: 1px solid var(--line); }
.result-kicker { margin: 0 0 4px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--warm); }
.result h2 { font-size: 1.12rem; margin: 0; }
.result h2 a { text-decoration: none; }
.result h2 a:hover { text-decoration: underline; }
.result p { margin: 4px 0 0; color: var(--ink-soft); font-size: .93rem; }
mark { background: #ffe9a8; color: inherit; padding: 0 2px; border-radius: 2px; }
@media (prefers-color-scheme: dark) { mark { background: #4a3c17; color: #ffe9a8; } }

/* ------------------------------------------------------------------ outils */

.tool-wrap { padding-bottom: 26px; }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); max-width: 860px; }
.tool h2 { font-size: 1.24rem; margin: 0 0 4px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 700px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-out { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.meter { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 12px 0; }
.meter > i { display: block; height: 100%; width: 0; background: var(--warm); transition: width .25s ease, background .25s ease; }
@media (prefers-reduced-motion: reduce) { .meter > i { transition: none; } }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.stat { flex: 1 1 150px; background: var(--surface-2); border-radius: 8px; padding: 13px 15px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.tool-note { font-size: .88rem; color: var(--ink-faint); margin-top: 16px; }
.quiz-q { font-family: var(--serif); font-size: 1.22rem; margin: 0 0 6px; }
.quiz-body { background: var(--surface-2); border-radius: 8px; padding: 16px 18px; margin: 14px 0; font-size: .97rem; white-space: pre-wrap; font-family: var(--mono); }
.quiz-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.quiz-verdict { margin-top: 16px; padding: 16px 18px; border-radius: 8px; border: 1px solid var(--line); }
.ok { border-color: var(--green); }
.ko { border-color: var(--warm); }
.prompt-out { font-family: var(--mono); font-size: .9rem; white-space: pre-wrap; background: var(--surface-2); border-radius: 8px; padding: 16px; }

/* ------------------------------------------------------------ plan du site */

.map-block { margin-bottom: 40px; }
.map-sub { font-size: 1.05rem; margin: 22px 0 8px; }
.map-sub a { text-decoration: none; color: var(--ink-soft); }
.map-list { columns: 2; column-gap: 34px; list-style: none; margin: 0; padding: 0; font-size: .95rem; }
@media (max-width: 700px) { .map-list { columns: 1; } }
.map-list li { margin: 5px 0; break-inside: avoid; }

/* ------------------------------------------------------------------ pied */

.site-foot { background: var(--surface); border-top: 1px solid var(--line); padding: 50px 0 34px; margin-top: 20px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 38px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
.foot-brand p { color: var(--ink-faint); font-size: .92rem; max-width: 48ch; margin: 10px 0 0; }
.foot-rss a { font-weight: 600; }
.site-foot h2 { font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; font-family: var(--sans); color: var(--ink-faint); margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 7px 0; font-size: .93rem; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.foot-legal { margin: 38px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-faint); }

@media print {
  .site-head, .site-foot, .crumbs, .col-side, .toc-mobile, .related, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-grid { display: block; }
  a { color: #000; }
  .prose { max-width: none; }
}

/* ================================================================
   Compléments : confort de lecture mobile, maillage, ancres
   ================================================================ */

/* Zones sûres des écrans à encoche */
.wrap { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }

/* Typographie : évite les titres bancals et les lignes veuves */
h1, h2, h3 { text-wrap: balance; }
.prose p, .card-dek, .dek, .hero-dek, .sec-intro { text-wrap: pretty; }

/* Pas de surbrillance grise au tap sur mobile */
a, button, summary { -webkit-tap-highlight-color: rgba(15, 76, 129, .12); }

/* Ancre de section : discrète, apparaît au survol, jamais sur mobile */
.h-anchor {
  margin-left: .35em; color: var(--line-strong); text-decoration: none;
  font-family: var(--sans); font-weight: 400; opacity: 0; transition: opacity .15s ease;
}
.prose h2:hover .h-anchor { opacity: 1; }
.h-anchor:hover { color: var(--accent); }
@media (hover: none) { .h-anchor { display: none; } }
@media (prefers-reduced-motion: reduce) { .h-anchor { transition: none; } }

/* Barre de progression de lecture */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0;
  background: var(--warm); z-index: 60; transition: width .1s linear;
}
@media (prefers-reduced-motion: reduce) { .progress { transition: none; } }
@media print { .progress { display: none; } }

/* Retour en haut de page */
.to-top {
  position: fixed; right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%; z-index: 45;
  display: none; align-items: center; justify-content: center;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 1.1rem; cursor: pointer;
}
.to-top.show { display: flex; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }
@media print { .to-top { display: none !important; } }

/* Liste des articles voisins, colonne latérale */
.side-list { list-style: none; margin: 0 0 12px; padding: 0; }
.side-list li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.4; }
.side-list li:first-child { border-top: 0; padding-top: 0; }
.side-list a { text-decoration: none; font-weight: 600; }
.side-list a:hover { text-decoration: underline; }

/* Même liste, version affichée quand la colonne latérale disparaît */
.theme-strip { display: none; max-width: var(--measure); margin-top: 3.4em; background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; }
.theme-strip ul { list-style: none; margin: 0 0 12px; padding: 0; }
.theme-strip li { padding: 9px 0; border-top: 1px solid var(--line); }
.theme-strip li:first-child { border-top: 0; }
.theme-strip a { font-weight: 600; text-decoration: none; }
.theme-strip a:hover { text-decoration: underline; }
@media (max-width: 1000px) { .theme-strip { display: block; } }
@media print { .theme-strip { display: none; } }

/* Termes du glossaire cités par l'article */
.glo-inline { max-width: var(--measure); margin-top: 3.4em; border-top: 1px solid var(--line); padding-top: 20px; }
.glo-inline h2 { font-size: 1.1rem; margin: 0 0 12px; }
.glo-inline ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.glo-inline li a {
  display: inline-block; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--surface); font-size: .88rem;
  text-decoration: none; color: var(--ink-soft);
}
.glo-inline li a:hover { border-color: var(--accent); color: var(--accent); }
.glo-inline-note { margin: 14px 0 0; font-size: .85rem; color: var(--ink-faint); }

/* Tableaux : indice de défilement horizontal sur petit écran */
.table-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
@media (max-width: 620px) {
  .table-wrap::after {
    content: "Faites glisser le tableau pour voir la suite";
    display: block; padding: 8px 14px; font-size: .78rem; color: var(--ink-faint);
    border-top: 1px solid var(--line); background: var(--surface-2); position: sticky; left: 0;
  }
  th, td { padding: 10px 12px; font-size: .9rem; }
}

/* Le glossaire est long : on ne peint que ce qui est à l'écran */
.glo-group { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Confort de lecture sur téléphone */
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .prose { font-size: 1.04rem; }
  .prose h2 { font-size: 1.45rem; margin-top: 1.9em; }
  .prose h3 { font-size: 1.15rem; }
  .article-head { padding-top: 28px; }
  .section { padding: 38px 0; }
  .hero { padding: 48px 0 40px; }
  .btn { padding: 13px 20px; }
  .faq summary { padding: 17px 30px 17px 0; }
  .alpha a { min-width: 36px; padding: 8px 6px; }
  .site-nav a { padding: 13px 12px; }
}

/* Emplacements publicitaires : hauteur réservée pour éviter tout décalage */
.ad-slot { display: block; margin: 2.4em auto; text-align: center; min-height: 280px; contain: layout style; }
.ad-slot-inline { min-height: 250px; }
@media print { .ad-slot { display: none; } }

/* Texte d'introduction des rubriques et des thèmes */
.hub-intro { padding-top: 34px; padding-bottom: 34px; }
.hub-intro .prose { font-size: 1.03rem; }
.hub-intro .prose h2 { font-size: 1.35rem; margin-top: 1.6em; }

/* Index des questions sur les pages de thème */
.q-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
@media (max-width: 780px) { .q-list { columns: 1; } }
.q-list li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-list a { text-decoration: none; font-weight: 500; }
.q-list a::before { content: "? "; color: var(--warm); font-weight: 700; }
.q-list a:hover { text-decoration: underline; }

/* Index des thèmes sur la page d'accueil */
.theme-index { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }
@media (max-width: 1000px) { .theme-index { grid-template-columns: repeat(2, 1fr); gap: 22px 30px; } }
@media (max-width: 560px) { .theme-index { grid-template-columns: 1fr; } }
.theme-index h3 { font-size: 1rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.theme-index h3 a { text-decoration: none; color: var(--warm); }
.theme-index ul { list-style: none; margin: 0; padding: 0; }
.theme-index li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 5px 0; font-size: .92rem; }
.theme-index a { text-decoration: none; color: var(--ink-soft); }
.theme-index a:hover { color: var(--accent); text-decoration: underline; }
.theme-index span { color: var(--ink-faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
