/* ESCALE — « faire voyager » (25/11/2026, validé par Loïc) : coloris = destination, ligne d'itinéraire, afficheur du plan de vol.
   Fichier séparé : surcharge escale.css sans le réécrire. Teintes mesurées au pixel sur facade_<coloris>_v2.webp
   (cœur de la façade), mélangées au graphite jusqu'à garder 4,6:1 mini sur le texte secondaire et le libellé. */

/* ===== 1. Coloris = destination ===== */
@property --v-tint { syntax: "<color>"; inherits: true; initial-value: #1d1e21; }
@property --v-halo { syntax: "<color>"; inherits: true; initial-value: #1d1e21; }

#coloris {
  position: relative; isolation: isolate;
  --v-tint: var(--bg); --v-halo: var(--bg);
  transition: --v-tint 0.9s cubic-bezier(0.22, 1, 0.36, 1), --v-halo 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
/* le fond teinté s'éteint en haut et en bas : pas de marche avec les sections voisines */
#coloris::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--v-tint);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(80px, 13vh, 150px), #000 calc(100% - clamp(80px, 13vh, 150px)), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(80px, 13vh, 150px), #000 calc(100% - clamp(80px, 13vh, 150px)), transparent 100%);
}
/* la lumière : un halo derrière les deux enceintes, jamais sous le texte */
.scene-coloris { position: relative; }
.scene-coloris::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 0; pointer-events: none;
  height: calc(var(--scene-size) + clamp(32px, 6vh, 72px));
  background: radial-gradient(ellipse 44% 50% at 50% 52%, var(--v-halo), transparent 72%);
}
.scene-coloris > .duo, .scene-coloris > .choix { position: relative; z-index: 1; }
#coloris .swatch:hover { box-shadow: 0 0 0 2px var(--v-tint), 0 0 0 3px rgba(242, 241, 237, 0.35); }
#coloris .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--v-tint), 0 0 0 4px rgba(242, 241, 237, 0.85); }

/* ===== 2. Ligne d'itinéraire ===== */
main#top { position: relative; }
.itineraire {
  position: absolute; z-index: 2; pointer-events: none;
  left: calc(var(--pad-x) / 2); top: 0; width: 0; height: 0;
}
.itineraire-fond, .itineraire-trace { position: absolute; left: 0; top: 0; width: 1px; height: 100%; margin-left: -0.5px; }
.itineraire-fond { background: repeating-linear-gradient(to bottom, rgba(242, 241, 237, 0.2) 0 3px, transparent 3px 9px); }
.itineraire-trace { background: var(--accent); transform-origin: 50% 0; transform: scaleY(0); will-change: transform; }
.itineraire-escale {
  position: absolute; left: 0; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  background: var(--bg); border: 1px solid rgba(242, 241, 237, 0.34);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.itineraire-escale.est-passee { background: var(--accent); border-color: var(--accent); }
@media (max-width: 560px) {
  .itineraire-escale { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
}

/* ===== 3. Plan de vol : l'afficheur du caisson actif montre la configuration ===== */
.vol-rang { margin-top: 32px; display: grid; grid-template-columns: 1fr; gap: 16px; }
.vol-rang > .vol { margin-top: 0; min-width: 0; }
.vol-lcd { position: relative; border-radius: 24px; overflow: hidden; background: #f1f0eb; aspect-ratio: 1050 / 620; }
.vol-lcd img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.vol-lcd img.est-affiche { opacity: 1; }
@media (min-width: 1000px) {
  .vol-rang { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
  .vol-lcd { aspect-ratio: auto; min-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  #coloris { transition: none; }
  .itineraire-escale, .vol-lcd img { transition: none; }
}

/* Le coloris choisi teinte tout le site (demande de Loïc 25/11 16:50) : les fonds glissent ensemble */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #1d1e21; }
@property --bg-2 { syntax: "<color>"; inherits: true; initial-value: #25262a; }
@property --bg-3 { syntax: "<color>"; inherits: true; initial-value: #2c2d32; }
:root { transition: --bg 0.9s cubic-bezier(0.22, 1, 0.36, 1), --bg-2 0.9s cubic-bezier(0.22, 1, 0.36, 1), --bg-3 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) { :root { transition: none; } }
