/* Documentation Wariguai : en-tête, bannière, cartes de départ, sommaire, contenu, vidéothèque,
   recherche (Ctrl K) et thème sombre. S'appuie sur les couleurs de site.css. */
:root {
  --dh: 62px;
  --leaf: #12894d;
  --leaf-soft: #e6f5ec;
  --leaf-ink: #0d6b3c;
  --doc-max: 820px;
  --glow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --leaf-soft: rgba(18, 137, 77, 0.16); --leaf-ink: #5fd394; --glow: none; }
}
:root[data-theme='dark'] { --leaf-soft: rgba(18, 137, 77, 0.16); --leaf-ink: #5fd394; --glow: none; }

body { background: var(--bg); }
.dx { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

/* ───────────── En-tête ───────────── */
.dh { position: sticky; top: 0; z-index: 40; height: var(--dh); background: var(--bg); background: color-mix(in srgb, var(--bg) 84%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid var(--line); }
.dh .dx { display: flex; align-items: center; gap: 12px; height: 100%; }
.dh .brand { font-size: 17px; flex: none; }
.dh .brand img { width: 30px; height: 30px; }
.dh .brand small { background: var(--leaf-soft); color: var(--leaf-ink); }
.dfind { flex: 0 1 380px; min-width: 0; margin-left: 22px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--subtle); font: 600 14px var(--font); cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color 0.15s, color 0.15s; }
.dfind:hover { border-color: var(--input); color: var(--muted); }
.dfind .icon { width: 17px; height: 17px; }
.dfind span.t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dfind kbd, .dkbd { margin-left: auto; display: inline-flex; gap: 3px; padding: 3px 7px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font: 700 11.5px var(--font); white-space: nowrap; }
.dnav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.dnav a.l { color: var(--muted); font-weight: 650; font-size: 14px; padding: 8px 11px; border-radius: 10px; white-space: nowrap; }
.dnav a.l:hover { color: var(--ink); background: var(--card); text-decoration: none; }
.dnav .btn { margin-left: 6px; }
.ibtn { width: 40px; height: 40px; flex: none; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.ibtn:hover { color: var(--ink); border-color: var(--input); }
.ibtn .icon { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ───────────── Bannière ───────────── */
.dhero { margin-top: 22px; }
.dhero-card { position: relative; overflow: hidden; isolation: isolate; border-radius: 30px; padding: 58px 58px 54px; color: #fff; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 52px; align-items: center;
  background: radial-gradient(760px 420px at 100% -10%, rgba(18, 137, 77, 0.6), transparent 62%), radial-gradient(620px 380px at -10% 120%, rgba(212, 160, 42, 0.28), transparent 60%), linear-gradient(150deg, #0a1a36 0%, #0c2b55 55%, #0b3c3b 100%);
  box-shadow: 0 30px 80px rgba(10, 26, 54, 0.22); }
.dhero-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 20%, #000 10%, transparent 72%); mask-image: radial-gradient(ellipse 80% 90% at 70% 20%, #000 10%, transparent 72%); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.88); font-weight: 700; font-size: 13px; }
.pill i { font-style: normal; padding: 2px 8px; border-radius: 999px; background: #f5cb5c; color: #2b1d00; font-weight: 800; font-size: 11.5px; }
.dhero h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.03; letter-spacing: -0.04em; margin: 20px 0 16px; font-weight: 800; text-wrap: balance; }
.dhero h1 span { background: linear-gradient(90deg, #f5cb5c, #ffe29a 50%, #7ee2a8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dhero p.sub { color: rgba(255, 255, 255, 0.78); font-size: 18px; line-height: 1.6; max-width: 600px; }
.dhero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn-glass { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.18); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.14); }
.btn .icon { width: 18px; height: 18px; }
.dhero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; color: rgba(255, 255, 255, 0.7); font-size: 13.5px; font-weight: 600; }
.dhero-facts span { display: inline-flex; align-items: center; gap: 7px; }
.dhero-facts .icon { width: 16px; height: 16px; color: #7ee2a8; }

/* Terminal de la bannière */
.term { border-radius: 20px; background: rgba(5, 10, 22, 0.72); border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); overflow: hidden; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); min-width: 0; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar b { margin-left: 8px; color: rgba(255, 255, 255, 0.55); font-size: 12.5px; font-weight: 700; }
.term pre { margin: 0; padding: 18px 20px 22px; font: 13.5px/1.85 var(--mono); color: #dbe4ff; overflow-x: auto; }
.term .p { color: #f5cb5c; user-select: none; }
.term .ok { color: #7ee2a8; }
.term .dim { color: #7b88aa; }
.term .cursor { display: inline-block; width: 8px; height: 16px; background: #dbe4ff; vertical-align: -3px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ───────────── Cartes de départ ───────────── */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.qcard { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 16px; align-items: start; align-content: start; padding: 20px 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm), var(--glow); color: var(--ink); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.qcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--input); text-decoration: none; }
.qcard .qi { grid-row: span 2; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.qcard .qi .icon { width: 21px; height: 21px; }
.qcard b { font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qcard span.d { color: var(--muted); font-size: 14px; line-height: 1.5; }
.qcard code { grid-column: 2; justify-self: start; margin-top: 8px; font: 600 12.5px var(--mono); background: var(--code-bg); color: #a5e3b6; padding: 5px 10px; border-radius: 9px; }
.qcard .go { position: absolute; top: 20px; right: 20px; color: var(--subtle); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s; }
.qcard:hover .go { opacity: 1; transform: none; }
.tag-new { font-size: 10.5px; font-weight: 800; color: var(--leaf-ink); background: var(--leaf-soft); padding: 2px 7px; border-radius: 999px; letter-spacing: 0.02em; }
.c-leaf { background: var(--leaf-soft); color: var(--leaf-ink); }
.c-blue { background: var(--primary-soft); color: var(--primary); }
.c-violet { background: rgba(106, 75, 196, 0.12); color: #7c5ce0; }
.c-gold { background: var(--gold-soft); color: var(--gold-ink); }
.c-rose { background: rgba(214, 69, 108, 0.12); color: #d6456c; }
.c-sky { background: rgba(14, 141, 196, 0.12); color: #0e8dc4; }

/* ───────────── Mise en page ───────────── */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 210px; gap: 48px; margin-top: 34px; }
.toc { position: sticky; top: var(--dh); align-self: start; max-height: calc(100vh - var(--dh)); overflow: auto; padding: 14px 6px 48px 0; scrollbar-width: thin; }
.toc h4 { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800; color: var(--ink); margin: 22px 0 6px; letter-spacing: -0.01em; word-spacing: 0; }
.toc h4:first-child { margin-top: 6px; }
.toc h4 .hi { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.toc h4 .hi .icon { width: 15px; height: 15px; }
.toc a { display: flex; align-items: center; gap: 8px; margin-left: 12px; padding: 6px 10px 6px 16px; border-left: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 14px; border-radius: 0 9px 9px 0; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.toc a:hover { color: var(--ink); border-left-color: var(--subtle); text-decoration: none; }
.toc a.active { color: var(--primary); border-left: 2px solid var(--primary); padding-left: 15px; background: var(--primary-soft); font-weight: 700; }
.toc a .tag-new { margin-left: auto; }
.toc-cta { margin: 26px 0 0 12px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 10px; }
.toc-cta b { font-size: 14px; }
.toc-cta span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.toc .toc-cta a.btn { margin: 0; padding: 9px 12px; border: 0; border-radius: 10px; color: #fff; justify-content: center; font-weight: 700; }
.toc .toc-cta a.btn:hover { color: #fff; background: #173ea5; }

/* Sur cette page */
.otp { position: sticky; top: var(--dh); align-self: start; padding: 22px 0 40px; max-height: calc(100vh - var(--dh)); overflow: auto; }
.otp h5 { margin: 0 0 10px; font-size: 12px; font-weight: 800; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.08em; }
.otp a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.otp a:hover { color: var(--ink); text-decoration: none; border-left-color: var(--subtle); }
.otp a.on { color: var(--primary); border-left-color: var(--primary); }
.otp .otp-top { margin-top: 16px; border: 0; padding-left: 0; font-size: 13px; color: var(--subtle); display: inline-flex; align-items: center; gap: 6px; }

/* ───────────── Contenu ───────────── */
.doc { min-width: 0; padding: 14px 0 120px; }
.doc > section { max-width: var(--doc-max); scroll-margin-top: calc(var(--dh) + 18px); }
.doc > section + section { border-top: 1px solid var(--line); margin-top: 60px; padding-top: 56px; }
.doc .kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--leaf-ink); }
.doc .kicker::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.doc h2 { position: relative; font-size: clamp(26px, 2.5vw, 32px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.doc h2 .anchor { position: absolute; left: -28px; top: 3px; color: var(--subtle); opacity: 0; font-weight: 700; }
.doc h2:hover .anchor { opacity: 1; text-decoration: none; }
.doc h3 { font-size: 19px; font-weight: 800; margin: 36px 0 12px; scroll-margin-top: calc(var(--dh) + 18px); letter-spacing: -0.02em; }
.doc p, .doc li { color: var(--ink); line-height: 1.75; font-size: 15.5px; }
.doc p + p, .doc p + .code-tabs, .doc p + .code-wrap, .doc .code-tabs + p, .doc .code-wrap + p, .doc .table-wrap + p, .doc p + .table-wrap, .doc ul + p, .doc p + ul, .doc ol + p, .doc p + ol, .doc .notice + p, .doc p + .notice { margin-top: 14px; }
.doc .code-tabs, .doc .code-wrap, .doc .table-wrap, .doc .notice { margin: 18px 0; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 7px; margin: 12px 0; }
.doc li::marker { color: var(--subtle); font-weight: 700; }
.doc a { font-weight: 600; }
.lead { font-size: 18px !important; color: var(--muted) !important; line-height: 1.65 !important; margin-top: 6px; }
.doc code.inline { background: var(--card); border-color: var(--line); color: var(--ink); padding: 2px 6px; font-size: 0.86em; }

/* Blocs de code : barre de titre avec le langage */
.doc .code-wrap { border-radius: 16px; overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: 0 16px 36px rgba(10, 26, 54, 0.14); }
.doc .code-wrap::before { content: attr(data-lang); display: block; padding: 11px 16px; font: 700 11.5px var(--font); text-transform: uppercase; letter-spacing: 0.08em; color: #8f9bbd; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); }
.doc .code-wrap[data-lang='node']::before { content: 'Node.js'; }
.doc .code-wrap[data-lang='esm']::before { content: 'Node.js · ES modules'; }
.doc .code-wrap[data-lang='ts']::before { content: 'TypeScript'; }
.doc .code-wrap[data-lang='bash']::before { content: 'Terminal'; }
.doc .code-wrap[data-lang='curl']::before { content: 'cURL'; }
.doc .code-wrap[data-lang='php']::before { content: 'PHP'; }
.doc .code-wrap[data-lang='python']::before { content: 'Python'; }
.doc .code-wrap[data-lang='json']::before { content: 'JSON'; }
.doc .code-wrap[data-lang='text']::before { content: 'Adresse'; }
.doc .code-wrap > pre.code { padding: 16px 18px 18px; border-radius: 0; background: transparent; font-size: 13.2px; }
.doc .code-wrap .copy-btn { top: 6px; right: 8px; display: inline-flex; align-items: center; gap: 6px; }
.doc .code-tabs { border-radius: 16px; box-shadow: 0 16px 36px rgba(10, 26, 54, 0.14); overflow: hidden; }
.doc .code-tabs .tabs { padding: 7px 96px 0 8px; background: rgba(255, 255, 255, 0.02); }
.doc .code-tabs .tab { padding: 8px 13px; }
.doc .code-tabs .tab[aria-selected='true'] { box-shadow: inset 0 -2px 0 #f5cb5c; }
.doc .code-tabs .code-wrap { margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: transparent; }
.doc .code-tabs .code-wrap::before { display: none; }
.doc .code-tabs .copy-btn { top: -37px; z-index: 2; }

/* Tableaux, encadrés, adresses */
.doc .table-wrap { border-radius: 16px; box-shadow: var(--shadow-sm); }
.doc th { background: transparent; font-size: 11.5px; padding: 12px 16px; }
.doc td { padding: 12px 16px; font-size: 14.5px; line-height: 1.55; }
.doc tbody tr:hover td { background: color-mix(in srgb, var(--bg) 60%, transparent); }
.doc .notice { border-radius: 16px; padding: 15px 18px; border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent); }
.doc .notice.warn { border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.doc .notice .icon { color: var(--primary); }
.doc .notice.warn .icon { color: var(--warning); }
.doc .notice.gold .icon { color: var(--gold); }
.endpoint { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13.5px; padding: 7px 12px 7px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); margin: 6px 0; max-width: 100%; overflow-wrap: anywhere; box-shadow: var(--shadow-sm); }
.verb { font-weight: 700; font-size: 11.5px; padding: 3px 8px; border-radius: 7px; color: #fff; letter-spacing: 0.03em; }
.verb.post { background: #0e8a3e; }
.verb.get { background: #1d4ed8; }
td code, th code { font-size: 12.5px; }
td .req { color: var(--danger); font-size: 11px; font-weight: 700; margin-left: 4px; }

/* Étapes numérotées */
.dsteps { display: grid; gap: 4px; margin: 22px 0; }
.dstep { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding-bottom: 18px; }
.dstep:not(:last-child)::before { content: ''; position: absolute; left: 19.5px; top: 46px; bottom: 4px; width: 1px; background: var(--line); }
.dstep > em { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, #f5cb5c, #d4a02a); color: #2b1d00; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 16px; box-shadow: 0 6px 14px rgba(212, 160, 42, 0.32); }
.dstep b { display: block; font-size: 16.5px; margin: 8px 0 6px; }
.dstep .code-wrap { margin: 10px 0 !important; }

/* Vidéo liée à une partie */
.vcta { display: flex; align-items: center; gap: 14px; max-width: 540px; margin: 20px 0; padding: 10px 16px 10px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink) !important; box-shadow: var(--shadow-sm); transition: transform 0.15s, border-color 0.15s; }
.vcta:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--input); }
.vcta .th { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: #0a1a36; }
.vcta .th img { width: 100%; height: 100%; object-fit: cover; }
.vcta .th::after { content: ''; position: absolute; inset: 0; background: rgba(5, 10, 22, 0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='white' fill-opacity='.92'/%3E%3Cpath d='M10 8l6 4-6 4z' fill='%230a1a36'/%3E%3C/svg%3E") center / 30px no-repeat; }
.vcta b { display: block; font-size: 14.5px; }
.vcta span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ───────────── Vidéothèque ───────────── */
.vlib { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin-top: 24px; padding: 12px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vstage { min-width: 0; display: grid; gap: 4px; align-content: start; }
.vstage video { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 18px; background: #060d1c; }
.vnow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 18px; padding: 14px 10px 8px; }
.vnow > div:first-child { min-width: 0; flex: 1 1 260px; }
.vnow .vlangs { flex: none; }
.vnow small { font-weight: 800; font-size: 12px; color: var(--leaf-ink); text-transform: uppercase; letter-spacing: 0.08em; }
.vnow h3 { font-size: 21px; margin: 4px 0 6px !important; }
.vnow p { color: var(--muted) !important; font-size: 14.5px !important; line-height: 1.55 !important; }
.vlangs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; background: var(--bg); border: 1px solid var(--line); }
.vlangs button { border: 0; background: none; padding: 7px 13px; border-radius: 10px; font: 700 13px var(--font); color: var(--muted); cursor: pointer; }
.vlangs button[aria-pressed='true'] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.vside { min-width: 0; display: grid; gap: 4px; padding: 6px 4px 4px; border-top: 1px solid var(--line); }
.vside h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 6px 6px; font-size: 14px; font-weight: 800; }
.vside h4 span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.vprog { height: 6px; margin: 0 6px 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.vprog i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), #7ee2a8); transition: width 0.4s; }
.vitems { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.vitem { min-width: 0; display: grid; align-content: start; gap: 9px; padding: 7px 7px 10px; border: 0; border-radius: 15px; background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; transition: background 0.15s; }
.vitem:hover { background: var(--bg); }
.vitem.on { background: var(--primary-soft); }
.vtxt { display: block; min-width: 0; padding: 0 2px; }
.vtxt .vg { display: block; margin-bottom: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vthumb { position: relative; aspect-ratio: 16 / 9; border-radius: 11px; overflow: hidden; background: #0a1a36; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb .dur { position: absolute; right: 5px; bottom: 5px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.75); color: #fff; font: 700 10.5px var(--font); }
.vthumb .n { position: absolute; left: 5px; top: 5px; width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.94); color: #0a1a36; font: 800 11px var(--font); }
.vitem.on .vthumb::after { content: ''; position: absolute; inset: 0; border-radius: 11px; box-shadow: inset 0 0 0 2px var(--primary); }
.vitem b { display: block; font-size: 14px; line-height: 1.3; }
.vitem .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.vitem .seen { display: none; align-items: center; gap: 3px; color: var(--success); }
.vitem.is-seen .seen { display: inline-flex; }
.vitem .seen .icon { width: 13px; height: 13px; }

/* ───────────── Recherche (Ctrl K) ───────────── */
.palette { position: fixed; inset: 0; z-index: 90; display: grid; justify-items: center; align-items: start; padding: 11vh 16px 16px; background: rgba(5, 10, 24, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade 0.15s ease; }
.palette-box { width: min(660px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35); overflow: hidden; animation: rise 0.2s ease; }
.palette-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--subtle); }
.palette-head input { flex: 1; min-width: 0; height: 58px; border: 0; outline: none; background: none; color: var(--ink); font: 600 16.5px var(--font); }
.palette-head input::-webkit-search-cancel-button { display: none; }
.palette-list { max-height: 54vh; overflow: auto; padding: 8px; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); }
.palette-list a:hover, .palette-list a.on { background: var(--primary-soft); text-decoration: none; }
.palette-list a .pi { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--bg); color: var(--muted); }
.palette-list a .pi .icon { width: 16px; height: 16px; }
.palette-list a b { display: block; font-size: 14.5px; }
.palette-list a small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.palette-list a .go { margin-left: auto; color: var(--subtle); }
.palette-list p { margin: 0; padding: 22px 14px; color: var(--muted); text-align: center; }
.palette-list .ph { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 800; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.08em; }
.palette-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 12px; font-weight: 600; }
.palette-foot kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); font: 700 11px var(--font); color: var(--muted); }

/* ───────────── Pied de page ───────────── */
.dfoot { border-top: 1px solid var(--line); margin-top: 20px; padding: 34px 0 44px; }
.dfoot .dx { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.dfoot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.dfoot a { color: var(--muted); font-weight: 600; }
.dfoot a:hover { color: var(--ink); }

.scrim { position: fixed; inset: var(--dh) 0 0 0; z-index: 30; background: rgba(5, 10, 24, 0.45); }

/* ───────────── Écrans plus petits ───────────── */
@media (max-width: 1320px) {
  .layout { grid-template-columns: 248px minmax(0, 1fr); gap: 44px; }
  .otp { display: none; }
}
@media (max-width: 1100px) {
  .dhero-card { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 46px 40px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dnav a.l.hide-md { display: none; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: 26px; }
  .toc { position: fixed; top: var(--dh); left: 0; bottom: 0; z-index: 35; align-self: stretch; height: auto; width: min(320px, 86vw); max-height: none; padding: 16px 16px 40px; background: var(--card); border-right: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(-102%); transition: transform 0.25s ease; }
  .toc.open { transform: none; }
  .menu-btn { display: inline-grid; }
  .dnav a.l { display: none; }
  .dfind { margin-left: 8px; }
  .doc h2 .anchor { display: none; }
}
@media (max-width: 760px) {
  .vitems { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
  .vitem { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .dx { padding: 0 16px; }
  .dh .brand small, .dfind kbd, .dnav .btn { display: none; }
  .dfind { flex: 1 1 auto; }
  .dhero { margin-top: 14px; }
  .dhero-card { padding: 34px 22px 30px; border-radius: 24px; }
  .dhero p.sub { font-size: 16px; }
  .term pre { font-size: 12.5px; padding: 14px 16px 18px; }
  .quick { grid-template-columns: minmax(0, 1fr); }
  .qcard { padding: 18px; }
  .vlib { padding: 8px; border-radius: 20px; }
  .vstage video { border-radius: 14px; }
  .doc p, .doc li { font-size: 15px; }
  .palette { padding-top: 8vh; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
