:root {
  --bg: #0f1419; --bg2: #121a22; --panel: #161e27; --panel2: #1c2632; --line: #2a3644; --line2: #364657;
  --txt: #e3eaf1; --muted: #9aabbc; --dim: #6c7d8e;
  --green: #5fd068; --cyan: #3fc8d8; --violet: #a98bff; --gold: #f2c14e; --red: #ff6b6b; --orange: #ff9f5a;
  --j1: #3fc8d8; --j2: #a98bff; --duo: #5fd068; --any: #f2c14e;
  --radius: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--cyan); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--gold); color: #111; padding: 6px 10px; }
h1, h2, h3 { font-family: Bahnschrift, "Segoe UI", sans-serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 22px 0 10px; color: var(--cyan); }
h3 { font-size: 14.5px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }

/* Layout */
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--bg2) 250px, var(--bg) 250px); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 12px; display: flex; flex-direction: column; gap: 12px; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand img { image-rendering: pixelated; }
.brand strong { display: block; color: var(--gold); font-family: Bahnschrift; font-size: 16px; }
.brand span { font-size: 12px; color: var(--muted); }
nav { display: flex; flex-direction: column; gap: 2px; }
nav .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--dim); margin: 10px 8px 4px; }
nav a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; color: var(--txt); text-decoration: none; font-size: 13.5px; }
nav a:hover { background: var(--panel2); }
nav a.active { background: #1f3a2a; color: #fff; box-shadow: inset 3px 0 0 var(--green); }
nav a .cnt { margin-left: auto; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
nav a .cur { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
nav a.done-phase .cnt { color: var(--green); }
.side-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); }
main { padding: 22px 28px 60px; min-width: 0; outline: none; }
main:focus, main:focus-visible { outline: none; }

/* Progress */
.bar { height: 8px; background: #0b1016; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width .3s; }
.bar.j1 > i { background: var(--j1); } .bar.j2 > i { background: var(--j2); } .bar.duo > i { background: var(--duo); }
.side-progress .lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* Cards / grid */
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .big { font-family: Bahnschrift; font-size: 26px; font-weight: 700; color: var(--gold); display: block; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.goal { border-left: 4px solid var(--gold); }
.unlock { border-left: 4px solid var(--green); }
.warn { border-left: 4px solid var(--red); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; border: 1px solid transparent; white-space: nowrap; }
.o-J1 { background: #10303a; color: #8fe9f3; border-color: #1f5864; }
.o-J2 { background: #251d40; color: #cbb9ff; border-color: #43357a; }
.o-DUO { background: #183421; color: #9df0a5; border-color: #2c5e38; }
.o-ANY { background: #3a3014; color: #f5d98a; border-color: #66551f; }
.s-done { background: #183421; color: #9df0a5; }
.s-progress { background: #13294a; color: #9cc8ff; }
.s-blocked { background: #3a1a1a; color: #ffb0b0; }
.s-available { background: #3a3014; color: #f5d98a; }
.opt { background: #2a2f36; color: #b9c4cf; border-color: #46505c; }
.crit { background: #3a2412; color: #ffc08a; border-color: #6b4220; }
.v-v { background: #173d22; color: #8ff09a; } .v-e { background: #3d3417; color: #f2d27c; } .v-u { background: #3d1717; color: #ff9d9d; }
.ico { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.ico.lg { width: 40px; height: 40px; }

/* Task list rows */
.tasks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.task { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 7px 10px; }
.task .t { flex: 1; min-width: 0; }
.task .t button.link { background: none; border: 0; padding: 0; color: var(--txt); font-weight: 600; cursor: pointer; text-align: left; }
.task .t button.link:hover { color: var(--gold); text-decoration: underline; }
.task .sub { font-size: 12px; color: var(--muted); display: block; }
.task .tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 3px 0 2px; }
.task.st-done { opacity: .62; }
.task.st-blocked { border-style: dashed; }
.check { width: 24px; height: 24px; border-radius: 4px; border: 2px solid var(--green); background: transparent; cursor: pointer; flex: none; display: grid; place-items: center; color: #0f1419; font-weight: 900; font-size: 15px; padding: 0; }
.check.on { background: var(--green); }
.check.blocked { border-color: #6b3a3a; }
.check:hover { box-shadow: 0 0 0 3px #5fd06833; }

/* Quest tree (FTB style) */
.tree-group { margin: 6px 0 22px; }
.tree-group > h3 { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; }
.qtree { position: relative; background: radial-gradient(circle at 1px 1px, #ffffff0d 1px, transparent 0) 0 0 / 22px 22px, #10171e; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; }
.qtree svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.qtree .edge { fill: none; stroke: #4b5d70; stroke-width: 2; }
.qtree .edge.ok { stroke: var(--green); }
.qnode { position: absolute; width: 210px; overflow: hidden; display: flex; gap: 8px; align-items: center; background: var(--panel); border: 2px solid var(--line2); border-radius: 8px; padding: 8px 8px 8px 9px; cursor: pointer; text-align: left; }
.qnode:hover { border-color: var(--gold); }
.qnode .nm { font-weight: 600; font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qnode .meta { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; margin-top: 4px; white-space: nowrap; }
.qnode.st-done { border-color: #2f7a3c; background: #14251a; }
.qnode.st-available { border-color: #b8912f; }
.qnode.st-progress { border-color: #4f8fe6; background: #142236; }
.qnode.st-blocked { border-style: dashed; border-color: #5b3434; opacity: .82; }
.qnode.optional { border-style: dotted; }
.qnode.final { border-color: var(--gold); box-shadow: 0 0 0 3px #f2c14e33; }
.qnode.hl { box-shadow: 0 0 0 4px #f2c14e88; }
.qnode .ext { font-size: 11px; color: var(--orange); margin-top: 3px; white-space: nowrap; }
.qnode .check { width: 22px; height: 22px; margin-left: auto; align-self: flex-start; }

/* Legend */
.legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }

/* Full tree */
.ftree, .ftree ul { list-style: none; margin: 0; padding-left: 18px; border-left: 1px dashed #33414f; }
.ftree { border-left: 0; padding-left: 0; }
.ftree li { margin: 4px 0; }
.ftree summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 5px; }
.ftree summary::-webkit-details-marker { display: none; }
.ftree summary:hover { background: var(--panel2); }
.ftree .leaf { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.ftree .tw { width: 12px; color: var(--muted); }
details[open] > summary .tw { transform: rotate(90deg); }
.ftree .nm { font-weight: 600; }
.ftree .chain { font-size: 11.5px; color: var(--orange); }
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 5px; padding: 6px 11px; cursor: pointer; text-decoration: none; color: var(--txt); font-size: 13px; }
.btn:hover { border-color: var(--cyan); }
.btn.sm { padding: 2px 8px; font-size: 12px; }
.btn.primary { background: #1d4a2a; border-color: #2f7a3c; }
.btn.danger { background: #4a1d1d; border-color: #7a2f2f; }
.btn[aria-pressed="true"] { background: #1d4a2a; border-color: var(--green); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Panel */
.panel-backdrop { position: fixed; inset: 0; background: #0008; z-index: 40; }
.panel { position: fixed; top: 0; right: 0; height: 100vh; width: min(520px, 100vw); background: var(--bg2); border-left: 1px solid var(--line2); z-index: 41; overflow-y: auto; padding: 18px 20px 40px; box-shadow: -10px 0 30px #0009; }
.panel h2 { margin-top: 18px; font-size: 14.5px; }
.panel .top { display: flex; gap: 12px; align-items: center; }
.panel .close { margin-left: auto; }
.panel ul { padding-left: 18px; margin: 4px 0; } .panel li { margin: 3px 0; }
.panel .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel textarea { width: 100%; min-height: 70px; background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 8px; }
.panel select { background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 5px; }
.req { display: flex; align-items: center; gap: 6px; }
.req button.link { background: none; border: 0; color: var(--cyan); cursor: pointer; padding: 0; text-decoration: underline; }
.uncertain { background: #3d1717; border: 1px solid #6b2f2f; border-radius: 5px; padding: 8px 10px; color: #ffc4c4; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--cyan); font-family: Bahnschrift; font-weight: 600; font-size: 13px; padding: 7px 8px; border-bottom: 1px solid var(--line); background: var(--panel2); }
td { padding: 7px 8px; border-bottom: 1px solid #222c37; vertical-align: middle; }
td.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
input.num { width: 120px; background: #0b1016; border: 1px solid var(--line2); border-radius: 4px; padding: 4px 6px; text-align: right; }

/* Duo columns */
.col-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.col-h.j1 { color: var(--j1); } .col-h.j2 { color: var(--j2); } .col-h.duo { color: var(--duo); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1d4a2a; border: 1px solid var(--green); padding: 8px 14px; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; }
.toast.show { opacity: 1; }
.imgs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.imgs img { width: 100%; border: 1px solid var(--line); border-radius: 4px; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } .g2, .g3, .g4 { grid-template-columns: 1fr; } main { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Compléments --- */
.badge.launch { background: #13294a; color: #9cc8ff; border-color: #2b4c7c; }
.badge.trap { background: #3d2a12; color: #ffcf8a; border-color: #6b4a20; }
.badge.phase-b { background: #222c37; color: var(--muted); text-decoration: none; border-color: var(--line2); }
.statebox { padding: 8px 10px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); }
.statebox.st-blocked { border-color: #6b2f2f; background: #2a1414; }
.statebox.st-available { border-color: #6b5a20; }
.statebox.st-done { border-color: #2f7a3c; }
.launchbox { background: #13294a; border: 1px solid #2b4c7c; border-radius: 5px; padding: 8px 10px; margin: 8px 0; }
.trapbox { background: #3d2a12; border: 1px solid #6b4a20; border-radius: 5px; padding: 8px 10px; margin: 8px 0; }
.rgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-width: 460px; }
.rgrid div { background: #0b1016; border: 1px solid #33414f; min-height: 52px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; padding: 4px; border-radius: 3px; }
.rgrid div.empty { border-style: dashed; opacity: .5; }
.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.plain li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
button.link { background: none; border: 0; padding: 0; color: var(--txt); font-weight: 600; cursor: pointer; text-align: left; }
button.link:hover { color: var(--gold); text-decoration: underline; }
.pl { display: flex; justify-content: space-between; margin: 8px 0 3px; font-size: 13px; }
.c-j1 { color: var(--j1); } .c-j2 { color: var(--j2); } .c-duo { color: var(--duo); } .c-any { color: var(--any); }
.speed .card h3 { font-size: 13.5px; }
.speed .plain { font-size: 13px; }
/* Composants de l'étoile */
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.comp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; background: var(--panel); border: 2px solid var(--line2); border-radius: 8px; padding: 10px 6px; cursor: pointer; color: var(--txt); text-decoration: none; font-size: 12.5px; }
.comp:hover { border-color: var(--gold); }
.comp.st-done { border-color: #2f7a3c; background: #14251a; }
.comp.st-available { border-color: #b8912f; } .comp.st-progress { border-color: #4f8fe6; }
.comp.st-blocked { border-style: dashed; }
.comp.sel { box-shadow: 0 0 0 3px var(--gold); }
.starhub { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; }
.starcore { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #2d2410; border: 2px solid var(--gold); border-radius: 10px; padding: 16px 8px; color: var(--gold); font-family: Bahnschrift; font-size: 16px; position: sticky; top: 10px; }
.ico.xl { width: 72px; height: 72px; }
/* Arbre : détails */
.qcanvas { position: relative; }
.qnode .nbody { background: none; border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; flex: 1; min-width: 0; cursor: pointer; text-align: left; color: var(--txt); }
.qnode .nbody:focus-visible { outline: 2px solid var(--gold); }
.qnode.compact { padding: 6px; gap: 6px; }
.qnode.compact .nm { font-size: 12px; }
.qnode.compact .meta .badge { font-size: 10.5px; padding: 0 5px; }
.qnode.dim { opacity: .22; }
.qnode .stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 6px 0 0 6px; }
.dot-crit { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 5px; vertical-align: 1px; }
.ph-1 { background: #8fd18f; } .ph-2 { background: #5fd068; } .ph-3 { background: #3fc8d8; } .ph-4 { background: #4f8fe6; }
.ph-5 { background: #a98bff; } .ph-6 { background: #e07bd0; } .ph-7 { background: #f2c14e; } .ph-8 { background: #ff8e6b; }
.stripe-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; }
.legend span { white-space: nowrap; }
.pmap { position: relative; height: 126px; }
.pmap svg { position: absolute; inset: 0; }
.pnode { position: absolute; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 8px; background: var(--panel2); border: 2px solid var(--line2); border-radius: 7px; color: var(--txt); text-decoration: none; font-size: 12px; }
.pnode:hover { border-color: var(--gold); }
.pnode.done { border-color: #2f7a3c; }
.pnode span { color: var(--green); }
/* Recherche */
.search input { width: 100%; background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 6px 9px; margin-bottom: 6px; }
.now-link { background: #2d2410; border: 1px solid #6b5a20; font-weight: 600; }
.now-link.active { background: #3d3214; box-shadow: inset 3px 0 0 var(--gold); }
/* Page « maintenant » */
.now-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.now-top h1 { font-size: 26px; }
.now-prog { min-width: 260px; } .now-prog .big { font-family: Bahnschrift; font-size: 28px; color: var(--gold); font-weight: 700; }
.now-col { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--line2); border-radius: var(--radius); padding: 12px 14px; }
.now-col.j1 { border-top-color: var(--j1); } .now-col.j2 { border-top-color: var(--j2); } .now-col.duo { border-top-color: var(--duo); }
.now-col h2 { margin: 0 0 10px; color: #fff; }
.now-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.now-list li { font-size: 15px; } .now-list li > * { vertical-align: middle; }
.now-list .check { display: inline-grid; margin-right: 4px; }
.notes { width: 100%; min-height: 140px; background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 10px; }
.win { font-size: 18px; color: var(--gold); font-weight: 700; }
code { font-family: Consolas, monospace; font-size: 12.5px; color: #c9f5d0; }
.ftree .btn.sm { margin-left: 4px; }
@media (max-width: 1100px) { .starhub { grid-template-columns: 1fr; } .starcore { position: static; flex-direction: row; justify-content: center; } }

/* --- Audit speedrun : priorités --- */
.p-crit { background: #3d1717; color: #ffb3b3; border-color: #7a2f2f; }
.p-imp { background: #3d2a12; color: #ffcf8a; border-color: #6b4a20; }
.p-util { background: #3a3414; color: #efe08a; border-color: #5f5520; }
.p-opt { background: #173d22; color: #9df0a5; border-color: #2c5e38; }
.p-conf { background: #2a2f36; color: #c9d2db; border-color: #46505c; }
.v-r { background: #13294a; color: #9cc8ff; }
.speedinfo { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.launch-item { background: var(--panel2); border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; margin-bottom: 6px; }
.launchcard { border-left: 4px solid #4f8fe6; }
.pnum { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.cpath { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.cpath li { font-size: 13.5px; }

/* ───── v2 : navigation compacte, synchro, outils, guides ───── */
nav details.navgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
nav details.navgroup > summary::-webkit-details-marker { display: none; }
nav details.navgroup > summary::after { content: '▸'; margin-left: 6px; color: var(--dim); }
nav details.navgroup[open] > summary::after { content: '▾'; }
.sync-wrap { margin-top: 10px; }
.sync-pill { display: block; font-size: 12px; padding: 5px 8px; border-radius: 5px; border: 1px solid var(--line2); text-decoration: none; color: var(--muted); }
.sync-ok { color: #8ff09a; border-color: #2f7a3c; } .sync-error { color: #ff9d9d; border-color: #7a2f2f; } .sync-connecting { color: #f2d27c; }
b.sync-ok, b.sync-error, b.sync-connecting, b.sync-off { border: 0; }
.txt { background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 5px 8px; text-transform: uppercase; letter-spacing: 1px; width: min(36ch, 100%); }
.form { display: grid; gap: 8px; }
.form label { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 2px 10px; align-items: center; font-size: 13px; }
.form label small { grid-column: 1 / -1; color: var(--dim); }
.form label small.ok { color: #8ff09a; } .form label small.est { color: #f2d27c; }
.form input, .form select, input.num { background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 4px 6px; width: 100%; }
input.num { width: 80px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.timerbox { margin-top: 6px; display: grid; gap: 6px; }
.btn.on { background: #13294a; border-color: #2b4c7c; }
table.calc td, table.calc th { white-space: nowrap; }
.tablewrap { overflow-x: auto; max-width: 100%; }
/* Guides */
.lbl { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; padding: 1px 6px; border-radius: 4px; margin-bottom: 4px; border: 1px solid transparent; }
.l-pack { background: #173d22; color: #8ff09a; border-color: #2f7a3c; }
.l-doc { background: #13294a; color: #9cc8ff; border-color: #2b4c7c; }
.l-prat { background: #2a2140; color: #cbb8ff; border-color: #4a3a7a; }
.l-est { background: #3d3417; color: #f2d27c; border-color: #6b5a20; }
.l-jeu { background: #3d1717; color: #ff9d9d; border-color: #6b2f2f; }
.gblock { margin: 8px 0 12px; } .gblock p { margin: 2px 0; } .gblock ul, .gblock ol { margin: 4px 0; padding-left: 22px; }
.gblock li { margin: 2px 0; }
.gsec { border-top: 1px solid var(--line); margin-top: 18px; scroll-margin-top: 10px; }
nav.toc { flex-direction: row; } .toc { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: 0; background: var(--bg); padding: 8px 0; z-index: 2; border-bottom: 1px solid var(--line); }
.guide-card { text-decoration: none; color: var(--txt); display: block; } .guide-card:hover { border-color: var(--cyan); }
.g-ok { background: #173d22; color: #8ff09a; } .g-part { background: #3d3417; color: #f2d27c; } .g-draft { background: #3d1717; color: #ff9d9d; }
.itemcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.itemcard { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 8px; }
button.link.item, span.item { color: var(--cyan); font-weight: 600; }
.bom .row { align-items: flex-start; gap: 18px; } .bom .row > div { flex: 1 1 200px; min-width: 0; } .bom h4 { margin: 4px 0; color: var(--cyan); font-size: 13px; }
.card.auto { margin: 10px 0; }
table.kv th { width: 170px; vertical-align: top; background: none; border-bottom: 1px solid #222c37; }
table.kv td ol { margin: 0; padding-left: 18px; }
.checklist { list-style: none; padding: 0; } .checklist li { padding: 5px 0; border-bottom: 1px solid #222c37; }
.checklist input { margin-right: 6px; transform: scale(1.15); }
.guidebox { background: #13294a; border: 1px solid #2b4c7c; border-radius: 5px; padding: 8px 10px; margin: 8px 0; }
.modtable td { vertical-align: top; }
.steps li { margin: 3px 0; }
.rgrid div button.link { font-weight: 500; font-size: 12px; text-align: center; }
main { overflow-wrap: anywhere; }
@media (max-width: 820px) { .form label { grid-template-columns: 1fr; } table.kv th { width: auto; } .toc { position: static; } }
.login { max-width: 460px; margin: 12vh auto; padding: 16px; }

/* ───── Guides visuels : 3D, couches, schémas, illustrations ───── */
.sv { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 10px 0; }
.sv-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.sv-bar, .sv-steps { margin: 4px 0; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.sv-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; }
.sv-canvas { position: relative; height: 440px; min-width: 0; background: #0b1016; border: 1px solid var(--line); border-radius: 5px; overflow: auto; }
.sv-canvas canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.sv-side { min-width: 0; max-height: 440px; overflow: auto; }
.sv-info { background: #0b1016; border: 1px solid var(--line2); border-radius: 5px; padding: 8px; margin-bottom: 8px; }
.sv-legend { list-style: none; padding: 0; margin: 0; } .sv-legend li { padding: 2px 0; }
.sv-legend button[aria-pressed="true"] { color: var(--gold); }
.sw { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; border: 1px solid #000; image-rendering: pixelated; background-size: cover; }
.sv-grid { display: grid; gap: 1px; padding: 6px; width: max-content; min-width: 100%; }
.sv-grid .c { width: 22px; height: 22px; padding: 0; border: 0; background-size: cover; image-rendering: pixelated; cursor: pointer; }
.sv-grid .c.e { background: #121a22; cursor: default; }
.sv-grid .c.past { opacity: .4; } .sv-grid .c.hatch { outline: 2px solid #ff9a4d; outline-offset: -2px; }
.flow { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin: 10px 0; }
.flow-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.flow-canvas { position: relative; }
.flow-canvas svg { position: absolute; inset: 0; }
.flow-line { stroke: #3fc8d8; stroke-width: 2; fill: none; stroke-dasharray: 7 6; animation: flowdash 1.2s linear infinite; }
.flow-lbl { fill: var(--muted); font-size: 11px; text-anchor: middle; }
@keyframes flowdash { to { stroke-dashoffset: -26; } }
.flow-node { position: absolute; background: #13294a; border: 1px solid #2b4c7c; border-radius: 6px; color: var(--txt); font-size: 12px; padding: 4px 6px; cursor: pointer; text-align: center; }
.flow-node:hover, .flow-node:focus-visible { border-color: var(--gold); }
.flow-info { margin-top: 6px; min-height: 1.4em; }
.vgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }
.vimg { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 8px; }
.vimg img { width: 100%; height: 190px; object-fit: contain; background: #0b1016; image-rendering: auto; border-radius: 4px; }
.vimg figcaption { font-size: 12.5px; margin-top: 6px; }
.vprog { height: 6px; background: #222c37; border-radius: 3px; overflow: hidden; } .vprog div { height: 100%; background: var(--green); }
.vdot { display: inline-block; min-width: 22px; text-align: center; margin: 0 2px; border: 1px solid var(--line2); border-radius: 11px; text-decoration: none; color: var(--muted); font-size: 12px; }
.vdot.cur { border-color: var(--gold); color: var(--gold); } .vdot.ok { background: #173d22; color: #8ff09a; }
.vnav { margin: 10px 0; } .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
ul.cols { columns: 2; } @media (max-width: 820px) { ul.cols { columns: 1; } .sv-body { grid-template-columns: 1fr; } .sv-canvas { height: 340px; } .sv-side { max-height: none; } }
@media (prefers-reduced-motion: reduce) { .flow-line { animation: none; } }
