/* Kepler — jetons, thème encre (accueil 3 « accordéon », choisi par Alex le 10/11). Les noms gardent leur rôle : --cream = fond, --ink = texte. Contraste : tests/contraste.mjs. */
:root {
  --cream: #1B1F2A; --paper: #232838; --ink: #F3EDE0; --ink-soft: #C9C2B3;
  --brass: #B08D57; --brass-ink: #C9A46B; --blue: #8FB0E8; --red: #E07A70; --green: #6FBF84;
  --surface-hi: #20283A; --blue-deep: #2F5DA8; --on-blue: #F3EDE0; --line: rgba(176,141,87,.5); color-scheme: dark;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px); --max: 1240px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
::selection { background: var(--brass); color: var(--cream); } html { scrollbar-color: var(--brass) transparent; caret-color: var(--blue); }
h1, h2, h3 { text-wrap: balance; } p { text-wrap: pretty; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 18px/1.55 var(--serif); }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.05; margin: 0; }
p { margin: 0 0 1em; max-width: 64ch; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.78em; letter-spacing: 0; }

/* boutons */
[hidden] { display: none !important; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 500 18px/1 var(--serif); padding: 14px 26px; border-radius: 3px; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--cream); }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; background: transparent; color: inherit; }
.btn-launch:disabled, .btn-launch:disabled:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--on-blue); }
.btn-x { padding: 0; width: 46px; height: 46px; justify-content: center; flex: none; }
.btn-x svg { width: 18px; height: 18px; fill: currentColor; }
.btn-launch { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--on-blue); font-size: 20px; padding: 16px 34px; }
.btn-launch:hover { background: var(--ink); border-color: var(--ink); color: var(--cream); } .btn-launch:hover .dot { background: var(--cream); }
.btn-launch .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-blue); }

/* en-tête */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter); max-width: var(--max); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 26px/1 var(--serif); color: var(--ink); text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-size: 18px; }
.nav a:hover { color: var(--blue); }
.demo-tag { font: 500 12px/1 var(--mono); color: var(--brass-ink); border: 1px solid var(--brass); border-radius: 3px; padding: 5px 9px; white-space: nowrap; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* planétaire */
.orrery { width: 100%; height: auto; display: block; overflow: visible; }
.o-bezel { fill: none; stroke: var(--brass); stroke-width: 1; }
.o-tick { stroke: var(--brass); stroke-width: 1; } .o-tick-l { stroke-width: 2; }
.o-sun-disc { fill: var(--brass); }
.o-ray { stroke: var(--brass); stroke-width: 1.5; }
.o-orbit { fill: none; stroke: var(--brass); stroke-width: 1; opacity: .85; transition: stroke .2s; }
.o-orbit.is-sel { stroke: var(--blue); stroke-width: 2; opacity: 1; }
.o-peri { fill: var(--green); }
.o-arm { stroke: var(--brass); stroke-width: .8; opacity: .45; } .o-arm.is-sel { stroke: var(--blue); opacity: .9; }
.o-planet { cursor: pointer; outline: none; }
.o-planet circle { fill: var(--ink); stroke: var(--cream); stroke-width: 2; }
.o-planet.is-sel circle, .o-planet:focus-visible circle { fill: var(--blue); }
.o-label { font: 500 15px/1 var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--cream); stroke-width: 4px; }
.o-burn { fill: none; stroke: var(--green); stroke-width: 2; }

/* poinçons de tranche */
.st { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; border: 1.5px solid var(--brass-ink); vertical-align: -1px; }
.st-burned { background: var(--green); border-color: var(--green); }
.st-cancelled { background: var(--red); border-color: var(--red); border-radius: 1px; transform: rotate(45deg) scale(.85); }
.stamp { font: 600 12px/1 var(--mono); letter-spacing: .04em; padding: 5px 8px; border: 1.5px solid currentColor; border-radius: 3px; }
.stamp-armed { color: var(--brass-ink); } .stamp-burned { color: var(--green); } .stamp-cancelled { color: var(--red); }

/* éphémérides */
.eph { width: 100%; border-collapse: collapse; }
.eph th { font: 500 14px/1.3 var(--serif); font-style: italic; color: var(--ink-soft); text-align: right; padding: 0 12px 10px; border-bottom: 1px solid var(--brass); white-space: nowrap; }
.eph th:first-child, .eph td:first-child { text-align: left; padding-left: 0; }
.eph td { padding: 12px; text-align: right; border-bottom: 1px solid rgba(176,141,87,.35); white-space: nowrap; }
.eph tbody tr:hover { background: var(--paper); }
.eph-name a { color: var(--ink); text-decoration: none; font-size: 20px; }
.eph-name a:hover { color: var(--blue); }
.eph-tk { font: 400 12px/1 var(--mono); color: var(--brass-ink); margin-left: 8px; }
.eph-st { text-align: left !important; }
.eph-st .num { margin-left: 6px; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* emplacement vide étiqueté (visuel à fournir par Alex) */
.slot { border: 1.5px dashed var(--brass); border-radius: 6px; display: grid; place-items: center; text-align: center; color: var(--brass-ink); font: 400 13px/1.4 var(--mono); padding: 18px; min-height: 160px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 440px) { .demo-tag { display: none; } .top .btn-launch { padding: 12px 20px; font-size: 18px; } .brand { font-size: 23px; } }

/* pages intérieures */
.page-h { padding-top: clamp(24px, 5vw, 56px); padding-bottom: 28px; }
.page-h h1 { font-size: clamp(44px, 6vw, 84px); letter-spacing: -0.02em; }
.page-h p { color: var(--ink-soft); font-size: 20px; margin-top: 14px; }
footer.foot { border-top: 1px solid var(--brass); padding: 28px 0 40px; font-size: 16px; color: var(--ink-soft); margin-top: 80px; }
footer.foot .foot-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
footer.foot .foot-x { display: inline-flex; align-items: center; gap: 7px; }
footer.foot .foot-x svg { width: 13px; height: 13px; fill: currentColor; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { all: unset; cursor: pointer; font: 400 14px/1 var(--mono); padding: 8px 12px; border: 1px solid var(--brass); border-radius: 3px; color: var(--ink); }
.chip[aria-pressed=true] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type=file]::file-selector-button { font: 400 15px var(--serif); background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
input[type=range] { accent-color: var(--blue-deep); }
::placeholder { color: #9C978C; opacity: 1; }
