/* Horizon — thème TRON orbital (d'après la maquette validée « horizon-orbital »).
   CSP stricte : aucune règle inline ; les couleurs de sphère viennent des classes hue-*,
   les positions d'orbite des classes ring-<nombre>-<index> (générées en fin de fichier). */
:root {
  --bg: #060d15;
  --panel: #0b1a24;
  --panel-2: #10212b;
  --ink: #ecfaff;
  --soft: #90a8b5;
  --dim: #607e8b;
  --line: #a1dbe32b;
  --line-strong: #355463;
  --cyan: #8cf5ef;
  --mint: #5ce8fa;
  --gold: #ffb65c;
  --danger-ink: #ffbb9d;
  --danger-bg: #302021;
  --ok: #a0f2d0;
  --color: var(--cyan);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg);
  display: flex; flex-direction: column;
}
a { color: var(--cyan); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--cyan); color: #06111b; padding: 8px 12px; z-index: 20; }
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; stroke: currentColor; fill: none; }

/* ---------- Ciel et grille ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -2;
  background:
    radial-gradient(ellipse at 50% 55%, #123a4933, transparent 65%),
    radial-gradient(1px 1px at 10% 20%, #b4e7ff 80%, transparent),
    radial-gradient(1px 1px at 30% 70%, #b4e7ff 80%, transparent),
    radial-gradient(1px 1px at 75% 30%, #b4e7ff 80%, transparent),
    radial-gradient(1px 1px at 85% 80%, #b4e7ff 80%, transparent);
  background-size: auto, 251px 251px, 351px 351px, 409px 409px, 567px 567px; }
.floor { position: fixed; bottom: -36vh; left: -40%; width: 180%; height: 65vh; pointer-events: none; z-index: -1;
  transform: perspective(500px) rotateX(58deg);
  background-image: linear-gradient(#62ced311 1px, transparent 1px), linear-gradient(90deg, #62ced311 1px, transparent 1px);
  background-size: 75px 75px;
  -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }

/* ---------- En-tête et navigation ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 4vw 14px; }
.brand { letter-spacing: 7px; font-size: 19px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--cyan); }
.tagline { font-size: 10px; letter-spacing: 2px; color: var(--soft); text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-actions form { margin: 0; }
.shortcut { background: #10252c; border: 1px solid #75d6db45; padding: 12px 19px; border-radius: 30px; font-size: 12px; color: #baf9f5; text-decoration: none; white-space: nowrap; }
.shortcut:hover { background: #20434d; }
.quiet-link { color: var(--soft) !important; text-decoration: none !important; font-size: 12px !important; }
.quiet-link:hover { color: var(--ink) !important; }
.nav { display: flex; gap: 6px; padding: 0 4vw 14px; border-bottom: 1px solid #b9f5ff12; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 30px; color: var(--soft); text-decoration: none; font-size: 13px; white-space: nowrap; min-height: 40px; }
.nav a .icon { width: 16px; height: 16px; }
.nav a:hover { color: var(--ink); background: #0f2532; }
.nav a[aria-current="page"] { color: var(--cyan); background: #10252c; box-shadow: inset 0 0 0 1px #75d6db45; }

.main { position: relative; flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 34px 4vw 70px; min-width: 0; }
.footer { font-size: 10px; letter-spacing: 1px; color: var(--dim); padding: 20px 4vw; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; text-transform: uppercase; }
.guide { display: flex; gap: 10px; align-items: flex-start; max-width: 640px; margin: 60px auto 0; color: var(--dim); font-size: 12px; text-align: left; }
.guide .icon { color: var(--gold); width: 16px; height: 16px; margin-top: 2px; }

/* ---------- Typographie ---------- */
h1, h2 { font-weight: 400; letter-spacing: -1px; overflow-wrap: anywhere; }
h1 { font-size: clamp(30px, 3.3vw, 49px); line-height: 1.15; margin: 14px 0 12px; }
h1 em { font-style: normal; color: var(--cyan); }
h2 { font-size: 24px; margin: 0 0 14px; }
h3 { font-size: 15px; margin: 0 0 6px; font-weight: 600; overflow-wrap: anywhere; }
p { margin: 6px 0 14px; }
.eyebrow, .chapter, .section-label { font-size: 10px; letter-spacing: 3px; color: #81a7b5; text-transform: uppercase; overflow-wrap: anywhere; }
.section-label { color: var(--color); }
.chapter { color: var(--cyan); }
.subtitle, .lead { color: var(--soft); font-size: 14px; line-height: 1.7; max-width: 62ch; }
.small { font-size: 12px; color: var(--soft); }
.hint { text-align: center; color: var(--dim); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; margin: 22px 0 0; }
.road-header, .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head { display: block; text-align: center; margin-bottom: 46px; }
.page-head .subtitle { margin: 0 auto; }
.road-header h1 { margin-bottom: 0; }
.pill { color: var(--cyan); font-size: 11px; }
.tag { font-size: 11px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 30px; color: var(--soft); }

/* ---------- Couleurs de sphère (par icône choisie) ---------- */
.hue-users { --color: #eab998; }
.hue-heart { --color: #cf9bd4; }
.hue-heart-pulse { --color: #9ce0bf; }
.hue-rocket { --color: #79eee7; }
.hue-gem { --color: #92bcf7; }
.hue-sprout { --color: #b3acef; }
.hue-compass { --color: #ecd09a; }
.hue-orbit { --color: #8cf5ef; }

/* ---------- Planètes ---------- */
.orb {
  --size: 125px;
  position: relative; display: grid; place-items: center; width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(circle at 31% 25%, #e4ffffa8, transparent 21%),
              radial-gradient(circle at 34% 28%, var(--color), #113047 43%, #020914 73%);
  box-shadow: inset 0 0 16px #dbffff44, inset -10px -15px 28px #01060d, 0 0 0 1px var(--color),
              0 0 25px color-mix(in srgb, var(--color) 24%, transparent), 0 0 75px color-mix(in srgb, var(--color) 12%, transparent);
  animation: float 7s ease-in-out infinite;
  transition: filter .4s, scale .4s;
}
.orb::before { content: ""; position: absolute; inset: -11px; border: 1px solid color-mix(in srgb, var(--color) 55%, transparent); border-radius: 50%;
  transform: rotateX(64deg) rotate(-22deg); box-shadow: 0 0 10px color-mix(in srgb, var(--color) 25%, transparent); }
.orb::after { content: ""; position: absolute; inset: 8px; border: 1px solid #dbffff20; border-radius: 50%; clip-path: polygon(0 0, 80% 0, 20% 100%, 0 100%); }
.orb-icon { width: 38%; height: 38%; stroke: #d7fffa; fill: none; stroke-width: 1.2; opacity: .9; filter: drop-shadow(0 0 8px var(--color)); }

/* Hauteur réelle : les cartes (orbe + flottement + nom sur deux lignes + statut) restent entre l'intro et la consigne. */
.space { position: relative; height: 820px; max-width: 1100px; margin: 10px auto 0; }
.orbit-ring { position: absolute; left: 50%; top: 47.1%; width: 80%; height: 70.2%; border: 1px solid #92e9f419; border-radius: 50%; transform: translate(-50%, -50%) rotate(-12deg); pointer-events: none; }
.orbit-ring::after { content: ""; position: absolute; inset: -35px; border: 1px dashed #92e9f40e; border-radius: 50%; }
.planets { list-style: none; margin: 0; padding: 0; }
/* Chaque carte est ancrée sur le CENTRE DE SA PLANÈTE (et non sur la carte entière) :
   les positions d'orbite décrivent donc des centres d'orbes, nom et statut se placent dessous. */
.planet-item { --orb: 125px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(var(--orb) / -2 - 12px)); width: 210px; }
.planet-item .orb { --size: var(--orb); }
.planet { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 12px; color: var(--ink); text-decoration: none; text-align: center; border-radius: 24px; isolation: isolate; }
.planet-name { font-size: 13px; font-weight: 400; letter-spacing: 1.6px; overflow-wrap: anywhere; max-width: 100%; }
.planet-status { color: #83a3af; font-size: 10px; letter-spacing: 1px; margin-top: -15px; text-transform: uppercase; }
.planet:hover .orb, .planet:focus-visible .orb { scale: 1.09; filter: brightness(1.3); }
.primary { --orb: 174px; top: 46%; }
.primary .planet-name { color: color-mix(in srgb, var(--color) 60%, #fff); }
.planet-item:nth-child(2n) .orb { animation-delay: -2.3s; }
.planet-item:nth-child(3n) .orb { animation-delay: -4.1s; }
.planet-item:nth-child(5n) .orb { animation-delay: -5.6s; }
.orbit-controls { display: none; }

/* 9 à 12 sphères : planètes plus petites pour garder l'orbite lisible. */
.space.crowded .planet-item { --orb: 96px; }
.space.crowded .primary { --orb: 150px; }
.space.crowded .planet-item { width: 170px; }
.space.crowded .planet { gap: 16px; }
.space.crowded .planet-status { margin-top: -9px; }

/* Constellation (au-delà de 12 sphères) : flux libre, aucune position calculée. */
.space.dense { height: auto; }
.space.dense .orbit-ring { display: none; }
.space.dense .planets { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 10px; padding: 20px 0 40px; }
.space.dense .planet-item { position: static; transform: none; width: 190px; }
.space.dense .planet-item:nth-child(even) { margin-top: 46px; }
.space.dense .planet-item { --orb: 104px; }
.space.dense .primary { --orb: 140px; }

/* Entrée dans une planète : zoom doux puis navigation serveur normale (JS). */
.warp-veil { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 15;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--color) 30%, transparent), #060d15 70%); transition: opacity .55s ease .15s; }
.warping .warp-veil { opacity: 1; }
.warping .intro, .warping .hint, .warping .orbit-ring, .warping .orbit-controls { opacity: 0; transition: opacity .35s; }
.warping .planet-item:not(.is-entering) { opacity: 0; transition: opacity .4s; }
.planet-item.is-entering { z-index: 10; }
.planet-item.is-entering .orb { animation: none; scale: 3.4; filter: brightness(1.7); transition: scale .7s cubic-bezier(.6, 0, .3, 1), filter .7s; }
.planet-item.is-entering .planet-name, .planet-item.is-entering .planet-status { opacity: 0; transition: opacity .2s; }

/* ---------- Pages de parcours ---------- */
.intro { text-align: center; }
.intro .subtitle { margin: 0 auto; }
.view { animation: enter .65s ease both; }
.crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; list-style: none; margin: 0 0 10px; padding: 0; color: #7f9daa; font-size: 12px; }
.crumb li + li::before { content: "/"; margin-right: 14px; color: #3d5966; }
.crumb a { color: #a9c4cd; text-decoration: none; padding: 8px 0; display: inline-block; }
.crumb a:hover { color: #fff; }
.crumb [aria-current] { color: var(--soft); overflow-wrap: anywhere; }

.sphere-view { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; min-height: 62vh; gap: 7vw; max-width: 1000px; margin: auto; }
.hero-orb { display: grid; place-items: center; min-height: 380px; }
.hero-orb .orb { --size: 290px; animation: arrive 1s cubic-bezier(.2, .7, .2, 1) both, float 7s ease-in-out 1s infinite; }
.sphere-body h1 { margin-bottom: 18px; }

.portals { list-style: none; margin: 8px 0 26px; padding: 0; }
.portal { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 24px 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; text-align: left; font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.portal small { display: block; font-size: 10px; letter-spacing: 2px; color: #80a0ac; margin-bottom: 8px; text-transform: uppercase; }
.portal .arrow { color: var(--cyan); font-size: 13px; letter-spacing: 1px; white-space: nowrap; flex-shrink: 0; }
.portal:hover, .portal:focus-visible { color: var(--cyan); }
.portal.done > span:first-child { color: var(--soft); }
.portals-quiet .portal { font-size: 16px; padding: 16px 0; color: var(--soft); }

.action { display: inline-flex; align-items: center; gap: 10px; background: #9df4e9; color: #062626; border: 1px solid #bdfff4; border-radius: 5px;
  padding: 16px 26px; font-size: 13px; text-decoration: none; box-shadow: 0 0 30px #7be5da22; margin-top: 22px; }
.action:hover { background: #c9fff6; }
.action .icon { width: 16px; height: 16px; }
.action-quiet { background: transparent; color: var(--cyan); border-color: #75d6db66; box-shadow: none; }
.action-quiet:hover { background: #10252c; }
.secondary { display: block; background: none; border: 0; color: #83a8b5; font-size: 12px; margin: 22px auto 0; padding: 10px; text-decoration: underline; text-underline-offset: 4px; }
.secondary-links { display: flex; flex-wrap: wrap; justify-content: inherit; align-items: center; gap: 8px 22px; margin-top: 30px; font-size: 12px; }
.secondary-links a, .secondary-links .text-button { color: #83a8b5; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; min-height: 36px; }
.secondary-links a:hover, .secondary-links .text-button:hover { color: #fff; }
.secondary-links .icon { width: 15px; height: 15px; }
.secondary-links form { margin: 0; }
.secondary-links .danger { color: #c79a87; }
.back { display: inline-block; color: #809ca9; font-size: 12px; margin-top: 26px; padding: 10px 0; text-decoration: none; }
.back:hover { color: #fff; }

.quest-view { max-width: 900px; margin: 30px auto 0; text-align: center; }
.quest-view .secondary-links { justify-content: center; }
.progress-block { max-width: 420px; margin: 26px auto 10px; }
.percent { margin: 0; color: var(--color); font-weight: 200; letter-spacing: -2px; line-height: 1; }
.percent strong { font-size: clamp(56px, 7vw, 84px); font-weight: 200; }
.percent span { font-size: 26px; }
.progress-block .subtitle { margin: 8px auto 14px; }
progress { display: block; width: 100%; height: 4px; border: 0; border-radius: 10px; background: #18323d; appearance: none; -webkit-appearance: none; overflow: hidden; }
progress::-webkit-progress-bar { background: #18323d; border-radius: 10px; }
progress::-webkit-progress-value { background: var(--color); border-radius: 10px; box-shadow: 0 0 12px var(--color); }
progress::-moz-progress-bar { background: var(--color); border-radius: 10px; }

details.more { max-width: 560px; margin: 18px auto; text-align: left; }
details.more summary { cursor: pointer; text-align: center; color: #83a8b5; font-size: 12px; padding: 10px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " +"; }
details.more[open] summary::after { content: " −"; }
details.more summary:hover { color: #fff; }
.detail { background: var(--panel-2); border: 1px solid #5fa3b433; border-radius: 12px; margin: 10px 0; padding: 20px 24px; line-height: 1.7; color: #adc5cc; font-size: 14px; }
.detail dt { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #7f9daa; margin-top: 12px; }
.detail dt:first-child { margin-top: 0; }
.detail dd { margin: 2px 0 0; overflow-wrap: anywhere; }

.path { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 46px 70px; position: relative; margin: 56px 0 30px; padding: 0; }
.path::before { content: ""; position: absolute; top: 43px; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--color) 55%, transparent), #74e7dc11); }
.path li { flex: 0 1 220px; position: relative; }
.node { display: block; color: var(--ink); text-decoration: none; padding: 0 6px; border-radius: 16px; }
.node-icon { display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 20px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--color) 40%, transparent);
  box-shadow: 0 0 45px #43cbd91a; background: radial-gradient(circle, #153f4b, #06121f); color: #a6fff6; font-size: 24px; font-weight: 200; }
.node:hover .node-icon, .node:focus-visible .node-icon { box-shadow: 0 0 45px color-mix(in srgb, var(--color) 40%, transparent); }
.node.validated .node-icon { background: radial-gradient(circle, color-mix(in srgb, var(--color) 45%, #06121f), #06121f 75%); border-color: var(--color); color: #fff; }
.node small { display: block; font-size: 10px; letter-spacing: 2px; color: #77939d; text-transform: uppercase; }
.node-title { display: block; font-size: 17px; line-height: 1.5; margin-top: 8px; overflow-wrap: anywhere; }

.focus { max-width: 680px; margin: 6vh auto 0; text-align: center; }
.focus .secondary-links { justify-content: center; }
.focus .portals { text-align: left; margin-top: 30px; }
.focus h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.15; margin: 26px 0 20px; }
.focus .subtitle { margin-left: auto; margin-right: auto; }
.badge { border: 1px solid color-mix(in srgb, var(--color) 30%, transparent); border-radius: 40px; display: inline-block; padding: 10px 17px; color: color-mix(in srgb, var(--color) 70%, #fff); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.completion { font-size: 54px; color: var(--color); margin: 10px 0 18px; text-shadow: 0 0 30px var(--color); }
.validation { margin: 26px auto 0; }
.validation form { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.validated-note { display: inline-flex; gap: 8px; align-items: center; color: var(--ok); margin: 0; }
.narrow { max-width: 640px; margin: 0 auto; }

.week-group { max-width: 760px; margin: 0 auto 50px; }
.week-group h2 { margin-top: 8px; }
.week-group h2 a { color: var(--ink); text-decoration: none; }
.week-group h2 a:hover { color: var(--cyan); }
.week-group .portal { font-size: 18px; padding: 18px 0; }

/* ---------- Boutons et formulaires (gestion) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 11px 20px; border-radius: 5px; text-decoration: none; font-size: 14px; }
.btn-primary { background: #9df4e9; color: #062626; border: 1px solid #bdfff4; box-shadow: 0 0 24px #7be5da22; }
.btn-primary:hover { background: #c9fff6; }
.btn-secondary { border: 1px solid #75d6db45; background: #10252c; color: var(--ink); }
.btn-secondary:hover { border-color: var(--cyan); }
.btn-ghost { background: transparent; color: var(--soft); border: 1px solid transparent; }
.text-button { background: transparent; color: var(--cyan); border: 0; padding: 6px 0; min-height: 34px; text-decoration: underline; text-underline-offset: 4px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.text-button .icon { width: 15px; height: 15px; }
.text-button.danger { color: var(--danger-ink); }
button:disabled { opacity: .45; cursor: default; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.inline form { margin: 0; }

.messages { margin: 0 auto 22px; padding: 0; list-style: none; max-width: 760px; text-align: center; }
.msg-success { color: var(--ok); padding: 10px 16px; font-size: 13px; border: 1px solid #a0f2d033; border-radius: 30px; display: inline-block; }
.msg-error, .error { color: var(--danger-ink); background: var(--danger-bg); padding: 12px 16px; border-left: 3px solid var(--gold); margin: 12px 0; font-size: 14px; border-radius: 4px; text-align: left; }
.errorlist { list-style: none; margin: 6px 0; padding: 0; color: var(--danger-ink); font-size: 13px; }

.quest, .panel { position: relative; padding: 28px; background: #0b1a24cc; border: 1px solid #5fa3b433; border-radius: 14px; }
.quest-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.quest-list { display: grid; gap: 26px; }
.road-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--cyan); font-size: 12px; margin: 14px 0; }
.road-line span { border: 1px solid var(--line); padding: 5px 10px; border-radius: 30px; overflow-wrap: anywhere; }
.badge-draft { color: var(--gold) !important; border-color: #6a5130 !important; }
.row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.progress-meta { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; color: var(--soft); }
.quest progress, .panel progress { margin: 10px 0 14px; }
details summary { cursor: pointer; padding: 8px 0; font-size: 13px; color: var(--cyan); }
.empty { padding: 50px 24px; border: 1px dashed #5fa3b444; border-radius: 14px; text-align: center; max-width: 760px; margin: 0 auto; }
.empty .icon { width: 40px; height: 40px; color: var(--cyan); margin-bottom: 10px; }
.draft-list { margin: 0 0 26px; }
.draft-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border: 1px dashed #6a5130; border-radius: 10px; margin-bottom: 10px; flex-wrap: wrap; }

.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; overflow-wrap: anywhere; cursor: pointer; flex: 1; min-width: 0; }
.check-row input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--cyan); margin-top: 2px; }
.toggle-form { display: flex; align-items: flex-start; gap: 10px; margin: 0; flex-wrap: wrap; }
.js .toggle-submit { display: none; }
.completed strong { text-decoration: line-through; color: var(--soft); }
.item-actions { display: flex; gap: 16px; flex-wrap: wrap; padding-left: 30px; }
.item-actions form { margin: 0; }
.mission { padding: 10px 0 10px 14px; border-left: 1px solid var(--line); margin: 6px 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 30px; padding: 0; list-style: none; }
.steps li { border-top: 2px solid #18323d; padding-top: 10px; font-size: 12px; color: var(--soft); }
.steps li a { color: inherit; text-decoration: none; }
.steps li.done { border-color: #2a6b78; }
.steps li.current { border-color: var(--cyan); color: var(--cyan); }
.steps b { display: inline-grid; place-items: center; border: 1px solid currentColor; width: 24px; height: 24px; border-radius: 50%; margin-right: 6px; font-weight: 400; }
.sphere-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.sphere { display: flex; gap: 14px; align-items: center; background: #0b1a24cc; color: var(--ink); border: 1px solid #5fa3b433; padding: 18px; text-align: left; min-width: 0; border-radius: 12px; width: 100%; }
.sphere .icon { width: 24px; height: 24px; color: var(--cyan); }
.sphere span { overflow-wrap: anywhere; }
button.sphere:hover { border-color: var(--cyan); }
.sphere[aria-pressed="true"] { border-color: var(--cyan); background: #12303d; box-shadow: inset 3px 0 var(--cyan); }
.sphere-card { flex-direction: column; align-items: stretch; }
.sphere-card .sphere-title { display: flex; gap: 12px; align-items: center; }
.draft-context { font-size: 12px; color: var(--soft); border-left: 2px solid var(--cyan); padding-left: 12px; margin-bottom: 18px; overflow-wrap: anywhere; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.form-actions .right { display: flex; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.entry { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.entry-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.entry p { margin: 4px 0; }
.number { flex-shrink: 0; border: 1px solid var(--line-strong); border-radius: 50%; width: 32px; height: 32px; display: grid; place-items: center; color: var(--cyan); font-size: 13px; }
.number .icon { width: 16px; height: 16px; }
.choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 10px 0 16px; padding: 0; list-style: none; }

.field { display: block; margin: 16px 0; color: var(--ink); font-size: 13px; }
.field small, .field .hint { display: block; color: var(--soft); margin: 3px 0 0; font-size: 12px; text-align: left; letter-spacing: 0; text-transform: none; }
input:not([type=checkbox]):not([type=radio]), textarea, select {
  display: block; width: 100%; min-width: 0; background: #0b1d27; color: var(--ink);
  border: 1px solid #52818b; border-radius: 5px; padding: 13px 14px; font: 16px/1.4 system-ui, sans-serif; margin-top: 8px;
}
textarea { resize: vertical; min-height: 80px; }
input::placeholder, textarea::placeholder { color: #8198a4; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; }
.inline-form input, .inline-form select { margin: 0; }
fieldset { border: 1px solid #5fa3b433; border-radius: 12px; padding: 16px 20px; margin: 18px 0; }
legend { padding: 0 8px; color: var(--cyan); font-size: 13px; }
.status-off { display: inline-flex; gap: 8px; align-items: center; color: var(--gold); border: 1px solid #6a5130; padding: 7px 12px; font-size: 13px; border-radius: 30px; }

/* ---------- Connexion / erreurs ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 50% 80%, #103b49 0, #060d15 65%); }
.login-card { width: min(420px, 100%); background: #0b1a24ee; border: 1px solid #5fa3b444; border-radius: 14px; padding: 32px; position: relative; }
.login-card .brand { display: block; margin-bottom: 6px; }

.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }

/* ---------- Animations ---------- */
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes arrive { from { opacity: 0; scale: 1.45; filter: brightness(1.7) blur(2px); } to { opacity: 1; scale: 1; filter: none; } }

/* ---------- Écrans larges peu hauts ---------- */
@media (min-width: 701px) and (max-height: 800px) {
  .planet-item { --orb: 100px; }
  .primary { --orb: 140px; }
  .planet { gap: 14px; }
  .planet-status { margin-top: -7px; }
  .space { height: 700px; }
  .hero-orb .orb { --size: 240px; }
}

/* ---------- Tablette ---------- */
@media (max-width: 960px) {
  .tagline { display: none; }
  .orbit-ring::after { display: none; }
  .planet-item, .space.crowded .planet-item { width: 150px; }
  .planet { padding: 8px 4px; }
  .sphere-view { grid-template-columns: 1fr; gap: 10px; min-height: 0; }
  .hero-orb { min-height: 300px; }
  .hero-orb .orb { --size: 220px; }
}

/* ---------- Mobile : une sphère majeure à la fois (avec JS), toutes listées sans JS ---------- */
@media (max-width: 700px) {
  .topbar { padding: 18px 20px 10px; gap: 10px; flex-wrap: wrap; }
  .topbar-actions { margin-left: auto; }
  .brand { font-size: 15px; letter-spacing: 4px; }
  .shortcut { font-size: 11px; padding: 10px 13px; white-space: normal; }
  .topbar-actions { gap: 10px; }
  .quiet-link { font-size: 0 !important; }
  .quiet-link .icon { width: 18px; height: 18px; }
  .nav { padding: 0 16px 12px; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .main { padding: 24px 20px 40px; }
  h1 { font-size: 30px; }
  .focus h1 { font-size: 32px; }

  .space { height: auto; margin-top: 24px; }
  .orbit-ring { width: 92%; height: 60%; top: 50%; }
  html:not(.js) .orbit-ring { display: none; }
  .planets { display: grid; gap: 34px; justify-items: center; }
  .planet-item, .space.dense .planet-item { position: static; transform: none; width: 260px; margin: 0; }
  .space.dense .planet-item:nth-child(even) { margin-top: 0; }
  .planet .orb, .space.dense .orb, .space.crowded .orb { --size: 150px; }
  .space.crowded .planet-item { width: 260px; }
  .planet-name { font-size: 18px; }
  .planet-status { margin-top: -9px; }

  .js .space { min-height: 360px; display: grid; place-items: center; }
  .js .planet-item:not(.is-current) { display: none; }
  .js .planet-item.is-current .orb { --size: 210px; }
  .js .orbit-controls:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 34px; margin: 8px 0 10px; }
  .orbit-controls button { background: #10232e; border: 1px solid #335965; border-radius: 50%; width: 48px; height: 48px; color: #b0e9e5; font-size: 18px; }
  .orbit-status { font-size: 11px; letter-spacing: 2px; color: #7f9daa; min-width: 4em; text-align: center; }
  .hint { font-size: 9px; line-height: 1.8; }

  .hero-orb { min-height: 250px; overflow-x: clip; }
  .hero-orb .orb { --size: 180px; }
  .portal { font-size: 19px; }
  .path { flex-direction: column; align-items: center; gap: 34px; margin: 40px 0; }
  .path::before { top: 40px; bottom: 40px; left: 50%; right: auto; width: 1px; height: auto; background: linear-gradient(color-mix(in srgb, var(--color) 50%, transparent), transparent); }
  .path li { flex: none; width: 100%; max-width: 300px; }
  .node-icon { width: 72px; height: 72px; position: relative; }
  .node-title { font-size: 16px; }
  .focus { margin-top: 3vh; }

  .sphere-grid, .two-col, .choice-list { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .quest, .panel { padding: 18px; }
  .quest-head { display: block; }
  .quest-head .inline { margin-top: 10px; }
  .item-actions { padding-left: 0; }
  .steps { gap: 5px; }
  .steps b { display: grid; margin-bottom: 6px; }
  .steps li { font-size: 11px; }
}

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

/* ---------- Positions d'orbite (générées) : centres d'orbes sur une ellipse centrée à 47.1 %, rx 40.0 %, ry 35.1 % de la hauteur.
   Nombre pair : départ symétrique, aucune planète à l'aplomb de la planète centrale (son nom long dessous).
   Nombre impair : une planète en haut, assez haute pour que son nom passe au-dessus de la planète centrale.
   Valeurs de base associées : .space 820px, .primary top 46.0 %, .orbit-ring top 47.1 % / hauteur 70.2 %. */
.ring-1-0 { left: 50.0%; top: 12.0%; }
.ring-2-0 { left: 90.0%; top: 47.1%; } .ring-2-1 { left: 10.0%; top: 47.1%; }
.ring-3-0 { left: 50.0%; top: 12.0%; } .ring-3-1 { left: 84.6%; top: 64.7%; } .ring-3-2 { left: 15.4%; top: 64.7%; }
.ring-4-0 { left: 78.3%; top: 22.3%; } .ring-4-1 { left: 78.3%; top: 71.9%; } .ring-4-2 { left: 21.7%; top: 71.9%; } .ring-4-3 { left: 21.7%; top: 22.3%; }
.ring-5-0 { left: 50.0%; top: 12.0%; } .ring-5-1 { left: 88.0%; top: 36.3%; } .ring-5-2 { left: 73.5%; top: 75.5%; } .ring-5-3 { left: 26.5%; top: 75.5%; } .ring-5-4 { left: 12.0%; top: 36.3%; }
.ring-6-0 { left: 70.0%; top: 16.7%; } .ring-6-1 { left: 90.0%; top: 47.1%; } .ring-6-2 { left: 70.0%; top: 77.5%; } .ring-6-3 { left: 30.0%; top: 77.5%; } .ring-6-4 { left: 10.0%; top: 47.1%; } .ring-6-5 { left: 30.0%; top: 16.7%; }
.ring-7-0 { left: 50.0%; top: 12.0%; } .ring-7-1 { left: 81.3%; top: 25.2%; } .ring-7-2 { left: 89.0%; top: 54.9%; } .ring-7-3 { left: 67.4%; top: 78.7%; } .ring-7-4 { left: 32.6%; top: 78.7%; } .ring-7-5 { left: 11.0%; top: 54.9%; } .ring-7-6 { left: 18.7%; top: 25.2%; }
.ring-8-0 { left: 65.3%; top: 14.7%; } .ring-8-1 { left: 87.0%; top: 33.7%; } .ring-8-2 { left: 87.0%; top: 60.5%; } .ring-8-3 { left: 65.3%; top: 79.5%; } .ring-8-4 { left: 34.7%; top: 79.5%; } .ring-8-5 { left: 13.0%; top: 60.5%; } .ring-8-6 { left: 13.0%; top: 33.7%; } .ring-8-7 { left: 34.7%; top: 14.7%; }
.ring-9-0 { left: 50.0%; top: 12.0%; } .ring-9-1 { left: 75.7%; top: 20.2%; } .ring-9-2 { left: 89.4%; top: 41.0%; } .ring-9-3 { left: 84.6%; top: 64.7%; } .ring-9-4 { left: 63.7%; top: 80.1%; } .ring-9-5 { left: 36.3%; top: 80.1%; } .ring-9-6 { left: 15.4%; top: 64.7%; } .ring-9-7 { left: 10.6%; top: 41.0%; } .ring-9-8 { left: 24.3%; top: 20.2%; }
.ring-10-0 { left: 62.4%; top: 13.7%; } .ring-10-1 { left: 82.4%; top: 26.5%; } .ring-10-2 { left: 90.0%; top: 47.1%; } .ring-10-3 { left: 82.4%; top: 67.7%; } .ring-10-4 { left: 62.4%; top: 80.5%; } .ring-10-5 { left: 37.6%; top: 80.5%; } .ring-10-6 { left: 17.6%; top: 67.7%; } .ring-10-7 { left: 10.0%; top: 47.1%; } .ring-10-8 { left: 17.6%; top: 26.5%; } .ring-10-9 { left: 37.6%; top: 13.7%; }
.ring-11-0 { left: 50.0%; top: 12.0%; } .ring-11-1 { left: 71.6%; top: 17.6%; } .ring-11-2 { left: 86.4%; top: 32.5%; } .ring-11-3 { left: 89.6%; top: 52.1%; } .ring-11-4 { left: 80.2%; top: 70.1%; } .ring-11-5 { left: 61.3%; top: 80.8%; } .ring-11-6 { left: 38.7%; top: 80.8%; } .ring-11-7 { left: 19.8%; top: 70.1%; } .ring-11-8 { left: 10.4%; top: 52.1%; } .ring-11-9 { left: 13.6%; top: 32.5%; } .ring-11-10 { left: 28.4%; top: 17.6%; }

/* =====================================================================
   HORIZON-SOLAR — système solaire de quête, atterrissage, quêtes liées
   (d'après la maquette validée « horizon-solar » ; positions posées par solar.js via CSSOM).
   ===================================================================== */
.ph-0 { --color: #79eee7; } .ph-1 { --color: #92bcf7; } .ph-2 { --color: #b3acef; }
.ph-3 { --color: #cf9bd4; } .ph-4 { --color: #ecd09a; } .ph-5 { --color: #9ce0bf; }

.btn-gold { background: #ffcf8f; color: #2a1600; border: 1px solid #ffe2b8; box-shadow: 0 0 26px #ffb65c33; }
.btn-gold:hover { background: #ffe2b8; }
.btn-quiet { background: transparent; color: var(--cyan); border: 1px solid #75d6db55; }
.btn-quiet:hover { background: #10252c; }
.btn:disabled, .action:disabled { background: #18262d; color: #7d939c; border: 1px dashed #4d6772; box-shadow: none; cursor: not-allowed; opacity: 1; }
.motion-toggle[hidden] { display: none !important; }
.motion-toggle .icon { width: 14px; height: 14px; }
.motion-toggle[aria-pressed="true"] { color: var(--gold) !important; }

/* ---------- Sphère : portail de quête ---------- */
.quest-portal { justify-content: flex-start; }
.quest-portal .qp-text { flex: 1; min-width: 0; }
.quest-portal .arrow .icon { color: var(--gold); }
.mini-system { width: 72px; height: 72px; flex-shrink: 0; transition: filter .4s; }
.quest-portal:hover .mini-system, .quest-portal:focus-visible .mini-system { filter: brightness(1.35); }
.quest-portal.is-locked .mini-system { filter: grayscale(.7) brightness(.7); }
details.discreet { margin: 0 0 18px; }
details.discreet summary { color: #83a8b5; font-size: 12px; padding: 10px 0; list-style: none; }
details.discreet summary::-webkit-details-marker { display: none; }
details.discreet summary::after { content: " +"; color: var(--dim); }
details.discreet[open] summary::after { content: " −"; }

/* ---------- Verrou ---------- */
.lock-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 760px; margin: 18px auto 0; padding: 14px 18px;
  border: 1px solid #ffb65c66; background: #1d160c; border-radius: 12px; text-align: left; }
.lock-chip { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid #ffb65c88; color: #ffcf8f;
  background: radial-gradient(circle, #1a1630, #070b14 70%); box-shadow: 0 0 20px #ffb65c22; }
.lock-chip.open { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 24px #a0f2d044; }
.lock-banner-text { flex: 1; min-width: 200px; }
.lock-banner-text strong { display: block; font-weight: 400; color: #ffe2b8; }
.lock-banner-text .small { display: block; color: #e3cfae; }
.lock-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #ffd9a4; font-size: 13px; }
.lock-line .icon { width: 15px; height: 15px; }

/* ---------- Quête : système solaire ---------- */
.solar-view { max-width: 1180px; margin: 10px auto 0; text-align: center; }
.solar-head { max-width: 760px; margin: 0 auto; }
.solar-head h1 { margin-bottom: 8px; }
.solar-head .subtitle { margin: 0 auto; }
.stage { position: relative; margin: 18px auto 0; }
.system { position: relative; width: 100%; }
.stage.is-locked .system { filter: saturate(.55); }
.solar-path { list-style: none; margin: 0; padding: 0; }
.solar-empty { margin: 20px auto; }

/* Sans JS (ou avant construction) : soleil puis chemin vertical de jalons. */
.stage:not(.is-built) .sun { position: relative; width: 150px; margin: 10px auto 30px; }
.stage:not(.is-built) .solar-path { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.stage:not(.is-built) .jalon { display: flex; align-items: center; gap: 18px; width: min(460px, 100%); text-align: left; }
.stage:not(.is-built) .jalon .orb { --size: 64px; flex-shrink: 0; }
.stage:not(.is-built) .jlabel { position: static; width: auto; opacity: 1; }

.system-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orbit { fill: none; stroke: #92e9f4; stroke-opacity: .08; stroke-width: 1; }
.orbit.outer { stroke-dasharray: 3 9; stroke-opacity: .12; }
.orbit.lit { stroke: var(--ok); stroke-opacity: .2; }
.trail { fill: none; stroke: #8fe6f0; stroke-opacity: .34; stroke-width: 1.6; stroke-dasharray: 1 9; stroke-linecap: round; }
.lit-path { fill: none; stroke: url(#litGrad); stroke-width: 3.2; stroke-linecap: round; filter: url(#glow); }
.flow { fill: none; stroke: #fff; stroke-opacity: .85; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 2 30; animation: flow 3.5s linear infinite; opacity: 0; }
.flow.on { opacity: 1; }
.sun-ring-bg { fill: none; stroke: #ffb65c22; stroke-width: 3; }
.sun-ring { fill: none; stroke: var(--gold); stroke-width: 3.5; stroke-linecap: round; filter: url(#glow); }
.start-mark { fill: #06121c; stroke: var(--cyan); stroke-width: 1.5; }
.start-label { position: absolute; transform: translate(-50%, 0); font-size: 10px; letter-spacing: 2px; color: #80a6b2; text-transform: uppercase; white-space: nowrap; pointer-events: none; }
.ship { pointer-events: none; }
.ship-hull { fill: #dffcff; stroke: #8cf5ef; stroke-width: 1; filter: drop-shadow(0 0 4px #8cf5ef); }
.ship-trail { stroke: #8cf5ef; stroke-opacity: .45; stroke-width: 2; stroke-linecap: round; }
.ship-engine { fill: #ffcf8f; animation: engine 1.2s ease-in-out infinite; }

.sun { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center; --p: 0; }
.stage:not(.is-built) .sun { transform: none; }
.sun::before { content: ""; position: absolute; inset: -95%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) calc(20% + var(--p) * 30%), transparent) 0, #ffb65c10 38%, transparent 66%); animation: breathe 6s ease-in-out infinite; }
.sun::after { content: ""; position: absolute; inset: -34%; border-radius: 50%; pointer-events: none; opacity: calc(.35 + var(--p) * .5);
  background: repeating-conic-gradient(from 0deg, #ffd59a33 0 2deg, transparent 2deg 11deg);
  -webkit-mask-image: radial-gradient(circle, transparent 46%, #000 52%, transparent 72%); mask-image: radial-gradient(circle, transparent 46%, #000 52%, transparent 72%);
  animation: spin 90s linear infinite; }
.sun-core { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 31% 25%, #fff6e0b0, transparent 22%),
              radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--gold) calc(45% + var(--p) * 45%), #3a240a), #2a1906 46%, #090a0d 76%);
  box-shadow: inset 0 0 22px #ffe4b844, inset -14px -18px 34px #050403, 0 0 0 1px #ffc77a, 0 0 calc(30px + var(--p) * 40px) #ffb65c66, 0 0 calc(90px + var(--p) * 90px) #ffb65c2a;
  animation: arrive 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.sun-text { position: relative; z-index: 1; line-height: 1; text-shadow: 0 1px 12px #000c; pointer-events: none; }
.sun-text .eyebrow { display: block; color: #ffd9a4; font-size: 9px; letter-spacing: 2.5px; margin-bottom: .55em; }
.sun-pct { display: block; font-weight: 200; letter-spacing: -1px; color: #fff; font-size: clamp(22px, 3.4vw, 46px); }
.sun-pct b { font-weight: 200; }
.sun-pct span { font-size: .45em; margin-left: .08em; color: #ffe2b8; }
.portrait .sun-pct { font-size: 30px; }

.jalon { color: var(--ink); text-decoration: none; border-radius: 50%; }
.is-built .jalon { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; animation: pop .7s cubic-bezier(.2, .8, .2, 1.2) both; z-index: 2; }
.is-built .jalon .orb { --size: 100%; }
.jalon .orb { animation: float 7s ease-in-out infinite; }
.solar-item:nth-child(2n) .orb { animation-delay: -2.3s; }
.solar-item:nth-child(3n) .orb { animation-delay: -4.1s; }
.jalon-num { position: relative; z-index: 1; font-size: 18px; font-weight: 200; color: #eafffd; text-shadow: 0 0 10px var(--color); }
.jalon .check, .landing-head .check { width: 42%; height: 42%; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 6px var(--color)); position: relative; z-index: 1; }
.jalon:hover .orb, .jalon:focus-visible .orb { scale: 1.12; filter: brightness(1.3); }
.jalon:focus-visible { outline: none; }
.jalon:focus-visible .orb { outline: 2px solid #fff; outline-offset: 10px; }
.jalon.is-validated .orb { --color: var(--ok); filter: brightness(1.15); }
.is-built .jalon.is-next::after { content: ""; position: absolute; inset: -22%; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--color) 50%, transparent); animation: ping 3.2s ease-out infinite; pointer-events: none; }
.jlabel { display: block; text-align: left; }
.is-built .jlabel { position: absolute; width: var(--lw, 200px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .5s .3s; }
.is-built .jlabel.placed { opacity: 1; }
.is-built .jlabel.side-right { text-align: left; } .is-built .jlabel.side-left { text-align: right; }
.jlabel-meta { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #7f9faa; margin-bottom: 5px; }
.is-validated .jlabel-meta { color: var(--ok); }
.is-next .jlabel-meta { color: var(--cyan); }
.jlabel-title { display: block; font-size: 15px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.jlabel.compact .jlabel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jalon:hover .jlabel-title, .jalon:focus-visible .jlabel-title { color: var(--cyan); }
.jalon:focus-visible .jlabel-title { text-decoration: underline; text-underline-offset: 5px; }

.solar-foot { margin-top: 18px; }
.motivation { font-size: 17px; color: #d6f4f4; margin: 0; }
.motivation-sub { color: var(--dim); font-size: 12px; margin: 6px 0 0; }
.linked-strip { max-width: 560px; margin: 30px auto 0; text-align: left; }

/* Départ d'orbite vers un jalon */
.stage.leaving .system-svg, .stage.leaving .sun, .stage.leaving .start-label, .stage.leaving .jalon:not(.is-landing) { opacity: 0; transition: opacity .35s; }
.jalon.is-landing { z-index: 5; }
.jalon.is-landing .orb { animation: none; scale: 4.5; filter: brightness(1.7); transition: scale .55s cubic-bezier(.6, 0, .3, 1), filter .55s; }
.jalon.is-landing .jlabel { opacity: 0; transition: opacity .2s; }

/* ---------- Atterrissage ---------- */
.landing { max-width: 1180px; margin: 0 auto; }
.back-orbit { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border-radius: 30px; border: 1px solid #75d6db45; background: #0c1d26; color: #c3f6f2; font-size: 13px; text-decoration: none; }
.back-orbit:hover { border-color: var(--cyan); background: #10252c; }
.back-orbit .ring { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--cyan); box-shadow: inset 0 0 6px var(--cyan); }
.landing-head { display: flex; align-items: center; gap: 28px; max-width: 1000px; margin: 26px auto 0; }
.landing-head .orb { --size: 74px; flex-shrink: 0; }
.landing-head .jalon-num { font-size: 22px; }
.landing-head .eyebrow { color: color-mix(in srgb, var(--color) 70%, #fff); }
.landing-head h1 { margin: 4px 0 6px; font-size: clamp(28px, 3.4vw, 46px); }
.landing-head .subtitle { margin: 0; }
.scene { display: none; position: relative; width: 100%; max-width: 1180px; margin: 30px auto 0; border-radius: 26px; overflow: hidden; border: 1px solid #5fa3b42b;
  box-shadow: 0 30px 90px #0009, 0 0 80px color-mix(in srgb, var(--color) 8%, transparent); background: #030810; }
.js .scene { display: block; }
.scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.landing-in .scene { animation: descend .95s cubic-bezier(.2, .7, .2, 1) both; }
.landing-in .landing-head { animation: enter .8s ease .25s both; }
.star { fill: #cfefff; animation: twinkle 5s ease-in-out infinite; }
.ridge { fill: none; stroke-linejoin: round; }
.trail-core { fill: none; stroke: #fff; stroke-opacity: .7; stroke-width: 1.4; stroke-dasharray: 2 16; animation: flow 3.2s linear infinite; }
.beam { animation: beam 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.waypoint { position: absolute; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; color: var(--ink); }
.waypoint .core { position: absolute; inset: 13px; transform: rotate(45deg); border: 1.5px solid var(--color); background: #061620; box-shadow: 0 0 14px var(--color), inset 0 0 8px color-mix(in srgb, var(--color) 60%, transparent); }
.waypoint::before { content: ""; position: absolute; left: 50%; bottom: 50%; width: 2px; height: 70px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--color) 80%, transparent), transparent); }
.waypoint::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--color) 60%, transparent); transform: scaleY(.45); animation: ping 3s ease-out infinite; pointer-events: none; }
.waypoint.done .core { background: var(--ok); border-color: #fff; box-shadow: 0 0 20px var(--ok); }
.waypoint:hover .core { scale: 1.25; }
.wp-label { position: absolute; top: 50%; transform: translateY(-50%); width: var(--lw, 240px); text-align: left; pointer-events: none; text-shadow: 0 2px 10px #000, 0 0 2px #000; text-decoration: none; }
.wp-label.left { right: calc(100% + 10px); text-align: right; }
.wp-label.right { left: calc(100% + 10px); }
.wp-label.is-hidden { visibility: hidden; }
.wp-meta { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: color-mix(in srgb, var(--color) 75%, #fff); margin-bottom: 4px; }
.done .wp-meta { color: var(--ok); }
.wp-title { display: block; font-size: 15px; line-height: 1.4; color: #f1fdff; overflow-wrap: anywhere; }
.waypoint:hover .wp-title { text-decoration: underline; text-underline-offset: 4px; }
.beacon-label { position: absolute; transform: translate(-50%, -100%); width: 220px; text-align: center; pointer-events: none; text-shadow: 0 2px 10px #000; }
.beacon-label .wp-meta { color: #ffd9a4; }
.beacon-label.ok .wp-meta { color: var(--ok); }

.land-body { max-width: 720px; margin: 46px auto 0; text-align: left; }
.bar-block { margin: 0; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.bar-label { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: #9fc1cc; }
.bar-value { font-size: 22px; font-weight: 300; color: #fff; font-variant-numeric: tabular-nums; }
.bar-value small { font-size: 13px; color: var(--soft); margin-left: 8px; }
progress.bar { height: 10px; margin-top: 12px; border-radius: 10px; }
progress.bar::-webkit-progress-value { background: linear-gradient(90deg, color-mix(in srgb, var(--color) 70%, #0b2a33), var(--ok)); box-shadow: 0 0 14px var(--ok); }
progress.bar::-moz-progress-bar { background: linear-gradient(90deg, color-mix(in srgb, var(--color) 70%, #0b2a33), var(--ok)); }
progress.bar.prereq::-webkit-progress-value { background: linear-gradient(90deg, #8a6cd8, #c6b3f2); box-shadow: 0 0 14px #b3acef; }
progress.bar.prereq::-moz-progress-bar { background: linear-gradient(90deg, #8a6cd8, #c6b3f2); }
.prereq-block .bar-label { color: #d8ccff; }
.bar-note { color: var(--dim); font-size: 12px; margin: 10px 0 0; }
.quest-line { margin: 26px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.quest-line b { color: var(--gold); font-weight: 400; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); margin: 18px 0 0; }
.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: #3d5966; }
.status-line.ok { color: var(--ok); } .status-line.ok .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.land-section { margin-top: 54px; }
.land-section > h2 { font-size: 22px; margin: 0 0 6px; }
.land-section > h2.section-label { font-size: 10px; letter-spacing: 3px; }
.steps-list { list-style: none; margin: 18px 0 0; padding: 0; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step-dot { width: 34px; height: 34px; transform: rotate(45deg) scale(.8); border: 1.5px solid var(--color); display: grid; place-items: center; margin-top: 4px; }
.step-dot span { transform: rotate(-45deg); font-size: 14px; }
.step.done .step-dot { background: var(--ok); border-color: #fff; color: #052; }
.step small { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #80a0ac; margin-bottom: 4px; }
.step.done small { color: var(--ok); }
.step strong { display: block; font-size: 19px; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.step-actions { grid-column: 2; display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.step-actions form { margin: 0; }
.step-actions .btn { min-height: 42px; padding: 9px 16px; font-size: 13px; }
.aside-note { color: var(--dim); font-size: 12px; margin: 14px 0 0; }
details.confirm > summary { list-style: none; cursor: pointer; display: inline-flex; color: #062626; }
details.confirm > summary::-webkit-details-marker { display: none; }
details.confirm[open] > summary { display: none; }
.confirm-box { border-top: 1px solid #ffb65c44; padding-top: 18px; }
.confirm-box p { margin: 0 0 16px; color: #f1d9b5; font-size: 14px; }
.start-reason { color: #ffd9a4; font-size: 13px; margin: 8px 0 0; }
.start-reason.ok { color: var(--ok); }
.row-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.land-foot { margin-top: 50px; text-align: center; }

details.freins { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.freins > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; font-size: 15px; color: #d6eef2; min-height: 44px; }
details.freins > summary::-webkit-details-marker { display: none; }
details.freins > summary::after { content: "+"; color: var(--cyan); font-size: 18px; }
details.freins[open] > summary::after { content: "−"; }
details.freins .has-note { font-size: 11px; color: var(--gold); letter-spacing: 1px; margin-left: auto; }
.freins-body { padding: 4px 0 24px; }
.freins label { display: block; font-size: 13px; color: var(--ink); margin: 18px 0 0; }
.freins label small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.guided { margin-top: 26px; }
.guided-head { display: inline-block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #c6b3f2; border: 1px solid #b3acef44; border-radius: 30px; padding: 6px 12px; margin: 0; }
.guided-help { color: var(--dim); font-size: 12px; margin: 10px 0 0; }
.saved-note { margin: 10px 0 0; }
.saved-note dt { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #7f9daa; margin-top: 16px; }
.saved-note dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #d6eef2; }

/* ---------- Conditions (quêtes liées) ---------- */
.inspect { max-width: 760px; margin: 4vh auto 0; }
.inspect-hero { display: flex; align-items: center; gap: 30px; }
.lnode-target { position: relative; flex-shrink: 0; }
.lnode-target .orb { --size: 110px; }
.lnode-target.locked .orb { filter: grayscale(.85) brightness(.55); }
.lnode-target .lock-chip { position: absolute; right: -6px; bottom: -6px; }
.inspect-hero h1 { margin: 4px 0 6px; }
.linkmap { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr); align-items: center; gap: 0 28px; margin: 40px 0 34px; }
.linkmap-conds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lm-cond { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px dashed #ffb65c66; border-radius: 30px; font-size: 13px; color: var(--soft); }
.lm-cond::after { content: ""; position: absolute; left: 100%; top: 50%; width: 28px; border-top: 2px dashed #8fe6f044; }
.lm-cond.met { border: 1px solid #c6b3f2; color: #efe9ff; box-shadow: 0 0 14px #b3acef33; }
.lm-cond.met::after { border-top: 2px solid #c6b3f2; }
.lm-dot { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 1px dashed #ffb65c99; color: var(--gold); font-size: 12px; }
.lm-cond.met .lm-dot { border: 0; background: var(--ok); color: #053; }
.lm-label { overflow-wrap: anywhere; min-width: 0; }
.lm-lock { position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; border: 1.5px solid #ffb65c88; color: #ffcf8f;
  background: radial-gradient(circle, #1a1630, #070b14 70%); box-shadow: 0 0 30px #ffb65c22; }
.lm-lock .icon { width: 30px; height: 30px; }
.lm-count { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); background: #0a1520; border: 1px solid #c6b3f266; color: #e3d9ff; border-radius: 20px; padding: 1px 9px; font-size: 11px; white-space: nowrap; }
.linkmap.is-open .lm-lock { border-color: var(--ok); color: var(--ok); box-shadow: 0 0 40px #a0f2d055; }
.lm-target { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 14px; }
.lm-target .orb { --size: 82px; }
.linkmap:not(.is-open) .lm-target .orb { filter: grayscale(.85) brightness(.55); }
.cond-list { list-style: none; margin: 18px 0 0; padding: 0; }
.cond { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cond-mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px dashed #ffb65c99; color: var(--gold); font-size: 13px; margin-top: 2px; }
.cond.met .cond-mark { border: 0; background: var(--ok); color: #053; box-shadow: 0 0 12px var(--ok); }
.cond-body { min-width: 0; }
.cond strong { display: block; font-weight: 400; font-size: 17px; overflow-wrap: anywhere; }
.cond strong a { color: var(--ink); }
.cond .state { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.cond.met .state { color: var(--ok); }
.cond p { margin: 2px 0 0; color: var(--soft); font-size: 13px; }
.cond-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 10px; }
.cond-actions form { margin: 0; }
.cond-form { margin: 0 0 22px; }
.cond-form .btn { margin-top: 4px; }
.start-block { margin-top: 44px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

@keyframes descend { from { opacity: 0; transform: translateY(-46px) scale(1.14); filter: blur(4px) brightness(1.7); } to { opacity: 1; transform: none; filter: none; } }
@keyframes twinkle { 50% { opacity: .25; } }
@keyframes beam { 50% { opacity: .55; } }
@keyframes pop { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes ping { 0% { opacity: .9; scale: .85; } 100% { opacity: 0; scale: 1.5; } }
@keyframes breathe { 50% { opacity: .75; scale: 1.05; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes flow { to { stroke-dashoffset: -64; } }
@keyframes engine { 50% { opacity: .35; } }

@media (max-width: 700px) {
  .solar-head h1 { font-size: 29px; }
  .landing-head { gap: 18px; margin-top: 18px; }
  .landing-head .orb { --size: 56px; }
  .landing-head h1 { font-size: 27px; }
  .scene { margin-top: 22px; border-radius: 18px; }
  .wp-title { font-size: 13px; }
  .land-body { margin-top: 34px; }
  .step strong { font-size: 17px; }
  .jlabel-title { font-size: 14px; }
  .inspect-hero { gap: 18px; }
  .lnode-target .orb { --size: 76px; }
  .linkmap { grid-template-columns: 1fr; justify-items: center; gap: 26px; }
  .linkmap-conds { width: 100%; }
  .lm-cond::after { left: 50%; top: 100%; width: 0; height: 12px; border-top: 0; border-left: 2px dashed #8fe6f044; }
  .mini-system { width: 56px; height: 56px; }
}

/* Pause des animations (bouton) et mouvement réduit : tout s'arrête immédiatement. */
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-built .jlabel { opacity: 1; }
}
