/* Shared legal-page styles — AAI Maquine */
@font-face { font-family: 'Founders Grotesk'; src: url('../fonts/FoundersGrotesk-Light.otf') format('opentype'); font-weight: 300; }
@font-face { font-family: 'Founders Grotesk'; src: url('../fonts/FoundersGrotesk-Regular.otf') format('opentype'); font-weight: 400; }
@font-face { font-family: 'Founders Grotesk'; src: url('../fonts/FoundersGrotesk-Medium.otf') format('opentype'); font-weight: 500; }
@font-face { font-family: 'Founders Grotesk'; src: url('../fonts/FoundersGrotesk-Semibold.otf') format('opentype'); font-weight: 600; }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #08080a;
  --surface:  #111114;
  --elevated: #1c1c21;
  --border:   #28282f;
  --border-s: #1e1e24;
  --fg1:      #e4e4e8;
  --fg2:      #a0a0ac;
  --fg3:      #5a5a66;
  --fg4:      #3c3c46;
  --accent:   #c8c8d2;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg1);
  font-family: 'Founders Grotesk', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav.legal-nav {
  position: sticky; top: 0; z-index: 50;
  height: 56px; display: flex; align-items: center; padding: 0 48px;
  background: rgba(8,8,10,0.92); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}
.nav-logo { height: 22px; }
.nav-back {
  margin-left: auto;
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg2); text-decoration: none; transition: color 150ms;
}
.nav-back:hover { color: var(--fg1); }

/* ── PAGE LAYOUT ── */
.legal-wrap {
  max-width: 820px; margin: 0 auto; padding: 80px 48px 120px;
}
.legal-eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--fg2); display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.legal-eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--fg3); }

h1.legal-title {
  font-size: clamp(34px, 4.5vw, 56px); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.05;
  color: var(--fg1); margin-bottom: 16px;
}
.legal-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; color: var(--fg3);
  padding-bottom: 32px; margin-bottom: 48px;
  border-bottom: 1px solid var(--border-s);
  display: flex; flex-wrap: wrap; gap: 24px;
}
.legal-meta span strong { color: var(--fg2); font-weight: 500; }

/* ── TOC ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--border-s);
  padding: 24px 28px;
  margin-bottom: 56px;
  border-radius: 2px;
}
.toc-label {
  font-size: 10px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--fg3); margin-bottom: 14px;
}
.toc ol {
  list-style: none; counter-reset: toc;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px;
}
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 10px; padding: 4px 0;
  font-size: 14px; color: var(--fg2); text-decoration: none;
  transition: color 150ms;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--fg4); flex-shrink: 0; padding-top: 2px;
}
.toc a:hover { color: var(--fg1); }

/* ── CONTENT ── */
.legal-section { margin-bottom: 56px; scroll-margin-top: 80px; }
.legal-section h2 {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--fg1);
  padding-bottom: 14px; margin-bottom: 24px;
  border-bottom: 1px solid var(--border-s);
  display: flex; align-items: baseline; gap: 14px;
}
.legal-section h2::before {
  content: attr(data-num);
  font-family: 'JetBrains Mono', monospace; font-weight: 400;
  color: var(--fg3); font-size: 11px;
}
.legal-section h3 {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg1); margin: 28px 0 12px;
}
.legal-section p { font-size: 15px; color: #c0c0cc; margin-bottom: 14px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--fg4); transition: border-color 150ms; }
.legal-section a:hover { border-color: var(--accent); }
.legal-section strong { color: var(--fg1); font-weight: 500; }
.legal-section ul { list-style: none; padding-left: 0; margin: 8px 0 16px; }
.legal-section ul li {
  position: relative; padding-left: 18px; margin-bottom: 8px;
  font-size: 15px; color: #c0c0cc;
}
.legal-section ul li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 6px; height: 1px; background: var(--fg3);
}
.legal-section ul li strong { color: var(--fg1); font-weight: 500; }

/* ── IDENTITY CARD (Mentions Légales) ── */
.identity-card {
  background: var(--surface);
  border: 1px solid var(--border-s);
  padding: 28px 32px;
  border-radius: 2px;
  margin: 16px 0 24px;
}
.identity-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-s);
  font-size: 14px;
}
.identity-row:last-child { border-bottom: none; }
.identity-row dt {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg3); padding-top: 2px;
}
.identity-row dd { color: var(--fg1); }
.placeholder {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--warn, #d4b86a);
  background: rgba(212, 184, 106, 0.08);
  border: 1px dashed rgba(212, 184, 106, 0.3);
  padding: 1px 8px; border-radius: 2px;
}

/* ── DATA TABLE (Privacy) ── */
.data-table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  font-size: 13px;
}
.data-table th, .data-table td {
  padding: 14px 16px; text-align: left;
  border-bottom: 1px solid var(--border-s);
  vertical-align: top;
}
.data-table th {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg3); background: var(--elevated);
}
.data-table td { color: #c0c0cc; }
.data-table tr:last-child td { border-bottom: none; }

/* ── FOOTER ── */
footer.legal-footer {
  border-top: 1px solid var(--border-s);
  padding: 32px 48px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #787886;
}
.legal-footer-links { display: flex; gap: 24px; }
.legal-footer-links a {
  color: #787886; text-decoration: none;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: color 150ms;
}
.legal-footer-links a:hover { color: var(--fg1); }
.legal-footer-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em; }

@media (max-width: 720px) {
  nav.legal-nav { padding: 0 24px; }
  .legal-wrap { padding: 48px 24px 80px; }
  .toc ol { grid-template-columns: 1fr; }
  .identity-row { grid-template-columns: 1fr; gap: 4px; }
  footer.legal-footer { flex-direction: column; gap: 16px; padding: 24px; text-align: center; }
}
