/* Documentation en ligne de Bazik ID : couleurs et polices du site (client/web/public/css/base.css). */
:root {
  --brand: #2F275D; --brand-hover: #3B3175; --brand-soft: #ECEBF4;
  --surface: #FFFFFF; --surface-muted: #F6F5FA; --surface-sunken: #FBFAFD;
  --text: #1C1838; --text-secondary: #5F5B78; --placeholder: #8E8AA6; --border: #DEDCE8; --line: #EEEDF3;
  --success: #0E7A4B; --warning: #8A5A00; --warning-soft: #FFF3DB; --warning-line: #F3DDAE;
  --accent: #6A59E6; --accent-soft: #F4F2FE; --accent-line: #DCD6FB;
  --night: #14112B; --night-line: #2E2850; --on-dark: #C9C6DB;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-padding-top: 84px; }
body { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; color: var(--text); background: var(--surface); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.grow { flex: 1; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 16px; }

/* ── Barre du haut ───────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 28px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; color: var(--text); text-decoration: none; white-space: nowrap; }
.top-docs { font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; padding-left: 16px; border-left: 1px solid var(--border); }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--line); }
.langs a, .langs span { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 7px; text-decoration: none; color: var(--text-secondary); }
.langs span { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(28, 24, 56, .12); }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-hover); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-muted); }

/* ── Mise en page ────────────────────────────────────────────────────── */
.layout { display: flex; max-width: 1280px; margin: 0 auto; gap: 48px; padding: 0 28px; }
.side { width: 240px; flex: none; position: sticky; top: 68px; align-self: flex-start; max-height: calc(100vh - 68px); overflow-y: auto; padding: 32px 0; }
.side-title { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--placeholder); margin: 0 0 8px; }
.side-title:not(:first-child) { margin-top: 28px; }
.side-nav, .side-toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--text-secondary); text-decoration: none; }
.side-nav a:hover { background: var(--surface-muted); }
.side-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.side-toc a { display: block; padding: 4px 12px; font-size: 13.5px; color: var(--text-secondary); text-decoration: none; border-left: 2px solid var(--line); }
.side-toc a:hover { color: var(--brand); border-left-color: var(--brand); }

/* ── Article ─────────────────────────────────────────────────────────── */
.article { flex: 1; min-width: 0; max-width: 820px; padding: 40px 0 80px; }
.article h1 { font-size: 40px; line-height: 1.15; letter-spacing: -.025em; margin: 0 0 16px; }
.article h1 + p { font-size: 18px; color: var(--text-secondary); }
.article h2 { font-size: 26px; line-height: 1.25; letter-spacing: -.02em; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.article h3 { font-size: 19px; margin: 32px 0 8px; }
.article h4 { font-size: 16px; margin: 24px 0 6px; }
.article h2, .article h3, .article h4 { position: relative; }
.anchor { position: absolute; left: -22px; color: var(--placeholder); text-decoration: none; opacity: 0; font-weight: 500; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus { opacity: 1; }
.article p, .article ul, .article ol { margin: 0 0 16px; }
.article li { margin: 4px 0; }
.article strong { font-weight: 700; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article code { font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--surface-muted); border: 1px solid var(--line); overflow-wrap: anywhere; }
.article pre { margin: 0 0 20px; padding: 18px 20px; border-radius: 14px; background: var(--night); border: 1px solid var(--night-line); overflow-x: auto; }
.article pre code { padding: 0; border: 0; background: none; color: var(--on-dark); font-size: 13.5px; line-height: 1.7; overflow-wrap: normal; white-space: pre; }
.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--border); border-radius: 14px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.article th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--placeholder); background: var(--surface-sunken); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.article td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article tr:last-child td { border-bottom: none; }
.article .right { text-align: right; }
.article .center { text-align: center; }
.callout { margin: 0 0 20px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--accent-line); background: var(--accent-soft); }
.callout.warn { border-color: var(--warning-line); background: #FFF8EA; }
.callout p:last-child { margin-bottom: 0; }

/* ── Pied ────────────────────────────────────────────────────────────── */
.foot { display: flex; gap: 20px; align-items: center; max-width: 1280px; margin: 0 auto; padding: 24px 28px 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-secondary); }
.foot a { color: var(--text-secondary); text-decoration: none; }
.foot a:hover { color: var(--brand); }

/* ── Écrans étroits ──────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .layout { flex-direction: column; gap: 0; }
  .side { position: static; width: auto; max-height: none; padding: 20px 0 0; border-bottom: 1px solid var(--line); }
  .side-toc, .side-title:not(:first-child) { display: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; padding-bottom: 16px; }
}
@media (max-width: 640px) {
  .top { padding: 0 16px; gap: 10px; }
  .top-docs, .btn.ghost { display: none; }
  .layout { padding: 0 16px; }
  .article h1 { font-size: 30px; }
  .article h2 { font-size: 22px; }
  .anchor { display: none; }
  .brand { font-size: 16px; }
  .foot { flex-wrap: wrap; gap: 8px 16px; padding: 20px 16px 32px; }
  .foot .grow { display: none; }
}
