/* ===================== Parcours en écrans et animations ===================== */
.entete.compact .conteneur { padding-bottom: 64px; }
.entete.compact .accroche { font-size: clamp(22px, 5.4vw, 34px); margin-top: 18px; }
.route { position: relative; height: 46px; margin-top: 10px; }
.route::before { content: ""; position: absolute; left: -20px; right: -20px; bottom: 6px; height: 3px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 18px, transparent 18px 34px); animation: defile 1.1s linear infinite; }
.bus { position: absolute; bottom: 4px; width: 84px; animation: arrivee 1.4s cubic-bezier(.2,.8,.2,1) both, cahot .5s ease-in-out 1.4s infinite alternate; }
.bus svg { width: 100%; display: block; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.bus .roue { transform-box: fill-box; transform-origin: center; animation: roule .6s linear infinite; }
@keyframes defile { to { background-position: -34px 0; } }
@keyframes arrivee { from { left: -110px; } to { left: calc(100% - 100px); } }
@keyframes cahot { to { transform: translateY(-2px); } }
@keyframes roule { to { transform: rotate(360deg); } }

.flux { position: relative; z-index: 3; margin-top: -48px; }
.progression { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 12px 12px 10px; scroll-margin-top: 10px; }
.pas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.pas button { border: 0; background: none; padding: 2px 0; font-size: 11px; font-weight: 700; color: var(--doux); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.pas button span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: var(--doux); font-size: 12px;
  transition: background .3s, color .3s, transform .3s cubic-bezier(.3,1.6,.5,1); }
.pas button.fait span { background: color-mix(in srgb, var(--c1) 14%, #fff); color: var(--c1); }
.pas button.actif { color: var(--c1); }
.pas button.actif span { background: var(--c1); color: #fff; transform: scale(1.15); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 18%, transparent); }
.pas button:disabled { opacity: .45; cursor: default; }
.jauge-flux { height: 4px; background: #f1f5f9; border-radius: 4px; margin-top: 10px; overflow: hidden; }
.jauge-flux i { display: block; height: 100%; width: 20%; border-radius: 4px; background: linear-gradient(90deg, var(--c1), color-mix(in srgb, var(--c1) 55%, var(--c2)));
  transition: width .5s cubic-bezier(.2,.8,.2,1); }
.resume { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.resume:empty { display: none; }
.puce { font-size: 12px; font-weight: 700; background: #f1f5f9; border-radius: 999px; padding: 4px 10px; animation: pop .35s cubic-bezier(.3,1.6,.5,1) both; }

.pistes { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start;
  margin: 0 -16px; transition: height .35s cubic-bezier(.2,.8,.2,1); overscroll-behavior-x: contain; }
.pistes::-webkit-scrollbar { display: none; }
.piste { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; padding: 18px 16px 8px; }
.ecran-titre { margin-bottom: 12px; }
.ecran-titre h2 { font-size: 24px; margin: 0; letter-spacing: -.02em; }
.ecran-titre p { margin: 4px 0 0; }

.puces-choix { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.choix-ville { border: 1.5px solid var(--bord); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .12s; }
.choix-ville.actif { background: var(--c1); border-color: var(--c1); color: #fff; }
.destinations { display: grid; gap: 8px; }
.destination { display: grid; grid-template-columns: 14px 1fr auto 18px; align-items: center; gap: 12px; text-align: left; border: 2px solid transparent; background: #fff;
  border-radius: 16px; padding: 15px 16px; box-shadow: var(--ombre); cursor: pointer; transition: transform .2s, border-color .2s; }
.destination .point { width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--c1); }
.destination .nom-ville { font-weight: 700; font-size: 17px; }
.destination .prix-ville { font-weight: 800; color: var(--c1); }
.destination .fleche-go { color: var(--doux); font-size: 22px; transition: transform .2s; }
.destination:hover .fleche-go { transform: translateX(4px); }
.destination.actif { border-color: var(--c1); }
.destination.actif .point { background: var(--c2); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }

.grille-jours { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.grille-jours .jour { min-width: 0; transition: transform .15s, background .2s, color .2s; }

.depart { width: 100%; text-align: left; font: inherit; color: inherit; }
.depart .milieu { min-width: 0; }
.depart.actif { border-color: var(--c1); }
.remplissage { height: 5px; border-radius: 5px; background: #f1f5f9; margin-top: 8px; overflow: hidden; }
.remplissage i { display: block; height: 100%; width: var(--r); background: var(--c2); border-radius: 5px; animation: remplir 1s cubic-bezier(.2,.8,.2,1) both .2s; }
@keyframes remplir { from { width: 0; } }
.squelette, .squelette-car { background: linear-gradient(90deg, #fff 30%, #eef2f7 50%, #fff 70%); background-size: 300% 100%; animation: brillance 1.2s linear infinite; }
.squelette { height: 84px; margin-bottom: 10px; }
.squelette-car { height: 420px; }
@keyframes brillance { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.grand-emoji { font-size: 40px; animation: cahot .6s ease-in-out infinite alternate; }

.car .rangee { animation: monte .4s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 25ms + 150ms); }
.siege { transition: transform .15s, background .2s, border-color .2s; }
.siege:not(.pris):active { transform: scale(.88); }
.siege.choisi { animation: pop .3s cubic-bezier(.3,1.6,.5,1); }

.barre-fixe { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.barre-fixe.visible { transform: none; pointer-events: auto; }
.barre-fixe .carte { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; box-shadow: 0 -2px 30px rgba(15,23,42,.18); }
.barre-fixe .total { font-weight: 800; font-size: 20px; display: inline-block; }
.barre-fixe .bouton { margin-left: auto; }
.bump { animation: pop .3s cubic-bezier(.3,1.6,.5,1); }

.ticket-recap { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 2px dashed var(--bord); border-radius: 14px; padding: 14px; }
.ticket-recap > div { display: flex; flex-direction: column; }
.ticket-recap .montant { font-size: 22px; font-weight: 800; text-align: right; }
.brille { position: relative; overflow: hidden; }
.brille::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-100%); animation: reflet 2.8s ease-in-out infinite 1s; }
@keyframes reflet { 40%, 100% { transform: translateX(100%); } }
.secoue { animation: secoue .4s; border-color: var(--alerte) !important; }
@keyframes secoue { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.raccourcis { display: flex; gap: 10px; justify-content: center; margin: 22px 0 0; flex-wrap: wrap; }
.pilule { border: 1.5px solid var(--bord); background: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; color: var(--c1); transition: transform .12s, box-shadow .2s; }
.pilule:hover { box-shadow: var(--ombre); }

/* Feuilles du bas */
.feuille-fond { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,42,.45); display: flex; align-items: flex-end; justify-content: center; animation: fondu .25s both; }
.feuille { background: var(--fond); width: 100%; max-width: 620px; max-height: 86vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 8px 18px calc(24px + env(safe-area-inset-bottom));
  animation: glisse .35s cubic-bezier(.2,.8,.2,1) both; transition: transform .2s; }
.feuille-fond.sort { animation: fondu .25s reverse both; }
.feuille-fond.sort .feuille { animation: glisse .25s reverse both; }
.poignee { width: 44px; height: 5px; border-radius: 5px; background: #cbd5e1; margin: 4px auto 10px; }
.feuille-titre { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.feuille-titre h2 { margin: 0; }
.feuille .tableau-tarifs { background: #fff; border-radius: 14px; overflow: hidden; }
.feuille .tableau-tarifs td { padding: 12px 14px; }
.feuille .contacts { grid-template-columns: 1fr; }
.feuille .contact a { text-decoration: none; font-weight: 700; color: var(--c1); line-height: 1.8; }
.onglets-ligne { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.onglets-ligne button { flex: none; border: 1.5px solid var(--bord); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.onglets-ligne button.actif { background: var(--c1); color: #fff; border-color: var(--c1); }
@keyframes fondu { from { opacity: 0; } }
@keyframes glisse { from { transform: translateY(100%); } }

/* Entrées échelonnées, retours tactiles */
.anim { animation: monte .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.bouton, .jour, .choix-ville, .destination, .pilule, .depart { -webkit-tap-highlight-color: transparent; }
.bouton:not(:disabled):active, .jour:active, .choix-ville:active, .destination:active, .pilule:active, .depart:not(.inactif):active { transform: scale(.97); }
.bouton { transition: transform .12s, filter .2s; }
.bouton:not(:disabled):hover { filter: brightness(1.06); }
.compagnie { transition: transform .2s, box-shadow .2s; }
.compagnie:hover { transform: translateY(-3px); }
.plateforme h1, .plateforme .sous, .plateforme .marque { animation: monte .6s cubic-bezier(.2,.8,.2,1) both; }
.plateforme h1 { animation-delay: .08s; }
.plateforme .sous { animation-delay: .16s; }

/* Billet */
.billet.entree { animation: billet .7s cubic-bezier(.2,.9,.25,1.05) both; transform-origin: top center; }
@keyframes billet { from { opacity: 0; transform: translateY(40px) rotateX(18deg) scale(.96); } }
.billet.entree .villes, .billet.entree .infos > div, .billet.entree .etat, .billet.entree .bas { animation: monte .5s cubic-bezier(.2,.8,.2,1) both; }
.billet.entree .villes { animation-delay: .25s; }
.billet.entree .infos > div:nth-child(1) { animation-delay: .3s; }
.billet.entree .infos > div:nth-child(2) { animation-delay: .34s; }
.billet.entree .infos > div:nth-child(3) { animation-delay: .38s; }
.billet.entree .infos > div:nth-child(4) { animation-delay: .42s; }
.billet.entree .infos > div:nth-child(5) { animation-delay: .46s; }
.billet.entree .infos > div:nth-child(6) { animation-delay: .5s; }
.billet.entree .etat { animation-delay: .55s; }
.billet.entree .bas { animation-delay: .65s; }
.billet .fleche { animation: va 1.4s ease-in-out infinite; }
@keyframes va { 50% { transform: translateX(5px); } }
.etat.attente { position: relative; padding-left: 34px; }
.etat.attente::before { content: ""; position: absolute; left: 14px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: #d97706; animation: pouls 1.4s infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(217,119,6,.6); } 100% { box-shadow: 0 0 0 12px rgba(217,119,6,0); } }
.coche { width: 22px; height: 22px; vertical-align: -6px; margin-right: 6px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.coche circle { stroke: #16a34a; stroke-width: 2; fill: #16a34a; }
.coche path { stroke: #fff; stroke-width: 2.6; stroke-dasharray: 20; stroke-dashoffset: 20; animation: trace .5s ease-out .9s forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
.confettis { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confettis i { position: absolute; top: -12px; left: calc(var(--i) * 5.6%); width: 8px; height: 14px; border-radius: 2px;
  background: var(--c2); animation: tombe 2.4s cubic-bezier(.3,.6,.5,1) forwards; animation-delay: calc(var(--i) * 45ms); }
.confettis i:nth-child(3n) { background: var(--c1); }
.confettis i:nth-child(4n) { background: #16a34a; }
.confettis i:nth-child(5n) { background: #ef4444; }
@keyframes tombe { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }
.toast { animation: toast .35s cubic-bezier(.3,1.4,.5,1) both; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 20px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .bus { left: calc(100% - 100px); }
}
@media print { .barre-fixe, .confettis, .raccourcis { display: none !important; } }
