/* Mercure — ton de la page (sable et soleil, laiton des Vex), trois simulations (classes
   time-past, time-present, time-future sur <body>, voir js/time.js), damier de recomposition,
   sélecteur de simulation, panneaux des simulations, couleurs de la coupe et pastilles. */

.mercure {
  --past: #ffd27a;
  --past-hi: #ffe9b8;
  --present: #ffb057;
  --present-hi: #ffd9a8;
  --future: #ff5d6c;
  --future-hi: #ffb0b8;
  --vex: #7fe0d2;
  --page-accent: var(--present);
  --page-accent-hi: var(--present-hi);
}
.mercure.time-past { --page-accent: var(--past); --page-accent-hi: var(--past-hi); }
.mercure.time-future { --page-accent: var(--future); --page-accent-hi: var(--future-hi); }
.mercure ::selection { background: rgba(255, 176, 87, .35); }

/* ---------- Les trois simulations ---------- */
.mercure:not(.time-past) [data-time="past"], .mercure:not(.time-present) [data-time="present"], .mercure:not(.time-future) [data-time="future"] { display: none !important; }
/* damier de recomposition : par-dessus la page, sans jamais gêner un clic */
#sim { position: fixed; inset: 0; z-index: 40; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .3s; }
#sim.on { opacity: 1; }
.mercure main { transition: background 1s; }
.mercure.time-past main { background: radial-gradient(ellipse 70% 26% at 80% 8%, rgba(255, 210, 122, .1), transparent 70%), radial-gradient(ellipse 60% 22% at 8% 46%, rgba(255, 140, 180, .06), transparent 70%); }
.mercure.time-future main { background: radial-gradient(ellipse 70% 26% at 80% 8%, rgba(255, 93, 108, .1), transparent 70%), radial-gradient(ellipse 60% 22% at 8% 46%, rgba(120, 60, 200, .07), transparent 70%); }
.mercure.time-future .quarter, .mercure.time-future .game, .mercure.time-future .room, .mercure.time-future .sim { border-color: rgba(255, 93, 108, .3); }
.mercure.time-past .sec-title { text-shadow: 0 0 30px rgba(255, 210, 122, .25); }
.mercure.time-future .sec-title { text-shadow: 0 0 30px rgba(255, 93, 108, .3); }

/* sélecteur de simulation */
.time-switch { display: inline-flex; padding: 3px; gap: 3px; background: rgba(6, 10, 22, .66); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.time-switch button { padding: 9px 16px; cursor: pointer; background: none; border: 1px solid transparent; font: inherit; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); transition: color .3s, background .3s, border-color .3s, box-shadow .3s; }
.time-switch button:hover, .time-switch button:focus-visible { outline: 0; color: #fff; border-color: var(--line-strong); }
.time-switch [data-time-set="past"] { --c: var(--past); }
.time-switch [data-time-set="present"] { --c: var(--present); }
.time-switch [data-time-set="future"] { --c: var(--future); }
.time-switch button[aria-checked="true"] { color: #0a0d16; background: var(--c); border-color: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }
/* le même, épinglé en bas de l'écran pendant toute la lecture */
.time-dock { position: fixed; left: 16px; bottom: 16px; z-index: 45; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .35s, transform .35s var(--ease), visibility .35s; }
.past-hero .time-dock { opacity: 1; visibility: visible; transform: none; }
.time-dock button { padding: 7px 12px; font-size: .6rem; }
.sec-note { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.sec-note b { color: var(--page-accent-hi); font-weight: 700; }

/* ---------- Héros ---------- */
.mercure .hero-title span:last-child { margin-top: .18em; font-size: .36em; font-weight: 500; letter-spacing: .3em; color: var(--page-accent-hi); transition: color .6s; }
.hero-time { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s; }
.time-past .hero-time--past, .time-future .hero-time--future { opacity: 1; }

/* ---------- Forêt infinie ---------- */
.sim-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.sim-switch .panel-title { margin: 0; padding: 0; border: 0; }
.sim { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin-bottom: clamp(30px, 4vw, 44px); background: var(--panel-solid); border: 1px solid var(--line); }
.sim::before { content: ''; position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: 3px; background: linear-gradient(90deg, var(--page-accent), transparent 70%); }
.sim .quarter-photo { aspect-ratio: auto; min-height: 420px; }
.sim .quarter-photo::after { background: linear-gradient(270deg, rgba(12, 19, 40, .9), rgba(12, 19, 40, 0) 30%); }
.sim-body { align-self: center; padding: clamp(22px, 3vw, 36px); }
.sim-body h3 { margin: 6px 0 12px; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--pearl); }
.sim-body > p:not(.tag) { margin: 0 0 14px; font-size: .95rem; line-height: 1.65; color: var(--muted); }
.mercure #foret .steps { margin-bottom: clamp(30px, 4vw, 44px); }

/* ---------- Coupe (brique commune : css/components/depths.css) ---------- */
.stratum--surface { background: radial-gradient(ellipse 46% 150% at 50% -40%, rgba(255, 238, 190, .95), rgba(255, 170, 80, .55) 45%, transparent 75%), linear-gradient(180deg, #5a2e14, #a8672f 80%, #d9a05a 100%); }
.stratum--foret { background: linear-gradient(180deg, #2b2118 0%, #0d1418 30%, #081013 100%); }
.stratum--simulations { background: linear-gradient(90deg, rgba(255, 210, 122, .2) 0 33%, rgba(255, 176, 87, .1) 33% 67%, rgba(255, 93, 108, .16) 67% 100%), linear-gradient(180deg, #081013, #0a0d14); }
.stratum--temps { background: linear-gradient(180deg, #0a0d14 0%, #6f7d92 40%, #dfe7f2 100%); }
.mercure .stratum--surface .stratum-name { color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(60, 20, 0, .8); }
.mercure .stratum--surface .stratum-note { color: rgba(255, 255, 255, .7); text-shadow: 0 1px 6px rgba(60, 20, 0, .8); }
.ground { stroke: rgba(60, 24, 6, .85); }
.gate { fill: #120a06; stroke: #9be8ff; stroke-width: 1.4; filter: drop-shadow(0 0 5px rgba(155, 232, 255, .8)); }
.split { stroke: rgba(255, 255, 255, .16); stroke-width: 1; stroke-dasharray: 2 6; }
.way-line { stroke: rgba(231, 235, 245, .36); }
.way-line--forest { stroke: rgba(127, 224, 210, .5); }
.way-line--past { stroke: rgba(255, 210, 122, .6); }
.way-line--present { stroke: rgba(255, 176, 87, .6); }
.way-line--future { stroke: rgba(255, 93, 108, .6); }
.way-line--time { stroke: rgba(233, 241, 255, .6); stroke-dasharray: 4 4; }
.room-node--zone { color: #f3eee4; }
.room-node--forest { color: var(--vex); }
.room-node--past { color: var(--past); }
.room-node--present { color: var(--present); }
.room-node--future { color: var(--future); }
.room-node--time { color: #e9f1ff; }
.room-node--time i { transform: none; }
.mercure .room-label { text-shadow: 0 1px 6px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9); }

/* ---------- Pastilles ---------- */
.spot[data-secret="reflections"] { color: #ffe9b8; border-color: rgba(255, 210, 122, .85); box-shadow: 0 0 14px rgba(255, 210, 122, .55); }
.spot[data-secret="reflections"].found { box-shadow: none; }
.spot[data-secret="winks"] { color: #d7f6f1; border-color: rgba(127, 224, 210, .7); }
.spot--book { color: #e9e3d6; border-color: rgba(255, 255, 255, .55); }
.spot--book.lit { color: #0a0d16; background: var(--present); border-color: var(--present); box-shadow: 0 0 16px rgba(255, 176, 87, .7); }

/* ---------- Les Vex ---------- */
.vex-sec { background: radial-gradient(ellipse 60% 30% at 88% 10%, rgba(127, 224, 210, .06), transparent 70%); }
.mercure #vex .quarters { margin-bottom: clamp(36px, 5vw, 56px); }
.mercure #vex .raid + .quarters { margin-top: clamp(8px, 2vw, 20px); margin-bottom: 0; }
.mercure .steps + .lead-quote { margin-top: 0; }
.secrets-sec { background: radial-gradient(ellipse 60% 45% at 30% 30%, color-mix(in srgb, var(--page-accent) 7%, transparent), transparent 70%); }
.mercure .secrets-layout .games { gap: 28px; }

@media (max-width: 1020px) {
  .sim { grid-template-columns: minmax(0, 1fr); }
  .sim .quarter-photo { aspect-ratio: 16 / 9; min-height: 0; }
  .sim .quarter-photo::after { background: linear-gradient(0deg, rgba(12, 19, 40, .85), rgba(12, 19, 40, 0) 38%); }
}
@media (max-width: 680px) {
  .time-dock { left: 10px; bottom: 10px; }
  .time-switch button { padding: 8px 10px; letter-spacing: .1em; }
  .sim-switch .time-switch { width: 100%; }
  .sim-switch .time-switch button { flex: 1; padding-inline: 4px; font-size: .58rem; }
}
