/* Nova — tokens et composants communs. Palette du brief ; contrastes mesurés (tests/contraste.mjs). */
:root {
  --void: #05060A; --white: #F5F7FF; --o: #6EA8FF; --giant: #FF5A3C; --surface: #11141D; --muted: #8C93A8; --rule: #232838;
  --display: "Unbounded", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px); --max: 1280px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--void); color: var(--white); font: 400 15px/1.6 var(--mono); overflow-x: hidden; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--o); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(28px, 4.2vw, 56px); }
h3 { font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; max-width: 64ch; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* navigation */
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav .mark { font: 700 20px/1 var(--display); letter-spacing: 0.02em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.nav .mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--white); outline: 1px solid var(--o); outline-offset: 3px; }
.nav .links { display: flex; gap: 22px; margin-left: auto; }
.nav .links a { text-decoration: none; color: var(--muted); }
.nav .links a:hover, .nav .links a[aria-current] { color: var(--white); }
@media (max-width: 720px) { .nav .links { display: none; } .nav .btn { margin-left: auto; } }

/* boutons : Launch est le seul bouton plein */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 24px; border-radius: 2px;
  font: 600 15px/1 var(--display); text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-launch { background: var(--o); color: var(--void); }
.btn-launch:hover { background: var(--white); }
.btn-ghost { border-color: var(--rule); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--white); }

/* jauge 0 → 1,4 */
.gauge { --fill: 0; position: relative; }
.gauge .track { position: relative; height: 8px; border-radius: 0; background: var(--surface); overflow: hidden; }
.gauge .track b { position: absolute; inset: 0 auto 0 0; width: calc(var(--fill) * 100%); background: linear-gradient(90deg, var(--o), var(--white) 78%, var(--giant)); transition: width .4s; }
.gauge .marks { position: relative; height: 22px; font-size: 12px; color: var(--muted); }
.gauge .marks span { position: absolute; top: 6px; transform: translateX(-50%); }
.gauge .marks span:last-child { color: var(--giant); transform: translateX(-100%); }

/* diagramme H-R */
.hr { width: 100%; height: auto; display: block; }
.hr-rule { stroke: var(--rule); stroke-width: 1; }
.hr-nova { stroke: var(--o); stroke-width: 1; stroke-dasharray: 2 6; opacity: .55; }
.hr-limit { stroke: var(--giant); stroke-width: 1.5; }
.hr-limit-label { fill: var(--giant); font: 500 13px var(--mono); }
.hr-tick, .hr-axis { fill: var(--muted); font: 12px var(--mono); }
.hr-star { cursor: pointer; outline: none; }
.hr-dot { fill: var(--o); }
.hr-star.is-critical .hr-dot { fill: var(--white); }
.hr-star.is-nebula .hr-dot { fill: var(--giant); }
.hr-star.is-dwarf .hr-dot { fill: #3d5f99; }
.hr-ring { fill: none; stroke: var(--giant); stroke-opacity: .5; stroke-dasharray: 2 3; }
.hr-name { fill: var(--white); font: 12px var(--mono); opacity: .8; }
.hr-star:hover .hr-name, .hr-star:focus-visible .hr-name { opacity: 1; fill: var(--o); }

/* statuts de tranche */
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-armed { color: var(--o); } .st-burned { color: var(--white); } .st-cancelled { color: var(--giant); } .st-none { color: var(--muted); }

.sim-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--rule); border-radius: 2px; padding: 2px 10px; }
section { padding: 112px 0; }
@media (max-width: 760px) { section { padding: 64px 0; } }
footer { border-top: 1px solid var(--rule); padding: 32px 0 48px; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- pages du site (étape 4) ---- */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(34px, 5vw, 64px); }
.page-head p { margin-top: 16px; color: var(--muted); }
details.q { border-bottom: 1px solid var(--rule); padding: 18px 0; }
details.q summary { cursor: pointer; font: 500 17px/1.4 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: "+"; color: var(--o); }
details.q[open] summary::after { content: "−"; }
details.q p { margin-top: 12px; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 400; font-size: 13px; }
.tbl-wrap { overflow-x: auto; }
.addr { font-family: var(--mono); font-size: 13px; color: var(--muted); word-break: break-all; }
.slot { display: grid; place-items: center; border: 1px dashed var(--rule); color: var(--muted); font-size: 12px; text-align: center; padding: 12px; background: var(--surface); }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--mono); padding: 6px 12px; border-radius: 2px; border: 1px solid var(--rule); }
.badge.live { color: var(--o); border-color: var(--o); }
.badge.fail { color: var(--giant); border-color: var(--giant); }
/* formulaires du studio */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field > span { font-size: 13px; color: var(--muted); }
.field input[type=text], .field input[type=url], .field textarea, .field select {
  width: 100%; background: var(--surface); color: var(--white); border: 1px solid var(--rule); border-radius: 2px; padding: 12px 14px; font: 15px var(--mono); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--o); outline: none; }
.field input[type=range] { width: 100%; accent-color: var(--o); }
.field .val { font: 600 20px var(--display); }
.err { color: var(--giant); font-size: 14px; min-height: 22px; }
.note { color: var(--muted); font-size: 13px; }
/* surfaces du navigateur, tirées de la palette */
::selection { background: var(--o); color: var(--void); }
html { scrollbar-color: var(--rule) var(--void); accent-color: var(--o); caret-color: var(--o); }
::placeholder { color: var(--muted); opacity: 1; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
/* lien X : bouton carré dans l'en-tête de toutes les pages */
.acts { display: flex; gap: 10px; align-items: center; }
.btn-icon { width: 48px; padding: 0; }
@media (max-width: 720px) { .nav .acts { margin-left: auto; } }
