/* Orvok — pages légales et sécurité. Mêmes tokens que le site (typo Apple, neutres #f6f5f1). */
:root {
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #151513;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --accent: #1f8a66;
  --accent-soft: rgba(31, 138, 102, .1);
  --todo-bg: #fff4cc;
  --todo-ink: #7a5600;
  --night: #12261f;
  --pad: clamp(16px, 5vw, 48px);
  --nav-h: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -.016em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #fff; }

/* Header */
.head { max-width: 1120px; margin: 0 auto; padding: calc(var(--nav-h) + clamp(48px, 8vw, 104px)) var(--pad) clamp(24px, 4vw, 40px); }
.back { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; letter-spacing: -.01em; }
.back svg { width: 14px; height: 14px; }
.ltabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; padding: 4px; width: max-content; max-width: 100%; border-radius: 999px; background: rgba(0, 0, 0, .05); }
.ltabs a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background .3s, color .3s; }
.ltabs a:hover { color: var(--ink); }
.ltabs a[aria-current="page"] { background: #fff; color: var(--ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .1); }
.kicker { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
h1 { margin-top: 8px; font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 5.4vw, 64px); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; max-width: 18ch; }
.intro { margin-top: 18px; max-width: 62ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.meta span { padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 13px; color: var(--ink-2); }

/* Layout */
.layout { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad) clamp(64px, 8vw, 112px); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc p { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.35; }
.toc a:hover { background: var(--surface); color: var(--ink); }

.doc { min-width: 0; padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 30px rgba(0, 0, 0, .05); }
.doc section + section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.doc h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.2; letter-spacing: -.028em; text-wrap: balance; }
.doc h3 { margin-top: 22px; font-size: 17px; font-weight: 600; letter-spacing: -.016em; }
.doc p, .doc ul, .doc ol, .doc dl, .doc .table-wrap { margin-top: 12px; max-width: 68ch; }
.doc p { text-wrap: pretty; }
.doc ul, .doc ol { padding-left: 1.2em; display: grid; gap: 6px; }
.doc li::marker { color: var(--ink-3); }
.doc strong { font-weight: 600; }
.doc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; }
.doc dt { color: var(--ink-3); font-size: 15px; }
.doc dd { font-size: 15px; }

.table-wrap { overflow-x: auto; max-width: 100% !important; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); background: var(--bg); }
tr:last-child td { border-bottom: 0; }

.note { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft); font-size: 15px; line-height: 1.5; max-width: 68ch; }
.note strong { color: var(--ink); }
mark.todo { padding: 1px 6px; border-radius: 6px; background: var(--todo-bg); color: var(--todo-ink); font-size: .92em; font-weight: 500; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.pills li { padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 14px; }
.pills li::marker { content: ""; }

/* 404 */
.lost { min-height: 78vh; padding-top: calc(var(--nav-h) + 48px) !important; display: grid; place-items: center; text-align: center; padding: 48px var(--pad); }
.lost h1 { margin: 8px auto 0; }
.lost p { margin: 16px auto 0; max-width: 44ch; color: var(--ink-2); }
.lost .back { margin-top: 28px; height: 46px; padding: 0 22px; font-size: 15px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
  .toc ol { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .doc { border-radius: 22px; }
  .doc dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .x-nav, .x-menu, .toc, .x-end, .ltabs { display: none; }
  .layout { display: block; }
  .doc { box-shadow: none; padding: 0; }
}
/* Cohérence avec le site : même sur-titre, sommaire qui suit la lecture */
.kicker { font-size: 17px; letter-spacing: -.02em; text-transform: none; }
.toc a { transition: background .25s, color .25s; }
.toc a[aria-current] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.doc p, .doc li { color: #333336; }
.doc a { font-weight: 500; }
