/* Belt Zerious : meme famille visuelle que les autres outils zerious (Fraunces + Public Sans, palette mauve) */
:root {
  --mauve-50: #faf7fc; --mauve-100: #f1eaf6; --mauve-200: #e0d2ea; --mauve-500: #7a5a94; --mauve-700: #4e3563; --mauve-900: #2a1d36;
  --bg: var(--mauve-50); --surface: #ffffff; --text: #2a1d36; --muted: #6f6479; --border: #e4dbeb;
  --accent: #5b3f78; --accent-text: #ffffff; --ok: #2f7a4f; --warn: #a15c07; --err: #b42318;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1627; --surface: #2a1f35; --text: #f1eaf6; --muted: #b3a6c0; --border: #3d2f4b;
    --accent: #c7a8e3; --accent-text: #1e1627; --ok: #6fcf97; --warn: #f2b35b; --err: #f28b82; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1627; --surface: #2a1f35; --text: #f1eaf6; --muted: #b3a6c0; --border: #3d2f4b;
  --accent: #c7a8e3; --accent-text: #1e1627; --ok: #6fcf97; --warn: #f2b35b; --err: #f28b82; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: 30px; margin: 8px 0 6px; }
h2 { font-size: 21px; margin: 32px 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
a { color: var(--accent); }
main { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 19px; text-decoration: none; color: var(--text); }
.brand span { color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--mauve-100); }
:root[data-theme="dark"] .nav a:hover { background: #352943; }
.nav a.active { color: var(--text); background: var(--mauve-100); }
:root[data-theme="dark"] .nav a.active { background: #352943; }
.user-box { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.stat { font-family: "Fraunces", Georgia, serif; font-size: 26px; font-weight: 600; }

button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--mauve-500); outline-offset: 2px; }
select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--muted); }
.pill.ok { color: var(--ok); border-color: currentColor; }
.pill.warn { color: var(--warn); border-color: currentColor; }
.pill.err { color: var(--err); border-color: currentColor; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.empty { color: var(--muted); padding: 12px 0; }

.module { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.module p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.doc { max-width: 760px; }
.doc p, .doc li { line-height: 1.65; }
.doc code, .doc pre { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }
.doc pre { background: var(--mauve-100); padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
:root[data-theme="dark"] .doc pre { background: #352943; }
.doc .toc { font-size: 14px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { max-width: 400px; width: 100%; padding: 32px; }
.doc .toc a { display: inline-block; margin: 2px 14px 2px 0; }
