/* Écran du chauffeur, habillage (consignes d'Hicham du 30/11/2026, docs/ECRAN-CHAUFFEUR.md, § 7 et § 8).
   Mode conduite : fond bleu ardoise très sombre dans tous les états (noir en veille). Plus de fond coloré (§ 8) : la
   couleur de l'état ne vit que sur les éléments. Vert quand une demande est pour lui (pictogramme de destination, anneau,
   bouton à glisser), ambre clair pendant la course (étape en cours, grand bouton), rouge sur les boutons de « Rendre la
   course ». Trois couleurs d'état, et seulement trois, chacune avec son mot et son pictogramme. Mode appli : l'ivoire du
   site (#f3efe6), cases presque blanches posées dessus, texte en ardoise. Jamais de blanc pur.
   Une seule police, Onest (celle de l'interface du site), à sa graisse la plus forte servie par le site (600) ; chiffres de
   largeur fixe. Aucun texte sous 20 px en mode conduite (vérifié par ecran-chauffeur/parcours.mjs). Aucun italique.
   Toutes les couleurs et la police sont des variables : un autre groupement change les siennes ici, et seulement ici. */
@font-face { font-family: 'Onest Variable'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../../polices/onest-latin-400-600.woff2') format('woff2'); }
@font-face { font-family: 'Onest Variable'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../../polices/onest-latin-ext-400-600.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }

/* ------------------------------------------------------------------ variables : piste « Annemasse » (charte du site) */
:root {
  --police: 'Onest Variable', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gras: 600;
  --ivoire: #f3efe6;            /* textes sur fond sombre, fond du mode appli */
  --case: #fffdf9;              /* cases du mode appli : presque blanches, jamais de blanc pur */
  --ardoise: #171c2e;           /* texte du mode appli */
  --gris: #5a5e70;              /* texte secondaire du mode appli (5,6:1 sur l'ivoire) */
  --filet: rgba(23, 28, 46, 0.14);
  --fond: #121626;              /* mode conduite, au repos */
  --fond-2: #1e2338;
  --fond-3: #2a3049;
  --brume: #c9c7d6;             /* texte secondaire sur fond sombre (9,3:1) */
  --filet-clair: rgba(243, 239, 230, 0.28);
  --veille: #000000;
  --veille-texte: #b9b4a8;      /* 10:1 sur le noir, sans éblouir */
  /* Couleurs d'état, de jour ; la nuit (20 h à 7 h) les remplace plus bas, un ton plus bas. Contrastes vérifiés par
     tests/ecran-chauffeur-habillage.test.mjs : texte à 4,5:1 au moins, traits et pictogrammes à 3:1 au moins. */
  --vert: #185c3d;              /* « sapin » : fond du bouton à glisser, l'ivoire dessus (6,9:1) */
  --vert-trait: #52bd88;        /* pictogrammes et anneau, sur l'ardoise (7,7:1) et sur le bouton vert (3,4:1) */
  --ambre: #f0b54a;             /* « miel », un doré lumineux : étape en cours, grand bouton (l'ardoise dessus, 9,2:1) */
  --ambre-texte: #171c2e;       /* texte posé sur l'ambre */
  --rouge: #a3322a;             /* boutons de « Rendre la course », l'ivoire dessus (6:1) */
  --bleu: #7fb2ff;              /* voyant « En course » (01/12/2026), rond et mot sur l'ardoise (8:1) ; étape « Départ » */
  --violet: #b9a3ff;            /* étape « Client » de la course (01/12/2026, point 9), sur l'ardoise */
  --whatsapp: #25d366;          /* le logo de WhatsApp, seul (01/12/2026) */
  --waze: #33ccff;              /* les logos de navigation de l'étape, seuls (01/12/2026 au soir) */
  --google-maps: #4285f4;
  --touche: #8a4b24;            /* la marque, en simple touche : cuir cognac du site */
  --appli-action: #8a4b24;      /* bouton principal du mode appli */
  --appli-action-texte: #f3efe6;
  --duree-teinte: 600ms;        /* un élément qui prend la couleur de l'état */
  --courbe: cubic-bezier(0.2, 0.8, 0.2, 1);
  --courbe-accroche: cubic-bezier(0.3, 1.45, 0.45, 1);
  --bord: max(16px, env(safe-area-inset-left, 0px));
  --haut: max(12px, env(safe-area-inset-top, 0px), var(--haut-telegram, 0px)); /* plein écran de Telegram (01/12/2026) */
  --bas: max(14px, env(safe-area-inset-bottom, 0px));
}
/* Piste « Welo » : une charte neutre pour tous les groupements ; le nom du groupement en haut, « par Welo » en discret,
   et le citron de Welo (#c6ff33, welo-agency-v2/src/styles/themes.css) en simple touche, jamais en aplat. */
[data-piste='welo'] {
  --fond: #0b1526;
  --fond-2: #16223a;
  --fond-3: #22304c;
  --touche: #c6ff33;
  --appli-action: #0b1526;
  --appli-action-texte: #f3efe6;
}
/* Les nuances à comparer (?vert=bouteille, ?ambre=ble), puis la nuit : les mêmes couleurs, moins lumineuses. */
[data-vert='bouteille'] { --vert: #145a55; --vert-trait: #52bdb2; }
[data-ambre='ble'] { --ambre: #f3c969; }
[data-heure='nuit'] { --vert: #144d33; --vert-trait: #3fae78; --ambre: #c9963a; --rouge: #8a2a23; --bleu: #6a9be0; --violet: #9c87e3; }
[data-heure='nuit'][data-vert='bouteille'] { --vert: #104a46; --vert-trait: #47b0a6; }
[data-heure='nuit'][data-ambre='ble'] { --ambre: #cfa955; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100%; font: 400 20px/1.35 var(--police); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.conduite { background: var(--fond); color: var(--ivoire); }
body.conduite[data-couleur='veille'] { background: var(--veille); color: var(--veille-texte); }
body.appli { background: var(--ivoire); color: var(--ardoise); }
p, h1, h2, ol, ul { margin: 0; }
b, strong, h1, h2 { font-weight: var(--gras); }
button, a.bouton { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; touch-action: manipulation; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.cache { display: none; }
.cache-lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Le logo de WhatsApp : plein, dans son vert, le seul endroit où cette couleur paraît (01/12/2026, points 1, 8 et 13). */
svg.ic.logo { fill: currentColor; stroke: none; }
.logo-whatsapp { color: var(--whatsapp); }
svg.ic { width: 30px; height: 30px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#i-dispo circle { fill: currentColor; }

.ecran { max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; display: flex; flex-direction: column; }
.conduite .ecran { height: 100vh; height: 100dvh; }

/* ------------------------------------------------------------------ mode conduite : le cadre */
/* L'en-tête ne se déforme jamais (01/12/2026, point 2) : deux colonnes fixes pour le son et « Appli », le reste au mot de
   l'état, qui se réduit (24 px, puis 20 px sur un petit écran) et se coupe proprement (…) plutôt que de pousser. */
.bandeau { display: grid; grid-template-columns: minmax(0, 1fr) 56px auto; align-items: center; gap: 6px; padding: var(--haut) var(--bord) 8px; }
.etat { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: var(--gras); font-size: 24px; }
.etat .mot { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rond { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--filet-clair); }
.rond[aria-pressed='true'] { background: var(--ivoire); color: var(--fond); border-color: var(--ivoire); }
/* « Appli » à la largeur de son mot, 104 px au moins (01/12/2026 au soir : « Меню » ne déborde plus). */
.vers-appli { min-width: 104px; height: 56px; padding: 0 8px; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 2px solid var(--filet-clair); font-weight: var(--gras); font-size: 20px; overflow: hidden; }
.vers-appli .ic { width: 24px; height: 24px; }
.vers-appli span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 374px) { .etat { font-size: 20px; gap: 7px; } .etat .voyant { width: 14px; height: 14px; } }
/* Sous 360 px (les plus petits téléphones), « Appli » garde son pictogramme seul, sur un rond comme le son : le mot de
   l'état garde la place de tenir en entier dans les cinq langues. Sur un même téléphone, rien ne change d'un état à l'autre. */
@media (max-width: 359px) { .bandeau { grid-template-columns: minmax(0, 1fr) 56px 56px; } .vers-appli { width: 56px; min-width: 0; padding: 0; position: relative; } .vers-appli span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
/* Le voyant (point 1) : un rond, sans fond coloré autour ; le mot dans la même couleur. Jamais la couleur seule : le mot. */
.essai { flex: none; margin-left: 2px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--filet-clair); color: var(--brume); font-size: 20px; font-weight: 400; line-height: 1.3; }
.voyant { width: 16px; height: 16px; border-radius: 50%; flex: none; background: currentColor; }
.etat[data-voyant='dispo'] { color: var(--vert-trait); }
.etat[data-voyant='pause'] { color: var(--ambre); }
.etat[data-voyant='course'] { color: var(--bleu); }
.etat[data-voyant='vacances'], .etat[data-voyant='absent'] { color: var(--brume); }
.etat[data-voyant='vacances'] .voyant, .etat[data-voyant='absent'] .voyant { background: none; border: 2px solid currentColor; }
/* « Connexion perdue » (temps réel, 01/12/2026 au soir) : petit, dans la couleur du texte, de jour, de nuit, en conduite et en appli. */
.connexion-perdue { margin: 0 var(--bord) 8px; padding: 6px 12px; border-radius: 12px; border: 2px dashed currentColor; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: var(--gras); }
.connexion-perdue svg { width: 22px; height: 22px; flex: none; }
.entrainement { margin: 0 var(--bord) 8px; padding: 8px 14px; border-radius: 14px; border: 2px dashed var(--ivoire); display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: var(--gras); }
.marque { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--brume); margin: 2px 0 10px; }
.marque::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--touche); flex: none; }
.marque .par { display: none; }
[data-piste='welo'] .marque .par { display: inline; opacity: 0.8; }

.corps { flex: 1; display: flex; flex-direction: column; padding: 0 var(--bord); min-height: 0; overflow-y: auto; }
.commandes { display: grid; gap: 12px; padding: 10px var(--bord) var(--bas); }
.petits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.petit { min-height: 72px; border-radius: 20px; border: 2px solid var(--filet-clair); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: var(--gras); font-size: 21px; line-height: 1.1; padding: 8px 12px; text-align: center; }
.petit .ic { width: 28px; height: 28px; }
/* Second retour du 01/12/2026 au soir : aucun texte de bouton sur deux lignes, à 320 comme à 390 px, dans les cinq langues
   (ecran-chauffeur/une-ligne.mjs le mesure). Sous 340 px de commandes, le pictogramme passe au-dessus du mot. */
.petit span { white-space: nowrap; }
@container (max-width: 339px) {
  .petits .petit { flex-direction: column; gap: 2px; padding: 6px 8px; } .petits .petit .ic { width: 26px; height: 26px; }
}
.geant span, .discret span { white-space: nowrap; }
.petit.large { width: 100%; }
.petit.canal .ic { width: 34px; height: 34px; }
.petit:active { background: rgba(243, 239, 230, 0.12); }
.lien { min-height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 21px; font-weight: 500; }
.lien[aria-pressed='true'] { text-decoration: underline; text-underline-offset: 6px; }

/* Le bouton géant (idée 6) : toujours au même endroit, en bas, sous le pouce ; il change de rôle. */
.geant { width: 100%; height: 112px; border-radius: 56px; display: flex; align-items: center; justify-content: center; gap: 16px; font-weight: var(--gras); font-size: 30px; line-height: 1.1; padding: 0 24px; text-align: center; }
.geant .ic { width: 40px; height: 40px; }
/* Sous 340 px de commandes (01/12/2026 au soir), le grand bouton garde son mot sur une ligne. Après la règle de base. */
@container (max-width: 339px) { .geant { font-size: 25px; gap: 10px; padding: 0 16px; } .geant .ic { width: 32px; height: 32px; } }
button.geant { background: var(--ivoire); color: var(--fond); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
button.geant:active { transform: scale(0.98); }
.geant.plaque { border: 2px dashed var(--filet-clair); color: var(--ivoire); font-size: clamp(20px, 6.4vw, 26px); gap: 12px; padding: 0 16px; white-space: nowrap; }
/* « Vous êtes disponible » sur une seule ligne (point 3) ; « Disponible » seul si la place manque vraiment. */
.commandes { container-type: inline-size; }
.plaque .court { display: none; }
@container (max-width: 279px) { .plaque .long { display: none; } .plaque .court { display: inline; } }

/* ------------------------------------------------------------------ la file en pastilles (idée 10) */
.file-tete { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; white-space: nowrap; font-size: 20px; color: var(--brume); margin: 0 0 8px; }
.file-tete b { color: var(--ivoire); font-size: 22px; }
.pastilles { display: flex; gap: 10px; align-items: flex-end; overflow-x: auto; margin: 0 calc(-1 * var(--bord)); padding: 4px var(--bord) 6px; scrollbar-width: none; }
.pastilles::-webkit-scrollbar { display: none; }
.pastilles li { list-style: none; flex: none; min-width: 78px; height: 78px; border-radius: 39px; padding: 0 14px; background: var(--fond-2); display: grid; place-content: center; text-align: center; line-height: 1.05; }
.pastilles .rang { font-weight: var(--gras); font-size: 24px; }
.pastilles .prenom { font-size: 20px; }
.pastilles .ic { width: 24px; height: 24px; margin: 0 auto 2px; }
.pastilles li.absent { background: transparent; border: 2px dashed var(--filet-clair); color: var(--brume); }
.pastilles li.moi { min-width: 104px; height: 104px; border-radius: 52px; background: var(--ivoire); color: var(--fond); }
.pastilles li.moi .rang { font-size: 34px; }
.pastilles li.moi.absent { background: transparent; color: var(--ivoire); border: 3px solid var(--ivoire); }

/* La place, en énorme. */
.place { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 0; }
.chiffre { font-weight: var(--gras); font-size: 168px; line-height: 0.9; letter-spacing: -0.04em; }
.chiffre.mot { font-size: 84px; letter-spacing: -0.02em; }
.place .sous { font-size: 22px; color: var(--brume); margin-top: 14px; max-width: 18em; }
.place .sous b { color: var(--ivoire); }

/* ------------------------------------------------------------------ une demande arrive (vert) */
.demande-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demande-tete h1 { font-size: 30px; line-height: 1.1; }
.destination { display: grid; gap: 14px; align-items: center; margin-top: 4px; }
.picto-geant { width: 76px; height: 76px; border-radius: 22px; background: var(--fond-2); display: grid; place-items: center; }
.picto-geant .ic { width: 52px; height: 52px; stroke-width: 1.8; }
.genre { font-size: 20px; }
.vers { font-size: 40px; font-weight: var(--gras); line-height: 1.08; }
/* Carte de demande repensée (retour d'essai d'Hicham du 02/12/2026, suite de la PR 125). Aucun texte sur deux lignes, aucun
   sous 20 px. En tête, pour une course planifiée, le jour et l'heure dans une étiquette ivoire, bien visible. */
.quand-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 10px; padding: 6px 16px 6px 12px; border-radius: 16px; background: var(--ivoire); color: var(--fond); font-size: 28px; font-weight: var(--gras); line-height: 1.1; white-space: nowrap; }
.quand-tag .ic { width: 28px; height: 28px; stroke-width: 2.2; }
/* Le rappel d'une course déjà acceptée trop près : discret, en gris clair, sur une ligne. */
.chevauche { display: flex; align-items: center; gap: 8px; margin: -2px 0 10px; font-size: 20px; color: var(--brume); white-space: nowrap; overflow: hidden; }
.chevauche .ic { width: 22px; height: 22px; }
.chevauche span { overflow: hidden; text-overflow: ellipsis; }
/* Le trajet, comme une carte de VTC : point plein (départ), petit trait, point creux (arrivée). */
.trajet { margin-top: 14px; display: grid; }
.trajet .point { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trajet .puce { flex: none; width: 16px; height: 16px; margin: 0 4px; border-radius: 50%; }
.trajet .puce.plein { background: var(--ivoire); }
.trajet .puce.creux { border: 3px solid var(--ivoire); }
.trajet .puce.carre { width: 12px; height: 12px; margin: 0 6px; border-radius: 3px; background: var(--brume); }
.trajet .nom { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trajet .depart .nom, .trajet .arret .nom { font-size: 24px; line-height: 1.2; }
.trajet .arret .nom { color: var(--brume); }
.trajet .vers { margin: 0; display: block; font-size: 34px; line-height: 1.15; -webkit-line-clamp: none; line-clamp: none; }
.trajet .liaison { display: flex; align-items: center; gap: 12px; min-height: 22px; }
.trajet .trait { flex: none; align-self: stretch; width: 2px; margin: 0 0 0 11px; min-height: 22px; background: var(--filet-clair); }
/* « Ligne directe » : une petite pastille discrète, à droite du trait. */
.trajet .direct { margin-left: auto; padding: 0 10px; border-radius: 12px; border: 1px solid var(--filet-clair); font-size: 20px; line-height: 1.2; color: var(--brume); white-space: nowrap; }
/* Le canal du client, à côté du départ : le logo de WhatsApp, le SMS, ou le combiné pour un appel. */
.canal-client { flex: none; margin-left: auto; display: grid; place-items: center; }
.canal-client .ic { width: 30px; height: 30px; }
.badges { margin-top: 10px; display: flex; }
.badge-vide { padding: 2px 12px; border-radius: 12px; background: var(--fond-3); font-size: 20px; line-height: 1.35; white-space: nowrap; }
/* Les distances en deux temps : l'approche en gris clair, puis la course, et le total en gras à droite. */
.distances { margin-top: 14px; }
.distances.seule { font-size: 28px; font-weight: var(--gras); line-height: 1.15; white-space: nowrap; }
button.distances { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 16px; border-radius: 20px; background: var(--fond-2); color: var(--ivoire); text-align: left; line-height: 1.1; white-space: nowrap; }
.distances .part { display: grid; }
.distances .km { font-size: 20px; }
.distances .min { font-size: 24px; }
.distances .aller { color: var(--brume); }
.distances .total { margin-left: auto; text-align: right; font-weight: var(--gras); }
.distances .total .min { font-size: 26px; }
.distances .op { font-size: 22px; color: var(--brume); }
/* Passagers, bagages, équipements : de petites icônes dessinées, chacune avec son chiffre ; la langue du client à droite. */
.infos { margin-top: 14px; display: flex; align-items: center; gap: 16px; font-size: 22px; line-height: 1.2; white-space: nowrap; }
.infos .info { display: inline-flex; align-items: center; gap: 5px; }
.infos .info .ic { width: 26px; height: 26px; }
.infos .langue { margin-left: auto; padding: 0 10px; border-radius: 10px; border: 2px solid var(--filet-clair); font-size: 20px; font-weight: var(--gras); letter-spacing: 0.04em; }
@media (max-width: 359px) { .infos { gap: 12px; } .infos .info .ic { width: 24px; height: 24px; } .quand-tag { font-size: 26px; } }
/* À 320 px, la ligne des distances tient même pour une approche de 72 h (essai d'Hicham depuis Fès), toujours à 20 px au moins. */
@media (max-width: 359px) { button.distances { gap: 4px; padding: 4px 10px; } .distances .min, .distances .op { font-size: 20px; } .distances .total .min { font-size: 22px; } }
.petite-carte { display: block; margin-top: 10px; width: 132px; height: 88px; border-radius: 14px; background: var(--fond-2); }
.petite-carte .trait-carte { stroke: var(--ivoire); stroke-width: 2; stroke-dasharray: 5 6; fill: none; }
.petite-carte .vous { fill: var(--ivoire); }
.petite-carte .client { fill: none; stroke: var(--ivoire); stroke-width: 3; }
.texte-dit { margin-top: 10px; font-size: 20px; }
/* Le chrono dans le rond blanc du bouton, en gros chiffres, à la place de la coche. */
.pouce-coeur .chrono { font-size: 28px; font-weight: var(--gras); line-height: 1; letter-spacing: -0.02em; }

/* Glisser pour accepter (idée 7), l'anneau qui se vide autour du bouton (idée 3). */
.glisse { position: relative; height: 112px; border-radius: 56px; background: var(--fond-2); border: 2px solid var(--filet-clair); touch-action: none; user-select: none; -webkit-user-select: none; overflow: hidden; }
.glisse-remplir { position: absolute; inset: 0; width: 0; background: var(--ivoire); border-radius: 56px; opacity: 0.18; }
.glisse-texte .court { display: none; }
@container (max-width: 349px) { .glisse-texte .long { display: none; } .glisse-texte .court { display: inline; } }
.glisse-texte { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 12px 0 104px; font-size: 22px; font-weight: var(--gras); white-space: nowrap; pointer-events: none; }
.pouce { position: absolute; left: 4px; top: 4px; width: 100px; height: 100px; border-radius: 50%; display: grid; place-items: center; touch-action: none; cursor: grab; }
.pouce-coeur { width: 80px; height: 80px; border-radius: 50%; background: var(--ivoire); color: var(--fond); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.pouce-coeur .ic { width: 40px; height: 40px; stroke-width: 2.6; }
.anneau { position: absolute; inset: 0; width: 100px; height: 100px; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 7; }
.anneau .anneau-fond { stroke: rgba(0, 0, 0, 0.25); }
.anneau .anneau-reste { stroke: var(--ivoire); stroke-linecap: round; transition: stroke-dashoffset 500ms linear; }
.glisse.accroche .pouce { transition: transform 220ms var(--courbe-accroche); }
.glisse.retour .pouce { transition: transform 260ms var(--courbe); }
.glisse.retour .glisse-remplir { transition: width 260ms var(--courbe); }
.glisse-aide { text-align: center; font-size: 21px; font-weight: var(--gras); min-height: 0; }

/* « Je passe » : cinq secondes pour se raviser (idée 9). */
.passe { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.passe h1 { font-size: 34px; line-height: 1.1; }
.rappel-demande { display: flex; align-items: center; gap: 12px; font-size: 22px; color: var(--brume); }
.rappel-demande .ic { width: 40px; height: 40px; }
.passe p { font-size: 24px; }
.barre { height: 14px; border-radius: 7px; background: var(--fond-3); overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--ivoire); border-radius: 7px; transform-origin: left; transition: transform 500ms linear; }

/* Course en cours (ambre). */
.course-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-tete h1 { font-size: 30px; }
.course-tete .km { font-size: 22px; white-space: nowrap; }
.etapes { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; }
.etapes li { list-style: none; }
.etape { width: 100%; min-height: 84px; border-radius: 22px; display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px; padding: 10px 16px; text-align: left; border: 2px solid var(--filet-clair); }
.etape .titre { font-size: 24px; font-weight: var(--gras); display: block; }
.etape .lieu { font-size: 20px; display: block; }
.etape .ic { width: 36px; height: 36px; }
.etape.allumee { background: var(--fond-2); border-color: var(--ivoire); border-width: 3px; min-height: 100px; }
/* Une seule étape à la fois (01/12/2026, points 7 et 8), avec « Waze » dit en clair. */
.course-tete + .etape { margin-top: 14px; grid-template-columns: 40px 1fr auto; }
.ensuite { margin-top: 12px; font-size: 20px; color: var(--brume); }
.discret { justify-self: center; min-height: 48px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; color: var(--brume); font-size: 20px; text-decoration: underline; text-underline-offset: 5px; }
.discret .ic { width: 24px; height: 24px; }
/* « Écouter le résumé » (point 10) : un rond à côté du titre, 56 px d'appui ; ■ pendant la lecture. */
.destination { grid-template-columns: 76px 1fr 56px; }
.ecouter-rond { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--filet-clair); display: grid; place-items: center; align-self: start; }
.ecouter-rond .signe { font-size: 22px; line-height: 1; }
.ecouter-rond[aria-pressed='true'] { background: var(--ivoire); color: var(--fond); border-color: var(--ivoire); }
.ecouter-rond::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--vert-trait); opacity: 0; pointer-events: none; }
.etape.faite { opacity: 0.6; border-style: dashed; }
.aide-etape { font-size: 20px; margin: 10px 2px 0; }

/* Fin de course (idée 14). */
.fin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.fin .sceau { width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--ivoire); display: grid; place-items: center; }
.fin .sceau .ic { width: 64px; height: 64px; stroke-width: 2.4; }
.fin h1 { font-size: 30px; }
.fin .nieme { font-size: 56px; font-weight: var(--gras); line-height: 1; letter-spacing: -0.02em; }
.fin p { font-size: 22px; color: var(--brume); }

/* Écran de veille (idée 5) : noir, la place seule, en très grand. */
.veille { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; width: 100%; color: var(--veille-texte); }
.veille .chiffre { font-size: 200px; }
.veille .chiffre.mot { font-size: 88px; }
.veille .sous { font-size: 26px; }
.veille .rappel { position: absolute; bottom: calc(var(--bas) + 12px); left: 0; right: 0; font-size: 20px; opacity: 0.75; }
.veille .etat { position: absolute; top: calc(var(--haut) + 8px); left: var(--bord); font-size: 22px; }

/* Feuille « Rendre la course » (idée 13). */
.voile { position: fixed; inset: 0; background: rgba(10, 12, 22, 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.feuille { width: 100%; max-width: 480px; background: var(--fond); color: var(--ivoire); border-radius: 28px 28px 0 0; padding: 0 var(--bord) var(--bas); display: grid; gap: 10px; }
.feuille-tete { margin: 0 calc(-1 * var(--bord)) 6px; padding: 18px var(--bord); border-radius: 28px 28px 0 0; border-bottom: 1px solid var(--filet-clair); display: flex; align-items: center; gap: 12px; font-size: 26px; font-weight: var(--gras); }
.feuille-tete .ic { width: 32px; height: 32px; }
.feuille p { font-size: 20px; color: var(--brume); }
.motif { min-height: 80px; border-radius: 20px; background: var(--ivoire); color: var(--fond); font-weight: var(--gras); font-size: 24px; display: flex; align-items: center; gap: 14px; padding: 10px 20px; text-align: left; }
.motif.petit-motif { background: transparent; color: var(--ivoire); border: 2px solid var(--filet-clair); min-height: 68px; font-size: 21px; }
.feuille .retour-course { min-height: 64px; font-size: 21px; font-weight: var(--gras); }
/* « Je pars en course » (01/12/2026) : deux gros choix côte à côte, l'ivoire sur l'ardoise, le bleu de « En course » en trait. */
.choix-gros { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choix-course { min-height: 168px; border-radius: 24px; background: var(--ivoire); color: var(--fond); display: grid; justify-items: center; align-content: center; gap: 6px; padding: 14px 10px; text-align: center; }
.choix-course .ic { width: 44px; height: 44px; }
.choix-course b { font-size: 30px; line-height: 1.05; }
.choix-course span { font-size: 20px; line-height: 1.2; color: var(--fond-3); }
.choix-course:active { transform: scale(0.98); }

/* Petit message en haut, quelques secondes. */
.toast { position: fixed; left: 50%; top: calc(var(--haut) + 76px); transform: translateX(-50%); max-width: 440px; width: calc(100% - 32px); background: var(--ivoire); color: var(--ardoise); border-radius: 18px; padding: 14px 18px; font-size: 20px; font-weight: var(--gras); z-index: 20; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }

/* ------------------------------------------------------------------ la couleur de l'état, sur les éléments seulement (§ 8)
   Le fond ne change jamais. L'état se lit au titre du bandeau (mot et pictogramme) et à la couleur du grand bouton. */
/* Une demande : vert profond. */
[data-couleur='vert'] .bandeau .etat .ic,
[data-couleur='vert'] .picto-geant .ic { color: var(--vert-trait); }
[data-couleur='vert'] .picto-geant { box-shadow: inset 0 0 0 2px var(--vert-trait); }
[data-couleur='vert'] .glisse { background: var(--vert); border-color: var(--vert-trait); }
[data-couleur='vert'] .anneau .anneau-reste { stroke: var(--vert-trait); }
[data-couleur='vert'] .pouce-coeur { color: var(--vert); }
/* Course en cours (retour d'essai du 01/12/2026, point 9) : chaque étape sa couleur, pleine, sur la carte, son grand
   pictogramme et le grand bouton (départ : bleu ; client : violet ; destination : vert). L'ambre reste dans l'en-tête,
   pour « En course ». */
[data-phase='depart'] { --phase: var(--bleu); }
[data-phase='client'] { --phase: var(--violet); }
[data-phase='destination'] { --phase: var(--vert-trait); }
[data-couleur='ambre'] .bandeau .etat,
[data-couleur='ambre'] .bandeau .etat .ic { color: var(--ambre); }
[data-couleur='ambre'] .etape.allumee { border-color: var(--phase); }
[data-couleur='ambre'] .etape.allumee .etape-picto .ic { color: var(--phase); }
[data-couleur='ambre'] .commandes[data-phase] button.geant { background: var(--phase); color: var(--ambre-texte); }
/* Rendre la course : le rouge sur ses boutons seuls ; l'écran derrière la feuille reste en course. */
.feuille .motif:not(.petit-motif) { background: var(--rouge); color: var(--ivoire); }

/* ------------------------------------------------------------------ mode appli : ivoire, cases presque blanches */
.appli-haut { padding: calc(var(--haut) + 6px) var(--bord) 0; }
.appli .marque { color: var(--gris); font-size: 17px; margin: 0; }
.appli-haut h1 { margin: 4px 0 14px; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.bouton-appli { width: 100%; min-height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: var(--gras); font-size: 21px; padding: 10px 18px; }
.bouton-appli.principal { background: var(--appli-action); color: var(--appli-action-texte); }
.bouton-appli.trait { border: 2px solid var(--filet); background: var(--case); }
.bouton-appli .ic { width: 28px; height: 28px; }
.statut-appli { margin: 10px 0 0; font-size: 17px; color: var(--gris); }
.appli-corps { padding: 18px var(--bord) var(--bas); display: grid; gap: 18px; }
.bloc-file { border-top: 1px solid var(--filet); padding-top: 14px; }
.bloc-file h2, .appli-corps h2 { margin: 0 0 10px; font-size: 20px; }
.bloc-file h2 span { font-weight: 400; color: var(--gris); font-size: 16px; }
.liste-file { margin: 0; padding: 0; display: grid; gap: 4px; }
.liste-file li { list-style: none; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; }
.liste-file li.moi { background: var(--ardoise); color: var(--ivoire); }
.liste-file li .rang { font-weight: var(--gras); }
.liste-file li .quoi { color: var(--gris); font-size: 16px; }
.liste-file li.moi .quoi { color: var(--brume); }
/* Point 4 : à son tour (1er), sa ligne s'allume en vert ; une grande carte l'invite au mode conduite. */
.liste-file li.tour { background: var(--vert); color: var(--ivoire); }
.liste-file li.vide { display: block; padding: 10px 12px; color: var(--gris); }
.carte-tour { width: 100%; margin: 0 0 12px; padding: 16px 18px; border-radius: 22px; background: var(--vert); color: var(--ivoire); display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 12px; text-align: left; }
.carte-tour b { font-size: 24px; }
.carte-tour span:not(.voyant) { grid-column: 2; font-size: 17px; }
.carte-tour .ic { grid-row: 1 / span 2; grid-column: 3; }
.carte-tour .voyant { grid-row: 1 / span 2; background: var(--ivoire); }
.voir-autres { width: 100%; min-height: 48px; margin-top: 6px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; color: var(--gris); font-size: 17px; text-align: left; }
.voir-autres .ic { width: 22px; height: 22px; transition: transform 0.2s var(--courbe); }
.voir-texte { display: grid; } .voir-texte .compte { font-size: 15px; }
.voir-texte { min-width: 0; } .voir-texte span { white-space: nowrap; }
/* Un mot sur une ligne ne doit jamais élargir la page : au pire, il est coupé proprement (…), et une-ligne.mjs le voit. */
.petit span, .geant span, .discret span, .voir-texte span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 359px) { .bouton-appli { font-size: 19px; gap: 8px; padding: 10px 12px; } .motif { font-size: 20px; gap: 10px; padding: 10px 14px; } .motif.petit-motif { font-size: 19px; } }
.voir-autres[aria-expanded='true'] .ic { transform: rotate(90deg); }
.liste-file.autres { margin-top: 4px; }
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case { min-height: 132px; border-radius: 20px; background: var(--case); box-shadow: 0 1px 0 var(--filet); padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; }
.case .ic { width: 32px; height: 32px; }
.case b { font-size: 20px; line-height: 1.15; }
.case span { font-size: 15px; color: var(--gris); line-height: 1.3; }
.case.large { grid-column: 1 / -1; background: var(--ardoise); color: var(--ivoire); }
.case.large span { color: var(--brume); }
.case:active { filter: brightness(0.96); }
.retour { min-height: 56px; display: inline-flex; align-items: center; gap: 10px; font-weight: var(--gras); font-size: 18px; }
.page { padding: calc(var(--haut) + 4px) var(--bord) var(--bas); display: grid; gap: 14px; align-content: start; }
.page h1 { font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; }
.page .note { color: var(--gris); font-size: 16px; }
.carte { border-radius: 18px; background: var(--case); padding: 16px; display: grid; gap: 6px; }
.carte b { font-size: 20px; }
.carte .bouton-appli { min-height: 60px; font-size: 18px; margin-top: 6px; }
.chiffres { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 0; }
.chiffres dt { color: var(--gris); }
.chiffres dd { margin: 0; font-weight: var(--gras); text-align: right; }
.gros-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gros-chiffres div { background: var(--case); border-radius: 18px; padding: 16px; }
.gros-chiffres b { display: block; font-size: 48px; line-height: 1; }
.groupe { border-radius: 18px; background: var(--ardoise); color: var(--ivoire); padding: 16px; display: grid; gap: 4px; }
.groupe span { color: var(--brume); font-size: 16px; }
/* « Mes chiffres » (30/11/2026) : trois gros nombres, puis des barres en ardoise ; le mois en cours en trait seulement. */
.unite { margin: 4px 0 -6px; font-weight: var(--gras); font-size: 18px; }
.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tuile { background: var(--case); border-radius: 18px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
.tuile.large { grid-column: 1 / -1; background: var(--ardoise); color: var(--ivoire); }
.tuile .titre { font-weight: var(--gras); font-size: 17px; }
.tuile b { font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.tuile.large b { font-size: 84px; }
.tuile span { font-size: 16px; color: var(--gris); line-height: 1.3; }
.tuile.large span { color: var(--brume); }
.tuile.large .titre { color: var(--ivoire); }
.barres { margin: 0; background: var(--case); border-radius: 18px; padding: 14px 12px 6px; }
.barres figcaption { font-weight: var(--gras); font-size: 17px; padding: 0 4px 6px; }
.barres svg { display: block; width: 100%; height: auto; }
.barres .colonne { fill: var(--ardoise); }
.barres .colonne.en-cours { fill: var(--case); stroke: var(--ardoise); stroke-width: 2.5; stroke-dasharray: 5 4; }
.barres .base { stroke: var(--filet); stroke-width: 1; }
.barres text { font: var(--gras) 17px var(--police); fill: var(--ardoise); text-anchor: middle; }
.barres text.mois { font-weight: 400; font-size: 15px; fill: var(--gris); }
.detail { background: var(--case); border-radius: 18px; padding: 4px 16px; }
.detail summary { min-height: 56px; display: flex; align-items: center; font-weight: var(--gras); font-size: 18px; cursor: pointer; }
.detail .chiffres { padding: 4px 0 14px; }
.choix { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choix button { min-height: 72px; border-radius: 16px; border: 2px solid var(--filet); background: var(--case); font-weight: var(--gras); font-size: 19px; }
.choix button[aria-pressed='true'] { background: var(--ardoise); border-color: var(--ardoise); color: var(--ivoire); }
.choix.trois { grid-template-columns: 1fr 1fr 1fr; }
.choix.trois button { min-height: 60px; font-size: 16px; padding: 6px; }
/* Écran branché au bot, jalon 3 (30/11/2026) : inscription, accueil guidé, absences, chiffres du bot. */
.cocher { display: grid; gap: 10px; margin: 0; padding: 0; }
.cocher li { list-style: none; }
.cocher button { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: 16px; border: 2px solid var(--filet); background: var(--case); font-size: 19px; font-weight: var(--gras); text-align: left; }
.cocher button .ic { width: 26px; height: 26px; flex: none; }
.cocher button[aria-pressed='true'], .cocher button[aria-checked='true'] { background: var(--ardoise); border-color: var(--ardoise); color: var(--ivoire); }
/* Sous les équipements (01/12/2026, point 14) : une courte explication par équipement. */
/* « D'où viennent vos clients » (groupe F, point 18) : un petit schéma, une source, une flèche, où arrive le client. */
.schema-clients { margin: 14px 0; padding: 0; display: grid; gap: 14px; }
.chemin { list-style: none; display: grid; gap: 4px; justify-items: stretch; }
.chemin .source { display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--ardoise); color: var(--ivoire); }
.chemin .source .ic { grid-row: 1 / span 2; width: 28px; height: 28px; }
.chemin .source span { grid-column: 2; font-size: 15px; opacity: 0.9; }
.chemin .fleche { justify-self: center; font-size: 22px; line-height: 1; color: var(--gris); }
.chemin .arrivee { padding: 12px 14px; border-radius: 16px; border: 2px solid var(--ardoise); background: var(--case); font-size: 17px; }
.onze { font-weight: var(--gras); }
.dessin-partage { display: block; width: 120px; margin: 10px auto 16px; color: var(--ardoise); }
.explications { margin: 12px 0 0; padding: 0 0 0 18px; display: grid; gap: 6px; font-size: 16px; color: var(--gris); }
.sous-titre { margin: -6px 0 14px; }
/* « Mes absences » (point 15) : un calendrier en jours, gros comme des boutons. */
.calendrier { gap: 10px; }
.cal-tete { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; text-align: center; font-size: 20px; }
.cal-tete b::first-letter { text-transform: uppercase; }
.mois-nav { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--filet); font-size: 24px; font-weight: var(--gras); }
.cal-grille { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-j { text-align: center; font-size: 14px; color: var(--gris); }
.jour { min-height: 44px; border-radius: 12px; font-size: 18px; font-weight: var(--gras); }
.jour:disabled { color: var(--filet); cursor: default; }
.jour.dans { background: color-mix(in srgb, var(--ardoise) 14%, transparent); }
.jour.bout { background: var(--ardoise); color: var(--ivoire); }
.cal-choix { font-size: 17px; }
.bouton-appli:disabled { opacity: 0.45; cursor: default; }
.conflit { border: 2px solid var(--appli-action); }
.demain { background: var(--ardoise); color: var(--ivoire); }
.accueil { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.accueil h1 { font-size: 34px; margin: 0; }
.accueil p { font-size: 20px; line-height: 1.45; margin: 0; }
.accueil-picto .ic { width: 64px; height: 64px; }
.points { display: flex; gap: 8px; }
.points span { width: 10px; height: 10px; border-radius: 50%; background: var(--filet); }
.points span.allume { background: var(--ardoise); }
.dates label { display: grid; gap: 6px; font-size: 17px; color: var(--gris); }
.dates input { min-height: 56px; border-radius: 14px; border: 2px solid var(--filet); background: var(--ivoire); color: var(--ardoise); font: 19px var(--police); padding: 0 12px; }
.texte-bot { background: var(--case); border-radius: 18px; padding: 16px; white-space: pre-wrap; font-size: 18px; line-height: 1.45; }
/* Vue des administrateurs, jalon 4 (30/11/2026). */
.bloc-admin { border-top: 1px solid var(--filet); padding-top: 14px; display: grid; gap: 10px; }
.liste-admin { display: grid; gap: 8px; margin: 0; padding: 0; }
.liste-admin li { list-style: none; display: grid; gap: 2px; font-size: 18px; }
.liste-admin li > b { font-size: 19px; }
.liste-admin li > span { color: var(--gris); }
.ligne-admin { width: 100%; min-height: 64px; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 16px; background: var(--case); box-shadow: 0 1px 0 var(--filet); }
.ligne-admin b { font-size: 19px; }
.ligne-admin .quoi { font-size: 17px; }
/* Tutos (01/12/2026, points 7 et 8) : fiches courtes, illustrées du pictogramme et du bouton dont parle l'étape. */
.tuto h1 { font-size: 30px; margin: 6px 0 8px; }
.tuto h2 { font-size: 20px; margin: 18px 0 6px; }
.tuto > p { font-size: 19px; line-height: 1.45; }
.tuto-etapes { display: grid; gap: 12px; margin: 14px 0; padding: 0; }
.tuto-etapes li { list-style: none; display: grid; grid-template-columns: 30px 44px 1fr; gap: 10px; align-items: start; background: var(--case); border-radius: 16px; padding: 12px; }
.tuto-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ardoise); color: var(--ivoire); display: grid; place-items: center; font-weight: var(--gras); font-size: 17px; }
.tuto-picto .ic { width: 40px; height: 40px; }
.tuto-texte { font-size: 18px; line-height: 1.4; display: grid; gap: 8px; }
.tuto-bouton { justify-self: start; padding: 8px 14px; border-radius: 12px; background: var(--ardoise); color: var(--ivoire); font-weight: var(--gras); font-size: 16px; }
.reconnecter .bouton-appli { margin-top: 6px; }
.code-icone label { display: grid; gap: 6px; font-size: 17px; color: var(--gris); }
.code-icone input { min-height: 60px; border-radius: 14px; border: 2px solid var(--filet); background: var(--ivoire); color: var(--ardoise); font: var(--gras) 26px var(--police); letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.lien-tutos { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-top: 14px; font-size: 19px; font-weight: var(--gras); text-decoration: underline; }
.code-affiche .code { font-size: 40px; letter-spacing: 0.12em; text-align: center; }
.installer { border: 2px solid var(--ardoise); }
/* Fin de course (01/12/2026) : la place dans la file d'abord, en grand ; la course du jour, plus petit. */
.fin .place-fin { font-size: 40px; font-weight: var(--gras); line-height: 1.1; margin: 4px 0 10px; }
.fin .place-fin ~ .nieme { font-size: 22px; font-weight: 400; }
a.bouton-appli { text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; }
/* Fin de course (01/12/2026) : la question et sa barre de 10 s. */
.demande-dispo { font-size: 30px; font-weight: var(--gras); margin: 8px 0; }
.question .barre span, .barre [data-barre-question] { display: block; height: 100%; transform-origin: left; }
/* Avertissement (01/12/2026) : discret, en bas du mode appli et du premier écran de l'accueil ; jamais en conduite. */
.avertissement { margin: 18px 0 4px; font-size: 15px; line-height: 1.4; color: var(--gris); }
.equip { display: grid; gap: 8px; margin: 0; padding: 0; }
.equip li { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 52px; border-bottom: 1px solid var(--filet); font-size: 18px; }
.equip li span { color: var(--gris); }
.demo { margin-top: 8px; min-height: 52px; border-radius: 14px; border: 1px dashed var(--gris); color: var(--gris); font-size: 16px; }
.appli .feuille { background: var(--ivoire); color: var(--ardoise); }
.appli .feuille p { color: var(--ardoise); } /* lisible sur l’ivoire (01/12/2026 au soir, « Ouvrir dans Chrome ») */

/* Retour d'essai du 01/12/2026 (point 5) : « Conduite », toujours visible en haut du mode appli, à la place symétrique de
   « Appli » en conduite (même taille, même coin). Plein, en ardoise : il reste lisible par-dessus ce qui défile. */
.vers-conduite { position: fixed; z-index: 5; top: var(--haut); right: max(var(--bord), calc((100vw - 480px) / 2 + var(--bord))); min-width: 104px; max-width: 140px; height: 56px; padding: 0 16px 0 12px; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--ardoise); color: var(--ivoire); font-weight: var(--gras); font-size: 18px; box-shadow: 0 6px 18px rgba(23, 28, 46, 0.22); overflow: hidden; }
.vers-conduite .ic { width: 24px; height: 24px; }
.vers-conduite span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appli-haut { padding-top: var(--haut); }
.appli-haut .marque { min-height: 56px; padding-right: 150px; }
.page > .retour:first-child, .page > .tuto > .retour:first-child { margin-right: 150px; }
.accueil, .reconnecter { padding-right: var(--bord); }
/* Point 4 : la position, un interrupteur en haut de « Ma fiche ». Toute la ligne se touche ; la couleur d'action et
   « Activée », ou le gris et « Désactivée » : l'état se lit au mot, pas à la couleur seule. La pastille glisse avec un
   léger rebond (idée reprise de l'interrupteur au double rebond de la bibliothèque d'étude, réécrite ici). */
.interrupteur { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 16px; border-radius: 18px; background: var(--case); box-shadow: 0 1px 0 var(--filet); text-align: left; }
.interrupteur-titre { display: flex; align-items: center; gap: 10px; }
.interrupteur-titre b { font-size: 20px; line-height: 1.15; }
.interrupteur-titre .ic { width: 28px; height: 28px; }
.interrupteur-titre > span { display: grid; gap: 2px; }
.bascule-mot { font-size: 17px; font-weight: var(--gras); color: var(--gris); }
.piste { position: relative; width: 64px; height: 36px; border-radius: 18px; background: var(--gris); transition: background-color 150ms ease; flex: none; }
.pastille-bascule { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--case); box-shadow: 0 2px 6px rgba(23, 28, 46, 0.3); transition: transform 250ms cubic-bezier(0.34, 1.35, 0.64, 1); }
.interrupteur[aria-checked='true'] .piste { background: var(--appli-action); }
.interrupteur[aria-checked='true'] .pastille-bascule { transform: translateX(28px); }
.interrupteur[aria-checked='true'] .bascule-mot { color: var(--appli-action); }
.interrupteur-phrase { grid-column: 1 / -1; font-size: 16px; color: var(--gris); line-height: 1.35; }

/* Point 6 : « Fin de course » dans l'en-tête, dans l'ambre de la course qui s'achève. */
.etat[data-voyant='fin'] { color: var(--ambre); }
/* Point 12 : l'anneau qui se vide autour de la coche (10 s), sur le même pas que l'anneau d'une demande. */
.sceau.compte { position: relative; width: 136px; height: 136px; border: 0; }
.anneau-q { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.anneau-q circle { fill: none; stroke-width: 6; }
.anneau-q .anneau-q-fond { stroke: var(--fond-3); }
.anneau-q .anneau-q-reste { stroke: var(--ivoire); stroke-linecap: round; transition: stroke-dashoffset 500ms linear; }
.question .commandes, .commandes .petit.large { min-height: 80px; }
/* Point 6 : la question suit le chauffeur en mode appli, en haut de l'écran, sous « Conduite ». */
.question-appli { padding: calc(var(--haut) + 66px) var(--bord) 0; }
.question-appli + .appli-haut, .question-appli + .page { padding-top: 14px; }
.question-appli + .appli-haut .marque { min-height: 0; padding-right: 0; }
.question-appli + .page > .retour:first-child, .question-appli + .page > .tuto > .retour:first-child { margin-right: 0; }
.carte-question { border-radius: 20px; background: var(--ardoise); color: var(--ivoire); padding: 16px; display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.carte-question .sceau.compte { width: 88px; height: 88px; display: grid; place-items: center; }
.carte-question .sceau .ic { width: 40px; height: 40px; stroke-width: 2.4; }
.carte-question .anneau-q .anneau-q-fond { stroke: rgba(243, 239, 230, 0.2); }
.carte-question > div:not(.choix) { display: grid; gap: 4px; }
.carte-question b { font-size: 21px; }
.carte-question span { font-size: 19px; }
.carte-question .note { font-size: 16px; color: var(--brume); }
.carte-question .note b { font-size: inherit; }
.carte-question .choix { grid-column: 1 / -1; }
.carte-question .bouton-appli { min-height: 64px; }
.carte-question .bouton-appli.trait { color: var(--ardoise); }

/* Point 9 : les trois pastilles d'étapes, reliées par un trait ; faite : la coche ; en cours : pleine, dans sa couleur. */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2px calc(-1 * var(--bord) / 2) 12px; padding: 0; }
.phases li { list-style: none; position: relative; display: grid; justify-items: center; gap: 4px; font-size: 20px; color: var(--brume); text-align: center; }
.phases li + li::before { content: ''; position: absolute; top: 22px; right: calc(50% + 26px); left: calc(-50% + 26px); height: 2px; background: var(--filet-clair); }
.phases .rond-etape { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--filet-clair); }
.phases .rond-etape .ic { width: 24px; height: 24px; }
.phases li.faite { color: var(--phase); }
.phases li.faite .rond-etape { border-color: var(--phase); }
.phases li.faite + li::before { background: var(--phase); }
.phases li.en-cours { color: var(--ivoire); font-weight: var(--gras); }
.phases li.en-cours .rond-etape { background: var(--phase); border-color: var(--phase); color: var(--ambre-texte); box-shadow: 0 0 0 4px color-mix(in srgb, var(--phase) 30%, transparent); }
/* Point 11 : la carte de l'étape occupe l'espace, en grand. Second retour du 01/12/2026 au soir (point 2) : elle s'agrandit
   au lieu de déborder (la page défile s'il le faut) ; la navigation est dans sa rangée du bas (deux icônes). */
.corps.course { padding-bottom: 4px; }
.corps.course > *, .corps.arrive > * { flex-shrink: 0; }
.corps.course .etape.allumee { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: safe center; align-items: flex-start; gap: 6px; padding: 16px 18px; border-radius: 28px; border-width: 3px; background: var(--fond-2); }
/* Le grand pictogramme et le titre de l'étape sur une même rangée (01/12/2026 au soir) : la place va à l'adresse. */
.etape-tete { display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 4px; }
.etape-picto { width: 72px; height: 72px; flex: none; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--phase) 16%, transparent); }
.corps.course .etape .etape-picto .ic { width: 48px; height: 48px; stroke-width: 1.8; }
.corps.course .etape .titre { font-size: 26px; color: var(--phase); }
.corps.course .etape .lieu, .corps.course .etape .ensuite { width: 100%; overflow-wrap: normal; word-break: normal; hyphens: manual; }
.corps.course .etape .lieu { font-size: 30px; font-weight: var(--gras); line-height: 1.12; }
.corps.course .etape .ensuite { display: block; margin-top: 2px; font-size: 21px; line-height: 1.2; color: var(--brume); }
.etape-pied { margin-top: auto; padding-top: 10px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.etape-pied .km { font-size: 22px; color: var(--brume); white-space: nowrap; }
.etape-pied .nav { display: flex; gap: 12px; }
.nav-appli { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--fond); border: 2px solid var(--filet-clair); }
.nav-appli:active { transform: scale(0.96); }
.nav-appli .ic { width: 38px; height: 38px; }
.nav-waze { color: var(--waze); }
.nav-maps { color: var(--google-maps); }
@media (max-height: 760px) { .etape-picto { width: 60px; height: 60px; border-radius: 18px; } .corps.course .etape .etape-picto .ic { width: 40px; height: 40px; } .corps.course .etape .lieu { font-size: 26px; } }
/* Petits téléphones (640 px de haut) : les commandes se tassent un peu, toujours au-dessus de 48 px d'appui. */
@media (max-width: 359px) { .corps.course .etape .titre { font-size: 23px; } }
@media (max-height: 700px) { .commandes { gap: 8px; } .petits .petit { min-height: 60px; } .corps.course .etape.allumee { padding: 12px 16px; } .nav-appli { width: 56px; height: 56px; } }

/* ------------------------------------------------------------------ mouvement : chaque animation dit ce qui change */
@media (prefers-reduced-motion: no-preference) {
  /* Le voyant vert pulse doucement ; la ligne « à votre tour » aussi ; la carte arrive avec un petit élan. */
  .etat[data-voyant='dispo'] .voyant, .carte-tour .voyant { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 60% { box-shadow: 0 0 0 9px transparent; } }
  .liste-file li.tour { animation: tour 2.4s ease-in-out infinite; }
  @keyframes tour { 50% { background: color-mix(in srgb, var(--vert) 82%, var(--ivoire)); } }
  .carte-tour { animation: carte-tour 0.5s var(--courbe-accroche); }
  @keyframes carte-tour { from { transform: translateY(14px) scale(0.97); opacity: 0; } }
  .carte-tour .ic { animation: invite 1.6s ease-in-out 0.6s 3; }
  @keyframes invite { 50% { transform: translateX(6px); } }
  .ecouter-rond.halo::after { animation: halo 1.1s ease-out 3; } /* trois fois, puis plus rien */
  @keyframes halo { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
  .arrive { animation: arrive 0.38s var(--courbe); }
  @keyframes arrive { from { transform: translateY(28px); opacity: 0; } }
  /* Le reflet qui court sur « Glissez pour accepter », comme sur un téléphone qui sonne : il montre le sens du geste. */
  .reflet { background: linear-gradient(90deg, var(--ivoire) 0 40%, rgba(243, 239, 230, 0.45) 50%, var(--ivoire) 60% 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: reflet 2.2s linear infinite; }
  @keyframes reflet { from { background-position: 100% 0; } to { background-position: -150% 0; } }
  .fin .sceau { animation: sceau 0.5s var(--courbe-accroche); }
  @keyframes sceau { from { transform: scale(0.6); opacity: 0; } }
  .voile .feuille { animation: monte 0.3s var(--courbe); }
  @keyframes monte { from { transform: translateY(40%); } }
  .glisse.refus .pouce { animation: secoue 0.4s ease; }
  @keyframes secoue { 30% { transform: translateX(22px); } 60% { transform: translateX(-4px); } }
  /* La couleur de l'état arrive en douceur sur les éléments (plus sur le fond) : du neutre de l'attente à leur couleur. */
  .teinte-neuve .bandeau .etat .ic, .teinte-neuve .picto-geant .ic, .teinte-neuve .etape.allumee .ic { animation: teinte-trait var(--duree-teinte) ease both; }
  .teinte-neuve .glisse, .teinte-neuve .etape.allumee, .voile .motif:not(.petit-motif) { animation: teinte-fond var(--duree-teinte) ease both; }
  /* Le grand bouton part de l'ivoire, sa couleur au repos : de l'ivoire au doré, jamais par un ton brun. */
  .teinte-neuve button.geant { animation: teinte-bouton var(--duree-teinte) ease both; }
  .teinte-neuve .phases li.en-cours .rond-etape, .teinte-neuve .etape-picto { animation: sceau 0.5s var(--courbe-accroche); }
  .teinte-neuve .anneau .anneau-reste { animation: teinte-anneau var(--duree-teinte) ease both; }
  @keyframes teinte-trait { from { color: var(--ivoire); } }
  @keyframes teinte-fond { from { background-color: var(--fond-2); border-color: var(--filet-clair); color: var(--ivoire); } }
  @keyframes teinte-anneau { from { stroke: var(--ivoire); } }
  @keyframes teinte-bouton { from { background-color: var(--ivoire); color: var(--fond); } }
}
/* Mouvement réduit : plus aucun mouvement, les couleurs des éléments changent d'un coup ; les mots et la barre restent. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-height: 700px) {
  .chiffre { font-size: 140px; }
  .chiffre.mot { font-size: 68px; }
  .geant, .glisse { height: 96px; }
  .pouce { width: 84px; height: 84px; }
  .anneau { width: 84px; height: 84px; }
  .pouce-coeur { width: 66px; height: 66px; }
  .vers { font-size: 34px; }
  .trajet .vers { font-size: 30px; }
  .picto-geant { width: 64px; height: 64px; border-radius: 18px; }
  .picto-geant .ic { width: 44px; height: 44px; }
  .destination { grid-template-columns: 64px 1fr 56px; }
  .quand-tag { font-size: 24px; padding: 4px 14px 4px 10px; margin-bottom: 6px; }
  .chevauche { margin-bottom: 6px; }
  .trajet, .distances, .infos { margin-top: 10px; }
  .trajet .depart .nom, .trajet .arret .nom { font-size: 22px; }
  .trajet .liaison, .trajet .trait { min-height: 16px; }
  .pouce-coeur .chrono { font-size: 24px; }
}
@media (max-width: 374px) {
  .destination { gap: 10px; }
}
/* Point 10 (01/12/2026) : la destination sur toute la largeur, deux lignes au plus, jamais un mot coupé : la taille se
   réduit (ecran.js, ajusterDestination), jusqu'à 24 px ; en dernier recours seulement, des points de suspension. */
.vers { margin-top: 12px; overflow-wrap: normal; word-break: normal; hyphens: manual; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.destination .genre { font-size: 26px; font-weight: var(--gras); line-height: 1.1; }
.destination .ecouter-rond { align-self: center; }
/* Écran partagé sur Android (groupe G) : Waze en haut, l'écran en bas, en demi-hauteur. Le gros bouton reste toujours
   visible ; seul l'essentiel reste au-dessus (la place, la destination, l'étape), toujours à 20 px au moins. */
@media (max-height: 480px) {
  .marque, .file-tete, .pastilles, .phases, .etape-picto, .etape-pied .km, .aide-etape, .ensuite, .petite-carte, .glisse-aide, .course-tete h1, .chevauche, .badges, .infos, .trajet .liaison, .trajet .arret, .distances .aller, .distances .op, .distances .total { display: none; }
  .bandeau { padding-bottom: 4px; }
  .rond, .vers-appli { height: 48px; }
  .rond { width: 48px; }
  .bandeau { grid-template-columns: minmax(0, 1fr) 48px 104px; }
  .chiffre { font-size: 76px; }
  .chiffre.mot { font-size: 44px; }
  .place .sous { font-size: 20px; margin-top: 4px; }
  .destination { grid-template-columns: 56px 1fr 56px; gap: 10px; }
  .picto-geant { width: 56px; height: 56px; border-radius: 16px; }
  .picto-geant .ic { width: 36px; height: 36px; }
  .vers { font-size: 26px; }
  .genre, .trajet .depart .nom, .distances.seule, .distances .min { font-size: 20px; }
  .trajet .vers { font-size: 26px; }
  .quand-tag { font-size: 20px; margin: 0 0 2px; padding: 0 10px; }
  .quand-tag .ic { width: 22px; height: 22px; }
  .trajet, .distances { margin-top: 4px; }
  button.distances { min-height: 48px; padding: 2px 12px; }
  .pouce-coeur .chrono { font-size: 20px; }
  .commandes { gap: 8px; padding-top: 6px; }
  .petit { min-height: 52px; font-size: 20px; padding: 4px 10px; }
  .petit .ic { width: 24px; height: 24px; }
  .geant, .glisse { height: 80px; }
  .pouce, .anneau { width: 72px; height: 72px; }
  .pouce-coeur { width: 56px; height: 56px; }
  .etape, .etape.allumee { min-height: 64px; padding: 6px 12px; }
  .nav-appli { width: 52px; height: 52px; border-radius: 16px; }
  .nav-appli .ic { width: 32px; height: 32px; }
  .course-tete + .etape { margin-top: 4px; }
  .course-tete { justify-content: flex-end; }
}
.sans-js { padding: 24px; }

/* L'accueil d'un nouveau chauffeur (02/12/2026, bienvenue.js) et la page de l'écran ouvert hors de Telegram : gros
   boutons, chaque texte sur une ligne (ecran-chauffeur/une-ligne.mjs), la progression en trois traits du formulaire. */
.bienvenue { justify-content: flex-start; gap: 12px; padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
.bienvenue h2 { margin: 6px 0 0; font-size: 20px; }
.bienvenue p, .porte-telegram p { font-size: 17px; }
.bienvenue .note { color: var(--gris); font-size: 16px; }
.bienvenue .cocher button { min-height: 56px; font-size: 18px; }
.traits { display: flex; gap: 8px; margin: 0 0 6px; }
.traits span { flex: 1; height: 5px; border-radius: 3px; background: var(--filet); }
.traits span.allume { background: var(--appli-action); }
.champ-prenom { display: grid; gap: 6px; }
.champ-prenom label { font-size: 17px; color: var(--gris); }
.champ-prenom input { width: 100%; box-sizing: border-box; min-width: 0; min-height: 60px; border-radius: 14px; border: 2px solid var(--filet); background: var(--case); color: var(--ardoise); font: var(--gras) 22px var(--police); padding: 0 16px; }
.porte-telegram { text-align: center; }
.porte-telegram .qr { display: block; width: min(220px, 64vw); height: auto; margin: 10px auto 0; border-radius: 10px; }
.bienvenue h1, .porte-telegram h1 { font-size: 30px; }
@media (max-width: 359px) { .bienvenue h1, .porte-telegram h1 { font-size: 27px; } }
/* ------------------------------------------------------------------ « Mon trajet » (décision d'Hicham du 02/12/2026, § 18)
   Saisie à l'arrêt, en clair (mode appli) : deux champs d'adresse et leur liste, le jour et l'heure d'une course à lui, la
   distance et la durée, Waze et Google Maps. Aucun texte de bouton sur deux lignes (ecran-chauffeur/une-ligne.mjs). */
.page-trajet label { display: grid; gap: 6px; font-size: 17px; color: var(--gris); }
.champ-adresse { display: grid; gap: 6px; }
.champ-adresse input { width: 100%; box-sizing: border-box; min-height: 60px; border-radius: 14px; border: 2px solid var(--filet); background: var(--ivoire); color: var(--ardoise); font: 19px var(--police); padding: 0 14px; }
.champ-adresse.choisi input { border-color: var(--ardoise); font-weight: var(--gras); }
.suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.suggestions:empty { display: none; }
.suggestion { width: 100%; min-height: 56px; border-radius: 14px; background: var(--case); padding: 8px 14px; display: grid; gap: 2px; text-align: left; }
.suggestion b, .suggestion span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion b { font-size: 18px; }
.suggestion span { font-size: 15px; color: var(--gris); }
.suggestion.utiliser b { font-weight: var(--gras); }
.suggestions .panne { font-size: 15px; color: var(--gris); padding: 2px; }
.trajet-quand { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trajet-quand input { width: 100%; box-sizing: border-box; }
.resultat-trajet .distance-trajet { font-size: 28px; line-height: 1.1; }
.resultat-trajet .retour-trajet { font-size: 20px; }
.pied-trajet { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.appli .nav { display: flex; gap: 12px; }
.appli .nav-appli { background: var(--ivoire); border-color: var(--filet); }
.carte.directe b { font-size: 20px; }
.chiffres-telephone .gros-chiffres { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.chiffres-telephone .gros-chiffres div { padding: 12px 10px; font-size: 15px; }
.chiffres-telephone .gros-chiffres b { font-size: 30px; white-space: nowrap; }
/* En course : le trajet saisi, sous « En course » ; l'arrivée sur une ligne (ecran.js l'ajuste), puis Waze et Maps. */
.trajet-saisi { display: grid; justify-items: stretch; gap: 6px; margin-top: 14px; width: 100%; min-width: 0; }
.vers-trajet { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; min-width: 0; font-size: 26px; font-weight: var(--gras); }
.vers-trajet .ic { width: 28px; height: 28px; flex: none; }
.vers-trajet span { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; line-height: 1.15; }
.sous-trajet { margin: 0; font-size: 22px; color: var(--brume); white-space: nowrap; text-align: center; }
.trajet-saisi .nav { justify-content: center; margin-top: 4px; }
.resultat-trajet .distance-trajet { white-space: nowrap; }
@media (max-width: 359px) { .sous-trajet { font-size: 20px; } .chiffres-telephone .gros-chiffres b { font-size: 24px; } .resultat-trajet .distance-trajet { font-size: 24px; } }
.trajet-saisi .nav { display: flex; gap: 12px; }
/* Avec le trajet saisi, « En course » sur une ligne, plus petit : l'arrivée, la distance, le retour et Waze tiennent dessous. */
.place .chiffre.mot.court { font-size: 64px; white-space: nowrap; }
@media (max-width: 359px), (max-height: 700px) { .place .chiffre.mot.court { font-size: 50px; } }
/* « D'où viennent ces chiffres ? » sur une ligne, à 320 px aussi (contrôlé depuis le 02/12/2026 avec « Mes chiffres »). */
.lien-tutos span { white-space: nowrap; }
@media (max-width: 359px) { .lien-tutos { font-size: 16px; gap: 8px; } }

:root { --ecran-version: "4c828973a578"; }
