:root {
  --bg: #0b0d12;
  --bg2: #12151d;
  --panel: #171b25;
  --line: #262b38;
  --text: #e6e9f0;
  --muted: #9aa3b5;
  --accent: #35d6ff;
  --accent2: #ff4fa3;
  --ok: #4ade80;
  --warn: #fbbf24;
  --radius: 14px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1a2238 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.brand .dot { width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 14px var(--accent); }
nav a { color: var(--muted); margin-left: 18px; font-size: 14px; }
nav a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 24px 0 8px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); margin: 0 0 6px; line-height: 1.1; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); margin: 0 0 18px; max-width: 760px; }

.viewer {
  position: relative; background: #05070b; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; height: min(62vh, 640px); min-height: 360px;
}
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer .hud {
  position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 8px; z-index: 2;
}
.viewer .hud button, .viewer .hud select {
  background: rgba(23,27,37,.85); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 12px; font-size: 13px; cursor: pointer; backdrop-filter: blur(6px);
}
.viewer .hud button.active { border-color: var(--accent); color: var(--accent); }
.viewer .hud button:hover { border-color: var(--muted); }
.viewer .hint { position: absolute; right: 12px; bottom: 10px; color: var(--muted); font-size: 12px; z-index: 2; }
.viewer:fullscreen { height: 100vh; border-radius: 0; }

section { padding: 36px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 24px; margin: 0 0 14px; }
section p { color: var(--muted); max-width: 820px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0 0 10px; font-size: 14px; }
.card ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.card li a {
  display: inline-block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
  background: var(--bg2);
}
.card li a:hover { border-color: var(--accent); text-decoration: none; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: rgba(74,222,128,.4); }
.badge.warn { color: var(--warn); border-color: rgba(251,191,36,.4); }

table.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.specs td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.specs td:first-child { color: var(--muted); width: 38%; }
.two { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 820px) { .two { grid-template-columns: 1fr; } }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; padding: 8px 0 8px 40px; position: relative; color: var(--muted); font-size: 15px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 7px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line); color: var(--accent); font-size: 13px; text-align: center; line-height: 24px;
}
footer { padding: 26px 0 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* pages de documents */
.doc { max-width: 900px; margin: 0 auto; padding: 24px 16px 60px; }
.doc h1 { font-size: 30px; }
.doc h2 { margin-top: 32px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 12px 0; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.doc th { background: var(--panel); }
.doc code { background: var(--panel); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.doc pre { background: var(--panel); padding: 12px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.doc .back { display: inline-block; margin-bottom: 16px; color: var(--muted); }
.doc li { margin: 4px 0; }
