/* Le socle commun aux trois espaces. La couleur vient de la fiche marque. */
:root {
  --marque: #1B2A4A; --encre: #14181f; --doux: #5d6675; --trait: #e3e6ec; --fond: #f4f5f8; --carte: #fff;
  --ok: #17794a; --ok-fond: #e6f4ec; --alerte: #b3261e; --alerte-fond: #fbeae8; --attente: #8a5a00; --attente-fond: #fdf3dc;
  --rayon: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.page { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.entete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 0 14px; }
.entete .nom { font-weight: 700; font-size: 17px; color: var(--marque); letter-spacing: -.01em; }
.entete .espace { font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .08em; }
.lien { background: none; border: 0; padding: 8px 0; color: var(--doux); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.carte { background: var(--carte); border-radius: var(--rayon); padding: 20px; box-shadow: 0 1px 2px rgba(20,24,31,.05), 0 8px 24px rgba(20,24,31,.05); }
.carte + .carte { margin-top: 12px; }
.bouton { display: block; width: 100%; border: 0; border-radius: 14px; padding: 17px 18px; font: inherit; font-weight: 650; font-size: 17px;
  background: var(--marque); color: #fff; cursor: pointer; text-align: center; text-decoration: none; transition: transform .08s, opacity .15s; }
.bouton:active { transform: scale(.985); }
.bouton[disabled] { opacity: .55; cursor: default; }
.bouton.clair { background: #fff; color: var(--encre); box-shadow: inset 0 0 0 1.5px var(--trait); }
.bouton.vert { background: var(--ok); }
.bouton.petit { padding: 12px 14px; font-size: 15px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--doux); margin: 14px 0 6px; }
input { width: 100%; border: 1.5px solid var(--trait); border-radius: 12px; padding: 14px; font: inherit; background: #fff; color: var(--encre); }
input:focus { outline: none; border-color: var(--marque); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marque) 18%, transparent); }
.bouton:focus-visible, .lien:focus-visible, .onglets button:focus-visible { outline: 3px solid color-mix(in srgb, var(--marque) 45%, transparent); outline-offset: 2px; }
.onglets { display: grid; grid-template-columns: 1fr 1fr; background: #e9ebf0; border-radius: 12px; padding: 4px; margin-bottom: 6px; }
.onglets button { border: 0; background: none; padding: 10px 4px; font-size: 14.5px; white-space: nowrap; border-radius: 9px; font: inherit; font-weight: 600; color: var(--doux); cursor: pointer; }
.onglets button[aria-selected="true"] { background: #fff; color: var(--encre); box-shadow: 0 1px 3px rgba(20,24,31,.12); }
.message { border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin-top: 14px; background: var(--alerte-fond); color: var(--alerte); }
.message.info { background: var(--attente-fond); color: var(--attente); }
.pastille { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; padding: 6px 11px; border-radius: 99px; background: #e9ebf0; color: var(--doux); }
.pastille::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pastille.ok { background: var(--ok-fond); color: var(--ok); }
.trajet { display: grid; grid-template-columns: 18px 1fr; gap: 0 12px; margin: 4px 0; }
.trajet .rail { grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: center; padding: 7px 0; }
.trajet .rail i { width: 10px; height: 10px; border-radius: 50%; border: 2.5px solid var(--marque); background: #fff; flex: none; }
.trajet .rail i:last-child { border-radius: 2px; background: var(--marque); }
.trajet .rail b { flex: 1; width: 2px; background: var(--trait); margin: 3px 0; }
.trajet .lieu { padding: 2px 0 14px; min-width: 0; }
.trajet .lieu small { display: block; font-size: 12px; color: var(--doux); text-transform: uppercase; letter-spacing: .06em; }
.trajet .lieu span { font-weight: 600; overflow-wrap: anywhere; }
.chiffres { display: flex; gap: 18px; color: var(--doux); font-size: 14px; font-variant-numeric: tabular-nums; }
.chiffres b { color: var(--encre); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.bandeau-demo { background: var(--attente-fond); color: var(--attente); text-align: center; font-size: 12.5px; font-weight: 650; letter-spacing: .04em; padding: 5px 10px; }
/* La carte */
.plan { height: 230px; border-radius: var(--rayon); overflow: hidden; background: #e6e9ee; z-index: 0; }
.plan.grand { height: min(62vh, 620px); }
.repere { display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--marque); box-shadow: 0 1px 4px rgba(20,24,31,.35); }
.repere.arrivee { border-radius: 4px; background: var(--marque); border-color: #fff; }
.repere.voiture { background: var(--ok); border-color: #fff; width: 20px; height: 20px; } .repere.voiture.prise { background: var(--marque); } .repere.voiture.moi { background: var(--marque); }
.leaflet-container { font: inherit; } .leaflet-control-attribution { font-size: 10.5px; }
/* La messagerie de la course */
.discussion { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 4px 0 16px; min-height: 0; }
.fil-tete { display: flex; align-items: center; gap: 14px; } .fil-tete b { font-size: 18px; }
.fil { flex: 1; min-height: 180px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--carte); border-radius: var(--rayon); }
.bulle { align-self: flex-start; max-width: 82%; background: #eef0f4; border-radius: 16px 16px 16px 4px; padding: 9px 13px; overflow-wrap: anywhere; }
.bulle.moi { align-self: flex-end; background: var(--marque); color: #fff; border-radius: 16px 16px 4px 16px; }
.bulle small { display: block; font-size: 11px; opacity: .65; margin-top: 2px; text-align: right; }
.fil-vide { color: var(--doux); text-align: center; margin: auto; }
.rapides { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; } .rapides button { flex: none; border: 1.5px solid var(--trait); background: #fff; border-radius: 99px; padding: 8px 13px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.saisie { display: grid; grid-template-columns: 1fr auto; gap: 8px; } .saisie .bouton { width: auto; padding: 0 18px; }
.avec-pastille { position: relative; } .non-lus { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--alerte); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.repere.voiture.client { background: #E8A13A; }
