/* Glane — feuille de style du site. Aucune ressource externe. */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel2: #1e222b;
  --ink: #e6e9ef;
  --muted: #9aa3b2;
  --line: #2a2f3a;
  --accent: #4da3ff;
  --ok: #3ddc84;
  --sat: #ffb020;
  --stale: #ff6b6b;
  --fault: #c084fc;
  --code: #0b0d12;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace; }
code { background: var(--code); padding: .1rem .35rem; border-radius: 4px; font-size: .88em; }

/* ---------- en-tête ---------- */
.top { padding: 2.6rem 0 1.4rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #141922, var(--bg)); }
.top h1 { margin: 0; font-size: 2.6rem; letter-spacing: -.02em; }
.tagline { color: var(--muted); font-size: 1.1rem; margin: .3rem 0 1rem; max-width: 60ch; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.badge { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; font-size: .85rem; }
.badge b { color: var(--ok); font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: .85rem; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(15,17,21,.94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; flex-wrap: wrap; gap: .2rem; padding: .45rem 1.1rem; }
.nav a { color: var(--muted); padding: .35rem .7rem; border-radius: 7px; font-size: .9rem; }
.nav a:hover { color: var(--ink); background: var(--panel2); text-decoration: none; }
.nav a.active { color: var(--ink); background: var(--panel2); }

/* ---------- sections ---------- */
section { padding: 2.4rem 0 .6rem; border-bottom: 1px solid var(--line); }
section h2 { font-size: 1.7rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
section h3 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; color: var(--ink); }
.lead { color: var(--muted); max-width: 78ch; margin: .2rem 0 1rem; }
.small { color: var(--muted); font-size: .88rem; }
.hint { color: var(--muted); font-weight: 400; font-size: .85rem; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; }
.card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px;
  padding: .25rem .6rem; font-size: .82rem; color: var(--muted); }
.tag b { color: var(--ink); }

/* ---------- démo ---------- */
.demo-grid { display: grid; grid-template-columns: 270px 1fr; gap: 1rem; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.controls h3 { margin: .9rem 0 .35rem; font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
.controls h3:first-child { margin-top: 0; }
.controls label { display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; font-size: .86rem; margin: .25rem 0; color: var(--muted); }
.controls input, .controls select { width: 110px; background: var(--code); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: .25rem .4rem; font-size: .85rem; }
.controls button { width: 100%; margin-top: .6rem; background: var(--accent); color: #06121f;
  border: 0; border-radius: 8px; padding: .5rem; font-weight: 600; cursor: pointer; font-size: .9rem; }
.controls button.ghost { background: var(--panel2); color: var(--ink); border: 1px solid var(--line); }
.controls button:hover { filter: brightness(1.08); }

#d-chart { width: 100%; height: 240px; background: var(--code); border: 1px solid var(--line);
  border-radius: 8px; display: block; }
.qstrip { display: flex; flex-wrap: wrap; gap: 1px; margin: .3rem 0; }
.qstrip i { width: 7px; height: 16px; border-radius: 2px; display: block; }
.legend { display: flex; gap: .9rem; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: .3rem; }
.dot.ok { background: var(--ok); } .dot.sat { background: var(--sat); }
.dot.stale { background: var(--stale); } .dot.fault { background: var(--fault); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: .5rem .7rem; }
.stat .k { color: var(--muted); font-size: .78rem; }
.stat .v { font-size: 1.15rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.stats.big .stat .v { font-size: 1.6rem; color: var(--ok); }

.journal { background: var(--code); border: 1px solid var(--line); border-radius: 8px;
  padding: .7rem .8rem; overflow-x: auto; font-size: .78rem; line-height: 1.5; max-height: 220px; }
pre.code { background: var(--code); border: 1px solid var(--line); border-radius: 8px;
  padding: .8rem .9rem; overflow-x: auto; font-size: .82rem; line-height: 1.5; }
button.small { width: auto; padding: .15rem .5rem; font-size: .78rem; margin: 0 .3rem; }

/* ---------- vitrine QNX en direct ---------- */
.qnx-live { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: .8rem; margin: .6rem 0; }
@media (max-width: 860px) { .qnx-live { grid-template-columns: 1fr; } }
.qnx-live img { width: 100%; height: 300px; object-fit: contain; background: #000;
  border: 1px solid var(--line); border-radius: 8px; }
.qnx-live-side { display: flex; flex-direction: column; gap: .5rem; }
.qnx-live .keys { display: flex; flex-wrap: wrap; gap: .35rem; }
.qnx-live .keys button { background: var(--panel2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem;
  cursor: pointer; font: inherit; font-size: .82rem; }
.qnx-live .keys button:hover { border-color: var(--accent); }
.qnx-live .journal { flex: 1; min-height: 230px; max-height: 300px; }

/* ---------- grille de fonctionnalités ---------- */
.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }
.filter button { background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: .3rem .85rem; cursor: pointer; font-size: .85rem; }
.filter button.on { background: var(--accent); color: #06121f; border-color: var(--accent); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: .85rem 1rem; }
.feat .head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.feat h4 { margin: 0; font-size: .98rem; }
.feat .id { color: var(--muted); font-size: .76rem; font-family: ui-monospace, monospace; }
.feat p { margin: .35rem 0 .5rem; color: var(--muted); font-size: .88rem; }
.kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; border-radius: 5px;
  padding: .12rem .45rem; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.kind.core { color: #9ecbff; border-color: #2c4a6e; }
.kind.outil { color: #b9f6ca; border-color: #2e5d3a; }
.gla { display: inline-block; background: var(--code); border: 1px solid var(--line);
  border-radius: 5px; padding: .05rem .4rem; font-size: .72rem; color: var(--accent);
  font-family: ui-monospace, monospace; margin-right: .25rem; }

/* ---------- barres de vérifications ---------- */
.bar-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: .6rem; align-items: center;
  font-size: .85rem; margin: .25rem 0; }
.bar-row .name { color: var(--muted); font-family: ui-monospace, monospace; font-size: .8rem; }
.bar { background: var(--panel2); border-radius: 5px; height: 14px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #2f7bd6, var(--ok)); }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- tableaux ---------- */
table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .4rem 0; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
td.mono { font-family: ui-monospace, monospace; font-size: .82rem; }
.pill { border-radius: 5px; padding: .05rem .4rem; font-size: .74rem; border: 1px solid var(--line); }
.pill.S { color: #9ecbff; border-color: #2c4a6e; }
.pill.C { color: #b9f6ca; border-color: #2e5d3a; }
.pill.X { color: #f6c89e; border-color: #6e4a2c; }
.yes { color: var(--ok); } .no { color: var(--muted); }

/* ---------- onglets journaux ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.tabs button { background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
  border-radius: 7px 7px 0 0; padding: .35rem .8rem; cursor: pointer; font-size: .84rem; }
.tabs button.on { background: var(--code); color: var(--ink); border-bottom-color: var(--code); }

/* ---------- idées ---------- */
.lot { margin-bottom: 1.4rem; }
.lot h3 { display: flex; align-items: baseline; gap: .5rem; }
.lot .count { color: var(--muted); font-size: .82rem; font-weight: 400; }
.idea { display: grid; grid-template-columns: 26px 1fr auto; gap: .6rem; padding: .5rem .6rem;
  border: 1px solid var(--line); border-radius: 9px; margin: .35rem 0; background: var(--panel); }
.idea.star { border-color: #2e5d3a; background: #14201a; }
.idea .n { color: var(--muted); font-family: ui-monospace, monospace; font-size: .82rem; }
.idea .body strong { font-size: .93rem; }
.idea .body p { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; }
.idea .meta-r { text-align: right; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.gain { color: var(--ok); font-weight: 600; }
.star-mark { color: var(--ok); }

.tight { margin: .3rem 0; padding-left: 1.1rem; color: var(--muted); font-size: .88rem; }
.tight li { margin: .15rem 0; }

/* ---------- console QNX (terminal) ---------- */
.terminal { background: #05070a; border: 1px solid var(--line); border-radius: 9px;
  overflow: hidden; margin: .5rem 0 1rem; }
.terminal-bar { background: #12151c; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .76rem; padding: .35rem .8rem;
  font-family: ui-monospace, Menlo, Consolas, monospace; }
.terminal pre { margin: 0; padding: .7rem .9rem; background: transparent;
  color: #b9f6ca; font-size: .76rem; line-height: 1.45; max-height: 420px;
  overflow: auto; white-space: pre; }

footer { padding: 1.6rem 0 2.4rem; color: var(--muted); font-size: .88rem; }

@media (max-width: 820px) {
  .demo-grid { grid-template-columns: 1fr; }
  .controls input, .controls select { width: 100px; }
}
