/* =========================================================
   VOICEE — Pages légales
   Même système typographique que la landing : Archivo (display),
   Plus Jakarta Sans (texte), JetBrains Mono (labels).
   Blanc pur, encre, braise. Air partout.
   ========================================================= */

:root {
  --bg:      #FFFFFF;
  --shell:   #FAFAF8;
  --ink:     #111111;
  --ink-60:  #555550;
  --muted:   #77736B;
  --ghost:   #DAD6CE;
  --line:    #ECEAE4;
  --braise:  #FF4A1F;
  --braise-deep: #E23A12;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.25,.1,.25,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --pad: clamp(20px, 4.5vw, 64px);
  --nav-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--nav-h) + 28px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--braise); color: #fff; }
img, svg { max-width: 100%; }
a { color: inherit; }

.container { max-width: 1440px; margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Barre de progression de lecture ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--braise); z-index: 900;
  transition: width .12s linear;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; display: block; color: var(--ink); }
.brand-word { display: flex; align-items: baseline; gap: 8px; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.03em;
}
.brand-name sup { font-size: .5em; top: -.7em; position: relative; }
.brand-vertical {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav-links > a:not(.pill) {
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-60);
  transition: color .25s;
}
.nav-links > a:not(.pill):hover { color: var(--ink); }
@media (max-width: 860px) { .nav-links > a:not(.pill) { display: none; } }

.pill {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 11px 22px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--ink);
  background: transparent; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s;
}
.pill:hover { background: var(--ink); color: #fff; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--braise); flex: none; }
.pill:hover .dot { background: #fff; }

/* ---------- HERO document ---------- */
.doc-hero {
  padding-top: calc(var(--nav-h) + clamp(48px, 9vw, 110px));
  padding-bottom: clamp(34px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: clip;
}
.doc-hero::after {
  content: ""; position: absolute; inset: auto auto -420px -180px;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,74,31,.10), transparent 62%);
  pointer-events: none;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--braise); margin: 0 0 22px; display: block;
}
.doc-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(38px, 7.2vw, 96px); letter-spacing: -.045em; line-height: .94;
  margin: 0; text-wrap: balance; max-width: 16ch;
}
.doc-title em { font-style: normal; color: var(--braise); }
.doc-lead {
  color: var(--muted); font-size: clamp(15px, 1.25vw, 18px);
  max-width: 62ch; margin: 26px 0 0;
}
.doc-meta {
  display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 38px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.doc-meta b { color: var(--ink); font-weight: 500; }

/* ---------- Sélecteur de documents ---------- */
.doc-switch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.doc-switch a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-60);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  background: var(--shell);
  transition: color .25s, border-color .25s, background-color .25s;
}
.doc-switch a:hover { color: var(--ink); border-color: var(--ghost); }
.doc-switch a[aria-current="page"] {
  color: #fff; background: var(--ink); border-color: var(--ink);
}

/* ---------- Layout : sommaire + contenu ---------- */
.doc-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 120px);
  align-items: start;
}
@media (max-width: 1000px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } }

.toc { position: sticky; top: calc(var(--nav-h) + 32px); }
.toc-title {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.toc ol { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow-y: auto; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; align-items: baseline;
  text-decoration: none; color: var(--ink-60);
  font-size: 13.5px; line-height: 1.35; padding: 7px 0 7px 12px;
  border-left: 1.5px solid var(--line);
  transition: color .25s, border-color .25s;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono); font-size: 10px; color: var(--ghost);
  flex: none; transition: color .25s;
}
.toc ol { counter-reset: toc; }
.toc a:hover { color: var(--ink); border-left-color: var(--ghost); }
.toc a.-active { color: var(--ink); border-left-color: var(--braise); font-weight: 600; }
.toc a.-active::before { color: var(--braise); }

.toc-mobile { display: none; }
@media (max-width: 1000px) {
  .toc { display: none; }
  .toc-mobile {
    display: block; border: 1px solid var(--line); border-radius: 16px;
    background: var(--shell); padding: 18px 20px; margin-bottom: 34px;
  }
  .toc-mobile summary {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
    text-transform: uppercase; cursor: pointer; color: var(--ink);
  }
  .toc-mobile ol { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: toc; }
  .toc-mobile li { counter-increment: toc; }
  .toc-mobile a {
    display: flex; gap: 10px; text-decoration: none; color: var(--ink-60);
    font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line);
  }
  .toc-mobile a::before {
    content: counter(toc, decimal-leading-zero);
    font-family: var(--font-mono); font-size: 10px; color: var(--ghost);
  }
}

/* ---------- Contenu ---------- */
.doc-body { max-width: 76ch; }
.doc-body section { scroll-margin-top: calc(var(--nav-h) + 28px); padding-bottom: clamp(38px, 5vw, 60px); }
.doc-body section + section { border-top: 1px solid var(--line); padding-top: clamp(38px, 5vw, 58px); }

.doc-body h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(23px, 2.6vw, 34px); letter-spacing: -.035em; line-height: 1.08;
  margin: 0 0 22px; text-wrap: balance;
}
.doc-body h2 .num {
  display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; color: var(--braise); margin-bottom: 12px;
}
.doc-body h3 {
  font-family: var(--font-body); font-weight: 700;
  font-size: 16.5px; letter-spacing: -.01em; margin: 34px 0 12px;
}
.doc-body p { color: var(--ink-60); margin: 0 0 16px; font-size: 16px; }
.doc-body p.intro { color: var(--ink); font-size: 17.5px; }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body a:not(.pill) {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--braise);
  transition: color .25s, border-color .25s;
}
.doc-body a:not(.pill):hover { color: var(--braise); }

.doc-body ul, .doc-body ol.num { margin: 0 0 18px; padding: 0; list-style: none; }
.doc-body ul > li, .doc-body ol.num > li {
  color: var(--ink-60); position: relative; padding-left: 22px; margin-bottom: 10px;
}
.doc-body ul > li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--braise);
}
.doc-body ol.num { counter-reset: li; }
.doc-body ol.num > li { counter-increment: li; }
.doc-body ol.num > li::before {
  content: counter(li) "."; position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 12px; color: var(--braise);
}

/* Définitions */
.defs { margin: 0; }
.defs dt {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: -.01em; color: var(--ink); margin-top: 20px;
}
.defs dt:first-child { margin-top: 0; }
.defs dd { margin: 6px 0 0; color: var(--ink-60); }

/* Encadrés */
.callout {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--shell); padding: 22px 24px; margin: 26px 0;
}
.callout .lab {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 10px;
}
.callout p:last-child { margin-bottom: 0; }
.callout.-key { border-color: rgba(255,74,31,.35); background: rgba(255,74,31,.045); }
.callout.-key .lab { color: var(--braise); }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px;
}
thead th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  text-align: left; padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink);
}
tbody td {
  padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line);
  color: var(--ink-60); vertical-align: top;
}
tbody td:first-child { color: var(--ink); font-weight: 600; }

/* Carte identité (mentions légales) */
.idcard {
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  margin: 0 0 26px; background: var(--shell);
}
.idcard-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px; padding: 16px 24px; border-bottom: 1px solid var(--line);
}
.idcard-row:last-child { border-bottom: 0; }
.idcard-row dt {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); padding-top: 3px;
}
.idcard-row dd { margin: 0; color: var(--ink); font-weight: 500; }
@media (max-width: 620px) {
  .idcard-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

/* Bloc contact final */
.doc-cta {
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 7vw, 88px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px; align-items: end;
}
@media (max-width: 760px) { .doc-cta { grid-template-columns: minmax(0, 1fr); align-items: start; } }
.doc-cta h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(26px, 3.6vw, 46px); letter-spacing: -.04em; line-height: 1.02;
  margin: 0; max-width: 18ch; text-wrap: balance;
}
.doc-cta .cta-links { display: flex; flex-wrap: wrap; gap: 12px; }
.pill.-solid { background: var(--ink); color: #fff; }
.pill.-solid:hover { background: var(--braise); border-color: var(--braise); }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); background: var(--shell); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 34px;
  padding-block: 34px; font-size: 13px; color: var(--muted);
}
.footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800; color: var(--ink);
  font-size: 15px; letter-spacing: -.02em;
}
.footer-brand svg { width: 18px; height: 18px; }
.footer-inner a { color: var(--muted); text-decoration: none; transition: color .25s; }
.footer-inner a:hover { color: var(--ink); }
.footer-inner a[aria-current="page"] { color: var(--ink); }

/* ---------- Retour en haut ---------- */
#totop {
  position: fixed; right: 24px; bottom: 24px; z-index: 400;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .25s;
}
#totop.-on { opacity: 1; pointer-events: auto; transform: none; }
#totop:hover { border-color: var(--ink); }
#totop svg { width: 16px; height: 16px; }

/* ---------- Révélation douce ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .doc-body section, .js .doc-hero > .container > * {
    opacity: 0; transform: translateY(14px);
    transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  }
  .js .doc-body section.-in, .js .doc-hero.-in > .container > * { opacity: 1; transform: none; }
  .js .doc-hero > .container > *:nth-child(2) { transition-delay: .06s; }
  .js .doc-hero > .container > *:nth-child(3) { transition-delay: .12s; }
  .js .doc-hero > .container > *:nth-child(4) { transition-delay: .18s; }
  .js .doc-hero > .container > *:nth-child(5) { transition-delay: .24s; }
}

/* ---------- Impression ---------- */
@media print {
  .nav, .toc, .toc-mobile, #totop, #progress, .doc-switch, .doc-cta, .footer { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc-hero { padding-top: 0; border: 0; }
  .doc-hero::after { display: none; }
  body { font-size: 11pt; }
  .doc-body { max-width: none; }
  .doc-body section { break-inside: avoid; }
  a { border: 0 !important; }
}
