/* Mode GO (E6.3 / E6.4 — guidage pas-à-pas) — harmonisé Tracéo à l'É6.
   Pas de maquette dédiée : l'écran est un « mode focus » qui reprend les
   composants du détail d'itinéraire (É5). La timeline affichée est un CLONE du
   `.tl` de la carte trajet — ses classes (`.tl-*`, `.board-conn`, `data-alight`)
   sont un CONTRAT partagé avec journey.js/go.js : on ne les restyle pas ici,
   elles héritent de css/journey.css. Ce fichier n'habille que le châssis du
   mode (en-tête, bandeau de progression, alarmes, widget de vote). */

#step-go { display: flex; flex-direction: column; gap: var(--sp-4); }

/* ── En-tête du mode ────────────────────────────────────────── */
.go-head {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'lbl close' 'title close';
  align-items: center; gap: 2px var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--traceo-red-soft);
  border: 1px solid color-mix(in srgb, var(--traceo-red) 22%, transparent);
  border-radius: var(--r-md);
}
.go-head__lbl {
  grid-area: lbl;
  font-size: var(--fs-2xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: var(--ls-label);
  color: var(--traceo-red);
}
.go-head__title {
  grid-area: title; margin: 0; min-width: 0;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-h3); font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tight); color: var(--ink); line-height: 1.15;
}
.go-exit { grid-area: close; align-self: center; background: var(--surface); }

/* ── Bandeau de progression (instruction + arrivée + fraîcheur) ── */
.go-progress {
  display: flex; flex-direction: column; gap: 4px;
  padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-1);
}
.go-instruction {
  font-size: var(--fs-h3); font-weight: var(--fw-extra);
  letter-spacing: var(--ls-tight); color: var(--ink); line-height: var(--lh-snug);
}
.go-eta {
  font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: var(--fw-bold);
  color: var(--ink-2);
}
.go-eta:empty { display: none; }
/* Fraîcheur RITI : pastille « live » + horodatage mono (même code visuel que
   le badge de source des passages — la donnée est bien du temps réel). */
.go-riti {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-top: 2px; padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--ok-wash); color: var(--ok);
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: var(--fw-bold);
}
.go-riti:empty { display: none; }
.go-riti__dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0;
  animation: go-live 1.6s ease-in-out infinite;
}

/* ── Alarmes de descente (géofencing) ───────────────────────── */
.go-alarms { display: flex; flex-direction: column; gap: var(--sp-2); }
.go-alarms:empty { display: none; }
.go-alarm-banner {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--crit-wash); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--crit) 38%, transparent);
  border-radius: var(--r-md);
  font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: var(--lh-snug);
  animation: go-alarm 1.1s ease-in-out infinite alternate;
}
.go-alarm-banner__ic {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--crit); color: #fff;
}

/* ── Timeline clonée ────────────────────────────────────────── */
.go-timeline {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-1);
  overflow: hidden;
}
.go-timeline:empty { display: none; }

/* ── Widget de vote d'affluence (E3 depuis le mode GO) ──────── */
.go-report-widget {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.go-report-widget.hidden { display: none; }
.go-report-widget__q {
  margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink);
}
.go-report-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.go-report-actions button {
  flex: 1 1 auto; min-width: 76px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--ink-2); font-family: var(--font-ui);
  font-size: var(--fs-sm); font-weight: var(--fw-semi); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.go-report-actions button:hover { border-color: var(--border-strong); }
.go-report-actions button:active { transform: scale(.97); }

@keyframes go-live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes go-alarm {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--crit) 45%, transparent); }
  to   { box-shadow: 0 0 0 7px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .go-riti__dot, .go-alarm-banner { animation: none; }
  .go-report-actions button { transition: none; }
}

@media (min-width: 900px) {
  #step-go { max-width: 720px; margin: 0 auto; }
}
