/* ════════════════════════════════════════════════════════════════════════════
   legal.css : MISE EN PAGE DES DOCUMENTS JURIDIQUES
   Strive × Diamix Studio · août 2026
   ─────────────────────────────────────────────────────────────────────────────
   Sert les quatre pages publiques : mentions-legales, confidentialite, cgu,
   credits. Une seule feuille, parce que quatre copies divergeraient à la
   première retouche (§21).

   ⚠️ CES PAGES SONT PUBLIQUES ET N'APPELLENT PAS requireAuth().
   Quelqu'un doit pouvoir lire la politique de confidentialité AVANT de créer
   un compte : c'est même la seule façon que son consentement soit valable au
   sens du RGPD. Ne jamais les mettre derrière l'authentification.

   ⚠️ ELLES CHARGENT js/theme.js EN PREMIER SCRIPT (§17 règle 1) pour suivre le
   thème du membre, mais ne dépendent d'aucune donnée de session : theme.js
   protège ses accès par typeof (§17 règle 1bis), donc il fonctionne seul.

   ⚠️ LES REPLIS --bg / --text CI-DESSOUS SONT VOLONTAIRES.
   Ces pages n'ont pas le :root d'une page d'app. Sans eux, un visiteur non
   connecté verrait du texte sans fond. Ils sont posés à spécificité (0,1,0)
   et (0,1,1), donc la feuille du thème les écrase normalement.
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0a;
  --bg2: #121214;
  --text: #f0f0eb;
}
html[data-theme-scheme="light"] {
  --bg: #f7f5f0;
  --bg2: #ffffff;
  --text: #1c1b18;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-outil, 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* ── Chrome de page ──────────────────────────────────────────────────── */

.lg-top {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.lg-top-in {
  max-width: 860px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.lg-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 10px 5px 6px;
  border-radius: var(--rad-s, 11px);
  transition: background .16s, color .16s;
}
.lg-back:hover { background: var(--accent-soft); color: var(--text); }
.lg-back::before { content: "\2190"; font-size: 15px; }
.lg-brand {
  margin-left: auto;
  font-size: 13px;
  color: var(--dim2);
  letter-spacing: .02em;
}

.lg-wrap { max-width: 860px; margin: 0 auto; padding: 48px 24px 110px; }

/* ── Titre ───────────────────────────────────────────────────────────── */

.lg-kicker {
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--dim2);
  margin: 0 0 14px;
}
.lg-wrap h1 {
  font-family: var(--font-game, var(--font-outil));
  font-weight: 600;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.lg-lede {
  font-size: 18px;
  color: var(--dim);
  max-width: 62ch;
  margin: 0 0 10px;
}
.lg-dates {
  font-size: 13.5px;
  color: var(--dim2);
  margin: 0 0 40px;
  font-variant-numeric: tabular-nums;
}

/* ── Sommaire ────────────────────────────────────────────────────────── */

.lg-toc {
  background: var(--surf);
  border: 1px solid var(--line);
  border-radius: var(--rad, 22px);
  padding: 20px 24px;
  margin: 0 0 48px;
}
.lg-toc h2 {
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--dim2);
  margin: 0 0 12px;
  font-family: var(--font-outil);
}
.lg-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  columns: 2;
  column-gap: 34px;
}
.lg-toc li { counter-increment: toc; break-inside: avoid; margin: 0 0 6px; }
.lg-toc a {
  color: var(--text);
  text-decoration: none;
  font-size: 14.5px;
  display: block;
  padding: 2px 0;
  border-radius: 5px;
}
.lg-toc a::before {
  content: counter(toc) ". ";
  color: var(--dim2);
  font-variant-numeric: tabular-nums;
}
.lg-toc a:hover { color: var(--elan-ink); }
@media (max-width: 620px) { .lg-toc ol { columns: 1; } }

/* ── Corps ───────────────────────────────────────────────────────────── */

.lg-wrap section { margin: 0 0 46px; scroll-margin-top: 78px; }
.lg-wrap h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.015em;
  line-height: 1.25;
  margin: 0 0 16px;
  text-wrap: balance;
}
.lg-wrap h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 30px 0 10px;
  letter-spacing: -.01em;
}
.lg-wrap p { margin: 0 0 1em; max-width: 68ch; }
.lg-wrap ul, .lg-wrap ol { margin: 0 0 1.1em; padding-left: 22px; max-width: 68ch; }
.lg-wrap li { margin: 0 0 .5em; }
.lg-wrap strong { font-weight: 600; }
.lg-wrap a { color: var(--text); text-decoration: underline; text-decoration-color: var(--elan); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.lg-wrap a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--elan-ink); outline-offset: 3px; border-radius: 4px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em;
  background: var(--surf2);
  padding: .12em .4em;
  border-radius: 5px;
}

/* ── Encadrés ────────────────────────────────────────────────────────── */

.lg-note {
  border-left: 3px solid var(--line2);
  padding: 2px 0 2px 20px;
  margin: 0 0 22px;
  color: var(--dim);
  max-width: 68ch;
}
.lg-note strong { color: var(--text); }

.lg-key {
  background: var(--surf);
  border: 1px solid var(--line);
  border-left: 3px solid var(--elan);
  border-radius: var(--rad-m, 15px);
  padding: 18px 22px;
  margin: 0 0 24px;
  max-width: 68ch;
}
.lg-key h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--elan-ink);
}
.lg-key p { margin: 0 0 .7em; color: var(--dim); font-size: 15px; }
.lg-key p:last-child { margin: 0; }
.lg-key strong { color: var(--text); }
.lg-key.commit { border-left-color: var(--xp); }
.lg-key.commit h4 { color: var(--xp-ink); }

/* ── Tableaux ────────────────────────────────────────────────────────── */

.lg-tw {
  overflow-x: auto;
  margin: 0 0 26px;
  border: 1px solid var(--line);
  border-radius: var(--rad-m, 15px);
  background: var(--surf);
}
.lg-tw table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 520px; }
.lg-tw th, .lg-tw td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lg-tw tr:last-child td { border-bottom: none; }
.lg-tw th {
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--dim2);
  background: var(--surf2);
  white-space: nowrap;
}
.lg-tw td { color: var(--dim); }
.lg-tw td:first-child { color: var(--text); font-weight: 500; }

/* ── Marqueur de champ à compléter ───────────────────────────────────
   ⚠️ Volontairement TRÈS visible : un espace réservé discret finit en
   ligne dans une page publiée. Un `grep -rn "todo-fill" *.html` les
   retrouve tous. */
.todo-fill {
  background: var(--elan-bg);
  border: 1px dashed var(--elan);
  color: var(--elan-ink);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: .92em;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Pied ────────────────────────────────────────────────────────────── */

.lg-foot {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding-top: 24px;
  color: var(--dim2);
  font-size: 13.5px;
}
.lg-foot nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.lg-foot nav a { color: var(--dim); text-decoration: none; }
.lg-foot nav a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 560px) {
  .lg-wrap { padding: 34px 18px 80px; }
  .lg-top-in { padding: 12px 18px; }
  .lg-wrap h2 { font-size: 21px; }
}
