/* ============================================================
   legal.css — shared styles for mentions-legales, confidentialite, cookies
   ============================================================ */

:root {
  color-scheme: light dark;
  --bg-app: #f6f9fc;
  --bg-surface: #ffffff;
  --text-primary: #162033;
  --text-secondary: #647187;
  --text-muted: #8a9ab0;
  --border-subtle: rgba(91, 111, 140, 0.18);
  --brand-blue: #1769e0;
  --ink: #162033;
  --muted: #647187;
  --outline: rgba(91, 111, 140, 0.18);
  --font: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  scroll-behavior: smooth;
  color-scheme: light dark;
  background: var(--bg-app);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-app);
}

a {
  color: var(--brand-blue);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.legal-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 24px 0 80px;
}

/* ---- Topbar ---- */
.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 40px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}

.legal-back {
  font-size: 0.85rem;
  color: var(--brand-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legal-back:hover { text-decoration: underline; }
.legal-back::before { content: "←"; }

/* ---- Content typography ---- */
.legal-content h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.legal-content .legal-date {
  margin: 0 0 32px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legal-content h2 {
  margin: 36px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.legal-content h3 {
  margin: 24px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.legal-content p {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: 0.93rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 14px;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 6px;
  font-size: 0.93rem;
  color: var(--text-primary);
}

.legal-content strong {
  font-weight: 700;
  color: var(--ink);
}

.legal-content a {
  color: var(--brand-blue);
}

.legal-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 32px 0;
}

/* Info box */
.legal-info-box {
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  margin: 0 0 24px;
}

.legal-info-box p { margin: 0; }

/* ---- Footer ---- */
.legal-footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legal-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.82;
}

.legal-footer-links a:hover { opacity: 1; text-decoration: underline; }
.legal-footer-sep { opacity: 0.4; user-select: none; }

/* ============================================================
   Dark mode
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: #131720;
    --bg-surface: #1c2132;
    --text-primary: #e6eaf4;
    --text-secondary: #8fa3be;
    --text-muted: #647a96;
    --border-subtle: rgba(255, 255, 255, 0.09);
    --ink: #e6eaf4;
    --muted: #8fa3be;
    --outline: rgba(255, 255, 255, 0.09);
  }

  html, body { background: #131720 !important; color: #e6eaf4 !important; }

  .legal-content h1,
  .legal-content h2,
  .legal-content h3,
  .legal-content strong { color: #e6eaf4 !important; }

  .legal-content p,
  .legal-content li { color: #c8d3e8 !important; }

  .legal-brand { color: #e6eaf4 !important; }

  .legal-info-box {
    background: #1c2132 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 639px) {
  .legal-shell { padding-top: 16px; }
  .legal-topbar { margin-bottom: 28px; }
  .legal-content h1 { font-size: 1.55rem; }
}
