/* Écran 3 : la Route des Grandes Alpes. Téléphone : rail natif sous une aiguille. Ordinateur : scène collante. */
.rga { position: relative; padding: 36px 0 40px; scroll-margin-top: var(--barre-h); }
.rga__scene { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.rga__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
.rga__phrase { font: 600 clamp(24px, 3vw, 40px)/1.1 var(--titre); max-width: 20em; }
.rga__km { font: 600 22px/1 var(--titre); color: var(--jaune); white-space: nowrap; }
.rga__km small { font: 500 14px/1 var(--texte); color: var(--lichen); margin-left: 6px; }

.rga__cadre { position: relative; }
.rga__rail {
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity;
  scrollbar-width: none; height: min(52svh, 440px); min-height: 300px;
}
.rga__rail::-webkit-scrollbar { display: none; }
.rga__piste { position: relative; height: 100%; }
.rga__piste svg { position: absolute; top: 0; height: 100%; max-width: none; overflow: visible; }
.rga__snap { position: absolute; top: 0; width: 1px; height: 1px; scroll-snap-align: center; }
.rga__aiguille {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: var(--jaune); pointer-events: none;
}
.rga__aiguille::before {
  content: ""; position: absolute; top: 0; left: -6px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--jaune);
}
.rga__indice { font-size: 14px; color: var(--lichen); }

.p-aire { fill: rgb(157 176 169 / .14); }
.p-ligne { fill: none; stroke: var(--neige); stroke-width: 2; }
.p-grille { stroke: rgb(157 176 169 / .22); stroke-dasharray: 2 6; }
.p-grille-t, .p-km { font: 500 14px var(--texte); fill: var(--lichen); }
.p-nom { font: 600 18px var(--titre); fill: var(--neige); }
.p-alt { font: 500 14px var(--titre); fill: var(--lichen); }
.p-ville { font: 500 15px var(--texte); fill: var(--lichen); }
.p-pic { fill: var(--neige); }
.p-tige { stroke: rgb(242 246 248 / .35); }
.p-atelier circle { fill: var(--rouge); }
.p-atelier text { font: 700 16px var(--texte); fill: var(--rouge); }
.p-atelier line { stroke: var(--rouge); stroke-width: 1.5; stroke-dasharray: 3 4; }
.p-poteau { fill: var(--neige); }
.p-bras { transform-box: fill-box; transform-origin: 2px 50%; transform: rotate(-40deg); transition: transform .7s cubic-bezier(.34, 1.56, .64, 1); }
.p-col.est-passe.is-ouvert .p-bras { transform: rotate(-86deg); }
.p-col.est-passe.is-ferme .p-bras { animation: tombe-rga .9s cubic-bezier(.3, 0, .6, 1) both; }
.p-col.is-ferme .p-nom { fill: var(--rouge); }
@keyframes tombe-rga {
  0% { transform: rotate(-40deg); } 55% { transform: rotate(0); } 70% { transform: rotate(-12deg); }
  84% { transform: rotate(0); } 92% { transform: rotate(-3deg); } 100% { transform: rotate(0); }
}

.rga__mini { display: none; }

@media (min-width: 1024px) {
  .rga.est-collante { height: 300svh; padding: 0; }
  .est-collante .rga__scene {
    position: sticky; top: 0; height: 100svh; overflow: clip;
    padding: calc(var(--barre-h) + 28px) 0 calc(var(--bande-tot) + 20px);
    grid-template-rows: auto 1fr auto; gap: 20px;
  }
  .est-collante .rga__rail { overflow: hidden; height: 100%; scroll-snap-type: none; }
  .est-collante .rga__piste svg { will-change: transform; }
  .est-collante .rga__indice { display: none; }
  .est-collante .rga__mini { display: block; height: 58px; cursor: pointer; }
  .p-nom { font-size: 22px; }
  .p-alt { font-size: 15px; }
  .rga__mini .a-aire { fill: rgb(157 176 169 / .3); }
  .rga__mini .a-fen { fill: rgb(232 178 26 / .16); stroke: var(--jaune); stroke-width: 1.5; }
  .rga__mini .a-atelier { fill: var(--rouge); }
  .rga__mini text { font: 500 14px var(--texte); fill: var(--lichen); }
}

/* ---------- Fin : la jauge redescend à l'atelier ---------- */
.fin { position: relative; min-height: calc(100svh - var(--bande-tot)); display: flex; flex-direction: column; justify-content: flex-end; padding: 40px 0 28px; }
.fin__repere { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 18px; padding-bottom: 14px; border-bottom: 3px solid var(--jaune); }
.fin__repere b { font: 700 clamp(72px, 22vw, 220px)/.8 var(--titre); color: var(--jaune); white-space: nowrap; }
.fin__repere span { max-width: 22em; }
.fin__repere span { font: 500 16px/1.3 var(--texte); color: var(--lichen); }
.fin__corps { display: grid; gap: 18px; padding-top: 18px; }
.fin__bulletin { font: 600 22px/1.25 var(--titre); }
.fin__bulletin .ferme { color: var(--rouge); }
.fin__lignes { display: grid; gap: 4px; }
.fin__lignes a { display: inline-flex; align-items: center; min-height: 44px; font: 600 22px/1 var(--texte); text-decoration: none; color: var(--neige); }
.fin__mentions { font-size: 14px; color: var(--lichen); display: grid; gap: 4px; }
.fin__mentions p { max-width: 31em; }
.fin__echelle { position: relative; flex: 1 1 auto; min-height: 46svh; margin-bottom: 8px; }
.fin__echelle span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgb(157 176 169 / .28); }
.fin__echelle b { position: absolute; left: 0; bottom: 4px; font: 500 clamp(18px, 2vw, 28px)/1 var(--titre); color: var(--lichen); white-space: nowrap; }
.fin__echelle b i { font-style: normal; color: var(--neige); margin-right: .4em; }
@media (min-width: 1024px) {
  .fin__lignes { grid-auto-flow: column; justify-content: start; column-gap: 40px; align-items: center; }
  .fin__mentions { padding-top: 18px; border-top: 1px solid var(--filet-clair); }
  .fin__repere span { font-size: 17px; }
}
