/* Pages « document » du site (W-09) : mentions légales, confidentialité, CGU, aide, suppression du compte, charte.
   Direction de l'accueil (home.css, W-04) pour une lecture confortable : docs/design/notes/2026-09-28-site-vitrine.md §6.4.
   Feuille autonome (ni track.css ni site.css), sans script. Mode sombre par prefers-color-scheme (jetons doublés,
   comme home.css) ; impression sobre (@media print, en bas). */

/* Polices embarquées (OFL), mêmes URL que /t/ et l'accueil. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("../track/fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../track/fonts/fraunces-latin-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Jetons : palette « Foyer chaleureux », ceux de home.css. */
:root {
  color-scheme: light dark;
  --sans: "Plus Jakarta Sans", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --bg: #FAF6F0;
  --surface: #FFFCF7;
  --surface-2: #F5EEE5;
  --line: #E3D6C7;
  --text: #3D2C29;
  --text-2: #6B5B53;
  --link: #B5543A;
  --focus: #3D2C29;
  --logo: #B5543A;
  --logo-house: #FAF6F0;
  /* Décoratif : jamais en texte. */
  --honey: #F2CC8F;
  /* Pied de page de nuit, fixe dans les deux thèmes. */
  --night: #221A17;
  --n-text: #EDE3D6;
  --n-text-2: #B4A79B;
  --n-cta: #E8907A;
  --n-on-cta: #221A17;
  --r-s: 12px; --r-m: 20px;
  /* Une colonne de lecture (~68 caractères) pour l'en-tête, le texte, le sommaire et le pied (W-09, B2). */
  --measure: 33rem;
  --gutter: clamp(20px, 5vw, 48px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #221A17;
    --surface: #2E2420;
    --surface-2: #2A211D;
    --line: #3A2E29;
    --text: #EDE3D6;
    --text-2: #B4A79B;
    --link: #E8907A;
    --focus: #EDE3D6;
    --logo: #E8907A;
    --logo-house: #221A17;
    --night: #1C1512;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }
/* Hors de l'écran quelle que soit sa taille (texte à 200 %), visible au focus. */
.site-skip { position: absolute; left: 12px; top: 12px; z-index: 50; padding: 12px 18px; border-radius: 999px; background: var(--n-cta); color: var(--n-on-cta); font-weight: 700; text-decoration: none; transform: translateY(calc(-100% - 24px)); }
.site-skip:focus { transform: none; }
.doc-wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* En-tête compact, sur le fond du thème (pas de nuit). */
.doc-bar { border-bottom: 1px solid var(--line); }
.doc-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 68px; padding-block: 10px; }
.doc-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font: 800 1.0625rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; }
.doc-brand svg { width: 30px; height: 30px; flex: none; }
.logo-bg { fill: var(--logo); }
.logo-house { fill: var(--logo-house); }
.logo-window { fill: var(--honey); }
.doc-lang { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; color: var(--text); font-weight: 600; font-size: .9375rem; }

/* Document */
.doc { padding-block: clamp(40px, 7vw, 80px) clamp(48px, 8vw, 96px); }
.doc h1, .doc h2, .doc h3 { overflow-wrap: break-word; text-wrap: balance; }
.doc h1 { margin: 0; font: 300 clamp(2.25rem, 1.6rem + 2.6vw, 3rem)/1.08 var(--serif); letter-spacing: -.02em; }
.doc-meta { display: block; margin: 16px 0 0; color: var(--text-2); font-size: .9375rem; }
.doc-meta time { white-space: nowrap; }

/* Sommaire sans fond, entre deux filets : ses liens restent sur le fond de page (4,54:1, W-09, B1 et B3). */
.doc-toc { margin-top: 32px; padding: 16px 0 12px; border-block: 1px solid var(--line); border-radius: 0; background: none; }
.doc-toc h2 { margin: 0 0 4px; color: var(--text-2); font: 700 .8125rem/1.3 var(--sans); letter-spacing: .07em; text-transform: uppercase; }
.doc-toc ol { margin: 0; padding: 0; list-style: none; }
.doc-toc a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 4px; line-height: 1.4; }

.doc-body { margin-top: 8px; }
/* « En bref » et préambule, avant le sommaire (W-09, B3). */
.doc-lead { margin-top: 28px; }
.doc-lead > :last-child { margin-bottom: 0; }
.doc-body h2 { margin: 48px 0 12px; font: 700 1.5rem/1.3 var(--sans); letter-spacing: -.01em; scroll-margin-top: 24px; }
.doc-body h3 { margin: 32px 0 8px; font: 700 1.125rem/1.4 var(--sans); scroll-margin-top: 24px; }
.doc-body h4, .doc-body h5, .doc-body h6 { margin: 24px 0 8px; font: 700 1rem/1.4 var(--sans); }
.doc-body p, .doc-body ul, .doc-body ol, .doc-body blockquote, .doc-body table { margin: 0 0 16px; }
.doc-body p, .doc-body li { text-wrap: pretty; overflow-wrap: break-word; }
.doc-body ul, .doc-body ol { padding-left: 1.4em; }
.doc-body li + li { margin-top: 6px; }
.doc-body strong { font-weight: 700; }
.doc-body blockquote { padding: 12px 20px; border-left: 3px solid var(--honey); border-radius: 0 var(--r-s) var(--r-s) 0; background: var(--surface-2); }
.doc-body blockquote > :last-child { margin-bottom: 0; }
/* Lien dans un encadré : texte sur --surface-2, souligné couleur lien (4,25:1 sinon, W-09, B1). */
.doc-body blockquote a { color: var(--text); text-decoration-color: var(--link); }
.doc-body hr { max-width: none; height: 1px; margin: 40px 0; border: 0; background: var(--line); }
.doc-body code { padding: .1em .35em; border-radius: 6px; background: var(--surface-2); font-size: .9em; }
/* Tableaux (durées de conservation…) : défilement horizontal plutôt qu'une page élargie. */
.doc-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.doc-body th, .doc-body td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-body th { font-weight: 700; }
.doc-top { margin: 40px 0 0; }
.doc-top a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Pied de page de nuit (gabarit du site) */
.site-footer { padding: clamp(40px, 7vw, 64px) max(var(--gutter), (100% - var(--measure)) / 2) calc(32px + env(safe-area-inset-bottom)); background: var(--night); color: var(--n-text-2); font-size: .9375rem; line-height: 1.6; }
.site-footer p { margin: 0 0 8px; max-width: 60ch; }
.site-footer a { color: var(--n-text); }
.site-footer nav { margin-top: 16px; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
.site-footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer-links a[aria-current="page"] { font-weight: 700; text-decoration: none; }
.site-footer :focus-visible { outline-color: var(--n-text); }

/* Impression : le texte seul, noir sur blanc, adresses des liens externes en clair. */
@media print {
  :root { color-scheme: light; --bg: #FFFFFF; --text: #000000; --text-2: #333333; --link: #000000; --line: #999999; --surface-2: #FFFFFF; }
  body { font-size: 11pt; line-height: 1.5; }
  .site-skip, .doc-bar, .doc-top, .site-footer nav { display: none; }
  .doc { padding: 0; }
  .doc-wrap { max-width: none; padding: 0; }
  .doc-toc { padding: 12px 0; border-block: 1px solid var(--line); border-radius: 0; }
  .doc-toc a { min-height: 0; }
  .doc-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .9em; overflow-wrap: anywhere; }
  .doc-body h2, .doc-body h3 { break-after: avoid; }
  .doc-body p, .doc-body li { orphans: 3; widows: 3; }
  .doc-body table { display: table; overflow: visible; }
  .site-footer { padding: 16px 0 0; border-top: 1px solid var(--line); background: none; color: var(--text-2); }
  .site-footer a { color: var(--text); }
}
