/* Comets — jetons et base. DA : nuit, glace bleue, poussière dorée, blanc. Cormorant (titres et texte), JetBrains Mono (données). */
:root {
  --night: #070B14;
  --night-2: #0C1322;
  --night-3: #121B2E;
  --line: rgba(159, 216, 255, 0.16);
  --line-2: rgba(159, 216, 255, 0.32);
  --ice: #9FD8FF;
  --gold: #F4C77B;
  --white: #FFFFFF;
  --text: #E6EEF8;
  --mute: #93A6C2;
  --red: #FF7A7A;
  --serif: "Cormorant", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, 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(--night); color: var(--text); font: 500 1.15rem/1.55 var(--serif); }
a { color: var(--ice); text-underline-offset: 3px; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; color: var(--white); }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; max-width: 64ch; }
.lede { font-size: clamp(1.2rem, 1.6vw, 1.45rem); color: var(--text); }
.muted { color: var(--mute); }

/* boutons : un seul principal (Launch), doré */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; min-height: 44px; padding: 0 1.3em; border-radius: 2px;
  font: 600 0.9rem/1 var(--mono); text-decoration: none; cursor: pointer; border: 1px solid var(--line-2); color: var(--white); background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s; white-space: nowrap; }
.btn:hover { border-color: var(--ice); background: var(--night-2); }
.btn.primary { background: var(--gold); color: var(--night); border-color: var(--gold); }
.btn.primary:hover { background: #FFDCA0; }
.btn.small { min-height: 34px; padding: 0 0.9em; font-size: 0.78rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* barre du haut */
.top { position: sticky; top: 0; z-index: 20; background: var(--night); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font: 600 1.6rem/1 var(--serif); }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font: 500 0.85rem/1 var(--mono); }
.nav a:hover, .nav a[aria-current] { color: var(--gold); }
/* le compte X du site : un bouton carré à l'icône, dans l'en-tête ; le même lien en clair dans le pied */
.xlink { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--white); }
.xlink:hover { border-color: var(--ice); background: var(--night-2); color: var(--gold); }
.xlink svg { width: 15px; height: 15px; fill: currentColor; }
@media (max-width: 760px) { .nav { display: none; } .top .xlink { margin-left: auto; } }

/* étiquettes de classe : la rareté se lit à la couleur du trait, pas en capitales */
.cls { display: inline-flex; align-items: center; gap: 6px; font: 500 0.78rem/1 var(--mono); color: var(--text); white-space: nowrap; }
.cls::before { content: ""; width: 14px; height: 2px; background: currentColor; border-radius: 2px; }
.cls.interstellar { color: var(--gold); }
.cls.halley { color: #FFFFFF; }
.cls.long { color: var(--ice); }
.cls.jupiter { color: var(--mute); }

/* statuts de tranche */
.st { font: 600 0.76rem/1 var(--mono); padding: 5px 8px; border-radius: 2px; border: 1px solid; white-space: nowrap; }
.st.ARMED { color: var(--ice); border-color: rgba(159, 216, 255, 0.45); }
.st.DUE { color: var(--gold); border-color: rgba(244, 199, 123, 0.5); }
.st.BURNED { color: var(--night); background: var(--gold); border-color: var(--gold); }
.st.CANCELLED { color: var(--red); border-color: rgba(255, 122, 122, 0.55); }

/* registre */
.table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.82rem; }
.table th { text-align: left; font-weight: 500; color: var(--mute); padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(159, 216, 255, 0.04); }
.table .name { font: 600 1.12rem/1.2 var(--serif); color: var(--white); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.78rem/1 var(--mono); color: var(--text); background: transparent; border: 1px solid var(--line-2); border-radius: 2px; padding: 9px 12px; cursor: pointer; min-height: 34px; }
.chip[aria-pressed="true"] { background: var(--ice); color: var(--night); border-color: var(--ice); }
input.field, select.field, textarea.field { width: 100%; background: var(--night-2); color: var(--white); border: 1px solid var(--line-2); border-radius: 2px;
  padding: 11px 13px; font: 500 0.9rem/1.3 var(--mono); min-height: 44px; }
input.field:focus, select.field:focus, textarea.field:focus { border-color: var(--ice); outline: none; }

.foot { border-top: 1px solid var(--line); margin-top: 96px; padding: 36px 0 48px; color: var(--mute); font: 500 0.8rem/1.6 var(--mono); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.xfoot { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.xfoot:hover { color: var(--gold); }
.xfoot svg { width: 12px; height: 12px; fill: currentColor; }
.empty-slot { display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--mute); font: 500 0.78rem/1.4 var(--mono); text-align: center; padding: 16px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

[hidden] { display: none !important; }

/* surfaces du navigateur, thémées depuis la palette */
::selection { background: var(--gold); color: var(--night); }
html { scrollbar-color: var(--line-2) var(--night); caret-color: var(--gold); }
.mono, .table, .cd { font-variant-numeric: tabular-nums; }
::placeholder { color: var(--mute); opacity: 1; }

/* recherche de comète : l'action principale, en état de marche (js/finder.js) */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.finder { position: relative; }
.finder form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.finder input.field { border-right: 0; border-radius: 2px 0 0 2px; min-height: 50px; font-size: 0.92rem; }
.finder form .btn { border-radius: 0 2px 2px 0; min-height: 50px; }
.finder .hits { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 0; list-style: none;
  background: var(--night-2); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); }
.finder .hits li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.finder .hits li + li { border-top: 1px solid var(--line); }
.finder .hits b { display: block; font: 600 1.15rem/1.15 var(--serif); color: var(--white); }
.finder .hits small { font: 500 0.78rem/1.4 var(--mono); color: var(--mute); }
.finder .hits .none { font: 500 0.82rem/1.5 var(--mono); color: var(--mute); }
@media (max-width: 520px) { .finder form { grid-template-columns: 1fr; gap: 8px; } .finder input.field { border-right: 1px solid var(--line-2); border-radius: 2px; } .finder form .btn { border-radius: 2px; } }

/* fins de paragraphe sans mot orphelin (polish Impeccable) */
p, .def, .lede { text-wrap: pretty; }
