/* =====================================================================
   MAKER_OS — feuille de style commune à toutes les pages
   ===================================================================== */
:root {
    --bg:        #0a0e17;
    --bg-deep:   #070b12;
    --panel:     #0f1522;
    --panel-2:   #111827;
    --line:      #1f2937;
    --line-soft: #172031;
    --text:      #e2e8f0;
    --muted:     #94a3b8;
    --dim:       #64748b;

    --neon:   #00ff9d;
    --cyan:   #00e5ff;
    --purple: #a855f7;
    --pink:   #f778ba;
    --amber:  #f59e0b;
    --rose:   #f43f5e;
    --yellow: #f1e05a;

    --accent: var(--neon);
    --accent-rgb: 0, 255, 157;

    --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
    --sans: 'Inter', system-ui, sans-serif;
    --radius: 10px;
    --bar-h: 26px;
}
html[data-accent="amber"]  { --accent: #ffb000; --accent-rgb: 255, 176, 0; }
html[data-accent="cyan"]   { --accent: #00e5ff; --accent-rgb: 0, 229, 255; }
html[data-accent="purple"] { --accent: #c084fc; --accent-rgb: 192, 132, 252; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.6;
    padding-bottom: var(--bar-h);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: var(--accent); color: #000; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
kbd {
    font-family: var(--mono); font-size: 11px;
    padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px;
    border-radius: 4px; background: var(--panel-2); color: var(--muted);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.skip-link {
    position: fixed; left: 1rem; top: -100px; z-index: 1000;
    background: var(--accent); color: #000; padding: .5rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Fond : grille + projecteur ---------- */
.bg-grid {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background-image: radial-gradient(rgba(148,163,184,.13) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
/* Le projecteur est un disque déplacé avec transform : la carte graphique
   s'en charge, il suit la souris sans latence (aucun repaint plein écran). */
#spot {
    position: fixed; left: 0; top: 0; z-index: -1; pointer-events: none;
    width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), .08) 0%, transparent 60%);
    transform: translate3d(50vw, 15vh, 0);
    will-change: transform;
}
body.crt::after {
    content: ""; position: fixed; inset: 0; z-index: 900; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px);
    mix-blend-mode: multiply;
}
body.crt { text-shadow: 0 0 2px rgba(var(--accent-rgb), .35); }

/* ---------- Dégradés de texte ---------- */
.g-rainbow, .g-ocean, .g-purple, .g-amber, .g-rose, .g-matrix {
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.g-rainbow { background-image: linear-gradient(90deg, var(--pink), var(--purple), var(--cyan), var(--neon), var(--yellow)); animation: hue 8s linear infinite; }
.g-ocean   { background-image: linear-gradient(90deg, var(--cyan), var(--neon)); }
.g-purple  { background-image: linear-gradient(90deg, var(--purple), var(--pink)); }
.g-amber   { background-image: linear-gradient(90deg, var(--amber), var(--rose)); }
.g-rose    { background-image: linear-gradient(90deg, var(--rose), #fb7185); }
.g-matrix  { background-image: linear-gradient(90deg, var(--neon), var(--cyan), #3b82f6); }
@keyframes hue { to { filter: hue-rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =====================================================================
   TOP BAR (tmux)
   ===================================================================== */
.topbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,14,23,.82);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; font-size: 14px; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); object-fit: contain; background: var(--panel-2); }
.brand .ver { font-size: 10px; color: var(--dim); font-weight: 400; }

/* Pas de conteneur défilant ici : combiné au flou (backdrop-filter) de la barre,
   il laissait un reste de dessin (trait vertical) après le dernier onglet actif. */
.tabs { display: flex; gap: 2px; margin-left: 8px; }
.tabs a { font-size: 12px; padding: 6px 10px; border-radius: 6px; color: var(--muted); white-space: nowrap; transition: color .12s; }
.tabs a:focus-visible { outline-offset: -2px; }
.tabs a .n { color: var(--dim); }
.tabs a:hover { color: var(--text); background: var(--panel-2); }
.tabs a.active, .tabs a[aria-current="page"] { color: #000; background: var(--accent); }
.tabs a.active .n, .tabs a[aria-current="page"] .n { color: rgba(0,0,0,.55); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.k-btn {
    display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
    border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--panel);
    transition: border-color .15s, color .15s;
}
.k-btn:hover { border-color: rgba(var(--accent-rgb), .5); color: var(--text); }
.online { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--cyan); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@media (max-width: 1140px) { .online { display: none; } }
@media (max-width: 980px)  { .tabs { display: none; } }
@media (max-width: 640px) {
    .hide-sm, .statusbar .seg.hide-sm { display: none; }
    /* Sur téléphone : pas de clavier, donc pas de raccourci « Ctrl K » ; juste la loupe */
    .k-btn kbd { display: none; }
    .k-btn { padding: 8px 11px; }
    .statusbar .file { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* =====================================================================
   BOUTONS
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px;
    padding: 12px 18px; border-radius: var(--radius); border: 1px solid var(--line);
    transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-primary:hover { box-shadow: 0 8px 30px -8px rgba(var(--accent-rgb), .7); }
.btn-ghost { background: var(--panel); color: var(--text); }
.btn-ghost:hover { border-color: rgba(var(--accent-rgb), .5); }

/* =====================================================================
   SECTIONS
   ===================================================================== */
section.block { padding-block: 72px 8px; }  /* vertical seulement : garde la marge latérale de .wrap */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.sec-head .cmd { font-size: 13px; color: var(--dim); }
.sec-head .cmd b { color: var(--accent); font-weight: 500; }
.sec-head h1, .sec-head h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.01em; }
.sec-head .idx { color: var(--dim); font-weight: 400; margin-right: 8px; font-size: .7em; }
.sec-head .tag { font-size: 11px; color: var(--dim); white-space: nowrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cartes à halo (suivent la souris) ---------- */
.glow { position: relative; overflow: hidden; }
.glow::before {
    content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .12s; pointer-events: none;
    background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(var(--c, var(--accent-rgb)), .13), transparent 60%);
}
.glow:hover::before { opacity: 1; }

/* =====================================================================
   LISTE D'ARTICLES (ls)
   ===================================================================== */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.search {
    flex: 1 1 260px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel);
    border-radius: 8px; padding: 8px 12px; font-size: 12px;
}
.search:focus-within { border-color: rgba(var(--accent-rgb), .6); }
.search span { color: var(--accent); white-space: nowrap; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font-family: var(--mono); font-size: 12px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font-size: 11px; padding: 7px 11px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); }
.filters button[aria-pressed="true"] { color: #000; background: var(--accent); border-color: var(--accent); }

.ls { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.ls-total { font-size: 11px; color: var(--dim); padding: 9px 20px; border-bottom: 1px solid var(--line-soft); background: var(--bg-deep); }
.ls-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 20px; gap: 20px; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); transition: background .12s; position: relative; }
.ls li:last-child .ls-row { border-bottom: 0; }
.ls-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c, var(--accent)); transform: scaleY(0); transition: transform .15s; }
.ls-row:hover, .ls-row:focus-visible { background: rgba(255,255,255,.025); }
.ls-row:hover::before, .ls-row:focus-visible::before { transform: scaleY(1); }
.type { font-size: 10px; font-weight: 700; text-align: center; padding: 3px 0; border-radius: 5px; border: 1px solid; }
.type.new  { color: var(--yellow); border-color: rgba(241,224,90,.3); background: rgba(241,224,90,.08); }
.type.tuto { color: var(--purple); border-color: rgba(168,85,247,.3); background: rgba(168,85,247,.08); }
.type.info { color: var(--cyan); border-color: rgba(0,229,255,.3); background: rgba(0,229,255,.08); }
.ls-row .name h3 { font-size: 14px; font-weight: 700; }
.ls-row .name p { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 2px; }
.ls-row .go { color: var(--dim); transition: transform .15s, color .15s; }
.ls-row:hover .go { color: var(--c, var(--accent)); transform: translateX(4px); }
.ls-empty { padding: 26px 20px; color: var(--dim); font-size: 12px; }
.ls-more {
    display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 20px;
    border-top: 1px solid var(--line); background: var(--bg-deep); font-size: 13px; color: var(--accent); font-weight: 700;
    transition: background .15s;
}
.ls-more:hover { background: rgba(var(--accent-rgb), .07); }
.ls-more .c-dim { color: var(--dim); font-weight: 400; }
.ls-more i { transition: transform .15s; }
.ls-more:hover i { transform: translateX(4px); }
.ls-row .date { font-size: 11px; color: var(--dim); white-space: nowrap; }
@media (max-width: 640px) {
    .ls-row { grid-template-columns: 52px minmax(0,1fr) 14px; gap: 12px; padding: 14px; }
    .ls-row .date { display: none; }
}

/* =====================================================================
   FAQ (accordéons)
   ===================================================================== */
.faq { display: grid; gap: 10px; }
.qa { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color .15s; }
.qa[open] { border-color: rgba(var(--accent-rgb), .4); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 20px; font-weight: 700; font-size: 14px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .q { color: var(--accent); }
.qa summary .chev { margin-left: auto; color: var(--dim); transition: transform .2s; font-size: 12px; }
.qa[open] summary .chev { transform: rotate(90deg); color: var(--accent); }
.qa p { font-family: var(--sans); color: #cbd5e1; font-size: 14px; line-height: 1.7; padding: 0 20px 18px 42px; }
.qa a { color: var(--cyan); border-bottom: 1px dotted; }

/* =====================================================================
   PAGE INTÉRIEURE (articles, légal…)
   ===================================================================== */
.page-head { padding-block: 56px 8px; }
.crumbs { font-size: 12px; color: var(--dim); margin-bottom: 18px; }
.crumbs a { color: var(--cyan); }
.crumbs a:hover { text-decoration: underline; }
.page-lead { font-family: var(--sans); color: var(--muted); font-size: 15px; max-width: 64ch; margin: -10px 0 26px; }

/* =====================================================================
   PAGE D'ARTICLE
   ===================================================================== */
.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.art { max-width: 1120px; margin: 0 auto; padding: 44px 20px 0; display: grid; grid-template-columns: minmax(0, 760px) 220px; gap: 56px; justify-content: center; }
@media (max-width: 1080px) { .art { grid-template-columns: minmax(0, 760px); } .toc { display: none; } }

.art-head { padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px dashed var(--line); }
.art-head .cmd { font-size: 13px; color: var(--dim); margin-bottom: 10px; }
.art-head .cmd b { color: var(--accent); font-weight: 500; }
.art-head h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.art-head .lede { font-family: var(--sans); color: var(--muted); font-size: 17px; line-height: 1.6; margin-top: 14px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-size: 11.5px; }
.art-meta > * { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel); }
.art-meta i { color: var(--accent); font-size: 11px; }
.art-meta .type { padding: 4px 10px; border-radius: 999px; }

/* Texte de l'article */
.prose { font-family: var(--sans); font-size: 16.5px; line-height: 1.8; color: #cbd5e1; counter-reset: sec; min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
    counter-increment: sec; font-family: var(--mono); font-size: 21px; line-height: 1.35; color: #fff; font-weight: 800;
    margin-top: 2.4em; scroll-margin-top: 80px;
}
.prose h2::before { content: counter(sec, decimal-leading-zero) "."; color: var(--accent); margin-right: 12px; font-weight: 500; }
.prose h2 .anchor { color: var(--dim); font-weight: 400; opacity: 0; transition: opacity .15s; text-decoration: none; border: 0; }
.prose h2:hover .anchor, .prose h2 .anchor:focus { opacity: 1; }
.prose h3 { font-family: var(--mono); font-size: 16px; color: #fff; margin-top: 1.8em; }
.prose h3::before { content: "### "; color: var(--dim); font-weight: 400; }
.prose strong { color: #fff; font-weight: 600; }
.prose a { color: var(--cyan); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.prose a:hover { text-decoration-style: solid; }
.prose :not(pre) > code { font-family: var(--mono); font-size: .88em; color: var(--accent); background: var(--bg-deep); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.prose ul { padding-left: 4px; }
.prose ul li { position: relative; padding-left: 24px; }
.prose ul li + li { margin-top: .45em; }
.prose ul li::before { content: "▸"; position: absolute; left: 2px; color: var(--accent); }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.prose figcaption { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-top: 10px; text-align: center; }
.prose figcaption::before { content: "↑ "; color: var(--accent); }

/* Bloc de code (fenêtre avec bouton copier) */
.codeblock { margin: 2em 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-deep); font-family: var(--mono); }
.cb-bar { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--panel)); font-size: 11.5px; color: var(--dim); }
.cb-bar .lights { display: flex; gap: 6px; }
.cb-bar .lights i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.cb-bar .lights i:nth-child(1) { background: #f43f5ecc; } .cb-bar .lights i:nth-child(2) { background: #f59e0bcc; } .cb-bar .lights i:nth-child(3) { background: #10b981cc; }
.cb-bar .fname { color: var(--text); }
.cb-bar .lang { color: var(--cyan); }
.cb-bar button { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; transition: color .15s, border-color .15s; }
.cb-bar button:hover { color: var(--accent); border-color: rgba(var(--accent-rgb), .5); }
.cb-bar button.ok { color: #000; background: var(--accent); border-color: var(--accent); }
.codeblock pre { margin: 0; padding: 18px 20px; overflow: auto; max-height: 640px; font-size: 13px; line-height: 1.65; color: #d4d4d4; tab-size: 4; }
.codeblock pre code { font-family: inherit; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 13.5px; background: var(--bg-deep); }
.prose th, .prose td { padding: 11px 16px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.prose th { background: var(--panel-2); color: var(--cyan); font-weight: 700; font-size: 12px; letter-spacing: .03em; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: rgba(var(--accent-rgb), .04); }
.prose td.hi { color: var(--accent); font-weight: 700; }

/* Encadrés */
.callout { --c: 0, 229, 255; border: 1px solid var(--line); border-left: 3px solid rgb(var(--c)); border-radius: 10px; background: var(--panel); padding: 18px 22px; margin: 2em 0; }
.callout .ct { font-family: var(--mono); font-size: 12px; font-weight: 700; color: rgb(var(--c)); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.callout p { margin: 0; }
.callout.tip { --c: 0, 255, 157; }
.callout.warn { --c: 245, 158, 11; }

/* Ressource externe (GitHub, PDF…) */
a.resource { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin: 2em 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.resource:hover { border-color: rgba(var(--accent-rgb), .55); transform: translateY(-2px); }
a.resource .ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 20px; color: var(--accent); background: rgba(var(--accent-rgb), .08); border: 1px solid rgba(var(--accent-rgb), .25); }
a.resource .rt { font-family: var(--mono); font-size: 14px; font-weight: 700; color: #fff; display: block; }
a.resource .rs { font-family: var(--mono); font-size: 11.5px; color: var(--dim); display: block; word-break: break-all; }
a.resource .arr { margin-left: auto; color: var(--dim); transition: transform .15s, color .15s; }
a.resource:hover .arr { color: var(--accent); transform: translate(3px, -3px); }

/* Fiches membres (article « Qui sommes-nous ») */
.person { --c: 0, 229, 255; display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 20px; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.person .avatar { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; font-size: 20px; color: rgb(var(--c)); background: rgba(var(--c), .08); border: 1px solid rgba(var(--c), .3); }
.person .pn { font-family: var(--mono); font-weight: 800; color: rgb(var(--c)); }
.person .pn::before { content: "> "; color: var(--dim); }
.person blockquote { margin: 6px 0 0; font-style: italic; color: var(--muted); }

/* Sommaire latéral */
.toc { position: sticky; top: 90px; align-self: start; font-size: 12px; }
.toc p { color: var(--dim); margin-bottom: 12px; }
.toc ol { border-left: 1px solid var(--line); counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.45; transition: color .15s, border-color .15s; }
.toc a::before { content: counter(t, decimal-leading-zero) " "; color: var(--dim); }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); }
.toc .toc-actions { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.toc .toc-actions a, .toc .toc-actions button { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; color: var(--dim); font-size: 12px; text-align: left; }
.toc .toc-actions a::before { content: none; }
.toc .toc-actions a:hover, .toc .toc-actions button:hover { color: var(--accent); }

/* Pied d'article */
.art-end { margin-top: 56px; padding-top: 22px; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.art-end .by { font-size: 12px; color: var(--dim); }
.art-end .by b { color: var(--accent); font-weight: 500; }
.art-more { margin-top: 56px; }
.art-more h2 { font-size: 13px; color: var(--dim); font-weight: 500; margin-bottom: 14px; }
.art-more h2 b { color: var(--accent); font-weight: 500; }

/* =====================================================================
   PAGES DE FORMATION
   ===================================================================== */
/* Mini-parcours 1 → 2 → 3 sous le titre */
.parcours { display: flex; flex-wrap: wrap; align-items: center; row-gap: 8px; margin-top: 22px; font-size: 12px; }
.parcours a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--panel); transition: border-color .15s, color .15s; }
.parcours a:hover { border-color: rgba(var(--accent-rgb), .5); color: var(--text); }
.parcours a .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; border: 1px solid var(--line); color: var(--dim); }
.parcours a.done .n { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.parcours a[aria-current="page"] { color: #000; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.parcours a[aria-current="page"] .n { color: #000; border-color: rgba(0,0,0,.3); }
.parcours .sep { width: 22px; height: 2px; background: var(--line); }
.parcours .sep.done { background: rgba(var(--accent-rgb), .45); }
/* Niveau pas encore publié (pas un lien) */
.parcours .soon { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px dashed var(--line); border-radius: 999px; color: var(--dim); }
.parcours .soon .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; border: 1px dashed var(--line); }

/* Listes à coches (informations, matériel) */
.prose ul.checks li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 12px; top: 3px; }
.prose ul.gear li::before { content: "▪"; color: var(--cyan); }

/* Sujets abordés en puces */
.prose ul.topics { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.prose ul.topics li { margin: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-family: var(--mono); font-size: 13px; color: var(--text); line-height: 1.4; }
.prose ul.topics li::before { content: none; }
.prose ul.topics li small { color: var(--dim); font-size: 11.5px; }
/* Programme numéroté (chapitres d'une formation) */
.prose ol.syllabus { counter-reset: ch; display: grid; gap: 8px; padding: 0; }
.prose ol.syllabus li { counter-increment: ch; display: flex; align-items: center; gap: 14px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-family: var(--mono); font-size: 14px; color: #fff; }
.prose ol.syllabus li::before { content: counter(ch, decimal-leading-zero); color: var(--accent); font-weight: 800; font-size: 12px; }
.prose ol.syllabus li .st { margin-left: auto; font-size: 11px; color: var(--accent); }
.prose ol.syllabus li.soon { border-style: dashed; background: transparent; color: var(--dim); }
.prose ol.syllabus li.soon::before { color: var(--dim); }
.prose ol.syllabus li.soon .st { color: var(--amber); }

/* Précédent / suivant */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color .15s, transform .15s; }
.pager a:hover { border-color: rgba(var(--accent-rgb), .55); transform: translateY(-2px); }
.pager small { display: block; font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.pager b { font-size: 14px; color: #fff; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager .next { grid-column: auto; } }

/* =====================================================================
   PAGES LÉGALES
   ===================================================================== */
.prose dl.ident { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 15px; }
.prose dl.ident dt { font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }
.prose dl.ident dd { margin: 0; }
@media (max-width: 560px) { .prose dl.ident { grid-template-columns: 1fr; } .prose dl.ident dd { margin-bottom: 8px; } }
/* Information encore à compléter : bien visible pour ne pas l'oublier */
mark.todo { background: rgba(245, 158, 11, .12); color: var(--amber); border: 1px dashed rgba(245, 158, 11, .6); border-radius: 4px; padding: 0 5px; font-family: var(--mono); font-size: .9em; }

/* =====================================================================
   FOOTER
   ===================================================================== */
footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--bg-deep); padding: 48px 0 28px; font-size: 12px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: span 2; } }
footer h2 { font-size: 12px; color: #fff; margin-bottom: 12px; }
footer h2::before { content: "~/"; color: var(--accent); }
footer li { margin-top: 7px; }
footer li a:hover { color: var(--accent); }
footer .about p { font-family: var(--sans); line-height: 1.7; margin: 12px 0 14px; max-width: 36ch; }
footer .social { display: flex; gap: 12px; font-size: 18px; }
footer .social a:hover { color: var(--accent); }
footer .values li { font-family: var(--sans); line-height: 1.5; color: var(--dim); }
footer .values li + li { margin-top: 9px; }
footer .values b { display: block; font-family: var(--mono); font-weight: 500; color: var(--muted); }
footer .values b::before { content: "▸ "; color: var(--accent); }
footer .to-top { color: var(--accent); }
footer .to-top:hover { text-decoration: underline; }
footer.fallback { text-align: center; }
footer.fallback a { margin: 0 8px; }
.foot-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: 11px; color: var(--dim); }
.foot-bottom .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* =====================================================================
   STATUS BAR (vim)
   ===================================================================== */
.statusbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; height: var(--bar-h);
    display: flex; align-items: center; font-size: 11px; background: var(--panel-2); border-top: 1px solid var(--line);
}
.statusbar .mode { background: var(--accent); color: #000; font-weight: 800; padding: 0 12px; height: 100%; display: flex; align-items: center; letter-spacing: .05em; }
.statusbar .seg { padding: 0 12px; height: 100%; display: flex; align-items: center; border-right: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.statusbar .file b { color: var(--text); font-weight: 500; }
.statusbar .right { margin-left: auto; display: flex; height: 100%; }
.statusbar .right .seg { border-right: 0; border-left: 1px solid var(--line); }
.statusbar .hint { color: var(--dim); }

/* =====================================================================
   PALETTE (Ctrl+K) + AIDE
   ===================================================================== */
#palette { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto; color: var(--text); }
#palette::backdrop { background: rgba(3,6,12,.72); backdrop-filter: blur(4px); }
.pal { border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 14px; background: var(--panel); overflow: hidden; box-shadow: 0 40px 100px -20px #000; }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-in span { color: var(--accent); font-weight: 800; }
.pal-in input { flex: 1; background: none; border: 0; outline: 0; color: #fff; font-family: var(--mono); font-size: 15px; }
#pal-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
#pal-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; }
#pal-list li .k { font-size: 10px; color: var(--dim); width: 64px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .06em; }
#pal-list li .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pal-list li mark { background: none; color: var(--accent); font-weight: 800; }
#pal-list li[aria-selected="true"] { background: rgba(var(--accent-rgb), .12); }
#pal-list li[aria-selected="true"]::after { content: "↵"; color: var(--accent); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }

#keys { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 22px 26px; width: min(420px, calc(100vw - 32px)); }
#keys::backdrop { background: rgba(3,6,12,.72); }
#keys h2 { font-size: 14px; margin-bottom: 14px; color: var(--accent); }
#keys dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 12px; }
#keys dd { margin: 0; color: var(--muted); }
#keys button { margin-top: 18px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translate(-50%, 20px); opacity: 0; z-index: 1600;
    background: var(--panel-2); border: 1px solid rgba(var(--accent-rgb), .4); color: var(--text); font-size: 12px; padding: 8px 14px; border-radius: 8px; transition: all .25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
    #spot { display: none; }
}
