/*
 * ISCOVA TransitFlow : styles du suivi public (page /suivi et page /suivi/<code>).
 * Toutes les règles sont préfixées .tf- pour ne pas gêner la feuille de style du site.
 * Aucune image externe, aucune police externe : tout est servi par le même domaine.
 */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

.tf-track,
.tf-result,
.tfp {
  --tf-blue: #084ba5;
  --tf-navy: #072c63;
  --tf-orange: #ff6500;
  --tf-orange-text: #8a3200;
  --tf-orange-soft: #fff0e5;
  --tf-bg: #f3f6fa;
  --tf-card: #ffffff;
  --tf-ink: #0e1a2e;
  --tf-muted: #475670;
  --tf-line: #dce3ee;
  --tf-ok: #0b6b3a;
  --tf-ok-soft: #e6f4ec;
  --tf-warn-soft: #fff4d6;
  --tf-warn-text: #6b4a00;
  --tf-radius: 12px;
}

/* ------------------------------------------------------------------ formulaire de la page /suivi */
.tf-track-form {
  display: grid;
  gap: 0.9rem;
  align-items: end;
  grid-template-columns: 1fr;
  max-width: 40rem;
}
@media (min-width: 40rem) {
  .tf-track-form { grid-template-columns: 1fr auto; }
}
.tf-track-form .field { margin: 0; }

/* ------------------------------------------------------------------ zone de résultat */
.tf-result {
  margin-top: 1.5rem;
  max-width: 40rem;
  color: var(--tf-ink);
}
.tfp .tf-result { margin-top: 0; max-width: none; }

.tf-view { display: grid; gap: 1rem; }

.tf-card {
  background: var(--tf-card);
  border: 1px solid var(--tf-line);
  border-radius: var(--tf-radius);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(7, 44, 99, 0.06);
}
.tf-card__title {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--tf-navy);
  font-weight: 700;
}

.tf-eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tf-muted);
}

/* carte d'identification */
.tf-hero { border-top: 5px solid var(--tf-blue); }
.tf-hero--done { border-top-color: var(--tf-ok); }
.tf-hero__title {
  margin: 0;
  font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  line-height: 1.15;
  color: var(--tf-navy);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.tf-hero__title:focus { outline: 3px solid var(--tf-orange); outline-offset: 4px; border-radius: 4px; }
.tf-hero__status { margin: 0.7rem 0 0; font-size: 1.05rem; line-height: 1.35; }
.tf-hero__status-label { color: var(--tf-muted); }
.tf-hero__step { margin: 0.2rem 0 0; color: var(--tf-muted); font-size: 0.92rem; }

/* listes clé / valeur */
.tf-kv { margin: 0.9rem 0 0; display: grid; gap: 0.55rem; }
.tf-card__title + .tf-kv, .tf-card > .tf-kv:first-child { margin-top: 0; }
.tf-kv__row { display: grid; gap: 0.1rem; }
.tf-kv dt { font-size: 0.82rem; color: var(--tf-muted); font-weight: 600; }
.tf-kv dd { margin: 0; font-size: 1rem; font-weight: 600; color: var(--tf-ink); overflow-wrap: anywhere; }
@media (min-width: 34rem) {
  .tf-kv__row { grid-template-columns: 11rem 1fr; gap: 0.8rem; align-items: baseline; }
}

/* messages */
.tf-btn + .tf-kv { margin-top: 1.1rem; }
.tf-note { margin: 0.8rem 0 0; font-size: 0.95rem; line-height: 1.45; }
.tf-note--muted { color: var(--tf-muted); }
.tf-note--warn { background: var(--tf-warn-soft); color: var(--tf-warn-text); padding: 0.6rem 0.8rem; border-radius: 8px; }
.tf-note--ok { background: var(--tf-ok-soft); color: var(--tf-ok); padding: 0.6rem 0.8rem; border-radius: 8px; }

.tf-status {
  background: var(--tf-card);
  border: 1px solid var(--tf-line);
  border-left: 5px solid var(--tf-blue);
  border-radius: var(--tf-radius);
  padding: 1rem 1.15rem;
  color: var(--tf-ink);
  line-height: 1.45;
}
.tf-status--error { border-left-color: #b3261e; }
.tf-status__title { margin: 0 0 0.3rem; font-size: 1.1rem; color: var(--tf-navy); }
.tf-status__title:focus { outline: 3px solid var(--tf-orange); outline-offset: 4px; border-radius: 4px; }
.tf-status p { margin: 0; }

.tf-foot { margin: 0; font-size: 0.85rem; color: var(--tf-muted); text-align: center; }

/* boutons et liens */
.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  margin-top: 0.8rem;
}
.tf-btn--primary { background: var(--tf-blue); color: #fff; }
.tf-btn--primary:hover { background: var(--tf-navy); }
.tf-btn:focus-visible, .tf-link:focus-visible { outline: 3px solid var(--tf-orange); outline-offset: 3px; }
.tf-link { color: var(--tf-blue); font-weight: 700; text-decoration: underline; }

/* ------------------------------------------------------------------ frise verticale des 10 étapes */
.tf-tl { list-style: none; margin: 0; padding: 0; }
.tf-tl__item {
  position: relative;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.9rem;
  padding-bottom: 1.15rem;
}
.tf-tl__item:last-child { padding-bottom: 0; }
/* trait de liaison entre deux points */
.tf-tl__item::before {
  content: "";
  position: absolute;
  left: calc(1rem - 1.5px);
  top: 2rem;
  bottom: 0;
  width: 3px;
  background: var(--tf-line);
  border-radius: 2px;
}
.tf-tl__item:last-child::before { display: none; }
.tf-tl__item--done::before { background: var(--tf-blue); }

.tf-tl__dot {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tf-card);
  border: 3px solid var(--tf-line);
  z-index: 1;
}
.tf-tl__item--done .tf-tl__dot { background: var(--tf-blue); border-color: var(--tf-blue); }
.tf-tl__item--done .tf-tl__dot::after {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 0.28rem;
  width: 0.45rem;
  height: 0.85rem;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}
.tf-tl__item--current .tf-tl__dot { background: var(--tf-orange); border-color: var(--tf-orange); }
.tf-tl__item--current .tf-tl__dot::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border-radius: 50%;
  background: var(--tf-navy);
}
/* halo discret autour de l'étape en cours */
.tf-tl__item--current .tf-tl__dot::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--tf-orange);
  opacity: 0;
  animation: tf-pulse 2.4s ease-out infinite;
}
@keyframes tf-pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tf-tl__item--current .tf-tl__dot::before { animation: none; opacity: 0.35; }
}

.tf-tl__body { padding-top: 0.2rem; min-width: 0; }
.tf-tl__label { margin: 0; font-size: 1rem; line-height: 1.3; font-weight: 600; color: var(--tf-ink); }
.tf-tl__item--todo .tf-tl__label { color: var(--tf-muted); font-weight: 500; }
.tf-tl__item--current .tf-tl__label { font-weight: 800; color: var(--tf-navy); font-size: 1.08rem; }
.tf-tl__tag {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--tf-orange-soft);
  color: var(--tf-orange-text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tf-tl__at { margin: 0.15rem 0 0; font-size: 0.86rem; color: var(--tf-muted); }

/* texte réservé aux lecteurs d'écran */
.tf-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ page autonome suivi-lien.html */
.tfp {
  margin: 0;
  min-height: 100vh;
  background: var(--tf-bg);
  color: var(--tf-ink);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
.tfp *, .tfp *::before, .tfp *::after { box-sizing: border-box; }

.tfp-head { background: var(--tf-blue); color: #fff; }
.tfp-head__in {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.tfp-logo { display: block; height: 2.2rem; width: auto; }
.tfp-brand { margin: 0; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; }
.tfp-brand span { font-weight: 500; opacity: 0.92; }

.tfp-main { max-width: 44rem; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.tfp-title { margin: 0 0 1rem; font-size: 1.3rem; color: var(--tf-navy); font-weight: 800; }
.tfp-foot { max-width: 44rem; margin: 0 auto; padding: 0 1rem 2rem; font-size: 0.85rem; color: var(--tf-muted); text-align: center; }
.tfp-foot p { margin: 0; }
.tfp-skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: #fff;
  color: var(--tf-navy);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  z-index: 10;
}
.tfp-skip:focus { top: 0.5rem; }
