/* Lanti's legal pages (api.lanti.visionpm.fr), built by scripts/legal_web.py.
   The Lanti design system (docs/design-system.md): night, always; glass for the parent; glow, not
   shadow; the lantern gold once, for focus. Values are its tokens, named as in its tokens.json.
   No web font: SF Pro Rounded comes with every Apple device (ui-rounded), the system face elsewhere. */

:root {
  color-scheme: dark;
  --ground: #0a0f29;
  --ground-deep: #1a1245;
  --surface-raised: rgba(255, 255, 255, 0.10);
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.82);
  --ink-faint: rgba(255, 255, 255, 0.60);
  --hairline: rgba(255, 255, 255, 0.18);
  --accent: #7aa5ff;
  --accent-wash: rgba(122, 165, 255, 0.16);
  --lantern-gold: #ffcc4d;
  --gold-wash: rgba(255, 204, 77, 0.14);
  --focus-ring: #ffcc4d;
  --glow-ask: 0 6px 24px rgba(107, 92, 232, 0.30);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --radius-chip: 12px;
  --radius-field: 20px;
  --radius-card: 26px;
  --radius-pill: 999px;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --system: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --column: 1040px;
  --wide: 900px; /* stage-wide-width: two panes from here, as in the app */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--ground), var(--ground-deep)) fixed;
  background-color: var(--ground);
  color: var(--ink);
  font: 17px/1.6 var(--system);
}
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }

.skip { position: absolute; left: var(--space-4); top: -100px; padding: var(--space-2) var(--space-4); background: var(--ground-deep); border-radius: var(--radius-chip); }
.skip:focus { top: var(--space-4); }

.wrap {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 max(var(--space-4), env(safe-area-inset-right)) var(--space-7) max(var(--space-4), env(safe-area-inset-left));
}

/* ---- the band at the top: the mark and the other language -------------------------------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) 0; }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--ink); text-decoration: none; font: 700 22px/1 var(--rounded); }
.brand img { width: 44px; height: 44px; border-radius: 22%; box-shadow: var(--glow-ask); }
.lang {
  color: var(--ink); text-decoration: none; font: 600 15px/1 var(--rounded);
  padding: var(--space-3) var(--space-4); min-height: 44px; display: inline-flex; align-items: center;
  border: 1px solid var(--hairline); border-radius: var(--radius-pill); background: var(--surface-raised);
}

/* ---- headings and notices ---------------------------------------------------------------- */
.eyebrow { margin: var(--space-4) 0 var(--space-2); color: var(--ink-faint); font: 700 13px/1.3 var(--rounded); letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0 0 var(--space-2); font: 700 clamp(30px, 6vw, 44px)/1.15 var(--rounded); }
.meta { margin: 0 0 var(--space-4); color: var(--ink-muted); font-size: 15px; }
.lead { margin: 0 0 var(--space-6); max-width: 46rem; color: var(--ink-muted); font-size: 18px; }
.notice {
  margin: 0 0 var(--space-4); max-width: 46rem; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface-raised);
}
.notice.draft { border-color: var(--lantern-gold); background: var(--gold-wash); }
mark.blank { background: var(--gold-wash); color: var(--lantern-gold); padding: 0 .2em; border-radius: 4px; }

/* ---- the hub: one card per document ------------------------------------------------------ */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.card {
  display: flex; flex-direction: column; gap: var(--space-2); height: 100%;
  padding: var(--space-5); color: var(--ink); text-decoration: none;
  border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface-raised);
}
.card:hover { border-color: var(--accent); }
.card-title { font: 700 20px/1.25 var(--rounded); }
.card-text { color: var(--ink-muted); font-size: 16px; }
.card-meta { margin-top: auto; color: var(--ink-faint); font-size: 14px; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }

/* ---- a document: the list and its contents beside the reading column ---------------------- */
.layout { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.side { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.docs ul { list-style: none; margin: 0; padding: 0 0 var(--space-1); display: flex; gap: var(--space-2); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.docs a {
  display: block; white-space: nowrap; color: var(--ink-muted); text-decoration: none; font: 600 15px/1.3 var(--rounded);
  padding: var(--space-2) var(--space-4); border: 1px solid var(--hairline); border-radius: var(--radius-pill);
}
.docs a[aria-current] { color: var(--ink); border-color: var(--accent); background: var(--accent-wash); }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; gap: var(--space-2); padding: 6px var(--space-3); border-radius: var(--radius-chip); color: var(--ink-muted); text-decoration: none; font-size: 15px; line-height: 1.4; }
.toc a:hover { color: var(--ink); background: var(--accent-wash); }
.toc .num { flex: none; min-width: 2.4em; }
.toc .label { margin: 0 0 var(--space-2) var(--space-3); color: var(--ink-faint); font: 700 12px/1 var(--rounded); letter-spacing: .14em; text-transform: uppercase; }
.toc-side { display: none; }
.toc-fold { margin-bottom: var(--space-4); border: 1px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface-raised); }
.toc-fold summary { cursor: pointer; padding: var(--space-3) var(--space-4); font: 600 16px/1.3 var(--rounded); min-height: 44px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.toc-fold summary::-webkit-details-marker { display: none; }
.toc-fold summary::after { content: "▾"; color: var(--accent); }
.toc-fold[open] summary::after { content: "▴"; }
.toc-fold ol { padding: 0 var(--space-2) var(--space-3); }
.reading { min-width: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 236px minmax(0, 1fr); gap: var(--space-7); align-items: start; }
  .side { position: sticky; top: var(--space-6); max-height: calc(100vh - 48px); overflow: auto; }
  .docs ul { flex-direction: column; overflow: visible; gap: 2px; }
  .docs a { border: 0; border-radius: var(--radius-chip); padding: var(--space-2) var(--space-3); }
  .docs a[aria-current] { box-shadow: inset 3px 0 0 var(--accent); }
  .toc-side { display: block; }
  .toc-fold { display: none; }
}

/* ---- the text --------------------------------------------------------------------------- */
.paper {
  padding: var(--space-2) var(--space-5) var(--space-6);
  border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--surface-raised);
}
@media (min-width: 700px) { .paper { padding: var(--space-3) var(--space-7) var(--space-7); } }
.paper h2 {
  display: flex; gap: var(--space-3); align-items: baseline; scroll-margin-top: var(--space-6);
  margin: var(--space-7) 0 var(--space-3); padding-top: var(--space-6); border-top: 1px solid var(--hairline);
  font: 700 22px/1.3 var(--rounded);
}
.paper h2:first-child { margin-top: var(--space-4); padding-top: 0; border-top: 0; }
.paper h2 .num { color: var(--lantern-gold); }
.paper h3 { margin: var(--space-6) 0 var(--space-2); font: 700 18px/1.35 var(--rounded); }
.paper h4 { margin: var(--space-4) 0 var(--space-2); font: 700 17px/1.35 var(--rounded); }
.paper p { margin: 0 0 1em; }
.paper ul { margin: 0 0 1em; padding-left: var(--space-5); }
.paper li { margin-bottom: 6px; }
.paper li::marker { color: var(--accent); }
.paper code { font: .9em var(--mono); background: var(--surface-raised); padding: .1em .35em; border-radius: 6px; }
.paper .note { padding: var(--space-3) var(--space-4); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-chip) var(--radius-chip) 0; background: var(--accent-wash); }
.table { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.table table { border-collapse: collapse; min-width: 100%; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3); border: 1px solid var(--hairline); }
.table th { background: var(--surface-raised); font-weight: 600; }
.up { margin: var(--space-5) 0 0; text-align: right; }
.foot { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--hairline); color: var(--ink-faint); font-size: 14px; }
.foot a { color: var(--ink-muted); }

/* Reduce Transparency: glass becomes solid ground-deep, as in the app. */
@media (prefers-reduced-transparency: reduce) {
  .paper, .card, .notice, .toc-fold, .lang { background: var(--ground-deep); }
}
@media (forced-colors: active) {
  .paper, .card, .notice, .toc-fold { border: 1px solid CanvasText; }
}

/* Printing: black on white, the text only. */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .top, .side, .toc-fold, .up, .skip, .foot { display: none; }
  .layout { display: block; }
  .paper, .notice, .card { border: 0; background: none; padding: 0; }
  .meta, .lead, .eyebrow, .card-text, .card-meta { color: #333; }
  .paper h2 .num, mark.blank { color: #000; }
  a { color: #000; }
  .table th, .table td { border-color: #999; }
}

/* ---- a folded block: the publisher's contact details, shut until opened ---------------------- */
.fold { margin: var(--space-4) 0; border: 1px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface-raised); }
.fold > summary { cursor: pointer; list-style: none; padding: var(--space-3) var(--space-4); min-height: 44px; display: flex; align-items: center; gap: var(--space-2); font: 600 16px/1.3 var(--rounded); color: var(--ink); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint); transform: rotate(-45deg); transition: transform .15s; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold-body { padding: 0 var(--space-4) var(--space-2); }
@media print { .fold { border: none; background: none; } .fold > summary::before { display: none; } .fold-body { display: block; } }

/* Questions fréquentes: each question stands out, its answer starts on a line of its own (Sam, 22 Oct 2026). */
.qa { margin: 0 0 var(--space-4); padding: var(--space-4); border: 1px solid var(--hairline); border-radius: var(--radius-field); background: var(--surface-raised); }
.qa .q { display: flex; gap: var(--space-3); align-items: baseline; margin: 0 0 var(--space-2); color: var(--ink); font: 700 18px/1.35 var(--rounded); }
.qa .q::before { content: "?"; flex: none; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: var(--radius-pill); background: var(--accent-wash); color: var(--accent); font: 800 15px/1 var(--rounded); }
.qa .a { margin: 0; padding-left: calc(1.6em * 15 / 18 + var(--space-3)); color: var(--ink-muted); font: 400 16px/1.6 var(--system); }
@media (max-width: 600px) { .qa .a { padding-left: 0; } }
@media print { .qa { border: 0; padding: 0; background: none; } .qa .q::before { display: none; } .qa .a { padding-left: 0; color: #000; } }
