/* =====================================================================
   OSCHAUFFEUR — ESPACE CLIENT (/r/{slug}/compte/) — P4-UX-001
   Refonte visuelle du 14/09/2026 (P3-UX-ESPACE-CLIENT-001).

   Trois partis pris, arbitrés par Hamza le 14/09 :
     1. BASE NEUTRE, couleur de la flotte en ACCENT. L'en-tête et le tiroir
        ne sont plus un aplat de --grad-primary : le résultat tenait mal
        selon la couleur que chaque société règle. L'accent porte le bouton
        principal, l'onglet actif, le focus et les repères — rien d'autre.
     2. NAVIGATION VISIBLE : barre de 4 onglets en bas sur mobile, colonne
        latérale permanente à partir de 1024 px. Le tiroir EXISTE TOUJOURS
        et s'ouvre par ≡ en dessous de 1024 px — e2e/client_zindex.mjs en
        dépend, et il reste le seul accès à Aide et à Déconnexion.
     3. Clair uniquement : pas de mode sombre (décision explicite).

   Le seuil de 1024 px (et non 900) est délibéré : client_zindex.mjs joue
   un Pixel 7 en PAYSAGE, 915 × 412. À 900 px le tiroir serait devenu une
   colonne fixe et `#btnMenu` aurait disparu sous le test.

   Mobile d'abord : c'est l'écran de l'app marque blanche.
   ===================================================================== */
:root {
    /* Accent de la flotte — #tenantTheme réécrit ces cinq variables, jamais les neutres. */
    --primary: #0A2540;
    --primary-dark: #061826;
    --primary-light: #EAF0F7;
    --primary-rgb: 10,37,64;
    --on-primary: #FFFFFF;
    --grad-primary: linear-gradient(135deg, #0A2540 0%, #002F6B 100%);
    --grad-primary-hover: linear-gradient(135deg, #061826 0%, #0A2540 100%);

    --success: #0E9E6E;
    --warn: #B7791F;
    --error: #E23D3D;
    --success-bg: #E6F6EF;
    --warn-bg: #FFF6E5;
    --error-bg: #FDECEC;

    /* Neutres — indépendants de la couleur du client. */
    --text-main: #10161F;
    --text-secondary: #59636F;
    --text-muted: #8A939F;
    --text-disabled: #B2BAC4;
    --bg: #F4F6F8;
    --bg-card: #FFFFFF;
    --border: #E7EAEF;
    --border-soft: #F0F2F5;
    --border-focus: #5B7FA6;
    --trait: #D5DBE3;          /* le fil qui relie départ et arrivée : plus marqué qu'une bordure, c'est un lien */

    /* Ombres NEUTRES : une ombre teintée par rgba(--primary-rgb) virait au bleu
       ou au vert selon la flotte, ce qui salissait le blanc des cartes. */
    --shadow-sm: 0 1px 2px rgba(16,22,31,.04);
    --shadow-md: 0 1px 2px rgba(16,22,31,.04), 0 1px 3px rgba(16,22,31,.05);
    --shadow-lg: 0 6px 18px rgba(16,22,31,.16);

    /* Échelle de rayons : le 8 px unique d'avant ne distinguait pas un champ d'une carte. */
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius: 16px;
    --radius-lg: 18px;

    --rail: 268px;          /* largeur de la colonne latérale à partir de 1024 px */
    --tabs-h: 64px;         /* hauteur de la barre d'onglets */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* [F2] UX-046 (25/09/2026) — images : jamais plus larges que leur bloc, proportions gardées quand
   elles portent width/height (réserve de place au chargement, aucun décalage). Les logos de la
   flotte gardent leur hauteur de classe (.ec-logo, .ec-hero-logo : plus spécifiques). */
img { max-width: 100%; height: auto; }
body { font-family: var(--font); color: var(--text-main); background: var(--bg); min-height: 100dvh;
    -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body.etat-chargement .ec-vue { display: none; }
/* [E3] UX-024 (25/09/2026) — squelette de chargement : trois formes grises (bandeau, carte, formulaire)
   à la place d'un écran vide, le temps de « config » puis « me ». Visible SEULEMENT sous
   body.etat-chargement ; le reflet s'arrête avec prefers-reduced-motion. */
.ec-squelette { display: none; }
body.etat-chargement .ec-squelette { display: block; }
.ec-sq { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--border-soft); }
.ec-sq::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: ec-sq-reflet 1.4s ease-in-out infinite; }
.ec-sq-ligne { height: 46px; margin-bottom: 10px; }
.ec-sq-carte { height: min(30vh, 200px); min-height: 180px; border-radius: var(--radius-lg); }
.ec-sq-bloc { margin-top: 10px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.ec-sq-champ { height: 48px; margin-bottom: 10px; border-radius: var(--radius-xs); }
.ec-sq-bouton { height: 56px; margin-top: 14px; }
@keyframes ec-sq-reflet { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ec-sq::after { animation: none; } }
.noscript { background: var(--error-bg); color: #991B1B; padding: 16px 24px; text-align: center; font-size: .9rem; }
a { color: var(--primary); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* ---------- En-tête ----------
   Blanc, 60 px, un simple filet en bas. Il reste COLLANT et à z-index 30 :
   client_zindex.mjs vérifie qu'il passe devant la carte au défilement. */
.ec-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top));
    background: var(--bg-card); color: var(--text-main); border-bottom: 1px solid var(--border); }
.ec-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
/* Logo de la flotte dans l'en-tête : 40 px (30 px avant le 04/09 — trop petit, retour de Hamza), la hauteur du
   bouton menu, donc un en-tête toujours à 60 px ; largeur libre mais bornée (mot-symbole accepté), jamais déformé. */
.ec-logo { height: 40px; width: auto; max-width: min(140px, 36vw); object-fit: contain; flex-shrink: 0; }
.ec-brand-text { font-weight: 700; font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-header-titre { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
/* Le bouton ≡ est retiré de l'interface (14/09) : en dessous de 1024 px c'est la barre basse
   qui navigue, au-dessus c'est la colonne latérale. L'élément reste dans le DOM — compte.js
   lui pose un écouteur et bascule son attribut hidden — mais il ne s'affiche plus jamais.
   Conséquence : le tiroir ne s'ouvre plus sur mobile, d'où Aide et Déconnexion dans « Mon profil ». */
.ec-menu-btn { display: none !important; }
.ec-menu-btn span { display: block; height: 2px; background: var(--text-main); border-radius: 2px; }
/* Appeler la société, depuis n'importe quelle vue : c'est ELLE qui répond sur les courses. */
.ec-hdr-tel { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; margin-left: auto;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-main); }

/* ---------- Tiroir (≤ 1023 px) / colonne latérale (≥ 1024 px) ---------- */
.ec-drawer-fond { position: fixed; inset: 0; background: rgba(16,22,31,.42); z-index: 40; }
.ec-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(84vw, 320px); z-index: 50; background: var(--bg-card);
    box-shadow: 0 0 40px rgba(16,22,31,.16); display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom); overflow-y: auto; }
.ec-drawer-marque { display: none; align-items: center; gap: 10px; padding: 18px 16px 14px; border-bottom: 1px solid var(--border-soft); }
.ec-drawer-tete { padding: 22px 16px 16px; padding-top: calc(22px + env(safe-area-inset-top)); border-bottom: 1px solid var(--border-soft); }
.ec-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
    display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.ec-drawer-nom { font-weight: 700; font-size: 1rem; color: var(--text-main); }
.ec-drawer-fid { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.ec-drawer-espace { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }
.ec-drawer-fid:empty { display: none; }
.ec-nav { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 12px; margin: 2px 8px;
    border-radius: var(--radius-sm); color: var(--text-secondary); text-decoration: none; font-weight: 600; font-size: .94rem;
    background: none; border: 0; width: calc(100% - 16px); text-align: left; font-family: inherit; cursor: pointer; }
.ec-nav:hover { background: var(--bg); }
.ec-nav.actif { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.ec-ico { display: grid; place-items: center; width: 22px; flex: 0 0 22px; color: currentColor; }
.ec-ico svg { display: block; }
.ec-nav-sep { height: 1px; background: var(--border-soft); margin: 8px 20px; }
/* Le contact de la société, épinglé en bas du tiroir. */
.ec-drawer-tel { margin: auto 12px 14px; padding: 12px 13px; border-radius: var(--radius-sm); background: var(--bg); }
.ec-drawer-tel span { display: block; font-size: .74rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.ec-drawer-tel a { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: .95rem; font-weight: 700;
    color: var(--text-main); text-decoration: none; }

/* ---------- Barre de navigation (14/09 — demande de Hamza) ----------
   Le bouton ≡ a disparu : c'est cette barre qui navigue, et elle est TOUJOURS visible
   dès que le client est entré. Aide & contact et Déconnexion vivent dans « Mon profil ».
   L'onglet actif porte une pastille teintée derrière son icône.
   « flex: 1 1 0 » + « min-width: 0 » + libellé à l'ellipse : un libellé long ne peut
   jamais élargir la barre, quelle que soit la largeur du téléphone. */
.ec-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none;
    justify-content: center; min-height: var(--tabs-h); background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--border);
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ec-tabs { background: var(--bg-card); }
}
body.ec-connecte .ec-tabs { display: flex; }
.ec-tab { flex: 1 1 0; min-width: 0; max-width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    gap: 3px; min-height: 0; padding: 0; margin: 0; width: auto; border-radius: 0;
    color: var(--text-muted); text-decoration: none; background: none; border: 0;
    font-family: inherit; cursor: pointer; text-align: center; }
.ec-tab:hover { background: none; }
.ec-tab .ec-ico { width: 100%; max-width: 64px; height: 32px; flex: 0 0 32px; border-radius: 999px;
    display: grid; place-items: center; transition: background .18s ease, color .18s ease; }
.ec-tab-lbl { display: block; max-width: 100%; font-size: 11px; font-weight: 600; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-tab.actif { background: none; color: var(--primary); }
.ec-tab.actif .ec-ico { background: var(--primary-light); }
.ec-tab.actif .ec-tab-lbl { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .ec-tab .ec-ico { transition: none; } }

/* ---------- Corps ---------- */
.ec-main { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(24px + env(safe-area-inset-bottom)); }
body.ec-connecte .ec-main { padding-bottom: calc(var(--tabs-h) + 24px + env(safe-area-inset-bottom)); }
.ec-vue { animation: ec-in .25s ease-out; }
@keyframes ec-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ec-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 14px;
    box-shadow: var(--shadow-sm); }
.ec-card h2 { margin: 0 0 12px; font-size: 1.05rem; letter-spacing: -.01em; }
.ec-card-centre { text-align: center; }
.ec-card-info { border-color: rgba(var(--primary-rgb), .25); background: var(--primary-light); }
/* [E3] UX-023 — un message d'ERREUR sur l'accueil (« Votre session a expiré », lien invalide, espace
   indisponible) se distingue d'une simple information : teinte d'erreur, texte foncé lisible. */
.ec-card-info.erreur { border-color: rgba(226, 61, 61, .35); background: var(--error-bg); color: #991B1B; }
/* Carte qui ne contient que des lignes de navigation (Aide, Déconnexion dans « Mon profil ») :
   les lignes portent déjà leur propre marge. */
.ec-card-liste { padding: 6px 0; }
.ec-hero { text-align: center; padding: 26px 8px 10px; }
.ec-hero h1 { margin: 6px 0 4px; font-size: 1.5rem; letter-spacing: -.02em; color: var(--text-main); }
.ec-hero-logo { height: 72px; width: auto; max-width: min(80vw, 300px); object-fit: contain; }   /* 56 px avant le 04/09 */
.ec-sous { color: var(--text-secondary); font-size: .9rem; line-height: 1.5; margin: 4px 0 10px; }

/* ---------- Marque blanche : la société d'abord, la technologie en bas (07/09) ----------
   Le client est chez SON chauffeur ; OSChauffeur n'est que ce qui fait tourner l'espace.
   D'où la hiérarchie visuelle : nom de la flotte en tête, « Votre espace client » juste
   dessous, et la mention de technologie en petit, grise, sans lien ni logo. */
.ec-hero-espace { margin: 0 0 6px; font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.ec-tech { margin: 14px auto 0; max-width: 34ch; font-size: .76rem; line-height: 1.45; color: var(--text-muted); }

/* L'explication de l'URL : repliée, discrète, jamais un pavé sous le formulaire. */
.ec-pourquoi { margin: 14px 0 0; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.ec-pourquoi > summary { cursor: pointer; list-style: none; font-size: .82rem; font-weight: 600; color: var(--text-secondary);
    padding: 6px 0; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.ec-pourquoi > summary::-webkit-details-marker { display: none; }
.ec-pourquoi > summary::before { content: '?'; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary); font-size: .72rem; display: grid; place-items: center; }
.ec-pourquoi > summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
.ec-pourquoi[open] > summary { color: var(--text-main); }
.ec-pourquoi p { margin: 8px 0 0; font-size: .82rem; line-height: 1.5; color: var(--text-secondary); }

/* Bandeau de bienvenue après l'activation du compte. */
.ec-bienvenue { display: flex; align-items: flex-start; gap: 10px; background: var(--primary-light);
    border: 1px solid rgba(var(--primary-rgb), .18); border-radius: var(--radius);
    padding: 14px; margin-bottom: 12px; }
.ec-bienvenue-titre { margin: 0; font-size: .96rem; font-weight: 700; color: var(--primary); }
.ec-bienvenue-sous { margin: 4px 0 0; font-size: .85rem; line-height: 1.45; color: var(--text-secondary); }
.ec-bienvenue-fermer { flex: 0 0 auto; width: 32px; height: 32px; margin: -4px -4px 0 0; border: 0; background: none;
    color: var(--text-secondary); font-size: 1.4rem; line-height: 1; cursor: pointer; border-radius: 50%; }
.ec-bienvenue-fermer:hover { background: rgba(16,22,31,.06); }

/* Pied de page : la mention d'éditeur et les liens légaux, discrets, sur toutes les vues. */
.ec-footer { max-width: 640px; margin: 0 auto; padding: 4px 14px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
body.ec-connecte .ec-footer { padding-bottom: calc(var(--tabs-h) + 22px + env(safe-area-inset-bottom)); }
.ec-footer p { margin: 0; font-size: .74rem; line-height: 1.6; color: var(--text-muted); }
.ec-footer-liens { margin-top: 2px; }
.ec-footer-liens a { color: var(--text-secondary); text-decoration: none; }
.ec-footer-liens a:hover { text-decoration: underline; }
.ec-footer-liens span { margin: 0 6px; color: var(--text-muted); }
.ec-vide { color: var(--text-muted); font-size: .9rem; }
.ec-note { color: var(--text-secondary); font-size: .82rem; margin: 10px 0 0; }
.ec-note:empty { display: none; }

/* ---------- Formulaires ---------- */
label { display: block; font-size: .78rem; font-weight: 600; color: var(--text-secondary); margin: 12px 0 0; }
label input, label select, .ec-inline input { display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-size: 1rem;
    color: var(--text-main); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none;
    transition: border-color .15s, box-shadow .15s; }
label input:focus, label select:focus, .ec-inline input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.14); }
input:disabled { background: var(--bg); color: var(--text-muted); }
.ec-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ec-3col { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.ec-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; line-height: 1.45; margin-top: 14px; color: var(--text-secondary); }
.ec-check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.ec-regles { list-style: none; padding: 0; margin: 8px 0 0; font-size: .8rem; color: var(--text-muted); }
.ec-regles li::before { content: '○ '; }
.ec-regles li.ok { color: var(--success); }
.ec-regles li.ok::before { content: '✓ '; }

.ec-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; margin-top: 14px;
    border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer;
    text-decoration: none; transition: transform .12s, box-shadow .2s, background .15s; }
.ec-btn:active { transform: translateY(1px); }
.ec-btn-primaire { background: var(--primary); color: var(--on-primary); width: 100%; box-shadow: var(--shadow-lg); }
.ec-btn-primaire:hover { background: var(--primary-dark); }
.ec-btn-primaire[disabled] { opacity: .5; cursor: progress; box-shadow: none; }
.ec-btn-secondaire { background: var(--bg-card); color: var(--text-main); border-color: var(--border); }
.ec-btn-secondaire:hover { background: var(--bg); }
.ec-btn-large { font-size: 1.02rem; min-height: 56px; }
/* P3-UX-002 (campagne QA 04/09) : cible tactile 42 px (était 36) ; le texte saisi ne passe plus sous le bouton.
   e2e/client_geo.mjs mesure ce bouton — il ne doit jamais repasser sous 40 px. */
.ec-btn-mini { position: absolute; right: 5px; bottom: 4px; width: 42px; height: 42px;
    border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--bg-card); cursor: pointer;
    color: var(--text-main); display: grid; place-items: center; font-size: 1rem; }
.ec-btn-mini:hover { background: var(--bg); }
.ec-champ-adr input { padding-right: 54px; }
.ec-liens { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ec-lien { background: none; border: 0; padding: 4px 0; color: var(--primary); font: inherit; font-size: .9rem; font-weight: 700;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ec-inline { display: grid; gap: 8px; margin-top: 10px; }
.ec-inline .ec-btn { margin-top: 0; }
.ec-champ-adr { position: relative; }
.ec-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; margin-top: 4px; }
.ec-suggest button { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border-soft);
    background: none; font: inherit; font-size: .92rem; cursor: pointer; color: var(--text-main); }
.ec-suggest button:last-child { border-bottom: 0; }
.ec-suggest button:hover, .ec-suggest button:focus { background: var(--primary-light); }
.ec-suggest small { display: block; color: var(--text-muted); font-size: .78rem; margin-top: 2px; }
/* P2-GEO-GOOGLE-001 (lot 1, 05/10/2026) — la liste Google : mêmes boutons que la BAN, plus la distance
   (depuis le départ ou la carte), la ville seule marquée « précisez l'adresse » (Q3 : proposée, jamais
   retenue), le message « aucun résultat » et le pied « Powered by Google », jamais masqué (Q5). */
.ec-suggest-dist { float: right; margin-left: 8px; font-size: .72rem; font-weight: 600; color: var(--text-muted); background: var(--bg); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.ec-suggest-imprecis small em { font-style: normal; color: var(--primary); }
.ec-suggest-vide { padding: 12px 14px; font-size: .88rem; color: var(--text-muted); }
.ec-suggest-pied { display: flex; justify-content: flex-end; padding: 6px 10px; border-top: 1px solid var(--border-soft); background: var(--bg); }
.oscg-powered { display: inline-flex; align-items: center; line-height: 1; }
.oscg-powered img { display: block; height: 16px; width: auto; }
.oscg-powered-texte { font-size: .68rem; color: var(--text-muted); letter-spacing: .2px; }
.oscg-powered-texte strong { font-weight: 700; color: var(--text-secondary); }

/* ---------- Carte et disponibilité ---------- */
.ec-dispo { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border-radius: var(--radius); background: var(--bg-card);
    border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-weight: 600; font-size: .92rem; line-height: 1.4;
    margin-bottom: 10px; transition: background .3s; }
.ec-dispo-point { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); flex: none; box-shadow: 0 0 0 0 rgba(14,158,110,.5); }
.ec-dispo[data-decision="ETA_OK"] .ec-dispo-point { background: var(--success); animation: ec-pulse 1.8s infinite; }
.ec-dispo[data-decision="ETA_APPROX"] .ec-dispo-point { background: var(--warn); }
.ec-dispo[data-decision="AUCUN_CHAUFFEUR"] .ec-dispo-point, .ec-dispo[data-decision="ETA_INCONNU"] .ec-dispo-point { background: var(--text-muted); }
/* Plus de décision « HORS_ZONE » depuis le 04/09 (décision 26) : la disponibilité se mesure autour du client. */
.ec-dispo[data-decision="AUCUN_CHAUFFEUR"] { font-weight: 500; color: var(--text-secondary); }
/* [E3] UX-024 — dispo.php en panne (503, réseau, délai de 12 s) : le bandeau le DIT (point ambre, texte en
   retrait) au lieu de rester sur « Recherche des chauffeurs disponibles… ». */
.ec-dispo[data-decision="ERREUR"] { font-weight: 500; color: var(--text-secondary); }
.ec-dispo[data-decision="ERREUR"] .ec-dispo-point { background: var(--warn); }
@keyframes ec-pulse { 0% { box-shadow: 0 0 0 0 rgba(14,158,110,.45); } 70% { box-shadow: 0 0 0 9px rgba(14,158,110,0); } 100% { box-shadow: 0 0 0 0 rgba(14,158,110,0); } }
/* La carte est son PROPRE contexte d'empilement (position + z-index 0 + isolation) : les calques Leaflet
   (z-index 400, contrôles 1000) restent enfermés dedans au lieu de passer au-dessus de l'en-tête (30), du
   tiroir (50), du toast (60) et de la feuille « raccourci » (61) — vu sur téléphone le 03/09 : la carte
   recouvrait le menu ouvert. compte_client_test.php §12 et e2e/client_zindex.mjs gardent cette règle :
   ne pas changer l'ordre des trois déclarations, le test les cherche dans cet ordre. */
.ec-carte { position: relative; z-index: 0; isolation: isolate; height: min(30vh, 200px); min-height: 180px; border-radius: var(--radius-lg);
    border: 1px solid var(--border); overflow: hidden; background: #DFE6EE; }

/* ---------- Le trajet : deux adresses tenues par un seul fil ----------
   Rond creux = départ, carré plein = arrivée. Le même repère se retrouve dans
   la liste des courses : trois écrans, une seule grammaire. */
.ec-resa { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 14px 16px;
    margin-top: 10px; box-shadow: var(--shadow-sm); }
.ec-resa label { margin-top: 10px; }
.ec-trajet { display: flex; gap: 12px; padding-top: 8px; }
/* Les deux repères sont alignés sur le CENTRE des champs, pas sur le bloc : l'étiquette
   (~15 px) + la marge du champ (6 px) + la demi-hauteur du champ (~24 px) − le demi-repère. */
.ec-trajet-rail { display: flex; flex-direction: column; align-items: center; flex: 0 0 12px; padding: 40px 0 19px; }
.ec-trajet-rail i { display: block; width: 11px; height: 11px; flex: none; }
.ec-trajet-rail .ec-trajet-depart { border-radius: 50%; border: 3px solid var(--text-main); }
.ec-trajet-rail .ec-trajet-fil { flex: 1 1 auto; width: 2px; height: auto; background: var(--trait); margin: 5px 0; min-height: 26px; }
.ec-trajet-rail .ec-trajet-arrivee { border-radius: 3px; background: var(--primary); }
.ec-trajet-champs { flex: 1 1 auto; min-width: 0; }
.ec-trajet-champs label { margin-top: 0; }
.ec-trajet-sep { height: 1px; background: var(--border-soft); margin: 12px 0; }
/* Les favoris tiennent sur UNE ligne qui défile du doigt : empilés, deux ou trois favoris
   aux noms longs repoussaient le bouton d'action sous la barre de navigation. Les puces
   débordent jusqu'aux bords de la carte (marges négatives = le rembourrage de .ec-resa). */
.ec-favoris { display: flex; gap: 7px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    margin: 10px -14px 0; padding: 0 14px 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain; }
.ec-favoris::-webkit-scrollbar { display: none; }
.ec-favoris button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
    max-width: 62vw; border: 1px solid var(--border);
    background: var(--bg-card); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: .82rem; font-weight: 600;
    color: var(--text-main); cursor: pointer; }
.ec-fav-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-favoris button:hover { background: var(--bg); }
.ec-favoris svg { flex: 0 0 auto; color: var(--text-secondary); }

/* Options : une ligne de résumé qui se déplie, au lieu de trois champs toujours là. */
.ec-options, .ec-pli { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); }
.ec-options > summary, .ec-pli > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px;
    cursor: pointer; font-size: .92rem; }
.ec-options > summary::-webkit-details-marker, .ec-pli > summary::-webkit-details-marker { display: none; }
.ec-options-titre, .ec-pli-titre { font-weight: 700; color: var(--text-main); }
.ec-options-resume, .ec-pli-resume { color: var(--text-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-options-chev, .ec-pli-chev { margin-left: auto; flex: 0 0 auto; width: 9px; height: 9px; border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.ec-options[open] > summary .ec-options-chev, .ec-pli[open] > summary .ec-pli-chev { transform: rotate(-135deg); }
.ec-options[open] > summary, .ec-pli[open] > summary { border-bottom: 1px solid var(--border-soft); }
.ec-options-corps, .ec-pli-corps { padding: 4px 14px 16px; }
/* Le repli est masqué tant que le client n'a pas d'historique : sans display:none
   explicite, l'attribut hidden ne suffirait pas si une règle posait un display. */
.ec-pli[hidden] { display: none; }
/* Les trajets vivent déjà dans une carte : leur marge du haut ferait double emploi. */
.ec-pli-corps .ec-habituels { margin-top: 0; }

/* ====================================================================
   Choix du véhicule — P4-UX-ESPACE-CLIENT-002 (15/09/2026)
   --------------------------------------------------------------------
   Vignettes à icône, à la place du menu déroulant qui affichait « 🚗
   Berline ». Mêmes icônes et mêmes badges que « Ajouter un véhicule »
   du compte chauffeur : le client voit la même berline que son chauffeur.

   Le <select> n'est pas retiré du DOM — il reste la source de vérité de
   compte.js — seulement masqué. display:none et non l'attribut hidden :
   le JS lit sa valeur, et un champ masqué par CSS reste lisible.
   ==================================================================== */
.ec-veh-select { display: none; }
.ec-lbl { display: block; font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin: 12px 0 6px; }

/* minmax(0, 1fr) : sans le 0, un libellé long dimensionnerait sa colonne
   en max-content et ferait déborder la carte (leçon du 14/09). */
.ec-veh { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ec-veh-opt {
    position: relative; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
    min-width: 0; min-height: 76px; padding: 13px 8px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); color: var(--text-secondary);
    font: inherit; cursor: pointer; text-align: center;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ec-veh-opt:hover { background: var(--bg-card); border-color: var(--trait); }
.ec-veh-opt:active { transform: scale(.98); }
.ec-veh-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; }
.ec-veh-ic svg { width: 24px; height: 24px; }
.ec-veh-lbl { display: block; max-width: 100%; min-width: 0; font-size: .86rem; font-weight: 700;
    line-height: 1.2; overflow-wrap: anywhere; }
/* Le badge se pose dans le coin : hors du flux, il ne pousse jamais le libellé. */
.ec-veh-badge { position: absolute; top: 6px; right: 7px; font-size: .55rem; font-weight: 800;
    letter-spacing: .4px; text-transform: uppercase; color: var(--text-disabled); }
/* Choisi : bordure doublée par un liseré intérieur, comme le compte chauffeur —
   la couleur seule ne suffirait pas à un œil qui distingue mal les teintes. */
.ec-veh-opt.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary);
    background: var(--bg-card); color: var(--text-main); }
.ec-veh-opt.on .ec-veh-ic, .ec-veh-opt.on .ec-veh-badge { color: var(--primary); }
/* Compteurs − / + : un pouce plutôt qu'un clavier numérique. Les bornes restent celles
   de <input type="number"> (min/max posés par bornerCapacites) — stepUp/stepDown les respecte. */
.ec-nb { display: flex; align-items: center; gap: 6px; margin-top: 6px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-card); padding: 5px; }
.ec-nb button { width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: var(--radius-xs); background: var(--bg);
    color: var(--text-main); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.ec-nb button:hover { background: var(--border); }
.ec-nb button:disabled { color: var(--text-disabled); cursor: default; background: var(--bg); }
.ec-nb input { flex: 1 1 auto; width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; background: none; text-align: center;
    font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--text-main); -moz-appearance: textfield; }
.ec-nb input:focus { box-shadow: none; border: 0; }
.ec-nb input::-webkit-outer-spin-button, .ec-nb input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.ec-quand { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; font-size: .86rem;
    color: var(--text-secondary); flex-wrap: wrap; }
.ec-quand-now { font-weight: 700; color: var(--success); }
.ec-quand-now::before { content: '● '; }
.ec-coche { width: 64px; height: 64px; margin: 6px auto 12px; border-radius: 50%; background: var(--success-bg); color: var(--success);
    display: grid; place-items: center; font-size: 2rem; font-weight: 700; }

/* ---------- Listes ---------- */
.ec-liste { display: grid; gap: 10px; }
.ec-course { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 15px;
    display: grid; gap: 0; box-shadow: var(--shadow-sm); }
.ec-course-tete { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.ec-course-date { font-weight: 700; font-size: .92rem; margin-left: auto; }
.ec-course-corps { display: flex; gap: 11px; }
.ec-course-rail { display: flex; flex-direction: column; align-items: center; flex: 0 0 10px; padding: 6px 0 7px; }
.ec-course-rail i { display: block; width: 10px; height: 10px; flex: none; }
.ec-course-rail .ec-trajet-depart { border-radius: 50%; border: 3px solid var(--text-main); }
.ec-course-rail .ec-trajet-fil { flex: 1 1 auto; width: 2px; height: auto; background: var(--trait); margin: 4px 0; min-height: 14px; }
.ec-course-rail .ec-trajet-arrivee { border-radius: 3px; background: var(--primary); }
.ec-course-adr { flex: 1 1 auto; min-width: 0; display: grid; gap: 12px; font-size: .9rem; font-weight: 600; line-height: 1.35; }
.ec-course-adr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-course-pied { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem;
    color: var(--text-secondary); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); }
.ec-course-prix { font-size: .98rem; font-weight: 700; color: var(--text-main); }
.ec-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: .74rem;
    font-weight: 700; background: var(--bg); color: var(--text-secondary); }
.ec-badge.confirmee { background: var(--success-bg); color: var(--success); }
.ec-badge.nouvelle { background: var(--warn-bg); color: var(--warn); }
.ec-badge.annulee, .ec-badge.noshow { background: var(--error-bg); color: var(--error); }
.ec-adr-liste { display: grid; gap: 8px; }
.ec-adr-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-card); font-size: .9rem; }
.ec-adr-item strong { display: block; font-size: .85rem; margin-bottom: 2px; }
.ec-adr-suppr { border: 0; background: none; color: var(--error); font-size: 1.1rem; cursor: pointer; min-width: 40px; min-height: 40px; }
.ec-fidelite { margin-top: 12px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--primary-light); color: var(--primary);
    font-size: .88rem; font-weight: 700; }
.ec-fidelite:empty { display: none; }
.ec-contacts { display: grid; gap: 8px; margin-top: 8px; }
.ec-contacts .ec-btn { margin-top: 0; }
.ec-support { border-top: 1px solid var(--border-soft); padding-top: 10px; margin-top: 12px; }
.ec-support a { display: inline-block; white-space: nowrap; color: var(--primary); font-weight: 600; }   /* l'adresse passe à la ligne entière, jamais coupée */

/* ---------- Toast ----------
   Remonté au-dessus de la barre d'onglets quand elle est là, sinon il passait dessous. */
.ec-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
    width: max-content; max-width: min(92vw, 520px); background: #10161F; color: #fff; padding: 12px 18px; border-radius: var(--radius);
    font-size: .9rem; line-height: 1.4; text-align: center; box-shadow: 0 10px 30px rgba(16,22,31,.30); }   /* 04/09 : rectangle arrondi, pas une pilule — un message long (localisation refusée) restait lisible mais informe */
body.ec-connecte .ec-toast { bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); }
.ec-toast.erreur { background: var(--error); }
.ec-toast.succes { background: var(--success); }

@media (prefers-reduced-motion: reduce) {
    .ec-vue, .ec-dispo-point { animation: none !important; }
}

/* Positions floutées des chauffeurs sur la carte (décision 4 amendée, 03/09) : une voiture dans
   une pastille blanche, au centre d'un halo tracé par Leaflet (L.circle). Le halo dit l'imprécision. */
.ec-voiture { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--text-main); box-shadow: 0 2px 8px rgba(16, 22, 31, .26), 0 0 0 2px rgba(255, 255, 255, .9); }
.ec-voiture svg { display: block; }
.ec-voiture--degrade { opacity: .55; }

/* Origine du départ (adresse enregistrée / position actuelle), sous le champ « Où êtes-vous ? » */
.ec-depart-origine { margin: 6px 0 0; font-size: .78rem; color: var(--text-secondary); }
.ec-depart-origine[hidden] { display: none; }
.ec-lien-petit { font-size: .78rem; padding: 0; }

/* Feuille basse « raccourci sur l'écran d'accueil » (P4-UX-001) */
.ec-feuille-fond { position: fixed; inset: 0; background: rgba(16, 22, 31, .45); z-index: 60; }
.ec-feuille-fond[hidden] { display: none; }
.ec-feuille { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-width: 560px; margin: 0 auto; background: #fff;
  border-radius: 20px 20px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(16, 22, 31, .18);
  animation: ec-monter .28s cubic-bezier(.22,.61,.36,1); }
.ec-feuille[hidden] { display: none; }
@keyframes ec-monter { from { transform: translateY(100%); } to { transform: translateY(0); } }
.ec-feuille-poignee { width: 42px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 12px; }
.ec-feuille-tete { display: flex; gap: 14px; align-items: center; }
.ec-feuille-icone { width: 48px; height: 48px; border-radius: var(--radius-sm); flex: 0 0 48px; background: #fff; border: 1px solid var(--border); object-fit: contain; }
/* Sans logo (08/09) : on ÉCRIT le nom de la société à la place de la voiture générique.
   Deux lignes au maximum, coupées proprement — un nom long ne pousse pas le titre hors de l'écran. */
.ec-feuille-marque { flex: 0 0 auto; max-width: 108px; padding: 9px 10px; border-radius: var(--radius-sm);
    background: var(--primary); color: var(--on-primary); font-size: .72rem; font-weight: 700; line-height: 1.25;
    text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-feuille-tete h2 { margin: 0; font-size: 1.05rem; line-height: 1.25; color: var(--text-main); }
.ec-feuille-tete p { margin: 4px 0 0; font-size: .85rem; color: var(--text-secondary); }
.ec-feuille-etapes { margin: 14px 0 0; padding: 0 0 0 22px; font-size: .9rem; line-height: 1.5; color: var(--text-main); }
.ec-feuille-etapes li + li { margin-top: 4px; }
.ec-feuille-etapes kbd { font: inherit; font-weight: 700; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }
.ec-feuille-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.ec-feuille-actions .ec-btn { width: auto; flex: 1 1 auto; margin-top: 0; }
.ec-feuille-actions .ec-lien { flex: 1 1 100%; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ec-feuille { animation: none; } }

/* ---------- Ma course (P4-SUIVI-001, phase G — refonte 2026-09-07) ----------
   Le client est INFORMÉ : un état (héros) → l'information la plus utile (heure de prise en charge,
   ETA, destination) → la carte → le chauffeur → la progression discrète → les détails repliés.
   Calme : neutre + une couleur positive (fait) + l'accent de la flotte (actuel). Rien de critique n'est
   porté par la couleur seule (texte + icône + coche). */
.ec-mc-retour { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; text-decoration: none; }
.ec-mc-etat { text-align: center; padding: 26px 18px 20px; }
.ec-mc-etat h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; margin: 10px 0 6px; }
.ec-mc-etat .ec-sous { font-size: .96rem; line-height: 1.45; margin: 0 auto; max-width: 30ch; }
.ec-mc-icone { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem;
    background: var(--primary-light); color: var(--primary); }
.ec-mc-icone svg { width: 28px; height: 28px; }
.ec-mc[data-etat="arrivee"] .ec-mc-icone, .ec-mc[data-etat="termine"] .ec-mc-icone { background: var(--success-bg); color: var(--success); }
.ec-mc[data-etat="annulee"] .ec-mc-icone { background: var(--error-bg); color: var(--error); }
.ec-mc[data-etat="en_route"] .ec-mc-icone { animation: ec-mc-pulse 2.2s ease-in-out infinite; }
@keyframes ec-mc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), .22); } 50% { box-shadow: 0 0 0 14px rgba(var(--primary-rgb), 0); } }
/* Transition douce quand l'état change (attribué → en route…) */
@keyframes ec-mc-etat-in { from { opacity: .35; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ec-mc-etat.ec-mc-anim { animation: ec-mc-etat-in .45s ease-out; }
@media (prefers-reduced-motion: reduce) { .ec-mc[data-etat="en_route"] .ec-mc-icone, .ec-mc-etat.ec-mc-anim { animation: none; } }

/* Information clé de l'état — un seul bloc, jamais deux */
.ec-mc-eta, .ec-mc-cle { margin: 16px auto 0; padding: 14px 16px 16px; border-radius: var(--radius-sm); background: var(--bg); display: grid; gap: 2px; max-width: 360px; }
.ec-mc-eta-lib, .ec-mc-cle-lib { font-size: .72rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .08em; }
.ec-mc-eta-val { font-size: 2.6rem; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text-main); margin-top: 4px; }
.ec-mc-eta-val--attente { font-size: 1.35rem; font-weight: 600; color: var(--text-secondary); margin-top: 8px; }
.ec-mc-eta-note { font-size: .78rem; color: var(--text-muted); min-height: 1em; }
.ec-mc-cle-val { font-size: 1.35rem; line-height: 1.2; margin-top: 4px; }
.ec-mc-cle-adr { font-size: .95rem; line-height: 1.4; color: var(--text-secondary); font-weight: 500; overflow-wrap: anywhere; }
.ec-mc-cle-adr--grande { font-size: 1.15rem; color: var(--text-main); font-weight: 700; }
.ec-mc-cle-fleche { font-size: 1.3rem; line-height: 1; color: var(--text-muted); margin: 2px 0; }

/* Carte : l'élément central quand le chauffeur est en route */
.ec-mc-carte { height: 42vh; min-height: 280px; margin-bottom: 14px; border-radius: var(--radius-lg); }

/* Chauffeur : de quoi le reconnaître */
.ec-mc-chauffeur h2 { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-secondary); margin-bottom: 10px; }
.ec-mc-chf { display: flex; gap: 14px; align-items: center; }
.ec-mc-chf-txt { min-width: 0; }
.ec-mc-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
    display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }
.ec-mc-nom { font-weight: 700; font-size: 1.1rem; }
.ec-mc-voiture { color: var(--text-secondary); font-size: .92rem; margin-top: 2px; }
.ec-mc-plaque { display: inline-block; margin-top: 8px; padding: 4px 12px; border: 1.5px solid var(--text-main); border-radius: 6px;
    font-family: ui-monospace, Menlo, monospace; font-weight: 700; letter-spacing: .08em; font-size: 1.02rem; background: #fff; }
.ec-mc[data-etat="arrivee"] .ec-mc-chauffeur { border-color: rgba(var(--primary-rgb), .35); }

/* Progression : compacte, verticale ; le passé s'efface, l'actuel ressort, l'avenir s'estompe */
.ec-mc-progression { padding: 12px 16px; }
.ec-mc-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; text-align: left; }
.ec-mc-etapes li { position: relative; padding: 5px 0 5px 26px; font-size: .84rem; line-height: 1.35; color: var(--text-muted); opacity: .55; }
.ec-mc-etapes li::before { content: ''; position: absolute; left: 6px; top: 9px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--border); background: #fff; box-sizing: border-box; }
.ec-mc-etapes li + li::after { content: ''; position: absolute; left: 9.5px; top: -6px; width: 2px; height: 12px; background: var(--border); }
.ec-mc-etapes li.fait { color: var(--text-secondary); opacity: .8; }
.ec-mc-etapes li.fait::before { content: '✓'; border-color: var(--success); background: var(--success); color: #fff; font-size: 7px; line-height: 5px; text-align: center; }
.ec-mc-etapes li.fait + li::after { background: var(--success); }
.ec-mc-etapes li.actuel { color: var(--text-main); font-weight: 700; font-size: .98rem; opacity: 1; }
.ec-mc-etapes li.actuel::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.ec-mc-etapes li.suivant { opacity: .7; }
.ec-mc[data-etat="annulee"] .ec-mc-etapes, .ec-mc[data-etat="termine"] .ec-mc-progression { display: none; }

/* Détails : repliés, un résumé sur la ligne fermée */
.ec-mc-detail { padding: 0; }
.ec-mc-detail-s { list-style: none; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t chev" "r chev"; align-items: center; gap: 0 12px; min-height: 56px; padding: 12px 18px; cursor: pointer; }
.ec-mc-detail-s::-webkit-details-marker { display: none; }
.ec-mc-detail-t { grid-area: t; font-weight: 700; font-size: 1rem; }
.ec-mc-detail-r { grid-area: r; font-size: .86rem; color: var(--text-secondary); }
.ec-mc-detail-r:empty { display: none; }
.ec-mc-detail-chev { grid-area: chev; width: 10px; height: 10px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.ec-mc-detail[open] > .ec-mc-detail-s .ec-mc-detail-chev { transform: rotate(-135deg); }
.ec-mc-detail[open] > .ec-mc-detail-s { border-bottom: 1px solid var(--border-soft); }
.ec-mc-detail .ec-mc-dl { padding: 14px 18px 4px; }
.ec-mc-detail .ec-mc-histo { padding: 0 18px 12px; }
.ec-mc-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .92rem; }
.ec-mc-dl dt { color: var(--text-secondary); }
.ec-mc-dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.ec-mc[data-etat="termine"] .ec-mc-dl dd#mcPrix { font-size: 1.2rem; }
.ec-mc-histo { margin-top: 8px; font-size: .88rem; }
.ec-mc-histo summary { cursor: pointer; color: var(--primary); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.ec-mc-histo ol { margin: 4px 0 0; padding-left: 18px; color: var(--text-secondary); }
.ec-mc-histo li { padding: 3px 0; }
.ec-mc-histo time { color: var(--text-muted); font-size: .8rem; margin-right: 8px; }
.ec-mc-actions { display: grid; gap: 4px; margin-bottom: 14px; }
.ec-mc-actions .ec-btn { width: 100%; margin-top: 8px; }
.ec-btn-danger { color: var(--error); border-color: #F3C9C9; }
.ec-btn-danger-plein { background: var(--error); color: #fff; box-shadow: none; }
.ec-btn-danger-plein:hover { background: #C62F2F; }
/* D14 (lot 9) — carte « Supprimer mon espace » et ses actions. */
.ec-card-danger { border-color: #F3C9C9; }
.ec-card-danger h2 { color: var(--error); }
.ec-card-danger form { margin-top: 12px; }
.ec-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ec-mc-form label { display: block; margin: 10px 0; font-size: .9rem; font-weight: 600; }
.ec-mc-form input { display: block; width: 100%; margin-top: 4px; min-height: 46px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.ec-mc-form .ec-liens .ec-btn { flex: 1; }
.ec-voiture--suivi { background: var(--primary); color: var(--on-primary); box-shadow: 0 2px 8px rgba(var(--primary-rgb), .35); }
.ec-mc-erreur { color: var(--error); font-size: .9rem; margin: 6px 0 0; }

/* Mes courses : groupes (phase J) et cartes cliquables */
.ec-groupe-titre { margin: 14px 0 2px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--text-muted); }
.ec-groupe-titre:first-child { margin-top: 2px; }
.ec-course { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.ec-course:hover { border-color: var(--text-disabled); box-shadow: var(--shadow-md); }
.ec-course:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.ec-course-suivi { font-size: .85rem; font-weight: 700; color: var(--primary); }
.ec-badge.realisee { background: var(--primary-light); color: var(--primary); }
.ec-badge.en_route, .ec-badge.arrivee, .ec-badge.en_cours { background: var(--primary); color: var(--on-primary); }

/* Trajets habituels (phase K) */
/* La colonne implicite d'une grille est dimensionnée sur le CONTENU MAXIMAL de ses éléments.
   Un <button> ne se laisse pas réduire en dessous de son contenu : avec un trajet long
   (« 44 Boulevard des Deux Corniches, 06300 Nice → Aéroport Nice Côte d'Azur Terminal 2 »)
   le bloc mesurait 614 px dans un écran de 393, la page passait à 643 px de large et la barre
   de navigation s'étirait avec elle. minmax(0, 1fr) + min-width: 0 verrouillent la colonne.
   Constaté sur la capture de Hamza du 14/09, invisible sur la flotte de dev (aucun historique). */
.ec-habituels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 12px 0 0; }
.ec-habituels h3 { min-width: 0; margin: 0; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.ec-habituel { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; min-height: 48px;
    padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card);
    font: inherit; text-align: left; cursor: pointer; color: var(--text-main); }
.ec-habituel:hover { background: var(--bg); }
.ec-habituel span { flex: 1 1 auto; font-size: .86rem; color: var(--text-secondary); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-habituel strong { font-size: .82rem; color: var(--primary); flex: 0 0 auto; }

/* ====================================================================
   Estimation de la course — P4-RESERVATION-003 (15/09/2026)
   --------------------------------------------------------------------
   Le prix se lit d'un coup d'œil, la distance et la durée en second
   rang : c'est le montant qui décide, pas les kilomètres. Le bloc est
   masqué tant que les deux points ne sont pas connus, donc il n'y a
   jamais de « — » ni de squelette clignotant à styler.

   Le montant ne bouge pas de place pendant le recalcul (opacité seule) :
   un chiffre qui saute à chaque option changée se lit comme une erreur.
   ==================================================================== */
.ec-estim { margin: 12px 0 0; padding: 13px 15px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--primary-light); }
.ec-estim[hidden] { display: none; }
.ec-estim-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.ec-estim-montant { flex: 0 0 auto; font-size: 1.32rem; font-weight: 700; color: var(--primary);
    line-height: 1.15; letter-spacing: -.01em; }
.ec-estim-detail { flex: 1 1 auto; min-width: 0; text-align: right; font-size: .82rem; color: var(--text-secondary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-estim-note { margin: 5px 0 0; font-size: .74rem; color: var(--text-muted); line-height: 1.35; }
/* Recalcul en cours : on garde le dernier montant à sa place, en retrait.
   Rien ne se vide, rien ne saute — le client voit que ça travaille. */
.ec-estim.calcul .ec-estim-montant, .ec-estim.calcul .ec-estim-detail { opacity: .4; }
/* Prix non calculable (un point manque, adresses confondues) : pas de montant,
   une phrase qui dit ce qui se passera. Jamais un chiffre de complaisance. */
.ec-estim.inconnu { background: var(--bg); }
.ec-estim.inconnu .ec-estim-montant { font-size: .95rem; font-weight: 600; color: var(--text-secondary); }

/* ====================================================================
   Destinations fréquentes de la flotte — P4-RESERVATION-002 (15/09/2026)
   --------------------------------------------------------------------
   Réglées par le propriétaire dans app/reglages.php, identiques à celles
   du tunnel public. Bloc SÉPARÉ des favoris du client (.ec-favoris) et
   de ses trajets habituels (.ec-habituels) : ce sont des suggestions de
   la société, pas ses adresses à lui.

   Grille à colonnes AUTO-AJUSTÉES avec minmax(0, 1fr) : sans le 0, un
   libellé long dimensionnerait sa colonne en max-content et pousserait
   la page au-delà de l'écran — c'est exactement ce qui avait déporté la
   barre d'onglets sur iPhone 14 le 14/09.
   ==================================================================== */
/* En tête du formulaire depuis le 15/09 : la marge passe du haut vers le bas,
   sinon le bloc décollait de la carte et se collait au champ « Où êtes-vous ? ». */
.ec-destinations { margin: 0 0 14px; }
.ec-destinations h3 { min-width: 0; margin: 0 0 8px; font-size: .74rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.ec-destinations-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(104px, 100%), 1fr)); gap: 8px; }
.ec-dest { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-width: 0; min-height: 76px; padding: 11px 8px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card);
    font: inherit; color: var(--text-main); text-align: center; cursor: pointer;
    transition: background .15s ease, border-color .15s ease; }
.ec-dest:hover { background: var(--bg); border-color: var(--trait); }
.ec-dest.actif { border-color: var(--primary); background: var(--primary-light); }
/* P4-RESERVATION-005 (15/09/2026) — un raccourci peut être le DÉPART. Deux marques
   distinctes, pas une seule repeinte : partir de la gare ET aller à la MAIF doit
   laisser les deux boutons marqués. Le vert est une TROISIÈME couleur assumée :
   --primary est déjà la marque de l'arrivée, la réutiliser dirait le contraire. */
.ec-dest.actif-depart { border-color: #16A34A; background: #F0FDF4; }
/* Le suffixe « · pour le départ » de l'intitulé : le h3 est en capitales, pas lui —
   c'est une indication, pas un titre, et une phrase capitalisée se lit deux fois
   moins vite. Vide si le JS n'a rien posé : rien ne bouge alors à l'écran. */
.ec-destinations h3 .ec-dest-cible { text-transform: none; letter-spacing: 0; color: var(--text-secondary); }
.ec-dest-ico { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto;
    border-radius: 999px; background: var(--primary-light); color: var(--primary); }
.ec-dest-ico svg { width: 17px; height: 17px; }
/* Deux lignes, pas une ellipse : « Aéroport Poitiers » coupé à « Aéroport Poi… »
   ne dit plus rien, alors qu'en deux lignes il tient entièrement dans la tuile.
   overflow-wrap: anywhere pour qu'un nom d'un seul tenant se coupe au lieu de
   déborder. Au-delà de deux lignes, on tronque : la grille doit rester régulière. */
.ec-dest-lbl { max-width: 100%; min-width: 0; font-size: .78rem; font-weight: 600;
    line-height: 1.25; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ====================================================================
   ≥ 1024 px — le tiroir devient une COLONNE PERMANENTE
   --------------------------------------------------------------------
   Avant le 14/09, @media (min-width: 720px) ne faisait que deux choses
   (padding-top et hauteur de carte) : sur un écran d'ordinateur c'était
   un écran mobile étiré, et .ec-main restait centré sur la FENÊTRE, donc
   décentré dès que le tiroir était ouvert.
   La condition de hauteur (≥ 560 px) exclut un téléphone en paysage.
   ==================================================================== */
@media (min-width: 1024px) and (min-height: 560px) {
    body.ec-connecte .ec-menu-btn { display: none; }
    body.ec-connecte .ec-drawer-fond { display: none !important; }
    /* compte.js repose `hidden` sur le tiroir à chaque changement de vue (fermerTiroir) :
       ici c'est le CSS qui décide, la colonne ne se referme jamais. */
    body.ec-connecte .ec-drawer,
    body.ec-connecte .ec-drawer[hidden] { display: flex !important; width: var(--rail); box-shadow: none;
        border-right: 1px solid var(--border); }
    /* C'est le BODY qu'on décale, pas les blocs : avec margin-left le « margin: 0 auto »
       de .ec-main ne centrait plus rien et le contenu restait collé à la colonne
       (exactement le défaut de l'ancienne version, mesuré au navigateur le 14/09).
       Le tiroir, le toast et la feuille sont en position fixed : le padding ne les touche pas. */
    body.ec-connecte { padding-left: var(--rail); }
    body.ec-connecte .ec-header .ec-brand { display: none; }       /* la marque passe dans la colonne */
    body.ec-connecte .ec-drawer-marque { display: flex; }
    body.ec-connecte .ec-drawer-tete { padding-top: 18px; }
    body.ec-connecte .ec-header-titre { margin-left: 0; margin-right: auto; font-size: 1.32rem; font-weight: 700;
        letter-spacing: -.02em; color: var(--text-main); }
    body.ec-connecte .ec-header { padding: 14px 28px; }
    body.ec-connecte .ec-hdr-tel { margin-left: auto; }
    body.ec-connecte .ec-tabs { display: none; }
    body.ec-connecte .ec-main { max-width: 760px; padding: 26px 28px 40px; }
    body.ec-connecte .ec-footer { padding-bottom: 28px; }
    body.ec-connecte .ec-toast { bottom: 24px; left: calc(50% + var(--rail) / 2); }
    .ec-carte { height: 360px; }

    /* Réserver, en deux colonnes : la carte prend la place que le grand écran offre,
       la réservation tient à droite sans qu'on ait à défiler. Rien à changer dans le HTML —
       #dispo, #carte et #formCourse sont déjà trois enfants de #vue-carte. */
    body.ec-connecte .ec-main:has(#vue-carte:not([hidden])) { max-width: 1040px; }
    body.ec-connecte #vue-carte { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0 22px; align-items: start; }
    body.ec-connecte #vue-carte > .ec-bienvenue,
    body.ec-connecte #vue-carte > .ec-dispo { grid-column: 1 / -1; }
    body.ec-connecte #vue-carte > .ec-carte { grid-column: 1; height: 486px; position: sticky; top: 78px; }
    body.ec-connecte #vue-carte > .ec-resa { grid-column: 2; margin-top: 0; }   /* pas de grid-row figé : #bienvenue peut être masqué, les rangées glisseraient */
}
/* Entre 720 et 1023 px (tablette, téléphone en paysage) : le tiroir reste un tiroir,
   la page respire un peu plus. */
@media (min-width: 720px) {
    .ec-main { padding-top: 20px; }
    .ec-carte { height: 300px; }
}

/* Bureau / tablette : même hiérarchie, plus d'espace — l'état, le chauffeur et la progression à gauche,
   la carte (en route) ou les détails à droite. Une seule expérience, deux largeurs. */
@media (min-width: 720px) {
    .ec-main:has(#vue-course:not([hidden])) { max-width: 980px; }   /* la vue « Ma course » respire (carte à droite) */
    .ec-mc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 18px; align-items: start; }
    .ec-mc-retour, .ec-mc-form { grid-column: 1 / -1; }
    .ec-mc-retour { justify-self: start; }
    .ec-mc-etat, .ec-mc-chauffeur, .ec-mc-progression, .ec-mc-actions { grid-column: 1; }
    .ec-mc-etat { text-align: left; padding: 24px 22px 20px; }
    .ec-mc-etat .ec-sous { margin: 0; max-width: none; }
    .ec-mc-icone { margin: 0; }
    .ec-mc-eta, .ec-mc-cle { margin-left: 0; max-width: none; }
    .ec-mc-carte { grid-column: 2; grid-row: 2 / span 5; height: 100%; min-height: 440px; max-height: calc(100vh - 120px); position: sticky; top: 16px; margin-bottom: 14px; }
    .ec-mc-detail { grid-column: 2; }
    .ec-mc[data-etat="en_route"] .ec-mc-detail { grid-column: 1; }
}
@media (min-width: 1024px) and (min-height: 560px) {
    body.ec-connecte .ec-main:has(#vue-course:not([hidden])) { max-width: 1000px; }
}
/* Téléphone en paysage : la barre d'onglets se resserre, la carte garde la vedette. */
@media (orientation: landscape) and (max-height: 500px) {
    :root { --tabs-h: 54px; }
    .ec-tabs { padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
    .ec-tab { gap: 1px; }
    .ec-tab .ec-ico { height: 26px; flex: 0 0 26px; }
    .ec-tab-lbl { font-size: 10px; }
    .ec-mc-carte { min-height: 60vh; }
    .ec-mc-progression { display: none; }
}
/* ====================================================================
   DURCISSEMENT ANTI-DÉBORDEMENT (14/09) — NE PAS RETIRER
   --------------------------------------------------------------------
   Deux mécanismes CSS produisent le même accident, et c'est celui qui a
   été vu en production le 14/09 sur un iPhone 14 :
     · une grille sans colonne déclarée dimensionne sa colonne implicite
       sur le CONTENU MAXIMAL de ses éléments — une adresse longue élargit
       alors toute la page ;
     · un élément de flex ou de grille a « min-width: auto », donc ne
       descend pas sous son contenu minimal, et un <button> ne descend
       pas du tout.
   Conséquence observée : « Vos trajets habituels » mesurait 614 px dans un
   écran de 393, la page passait à 643 px de large, et la barre de
   navigation — dimensionnée sur le bloc englobant initial — s'étirait
   avec elle. Toute l'interface se décalait.
   D'où, systématiquement : minmax(0, 1fr) sur chaque grille, min-width: 0
   sur chaque porteur de texte, ellipse sur ce qui ne doit jamais passer
   à la ligne.
   ==================================================================== */
.ec-liste, .ec-adr-liste, .ec-contacts, .ec-inline, .ec-mc-actions, .ec-habituels { grid-template-columns: minmax(0, 1fr); }
/* .ec-destinations-grille garde ses colonnes auto-ajustées — son minmax()
   porte déjà un 0 minimum, et ses libellés sont coupés à l'ellipse. On borne
   seulement le conteneur, qui ne doit jamais dépasser la carte. */
.ec-destinations, .ec-destinations-grille { min-width: 0; max-width: 100%; }
.ec-2col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-3col { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.ec-liste > *, .ec-adr-liste > *, .ec-contacts > *, .ec-mc-actions > *, .ec-habituels > * { min-width: 0; }

.ec-header > * { min-width: 0; }
.ec-dispo > * { min-width: 0; }
.ec-dispo-texte { overflow-wrap: anywhere; }

/* Une carte de course : le statut peut être long (« En attente de confirmation »)
   et la date aussi ; sur un petit téléphone les deux passent à la ligne au lieu de pousser. */
.ec-course-tete { flex-wrap: wrap; }
.ec-badge { max-width: 100%; }
.ec-course-adr { min-width: 0; }
.ec-course-pied > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ec-adr-item > span { min-width: 0; overflow-wrap: anywhere; }
.ec-contacts .ec-btn { min-width: 0; overflow-wrap: anywhere; }
.ec-suggest button { overflow-wrap: anywhere; }
.ec-mc-chf-txt > * { overflow-wrap: anywhere; }
.ec-trajet-champs, .ec-options-resume, .ec-pli-resume, .ec-drawer-nom, .ec-drawer-fid { min-width: 0; }

/* Le titre de vue n'a plus lieu d'être sur téléphone : la barre de navigation dit déjà où
   l'on se trouve, et un titre en « nowrap » disputait la largeur au logo et au téléphone
   de la société dans l'en-tête. Il reste sur grand écran, où il sert de titre de page. */
@media (max-width: 1023px) {
    .ec-header-titre { display: none; }
}

.ec-mc-pec { font-size: 24px; line-height: 28px; text-align: center; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
