/* Lexique AltBS — static editorial pages, no JS.
   Mirrors the SPA design system: tokens from frontend/src/index.css,
   header from components/layout/TopBar.tsx, footer from Footer.tsx,
   page rhythm from routes/about.tsx. Light theme only, like the SPA. */

:root {
  --background: #F8FAFC;
  --foreground: #0F172A;
  --card: #FFFFFF;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-foreground: #FFFFFF;
  --muted-foreground: #64748B;
  --accent: #E2E8F0;
  --border: #E2E8F0;
  --radius: 0.375rem;
  --font-display: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Geist", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.6 var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-underline-offset: 4px; }
a:hover { color: var(--primary-hover); }

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.mono, code { font-family: var(--font-mono); }

/* ── Header (TopBar) ─────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(8px);
}
.site-header .inner {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; transition: opacity .15s; }
.brand:hover img { opacity: .8; }

.site-header .search { flex: 1; max-width: 672px; }
.site-header .search input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--foreground);
  font: 14px var(--font-sans);
}
.site-header .search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.site-header nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: auto; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(37, 99, 235, 0.30);
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.pill:hover { background: rgba(37, 99, 235, 0.15); border-color: rgba(37, 99, 235, 0.40); color: var(--primary); }
.pill svg { width: 14px; height: 14px; }

/* Language switch (FR ⇄ NL counterpart of the same page) */
.lang {
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
}
.lang:hover { color: var(--foreground); border-color: var(--muted-foreground); }

/* ── Footer ──────────────────────────────────────────────────── */

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--border);
}
.site-footer .inner {
  max-width: 1536px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.site-footer .section-label { margin-top: 8px; }
.site-footer nav { display: flex; gap: 16px; margin-top: 20px; }
.site-footer nav a, .footer-legal a {
  font-size: 12px;
  color: var(--muted-foreground);
  text-decoration: none;
}
.site-footer nav a:hover, .footer-legal a:hover { color: var(--foreground); text-decoration: underline; }
.footer-legal { text-align: right; font-size: 12px; color: var(--muted-foreground); }
.footer-legal p { margin: 0 0 12px; }
.footer-legal a { color: rgba(15, 23, 42, 0.8); }
.footer-legal .mono { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ── Content (about.tsx rhythm: max-w-3xl, px-6, py-16) ─────── */

main {
  flex: 1;
  width: 100%;
  max-width: 768px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.breadcrumb { font-size: 13px; color: var(--muted-foreground); margin-bottom: 32px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--border); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--foreground); }

.page-head { margin-bottom: 40px; }
h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 12px 0 0;
  font-feature-settings: "liga" 1, "dlig" 1;
}
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 56px 0 16px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
h3 { font-size: 16px; font-weight: 600; margin: 28px 0 8px; }

article > p, main > p { font-size: 17px; line-height: 1.7; }
p { margin: 0 0 16px; }
ul, ol { padding-left: 20px; margin: 0 0 16px; font-size: 15px; line-height: 1.7; }
li { margin-bottom: 8px; }
li::marker { color: var(--muted-foreground); }

.definition {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.definition p { margin: 0; font-size: 18px; line-height: 1.6; }

.formula {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  overflow-x: auto;
}

code {
  font-size: 0.85em;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
th, td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
th {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
td.num, th.num { text-align: right; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 600; background: var(--background); }

.note {
  border-left: 2px solid var(--primary);
  padding: 4px 0 4px 16px;
  font-size: 15px;
  color: var(--muted-foreground);
}

/* Call to action: card + primary button (ui/button.tsx default variant) */
.cta {
  margin: 56px 0;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 24px; }
.cta p { margin: 0 0 16px; font-size: 15px; color: var(--muted-foreground); }
.button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s;
}
.button:hover { background: rgba(37, 99, 235, 0.8); color: var(--primary-foreground); }

details { border-bottom: 1px solid var(--border); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 500; font-size: 15px; }
summary::marker { color: var(--muted-foreground); }
details p { margin: 10px 0 0; font-size: 15px; color: var(--muted-foreground); }

/* Hub cards (WidgetCard look) */
.concepts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 8px; }
.concept-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--foreground);
  text-decoration: none;
  transition: border-color .15s;
}
.concept-card:hover { border-color: rgba(37, 99, 235, 0.4); color: var(--foreground); }
.concept-card strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.2;
}
.concept-card span { font-size: 13px; color: var(--muted-foreground); }

.disclaimer { margin-top: 40px; font-size: 12px; color: var(--muted-foreground); }

@media (max-width: 767px) {
  /* TopBar on mobile: pills move to a centred second row */
  .site-header .inner { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 12px 16px; }
  .site-header nav { width: 100%; justify-content: center; gap: 8px; margin-left: 0; }
  .site-footer .inner { flex-direction: column; padding: 40px 16px; }
  .footer-legal { text-align: left; }
  main { padding: 32px 16px 0; }
  h1 { font-size: 48px; }
  h2 { font-size: 28px; }
}
