/* Kepler — ton de la page : le cyan électrique de la Matière étincelante, le violet de la matière noire,
   l'orange des Aïoniens, le vert des Exilés, le rose des roches de Kepler, l'ivoire des Neuf.
   Ambiance par section (data-mood sur <body> : aion, exile, spark, nine, earth, desert, voir js/rituals.js).
   Matière étincelante (body.is-spark) : voile cyan, pointeur en boule d'énergie, coffres visibles.
   Dossier de Lodi, système des Neuf, téléphone, message de III, plan. Le mini-jeu est dans css/games.css. */

.kepler {
  --spark: #7fe8ff;
  --spark-hi: #dcf9ff;
  --dm: #b48cff;
  --dm-hi: #e6dbff;
  --aion: #ff8a55;
  --aion-hi: #ffd8c2;
  --exile: #c9e36b;
  --exile-hi: #eef7c8;
  --rose: #f2a7b4;
  --vex: #ff6f6f;
  --nine: #ecdcae;
  --nine-hi: #fff6dc;
  --earth: #8fe3b4;
  --page-accent: var(--spark);
  --page-accent-hi: var(--spark-hi);
}
.kepler[data-mood="aion"] { --page-accent: var(--aion); --page-accent-hi: var(--aion-hi); }
.kepler[data-mood="exile"] { --page-accent: var(--exile); --page-accent-hi: var(--exile-hi); }
.kepler[data-mood="nine"] { --page-accent: var(--nine); --page-accent-hi: var(--nine-hi); }
.kepler[data-mood="earth"] { --page-accent: var(--earth); --page-accent-hi: #dcfbe8; }
.kepler[data-mood="desert"] { --page-accent: #e9e2d0; --page-accent-hi: #ffffff; }
.kepler .kicker, .kepler .tag { transition: color .6s; }
.kepler .kicker { color: var(--page-accent); }
.kepler .sec-head .tag, .kepler .quarter .tag, .kepler .duo .tag, .kepler .mission-step .tag { color: var(--page-accent); }
.kepler .regions li::before { background: var(--page-accent); }
.kepler .footer-crest, .kepler .brand svg { color: var(--spark); }
.kepler main { background: radial-gradient(ellipse 70% 14% at 82% 3%, rgba(127, 232, 255, .07), transparent 70%), radial-gradient(ellipse 55% 12% at 8% 30%, rgba(255, 138, 85, .05), transparent 70%); }
@media (min-width: 1021px) { .kepler .nav-menu a { padding: 8px 7px; letter-spacing: .08em; font-size: .7rem; white-space: nowrap; } }
@media (min-width: 1021px) and (max-width: 1440px) { .kepler .brand span { display: none; } }

/* ---------- Héros ---------- */
.kepler .hero-status { display: grid; grid-template-columns: auto auto; column-gap: 18px; row-gap: 0; }
.kepler .hero-status .status-label { grid-row: 1; }
.kepler .hero-status .status-value { grid-row: 2; }
.kepler .hero-content .actions { flex-wrap: wrap; }
.kepler .hero-content .d-btn svg { width: 16px; height: 16px; }
.kepler .hero-title { font-size: clamp(3rem, 8vw, 7rem); }
.kepler .hero-title span:last-child { margin-top: .12em; font-size: .3em; font-weight: 500; letter-spacing: .3em; color: var(--page-accent-hi); }
body.is-spark [data-etincelle-hud] { color: var(--spark); }

/* ---------- Petits éléments ---------- */
.tr { display: block; margin-top: 6px; font-family: var(--font-ui); font-style: normal; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.quarter-body .tr, .sec-sub .tr, .duo-body .tr, .duo-note .tr, .mission-step .tr, .life-step .tr, .voice-body .tr, .council-head .tr, .containment-body .tr { display: inline; margin: 0 0 0 6px; }
.words-note { margin: 14px 0 0; font-size: .76rem; font-style: italic; line-height: 1.55; color: var(--muted); }
.sub-title { margin: clamp(34px, 5vw, 54px) 0 16px; font-size: .8rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--page-accent-hi); }
.kepler .atlas-photo > a { position: absolute; inset: 0; }
.kepler .quarter-photo > a { display: block; height: 100%; }
.kepler .quarter-photo > a > img { width: 100%; height: 100%; object-fit: cover; }
.kepler .quarter { transition: box-shadow .4s, border-color .4s; }
.kepler .quarter:hover { border-color: color-mix(in srgb, var(--page-accent) 55%, transparent); box-shadow: 0 0 26px color-mix(in srgb, var(--page-accent) 14%, transparent); }
.kepler .words-note + .duo, .kepler .duo + .duo, .kepler .powers + .game, .kepler .duo + .powers, .kepler .emissaries + .duo, .kepler .duo + .council, .kepler .council + .duo,
.kepler .dossier + .sub-title, .kepler .life + .files, .kepler .files + .duo, .kepler .duo + .containment, .kepler .containment + .duo, .kepler .duo + .message, .kepler .message + .duo,
.kepler .duo + .raid-bosses, .kepler .words-note + .duo, .kepler .quarters + .duo { margin-top: clamp(30px, 4vw, 44px); }

/* ---------- Deux colonnes : une image et son texte ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); background: var(--panel-solid); border: 1px solid var(--line); }
.duo--flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.duo--flip .duo-photo { order: 2; }
.duo-photo { position: relative; min-height: 380px; margin: 0; overflow: hidden; }
.duo-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.duo .duo-photo > a { position: absolute; inset: 0; display: block; }
.duo-photo figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: rgba(6, 10, 22, .82); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.duo-body { padding: clamp(22px, 3vw, 36px); }
.duo-body h3 { margin: 4px 0 14px; font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--pearl); }
.duo-body > p:not(.tag) { margin: 0 0 14px; font-size: .95rem; line-height: 1.65; color: var(--muted); }
.duo-note { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.duo-actions { margin: 18px 0 0 !important; }
.duo-actions .d-btn svg { width: 16px; height: 16px; }
.kepler .d-btn:disabled { opacity: .5; cursor: default; }
.lore-lines { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.lore-lines li { padding-left: 12px; border-left: 2px solid var(--page-accent); }
.lore-lines q { quotes: '« ' ' »'; font-family: var(--font-lore); font-style: italic; font-size: 1.1rem; line-height: 1.4; color: #eef0f6; }
.lore-lines small { display: block; margin-top: 2px; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--page-accent-hi); }

/* L'Autel et ses capsules */
.altar-slots-wrap { margin-top: 16px; }
.altar-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.altar-slots li { position: relative; display: grid; justify-items: center; gap: 8px; padding: 12px 6px 10px; border: 1px dashed rgba(127, 232, 255, .3); text-align: center; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); transition: border-color .6s, color .6s, box-shadow .6s; }
.altar-slots li::before { content: ''; width: 18px; height: 26px; background: rgba(127, 232, 255, .12); clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%, 42% 50%); transition: background .6s; }
.altar-slots li.is-on { border: 1px solid var(--spark); color: var(--spark-hi); box-shadow: 0 0 18px rgba(127, 232, 255, .2); }
.altar-slots li.is-on::before { background: linear-gradient(180deg, #e8fbff, var(--spark)); }
.altar-count { margin: 10px 0 0 !important; font-size: .78rem !important; color: var(--muted); }
.altar-count b { color: var(--spark-hi); font-variant-numeric: tabular-nums; }

/* ---------- Esquisses ---------- */
.sketches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sketches--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sketch { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); }
.sketch > a { display: block; height: 100%; }
.sketch img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.sketch:hover img { transform: scale(1.04); }
.sketch figcaption { position: absolute; left: 0; bottom: 0; padding: 4px 10px; background: rgba(6, 10, 22, .85); font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Les pouvoirs ---------- */
.spark-sec { background: radial-gradient(ellipse 60% 26% at 20% 6%, rgba(127, 232, 255, .07), transparent 70%), radial-gradient(ellipse 50% 22% at 90% 60%, rgba(180, 140, 255, .06), transparent 70%); }
.powers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: clamp(30px, 4vw, 44px) 0 0; padding: 0; list-style: none; }
.power { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel-solid); }
.power figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.power figure > a { display: block; height: 100%; }
.power figure img { width: 100%; height: 100%; object-fit: cover; }
.power > div { position: relative; padding: 16px 18px 18px; }
.power-icon { position: absolute; top: -22px; right: 16px; border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.power h3 { margin: 4px 0 8px; font-size: 1.15rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.power p:not(.tag) { margin: 0; font-size: .86rem; line-height: 1.58; color: var(--muted); }
.kepler .spark-game { margin-top: clamp(30px, 4vw, 44px); }
.kepler .game { border-color: color-mix(in srgb, var(--page-accent) 30%, var(--line)); box-shadow: 0 0 40px color-mix(in srgb, var(--page-accent) 7%, transparent); }
.game-foot { margin: 10px 0 0; font-size: .72rem; font-style: italic; color: var(--muted); }
.game > .game-foot { margin: -8px 0 0; padding: 0 24px 18px; }

/* ---------- Le périple ---------- */
.mission-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.mission-steps--solo { grid-template-columns: minmax(0, 1fr); }
.mission-step { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel-solid); transition: border-color .3s, box-shadow .3s; }
.mission-step:hover { border-color: color-mix(in srgb, var(--page-accent) 60%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--page-accent) 16%, transparent); }
.mission-step figure { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; }
.mission-step figure > a { display: block; height: 100%; }
.mission-step figure img { width: 100%; height: 100%; object-fit: cover; }
.mission-step > div { padding: 14px 16px 18px; }
.mission-step h3 { margin: 4px 0 8px; font-size: 1.02rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--pearl); }
.mission-step p:not(.tag) { margin: 0; font-size: .86rem; line-height: 1.58; color: var(--muted); }
.mission-step--wide { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.mission-step--wide figure { aspect-ratio: auto; min-height: 260px; }
.mission-step--wide > div { align-self: center; padding: 22px 26px; }
.capsule-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.capsule-group .sub-title { margin-top: clamp(26px, 4vw, 40px); }
.mission-steps--list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mission-steps--list .mission-step { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.mission-steps--list figure { aspect-ratio: auto; min-height: 100%; }
.mission-steps--list .mission-step > div { padding: 10px 14px 12px; }
.mission-steps--list p:not(.tag) { font-size: .82rem; }
.side-quests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.side-quests li { padding: 8px 0 8px 14px; border-left: 2px solid color-mix(in srgb, var(--page-accent) 55%, transparent); font-size: .84rem; line-height: 1.55; color: var(--muted); }
.side-quests b { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--pearl); }

/* ---------- Les Émissaires ---------- */
.nine-sec { background: radial-gradient(ellipse 60% 22% at 70% 4%, rgba(236, 220, 174, .07), transparent 70%), radial-gradient(ellipse 50% 30% at 10% 70%, rgba(127, 232, 255, .04), transparent 70%); }
.emissaries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: em; }
.emissary { display: flex; flex-direction: column; border: 1px solid rgba(236, 220, 174, .22); background: var(--panel-solid); }
.emissary figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.emissary figure > a { display: block; height: 100%; }
.emissary figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.emissary > div { padding: 16px 18px 18px; }
.emissary h3 { margin: 4px 0 8px; font-family: var(--font-lore); font-size: 1.9rem; font-weight: 600; color: var(--pearl); }
.emissary p:not(.tag) { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.emissary .tr { display: inline; margin-left: 6px; }
.spot--gol { display: none; color: #e9f6ff; border-color: var(--spark); box-shadow: 0 0 14px rgba(127, 232, 255, .5); }
body.has-gol .spot--gol, .spot--gol.found { display: grid; }

/* Le vote des Neuf */
.council { border: 1px solid rgba(236, 220, 174, .35); background: radial-gradient(circle at 30% 50%, rgba(236, 220, 174, .07), transparent 60%), #0a0b12; }
.council-head { padding: clamp(18px, 3vw, 28px) clamp(18px, 3vw, 28px) 0; }
.council-head h3 { margin: 4px 0 10px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.council-head p:not(.tag) { max-width: 900px; margin: 0; font-size: .92rem; line-height: 1.65; color: var(--muted); }
.council-head b { color: var(--nine-hi); }
.council-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding: clamp(18px, 3vw, 28px); }
.orrery { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; margin: 0 auto; }
.orrery-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.orbit { fill: none; stroke: rgba(236, 220, 174, .22); stroke-width: .25; }
.orbit--dead { stroke: rgba(143, 227, 180, .35); stroke-dasharray: 1 1.4; }
.planet { position: absolute; left: var(--x); top: var(--y); display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--nine-hi); font: inherit; cursor: pointer; }
.planet-dot { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--c, #d9c58f) 55%, #3a3220); box-shadow: 0 0 12px var(--c, #d9c58f); transition: transform .3s, box-shadow .3s; }
.planet-num { position: absolute; top: 34px; font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-shadow: 0 1px 4px #000; }
.planet:hover .planet-dot, .planet:focus-visible .planet-dot { transform: scale(1.35); }
.planet.is-current .planet-dot { transform: scale(1.45); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25), 0 0 22px var(--c, #d9c58f); }
.planet.is-heard .planet-num { color: #fff; }
.planet.is-heard::after { content: ''; position: absolute; inset: 6px; border: 1px solid rgba(236, 220, 174, .6); border-radius: 50%; }
.planet--ix { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.planet--ix .planet-dot { width: 34px; height: 34px; --c: #ffd27a; }
.planet--ix .planet-num { top: 50px; }
.planet--i .planet-dot { --c: #c9b8a6; width: 10px; height: 10px; }
.planet--ii .planet-dot { --c: #f0c98a; }
.planet--iii .planet-dot { --c: #6fd3a0; }
.planet--iv .planet-dot { --c: #ff7a5c; width: 12px; height: 12px; }
.planet--v .planet-dot { --c: #e2b98f; width: 24px; height: 24px; }
.planet--vi .planet-dot { --c: #e8d39a; width: 20px; height: 20px; }
.planet--vii .planet-dot { --c: #9fe8f0; }
.planet--viii .planet-dot { --c: #6f8fff; }
.planet--dead .planet-dot { background: radial-gradient(circle at 35% 35%, #cfe9da, #3d6b52 60%, #0d1a13); box-shadow: 0 0 8px rgba(111, 211, 160, .5); }
.planet.is-locked .planet-dot { opacity: .35; box-shadow: none; }
.planet.is-locked .planet-num { color: var(--faint); }
.council-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.nine-panel { flex: 1; min-height: 220px; padding: 18px 20px; border: 1px solid rgba(236, 220, 174, .25); background: rgba(6, 8, 14, .8); }
.nine-panel .tag { margin: 0 0 10px; color: var(--nine) !important; }
.nine-note, .nine-empty { margin: 0 0 10px; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.nine-empty { font-family: var(--font-lore); font-style: italic; font-size: 1.4rem; color: var(--earth); }
.nine-say { margin: 0 0 12px; font-size: 1.12rem; line-height: 1.5; color: #fff7e2; animation: memory-in .9s var(--ease) both; }
.nine-say--pipes { font-family: var(--font-mono, monospace); letter-spacing: .02em; }
.nine-say--spaced { letter-spacing: .32em; font-weight: 700; }
.nine-say--caps { text-transform: uppercase; font-weight: 800; letter-spacing: .04em; }
.nine-say--dash, .nine-say--plus, .nine-say--equals { font-family: var(--font-lore); font-style: italic; font-size: 1.3rem; }
.nine-say--plain { font-family: var(--font-lore); font-size: 1.3rem; }
.nine-say--earth { font-family: var(--font-lore); font-style: italic; font-size: 1.5rem; color: #dcfbe8; }
.nine-vote { display: inline-block; margin: 0 0 14px; padding: 4px 10px; font-size: .64rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nine-vote--oui { border: 1px solid rgba(143, 227, 180, .6); color: var(--earth); }
.nine-vote--non { border: 1px solid rgba(255, 138, 138, .6); color: #ffb3b3; }
.nine-lore { margin: 0; padding: 12px 0 0; border-top: 1px solid rgba(236, 220, 174, .2); }
.nine-lore p { margin: 0 0 6px; font-family: var(--font-lore); font-style: italic; font-size: 1.04rem; line-height: 1.45; color: #e9e3d2; }
.nine-lore cite { font-style: normal; font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nine); }
.nine-tally { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nine-tally b { font-size: .95rem; font-variant-numeric: tabular-nums; }
.tally-yes b { color: var(--earth); }
.tally-no b { color: #ffb3b3; }
.tally-left b { color: var(--nine-hi); }
.council > .game-foot { padding: 0 clamp(18px, 3vw, 28px) 18px; margin: 0; }
@keyframes memory-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }

/* ---------- L'agent ---------- */
.agent-sec { background: linear-gradient(180deg, transparent, rgba(30, 24, 16, .35) 30%, transparent); }
.dossier { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); border: 1px solid rgba(232, 214, 170, .35); background: #f3ead6; color: #2b2418; }
.dossier-photo { position: relative; min-height: 320px; margin: 0; overflow: hidden; border-right: 1px solid rgba(43, 36, 24, .25); }
.dossier-photo > a { position: absolute; inset: 0; }
.dossier-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; filter: sepia(.35) contrast(1.05); }
.dossier-stamp { position: absolute; right: 14px; bottom: 18px; padding: 6px 12px; border: 3px solid #b3261e; color: #b3261e; font-family: var(--font-mono, monospace); font-size: .9rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-8deg); background: rgba(243, 234, 214, .75); }
.dossier-body { padding: clamp(18px, 3vw, 30px); font-family: var(--font-mono, monospace); }
.dossier-head { margin: 0 0 8px; font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7a6a4c; }
.dossier-body h3 { margin: 0 0 14px; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: .04em; color: #1d180f; }
.dossier-body h3 span { font-size: .6em; font-weight: 600; letter-spacing: .02em; color: #6b5c40; }
.dossier-fields { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: .84rem; line-height: 1.5; }
.dossier-fields dt { font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; color: #7a6a4c; padding-top: 2px; }
.dossier-fields dd { margin: 0; color: #2b2418; }
.dossier .spot { color: #2b2418; border-color: #2b2418; background: rgba(243, 234, 214, .9); }
.dossier .spot.found { background: #2b2418; color: #f3ead6; }

.life { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.life-step { position: relative; padding: 16px 18px 18px; border: 1px solid var(--line); border-top: 3px solid var(--aion); background: var(--panel-solid); }
.life-date { margin: 0 0 4px; font-family: var(--font-mono, monospace); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--aion); }
.life-step h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.life-step p:not(.life-date) { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.kepler p > .spot--inline { width: 26px; height: 26px; margin: 0 0 0 6px; vertical-align: -7px; }
.kepler p > .spot--inline svg, .kepler li > .spot--inline svg, .kepler dd > .spot--inline svg { width: 14px; height: 14px; }
.kepler li > .spot--inline, .kepler dd > .spot--inline { width: 26px; height: 26px; margin: 0 0 0 6px; vertical-align: -7px; }

.files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.memo { position: relative; padding: clamp(18px, 3vw, 26px); background: #efe6d0; color: #2b2418; font-family: var(--font-mono, monospace); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.memo::before { content: ''; position: absolute; top: 10px; right: 14px; width: 54px; height: 54px; border: 2px solid rgba(43, 36, 24, .18); border-radius: 50%; }
.memo-head { margin: 0 0 6px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7a6a4c; }
.memo h3 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #1d180f; }
.memo h3 span { font-size: .7em; font-weight: 600; color: #6b5c40; }
.memo-sub { margin: 0 0 12px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #b3261e; }
.memo-list { display: grid; gap: 8px; margin: 0 0 12px; padding-left: 22px; font-size: .8rem; line-height: 1.55; }
.memo-list b { letter-spacing: .06em; text-transform: uppercase; }
.memo-list--log { padding-left: 0; list-style: none; }
.memo-list--log b { display: inline-block; min-width: 70px; color: #7a6a4c; }
.memo-foot { margin: 0; padding-top: 10px; border-top: 1px dashed rgba(43, 36, 24, .3); font-size: .7rem; line-height: 1.5; color: #6b5c40; }
.memo--report { background: #e9e4d6; }
.redact { display: inline-block; background: #111; color: #111; letter-spacing: -.1em; user-select: none; }
.memo .spot { color: #2b2418; border-color: #2b2418; background: rgba(239, 230, 208, .95); }
.memo .spot.found { background: #2b2418; color: #efe6d0; }
.containment-body .memo-foot { margin-top: 12px; color: var(--faint); border-top-color: var(--line); }

/* Le téléphone */
.containment { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); border: 1px solid rgba(255, 210, 122, .3); background: #0b0a10; }
.containment-room { position: relative; display: grid; place-items: center; min-height: 300px; padding: 30px 20px; background: radial-gradient(circle at 50% 55%, rgba(255, 210, 122, .1), transparent 60%), repeating-linear-gradient(90deg, #121119 0 40px, #15141d 40px 80px); }
.containment-sign { position: absolute; top: 16px; left: 50%; margin: 0; padding: 4px 12px; transform: translateX(-50%); border: 1px solid #b3261e; color: #ff8a80; font-size: .6rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.phone { display: grid; justify-items: center; gap: 10px; padding: 18px; border: 0; background: none; color: #f6efe0; font: inherit; cursor: pointer; }
.phone svg { width: 150px; height: 75px; filter: drop-shadow(0 0 16px rgba(255, 210, 122, .35)); }
.phone-arc { fill: none; stroke: #f6efe0; stroke-width: 11; stroke-linecap: round; }
.phone-trim { fill: none; stroke: #c9a24a; stroke-width: 1.6; }
.phone-cup { fill: #f6efe0; stroke: #c9a24a; stroke-width: 2.5; }
.phone-label { font-size: .7rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #ffd27a; }
.phone.is-ringing svg { animation: ring 1.6s ease-in-out infinite; }
.phone.is-off { opacity: .6; cursor: default; }
.phone:not(.is-ringing) .phone-label { color: var(--faint); }
@keyframes ring { 0%, 40%, 100% { transform: rotate(0); } 5%, 15%, 25%, 35% { transform: rotate(-7deg) translateY(-3px); } 10%, 20%, 30% { transform: rotate(7deg) translateY(-3px); } }
.containment-body { padding: clamp(18px, 3vw, 28px); }
.containment-body h3 { margin: 4px 0 10px; font-size: 1.5rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.containment-body > p:not(.tag):not(.memo-foot) { margin: 0 0 12px; font-size: .92rem; line-height: 1.6; color: var(--muted); }
.call-text { display: grid; gap: 6px; min-height: 40px; }
.call-text p { margin: 0; font-family: var(--font-lore); font-style: italic; font-size: 1.08rem; line-height: 1.4; color: #f3ead6; }
.call-text p.is-new { animation: memory-in .9s var(--ease) both; }

/* ---------- La mort de la Terre ---------- */
.earth-sec { background: radial-gradient(ellipse 60% 24% at 50% 4%, rgba(143, 227, 180, .06), transparent 70%), linear-gradient(180deg, transparent, rgba(4, 10, 12, .5) 50%, transparent); }
.message { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); border: 1px solid rgba(127, 232, 255, .35); background: radial-gradient(circle at 100% 0%, rgba(127, 232, 255, .08), transparent 55%), #070b14; }
.message-photo { position: relative; min-height: 360px; margin: 0; overflow: hidden; }
.kepler .message-photo > a, .kepler .dossier-photo > a { position: absolute; inset: 0; display: block; }
.message-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.message-photo figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 12px; background: rgba(6, 10, 22, .82); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.message-body { padding: clamp(18px, 3vw, 30px); }
.message-body h3 { margin: 4px 0 10px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.message-body > p:not(.tag):not(.game-foot) { margin: 0 0 14px; font-size: .92rem; line-height: 1.6; color: var(--muted); }
.msg-lines { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.msg-line q { quotes: '« ' ' »'; display: block; font-family: var(--font-lore); font-style: italic; font-size: 1.35rem; line-height: 1.35; color: #dff8ff; text-shadow: 0 0 18px rgba(127, 232, 255, .35); }
.msg-scene { display: block; margin-top: 4px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.msg-line.is-new { animation: memory-in 1.2s var(--ease) both; }
.message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.message-count { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.message-count b { color: var(--spark-hi); font-variant-numeric: tabular-nums; }
.message .game-foot { margin: 0; }

/* ---------- Le raid ---------- */
.raid-sec { background: radial-gradient(ellipse 60% 22% at 70% 4%, rgba(233, 226, 208, .06), transparent 70%); }
.raid-bosses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.raid-boss { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel-solid); }
.raid-boss figure { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; }
.raid-boss figure > a { display: block; height: 100%; }
.raid-boss figure img { width: 100%; height: 100%; object-fit: cover; }
.raid-boss > div { padding: 12px 14px 16px; }
.raid-boss h3 { margin: 4px 0 6px; font-size: 1rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.raid-boss p:not(.tag) { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }


/* ---------- Personnages, secrets, légendes ---------- */
.voices--eight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.secrets-sec { background: radial-gradient(ellipse 60% 45% at 30% 30%, color-mix(in srgb, var(--page-accent) 6%, transparent), transparent 70%); }
.kepler .secrets-layout .games { gap: 24px; }
.collect-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.collect-card { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); background: var(--panel-solid); }
.collect-card img { border: 1px solid rgba(255, 255, 255, .2); }
.collect-card h3 { margin: 2px 0 6px; font-size: 1rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.collect-card p:not(.tag) { margin: 0; font-size: .84rem; line-height: 1.55; color: var(--muted); }
.armory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.armory .item-card { margin: 0; }
.armory .item-flavor span { display: block; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .08); font-family: var(--font-ui); font-style: normal; font-size: .8rem; line-height: 1.55; color: var(--muted); }
.lore-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.lore-card { border: 1px solid var(--line); background: var(--panel-solid); }
.lore-card--wide { grid-column: span 2; border-color: rgba(236, 220, 174, .3); }
.lore-card .item-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(90deg, rgba(127, 232, 255, .12), transparent); }
.lore-card .item-head img { flex: none; border: 1px solid rgba(255, 255, 255, .2); }
.lore-card .item-name { margin: 0; font-size: .92rem; font-weight: 800; text-transform: uppercase; color: var(--pearl); }
.lore-card .item-type { margin: 2px 0 0; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lore-flavor { margin: 0; padding: 12px 16px 0; font-family: var(--font-lore); font-style: italic; font-size: 1.06rem; line-height: 1.42; color: #eef0f6; }
.lore-card details { padding: 10px 16px 16px; }
.lore-card summary { cursor: pointer; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--page-accent-hi); }
.lore-card details[open] summary { margin-bottom: 10px; }
.lore-card details p { margin: 0 0 10px; font-family: var(--font-lore); font-size: 1.04rem; line-height: 1.5; color: #e4e6ee; }
.kepler .event-img > a { display: block; height: 100%; }

/* ---------- Plan (brique commune : css/components/depths.css) ---------- */
.kepler .depths { aspect-ratio: 10 / 11; background: #07080f; }
.stratum--surface { background: linear-gradient(180deg, #2a1c2c 0%, #24182a 60%, #1d1424 100%); }
.stratum--gorge { background: linear-gradient(180deg, #121a22 0%, #0f161d 100%); }
.stratum--singularite { background: radial-gradient(ellipse 50% 80% at 50% 50%, #0d1a20, #07090f 80%); }
.stratum--inconnu { background: linear-gradient(180deg, #1b1a17 0%, #22201b 100%); }
.dm-line { fill: none; stroke: rgba(180, 140, 255, .3); stroke-width: 1; stroke-dasharray: 6 5; }
.sing-ring { fill: none; stroke: rgba(127, 232, 255, .25); stroke-width: .3; stroke-dasharray: 1 1.5; }
.sing-ring--in { stroke: rgba(127, 232, 255, .45); fill: rgba(0, 0, 0, .35); }
.veil-line { stroke: rgba(236, 220, 174, .5); stroke-width: 1; stroke-dasharray: 2 3; }
.way-line { stroke: rgba(240, 230, 240, .28); }
.way-line--trappe { stroke: rgba(127, 232, 255, .75); stroke-dasharray: 1 3; stroke-linecap: round; }
.way-line--raid { stroke: rgba(236, 220, 174, .7); stroke-dasharray: 4 3; }
.room-node--zone { color: #f6eee4; }
.room-node--aion { color: var(--aion); }
.room-node--exile { color: var(--exile); }
.room-node--region { color: var(--rose); }
.room-node--vex { color: var(--vex); }
.room-node--nine { color: var(--spark); }
.room-node--raid { color: var(--nine); }
.kepler .room-label { text-shadow: 0 1px 6px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9); }
.kepler .depths-count b { color: var(--spark-hi); }

/* ---------- Pastilles ---------- */
.spot[data-secret="urnes"] { color: #fff6e6; border-color: rgba(236, 220, 174, .95); }
.spot[data-secret="mues"] { color: #e9f6ff; border-color: rgba(127, 232, 255, .95); }
.spot[data-secret="raid"] { color: #fff; border-color: rgba(233, 226, 208, .95); box-shadow: 0 0 12px rgba(233, 226, 208, .4); }
.spot[data-secret="dossier"] { color: #fff2dc; border-color: rgba(255, 138, 85, .95); }
.kepler .spot.found { background: var(--pearl); border-color: var(--pearl); color: var(--night); }
/* Les coffres de compétence : seulement en Matière étincelante */
.spot--spark { display: none; color: #e9fbff; border-color: var(--spark); animation: spark-pulse 1.6s ease-in-out infinite; }
body.is-spark .spot--spark, .spot--spark.found { display: grid; }
@keyframes spark-pulse { 50% { box-shadow: 0 0 24px rgba(127, 232, 255, .95); } }

/* ---------- La Matière étincelante dans la page ---------- */
.spark-veil { position: fixed; inset: 0; z-index: 44; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 50%, rgba(20, 70, 110, .55) 100%), linear-gradient(180deg, rgba(127, 232, 255, .04), rgba(180, 140, 255, .05)); mix-blend-mode: screen; }
body.is-spark .spark-veil { opacity: 1; }
body.is-spark .photo { filter: var(--photo-filter) saturate(.8) hue-rotate(-12deg) brightness(1.04); }
.spark-cursor { position: fixed; left: -14px; top: -14px; z-index: 70; width: 28px; height: 28px; border-radius: 50%; pointer-events: none; opacity: 0; transform: translate(-100px, -100px);
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, #bff6ff 30%, #39b8e8 62%, rgba(40, 120, 220, 0) 72%); box-shadow: 0 0 22px rgba(127, 232, 255, .8); transition: opacity .4s; }
.spark-cursor::before, .spark-cursor::after { content: ''; position: absolute; inset: -6px; border: 1px dashed rgba(200, 245, 255, .8); border-radius: 50%; animation: spark-spin 1.2s linear infinite; }
.spark-cursor::after { inset: -11px; border-style: dotted; animation-duration: 2.1s; animation-direction: reverse; }
body.is-spark .spark-cursor { opacity: 1; }
@keyframes spark-spin { to { transform: rotate(360deg); } }
@media (hover: none) { .spark-cursor { display: none; } }
.etincelle-badge { position: fixed; left: 50%; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 16px; transform: translateX(-50%); border: 1px solid var(--spark); background: rgba(6, 12, 22, .92); box-shadow: 0 0 24px rgba(127, 232, 255, .35); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--spark-hi); }
.etincelle-badge svg { width: 16px; height: 16px; color: var(--spark); }
.etincelle-badge b { min-width: 3.2em; font-variant-numeric: tabular-nums; color: #fff; }
.etincelle-badge[hidden] { display: none; }

@media (max-width: 1200px) {
  .raid-bosses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voices--eight { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .life { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capsule-groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1020px) {
  .duo, .duo--flip, .dossier, .containment, .message, .council-body, .files { grid-template-columns: minmax(0, 1fr); }
  .duo--flip .duo-photo { order: 0; }
  .duo-photo, .message-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .dossier-photo { min-height: 0; aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid rgba(43, 36, 24, .25); }
  .lore-books, .powers, .emissaries { grid-template-columns: minmax(0, 1fr); }
  .lore-card--wide { grid-column: auto; }
  .sketches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mission-step--wide { grid-template-columns: minmax(0, 1fr); }
  .mission-step--wide figure { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 680px) {
  .kepler .depths { aspect-ratio: 10 / 16; }
  .mission-steps, .armory, .collect-cards, .side-quests, .life, .raid-bosses, .sketches--three { grid-template-columns: minmax(0, 1fr); }
  .mission-steps--list .mission-step { grid-template-columns: 110px minmax(0, 1fr); }
  .voices--eight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .altar-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dossier-fields { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dossier-fields dd { margin-bottom: 8px; }
  .planet { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .planet-num { top: 28px; }
  .kepler .hero-content { bottom: 150px; }
  .kepler .hero-content .actions { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .spot--spark, .phone.is-ringing svg, .spark-cursor::before, .spark-cursor::after { animation: none; }
}
