/* Application chauffeur. Même palette que site.css, mais pensée pour un
   téléphone tenu d'une main, dans une voiture : gros boutons, gros texte,
   rien à viser précisément. Aucune ressource externe, comme le site. */

:root {
  --encre: #0f1729;
  --encre-douce: #4b5563;
  --accent: #1a56db;
  --accent-sombre: #1442ab;
  --accent-pale: #eef2ff;
  --bord: #e5e7eb;
  --fond: #ffffff;
  --fond-doux: #f7f8fa;
  --vert: #047857;
  --vert-pale: #d1fae5;
  --alerte: #b91c1c;
  --alerte-pale: #fee2e2;
  --rayon: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --encre: #f3f4f6;
    --encre-douce: #9ca3af;
    --accent: #3b82f6;
    --accent-sombre: #2563eb;
    --accent-pale: #1e293b;
    --bord: #334155;
    --fond: #0b1120;
    --fond-doux: #111827;
    --vert: #34d399;
    --vert-pale: #064e3b;
    --alerte: #f87171;
    --alerte-pale: #450a0a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  color: var(--encre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.entete {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--fond);
  border-bottom: 1px solid var(--bord);
  z-index: 1;
}
.marque { font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.marque .transfer { color: var(--accent); }

.etat {
  font-size: 14px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--fond-doux);
  color: var(--encre-douce);
}
.etat[data-etat="en-service"] { background: var(--vert-pale); color: var(--vert); }
.etat[data-etat="reconnexion"] { background: var(--alerte-pale); color: var(--alerte); }

main { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }

h1 { font-size: 26px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 32px 0 12px; color: var(--encre-douce); font-weight: 600; }

label { display: block; font-weight: 600; margin: 16px 0 6px; }
input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* en dessous, iOS zoome sur le champ */
  padding: 14px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--fond-doux);
  color: var(--encre);
}

.bouton {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 16px;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--rayon);
  cursor: pointer;
  background: var(--fond-doux);
  color: var(--encre);
}
.bouton.principal { background: var(--accent); color: #fff; }
.bouton.principal:active { background: var(--accent-sombre); }
.bouton.geant { min-height: 88px; font-size: 22px; }
.bouton.arreter { background: var(--fond-doux); color: var(--encre); border: 2px solid var(--bord); }
.bouton:disabled { opacity: 0.6; }

.lien {
  font: inherit;
  font-size: 14px;
  background: none;
  border: 0;
  color: var(--encre-douce);
  text-decoration: underline;
  cursor: pointer;
  padding: 8px 0;
}

.aide, .vide, .note { color: var(--encre-douce); font-size: 15px; }
.erreur, .alerte { color: var(--alerte); font-weight: 600; }
.alerte { background: var(--alerte-pale); padding: 12px 14px; border-radius: var(--rayon); }
.pied { margin-top: 40px; text-align: center; }

/* Courses acceptées */
.course {
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  padding: 16px;
  margin-bottom: 12px;
}
.course .quand { font-weight: 700; margin: 0 0 8px; }
.course .trajet { margin: 0 0 4px; }
.course .trajet span { color: var(--encre-douce); font-size: 14px; display: block; }
.course .liens { display: flex; gap: 8px; margin-top: 12px; }
.course .liens a {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--accent-pale);
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

/* Offre : plein écran, impossible à manquer */
.offre {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}
.offre[hidden] { display: none; }
.carte-offre {
  width: 100%;
  max-width: 560px;
  background: var(--fond);
  border-radius: 20px 20px 0 0;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
}
.surtitre { margin: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.depart { font-size: 24px; font-weight: 700; margin: 8px 0 16px; }
.carte-offre dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.carte-offre dt { font-size: 13px; color: var(--encre-douce); }
.carte-offre dd { margin: 0; font-size: 22px; font-weight: 700; }
.minuteur { height: 8px; background: var(--fond-doux); border-radius: 4px; overflow: hidden; margin-top: 20px; }
.barre { height: 100%; width: 100%; background: var(--accent); transition: width 0.25s linear; }
.reste { font-size: 14px; color: var(--encre-douce); margin: 6px 0 0; }
.actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.actions .bouton { min-height: 64px; font-size: 20px; }

/* ── Formulaire d'inscription et documents ─────────────────────────── */
a.marque { color: inherit; text-decoration: none; }
select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 14px;
  border: 1px solid var(--bord);
  border-radius: var(--rayon);
  background: var(--fond-doux);
  color: var(--encre);
}
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facultatif { font-size: 13px; font-weight: 400; color: var(--encre-douce); }
.bouton.secondaire {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; margin-top: 8px; font-size: 15px;
  background: var(--accent-pale); color: var(--accent); text-align: center;
}
.document { border: 1px solid var(--bord); border-radius: var(--rayon); padding: 14px; margin-bottom: 12px; }
.document-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.document-etat { font-size: 13px; color: var(--encre-douce); white-space: nowrap; }
.document-etat.ok { color: var(--vert); font-weight: 600; }
.document .aide { margin: 4px 0 0; }
.apercus { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.apercus:empty { display: none; }
.vignette {
  position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden;
  background: var(--fond-doux); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.vignette button {
  position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(15, 23, 41, 0.75); color: #fff; font-size: 16px; line-height: 1; cursor: pointer;
}
.case { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; margin-top: 24px; }
.case input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.case a { color: var(--accent); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
#erreurs { display: grid; gap: 4px; margin-top: 16px; }
