/* Openworld -- the legal pages (legal/*.html): mentions légales, conditions
   d'utilisation, conditions de vente, confidentialité. Same colours and fonts
   as site.css, a quiet reading layout, no script needed to read them. */

@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("../fonts/Nunito-Bold.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("../fonts/Nunito-ExtraBold.woff") format("woff"); }

:root {
  --bg: #0a0f1c;
  --bg-2: #0e1628;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --ink: #eef3ff;
  --muted: #a6b3cd;
  --grass: #7ed957;
  --water: #5ac9dc;
  --gold: #ffcc4d;
  --display: "Nunito", ui-rounded, system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.65 var(--text); -webkit-font-smoothing: antialiased;
}
a { color: var(--water); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
b, strong { font-weight: 700; }

/* ---- top bar ----------------------------------------------------------------- */
.bar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px var(--gutter); padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(10, 15, 28, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 1rem var(--display); letter-spacing: 0.12em; }
.bar-brand img { width: 30px; height: 30px; }
.bar-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.bar-nav a { color: var(--muted); text-decoration: none; font: 700 0.92rem var(--display); }
.bar-nav a:hover, .bar-nav a[aria-current="page"] { color: var(--ink); }
.bar-nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--grass); }
@media (max-width: 640px) { .bar-nav { margin-left: 0; width: 100%; } }

/* ---- the document ------------------------------------------------------------ */
.doc { max-width: 780px; margin: 0 auto; padding: 44px var(--gutter) 64px; }
.doc h1 { font: 800 clamp(1.9rem, 5vw, 2.6rem)/1.1 var(--display); margin: 0 0 8px; letter-spacing: -0.01em; }
.doc .version { color: var(--muted); margin: 0 0 28px; font-size: 0.95rem; }
.doc h2 {
  font: 800 1.35rem/1.25 var(--display); margin: 44px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
.doc h3 { font: 800 1.08rem/1.3 var(--display); margin: 26px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc li::marker { color: var(--muted); }

/* « L'essentiel » : the page in a few lines, before the full text. */
.gist {
  background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--grass);
  border-radius: 14px; padding: 16px 20px; margin: 0 0 28px;
}
.gist h2 { border: 0; margin: 0 0 8px; padding: 0; font-size: 1.1rem; }
.gist ul { margin: 0; }

.toc { margin: 0 0 8px; padding: 14px 20px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.toc p { margin: 0 0 6px; font: 800 0.95rem var(--display); color: var(--muted); }
.toc ol { margin: 0; columns: 2 260px; column-gap: 28px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.note { color: var(--muted); font-size: 0.93rem; }
.doc code { font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }

/* Tables scroll inside their frame on a phone; the page never does. */
.table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.table table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.table th { font: 800 0.9rem var(--display); color: var(--muted); background: var(--bg-2); }
.table tr:last-child td { border-bottom: 0; }

.phone-reveal {
  font: 700 0.95rem var(--display); color: var(--bg); background: var(--grass); border: 0;
  border-radius: 9px; padding: 3px 12px; cursor: pointer;
}
.phone-reveal:hover { filter: brightness(1.08); }

/* ---- footer ------------------------------------------------------------------ */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom)); }
.foot-inner { max-width: 780px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; font: 700 0.92rem var(--display); }
.foot a:hover { color: var(--ink); }
.foot small { width: 100%; color: var(--muted); opacity: 0.8; }

@media print {
  .bar, .foot, .phone-reveal { display: none; }
  body { background: #fff; color: #000; }
  .doc a { color: #000; }
  .gist, .toc, .card, .table { border-color: #999; background: none; }
}
