/*
 * Shared stylesheet for the static legal pages (confidentialite.html,
 * cgu.html, mentions-legales.html). These pages sit outside the React app
 * (no build step, served as plain static files) so this is the single
 * shared "template" all three point at — one file to update instead of
 * three duplicated <style> blocks. Bento tokens, light by default (legal
 * reading pages are not the spectator/game-in-progress exception).
 */
:root {
  --surface: #FAF8F2;
  --surface-elevated: #FDFCF9;
  --surface-sunken: #F2EEE3;
  --border-subtle: #E8E3D8;
  --border-strong: #D9D2C3;
  --text-primary: #16302A;
  --text-secondary: #4F4B42;
  --text-tertiary: #6E6A5D;
  --accent: #2E7D5B;
  --accent-hover: #1F6147;
  --accent-ink: #1F6147;
  --ink: #16302A;
  --ink-hover: #0D1F1A;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Public Sans', system-ui, sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.65;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: var(--ink); }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav-bar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 960px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.logo-row { display: inline-flex; align-items: center; gap: 9px; }
.diamond { width: 16px; height: 16px; background: var(--accent); transform: rotate(45deg); border-radius: 3px; flex-shrink: 0; }
.logo-name { font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; color: var(--text-primary); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.btn-back { font-size: 13px; font-weight: 600; color: var(--text-tertiary); transition: color .18s; }
.btn-back:hover { color: var(--text-primary); }
.lang-switcher { position: relative; display: inline-block; }
.lang-btn {
  background: var(--surface-sunken); border: 0; border-radius: 999px;
  color: var(--text-secondary); font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: .05em; padding: 6px 12px; cursor: pointer; transition: color .18s, background .18s;
}
.lang-btn:hover { color: var(--text-primary); background: var(--border-subtle); }
.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--surface-elevated); border: 1px solid var(--border-subtle); border-radius: 12px;
  box-shadow: 0 2px 4px rgba(22,48,42,.05), 0 18px 36px -24px rgba(22,48,42,.28);
  min-width: 64px; z-index: 100; padding: 4px 0;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: block; width: 100%; padding: 7px 12px; font-family: var(--font-body);
  font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--text-secondary);
  cursor: pointer; text-align: left; transition: all .15s; border: none; background: none;
}
.lang-option:hover { color: var(--text-primary); background: var(--surface-sunken); }
.lang-option.active { color: var(--accent-ink); }

/* ── Layout: sticky table of contents + content, one column on mobile ── */
.legal-layout {
  max-width: 1040px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 28px 60px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px;
}
@media (min-width: 900px) {
  .legal-layout { grid-template-columns: 200px minmax(0, 68ch); align-items: start; }
}
.legal-toc {
  display: none;
  font-size: 13px;
}
@media (min-width: 900px) {
  .legal-toc { display: block; position: sticky; top: 84px; }
}
.legal-toc p.toc-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 12px;
}
.legal-toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.legal-toc a {
  display: block; padding: 6px 10px; border-radius: 8px; color: var(--text-tertiary);
  font-weight: 600; transition: color .15s, background .15s;
}
.legal-toc a:hover { color: var(--text-primary); background: var(--surface-sunken); }
.legal-toc a.active { color: var(--accent-ink); background: var(--surface-sunken); }

.legal-content { min-width: 0; }
.legal-content h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 5vw, 42px);
  line-height: 1.05; letter-spacing: -.025em; margin-bottom: 8px; text-wrap: balance;
}
.legal-content .subtitle { font-size: 13px; color: var(--text-tertiary); margin-bottom: 40px; }
.legal-content h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em;
  color: var(--text-primary); margin: 40px 0 14px; padding-top: 24px; border-top: 1px solid var(--border-subtle);
  scroll-margin-top: 84px;
}
.legal-content h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.legal-content p, .legal-content li { color: var(--text-secondary); font-size: 15px; line-height: 1.65; margin-bottom: 10px; text-wrap: pretty; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal-content strong { color: var(--text-primary); font-weight: 700; }
.legal-content a { font-weight: 600; }
.legal-content a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer { background: var(--surface-sunken); border-top: 1px solid var(--border-subtle); padding: 44px 0 28px; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand p { font-size: 12px; color: var(--text-secondary); line-height: 1.65; max-width: 240px; }
.footer-brand .adm { font-size: 11px; color: var(--text-tertiary); margin-top: 10px; }
.footer-brand .adm strong { color: var(--text-secondary); }
.footer-col h4 { font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 12px; font-weight: 500; color: var(--text-secondary); transition: color .18s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.footer-legal { font-size: 11px; color: var(--text-tertiary); line-height: 1.6; }
.footer-legal a { color: var(--text-secondary); transition: color .18s; }
.footer-legal a:hover { color: var(--text-primary); }
.footer-legal .sep { margin: 0 8px; opacity: .5; }
.footer-made { font-size: 11px; color: var(--text-tertiary); }

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
