:root {
  --c1: #1e3a8a; --c2: #facc15; --fond: #f4f6fb; --carte: #fff; --texte: #0f172a; --doux: #64748b; --bord: #e2e8f0;
  --ok: #15803d; --alerte: #b91c1c; --attention: #b45309; --rayon: 18px;
  --ombre: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.cache { display: none !important; }
.conteneur { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* En-tête de compagnie */
.entete { background: var(--c1); color: #fff; position: relative; overflow: hidden; }
.entete::after { content: ""; position: absolute; inset: auto -10% -60px -10%; height: 120px; background: var(--fond); border-radius: 50% 50% 0 0; }
.entete .conteneur { position: relative; z-index: 1; padding-top: 18px; padding-bottom: 86px; }
.barre { display: flex; align-items: center; gap: 12px; }
.logo { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; overflow: hidden;
  border: 3px solid var(--c2); font-weight: 800; color: var(--c1); font-size: 18px; letter-spacing: -.5px; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.barre .nom { font-weight: 800; font-size: 19px; line-height: 1.1; }
.barre .slogan { opacity: .8; font-size: 13px; }
.barre .droite { margin-left: auto; }
.lien-billet { color: #fff; text-decoration: none; font-size: 14px; border: 1px solid rgba(255,255,255,.4); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.accroche { margin: 26px 0 0; font-size: clamp(26px, 6vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.accroche em { font-style: normal; color: var(--c2); }
.sous { margin: 8px 0 0; opacity: .85; max-width: 520px; }
.bande { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, #14b53a 0 33.3%, #fcd116 33.3% 66.6%, #ce1126 66.6%); z-index: 2; }

/* Cartes */
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px; }
.recherche { margin-top: -70px; position: relative; z-index: 3; }
.champs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.champ label, .etiquette { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); margin-bottom: 6px; }
select, input[type=text], input[type=tel], input[type=email], input[type=date], input[type=number], input[type=password], input[type=time], textarea {
  width: 100%; border: 1.5px solid var(--bord); background: #fff; border-radius: 12px; padding: 12px 12px; font-size: 16px; outline: none; }
select:focus, input:focus, textarea:focus { border-color: var(--c1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c1) 18%, transparent); }
.inverser { width: 44px; height: 46px; border-radius: 12px; border: 1.5px solid var(--bord); background: #fff; cursor: pointer; font-size: 18px; }
.jours { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; margin-top: 14px; }
.jours::-webkit-scrollbar { display: none; }
.jour { flex: none; min-width: 64px; border: 1.5px solid var(--bord); background: #fff; border-radius: 14px; padding: 8px 6px; text-align: center; cursor: pointer; }
.jour b { display: block; font-size: 20px; line-height: 1.1; }
.jour small { display: block; font-size: 11px; color: var(--doux); text-transform: uppercase; }
.jour[aria-pressed=true] { background: var(--c1); color: #fff; border-color: var(--c1); }
.jour[aria-pressed=true] small { color: rgba(255,255,255,.8); }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px;
  background: var(--c1); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 16px; }
.bouton.plein { width: 100%; }
.bouton.jaune { background: var(--c2); color: #111; }
.bouton.clair { background: #eef2ff; color: var(--c1); }
.bouton.contour { background: #fff; color: var(--texte); border: 1.5px solid var(--bord); }
.bouton.danger { background: #fee2e2; color: var(--alerte); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton.petit { padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.mt { margin-top: 14px; } .mt2 { margin-top: 24px; }

section.bloc { margin-top: 28px; }
h2 { font-size: 20px; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 16px; margin: 0 0 8px; }
.doux { color: var(--doux); }
.petit { font-size: 13px; }

/* Résultats */
.etape-titre { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.retour { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--bord); background: #fff; cursor: pointer; font-size: 18px; flex: none; }
.trajet-resume { font-weight: 800; font-size: 18px; }
.depart { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .15s; }
.depart:hover { border-color: color-mix(in srgb, var(--c1) 30%, transparent); }
.depart + .depart { margin-top: 10px; }
.depart .heure { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.depart .prix { font-weight: 800; font-size: 18px; text-align: right; white-space: nowrap; }
.depart .prix small { display: block; font-weight: 500; color: var(--doux); font-size: 12px; }
.pastille { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #dcfce7; color: var(--ok); }
.pastille.peu { background: #fef3c7; color: var(--attention); }
.pastille.plein, .pastille.ferme { background: #f1f5f9; color: var(--doux); }
.pastille.rouge { background: #fee2e2; color: var(--alerte); }
.depart.inactif { opacity: .55; cursor: default; }
.vide { text-align: center; padding: 30px 18px; color: var(--doux); }

/* Plan du car */
.car { max-width: 340px; margin: 0 auto; background: #fff; border: 3px solid #cbd5e1; border-radius: 34px 34px 18px 18px; padding: 16px 14px 18px; }
.car .avant { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 12px; margin-bottom: 12px; border-bottom: 2px dashed #e2e8f0; font-size: 12px; color: var(--doux); }
.volant { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #94a3b8; position: relative; }
.volant::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #94a3b8; }
.rangee { display: grid; grid-template-columns: 1fr 1fr 18px 1fr 1fr; gap: 7px; margin-bottom: 7px; }
.rangee.cinq { grid-template-columns: repeat(5, 1fr); }
.siege { aspect-ratio: 1; border-radius: 9px 9px 6px 6px; border: 1.5px solid #cbd5e1; background: #f8fafc; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; color: #334155; position: relative; }
.siege::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -1px; height: 4px; border-radius: 4px 4px 0 0; background: #cbd5e1; }
.siege.pris { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; border-color: #e2e8f0; }
.siege.pris::after { background: #e2e8f0; }
.siege.choisi { background: var(--c2); border-color: color-mix(in srgb, var(--c2) 70%, #000); color: #111; }
.siege.choisi::after { background: color-mix(in srgb, var(--c2) 60%, #000); }
.legende { display: flex; gap: 14px; justify-content: center; font-size: 13px; color: var(--doux); margin: 12px 0; flex-wrap: wrap; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #cbd5e1; vertical-align: -2px; margin-right: 5px; background: #f8fafc; }
.legende i.p { background: #e2e8f0; border-color: #e2e8f0; } .legende i.c { background: var(--c2); }

/* Barre de validation collante */
.collant { position: sticky; bottom: 0; z-index: 5; background: linear-gradient(180deg, transparent, var(--fond) 30%); padding: 18px 0 14px; }
.collant .carte { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px; }
.collant .total { font-weight: 800; font-size: 20px; }
.collant .bouton { margin-left: auto; }

.choix-paiement { display: grid; gap: 10px; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--bord); border-radius: 14px; padding: 14px; cursor: pointer; background: #fff; }
.option input { margin-top: 4px; accent-color: var(--c1); width: 18px; height: 18px; }
.option:has(input:checked) { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 5%, #fff); }
.option b { display: block; }
.recap { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 15px; }
.recap dt { color: var(--doux); } .recap dd { margin: 0; font-weight: 600; text-align: right; }

/* Tarifs */
.lignes-tarifs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tableau-tarifs { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau-tarifs td { padding: 8px 4px; border-bottom: 1px solid #f1f5f9; }
.tableau-tarifs td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.tableau-tarifs tr { cursor: pointer; }
.tableau-tarifs tr:hover td { background: #f8fafc; }
.ligne-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.km { font-size: 12px; font-weight: 700; background: var(--c2); color: #111; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }

.contacts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact { display: flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--ombre); }
.contact .ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c1) 10%, #fff); color: var(--c1); flex: none; }
.contact small { display: block; color: var(--doux); font-size: 12px; }

footer { margin-top: 40px; padding: 26px 0 40px; color: var(--doux); font-size: 13px; text-align: center; }
footer a { color: var(--doux); }

/* Billet */
.billet { max-width: 440px; margin: 20px auto; background: #fff; border-radius: 22px; box-shadow: var(--ombre); overflow: hidden; }
.billet .haut { background: var(--c1); color: #fff; padding: 18px 20px; display: flex; gap: 12px; align-items: center; }
.billet .haut .logo { width: 44px; height: 44px; font-size: 15px; }
.billet .villes { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 20px 20px 6px; gap: 8px; }
.billet .ville { font-size: 22px; font-weight: 800; line-height: 1.1; }
.billet .ville:last-child { text-align: right; }
.billet .fleche { color: var(--doux); font-size: 22px; }
.billet .infos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px 20px 18px; }
.billet .infos small { display: block; color: var(--doux); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.billet .infos b { font-size: 17px; }
.billet .decoupe { border-top: 2px dashed var(--bord); margin: 0 14px; position: relative; }
.billet .decoupe::before, .billet .decoupe::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--fond); }
.billet .decoupe::before { left: -26px; } .billet .decoupe::after { right: -26px; }
.billet .bas { padding: 18px 20px 22px; text-align: center; }
.billet .qr { width: 190px; height: 190px; margin: 0 auto; }
.billet .qr svg { width: 100%; height: 100%; }
.billet .code { font: 800 28px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em; margin-top: 10px; }
.etat { margin: 0 20px; border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 15px; }
.etat.ok { background: #dcfce7; color: #14532d; }
.etat.attente { background: #fef3c7; color: #78350f; }
.etat.ko { background: #fee2e2; color: #7f1d1d; }
.billet.flou .qr { filter: blur(6px); pointer-events: none; }
.actions-billet { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px auto 0; max-width: 440px; }

.plateforme { background: radial-gradient(circle at 20% 0%, #1d4ed8, #0b1437 70%); color: #fff; padding: 50px 0 80px; }
.plateforme h1 { font-size: clamp(30px, 7vw, 52px); line-height: 1.05; margin: 18px 0 10px; letter-spacing: -.03em; }
.marque { font-weight: 900; letter-spacing: .02em; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.marque span { background: #facc15; color: #111; border-radius: 10px; padding: 2px 9px; }
.compagnies { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: -46px; }
.compagnie { display: flex; align-items: center; gap: 14px; text-decoration: none; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: calc(100% - 32px); box-shadow: var(--ombre); }
.charge { display: inline-block; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tourne .8s linear infinite; vertical-align: -3px; }
@keyframes tourne { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .champs { grid-template-columns: 1fr; }
  .inverser { justify-self: end; margin: -8px 0; transform: rotate(90deg); height: 40px; width: 40px; }
  .depart .heure { font-size: 22px; }
}
@media print {
  body { background: #fff; }
  .actions-billet, footer, .lien-billet, .toast { display: none !important; }
  .billet { box-shadow: none; border: 1px solid #ccc; }
}
