/* Alternative Flotte — design system. Aucune dépendance externe : fonctionne hors ligne. */

:root {
  --fond: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --bord: #e3e8ef;
  --bord-fort: #cfd6e0;
  --texte: #0f172a;
  --texte-2: #475569;
  --texte-3: #64748b; /* 4,8:1 sur blanc (lisible) — était #94a3b8, trop pâle */
  --accent: #1d4ed8;
  --accent-plein: #1d4ed8; /* fonds bleus pleins (boutons principaux…) : le bleu de la marque et des plaques */
  --accent-fond: #eff4ff;
  --accent-texte: #1d4ed8;
  --vert: #059669;   --vert-fond: #ecfdf5;
  --orange: #d97706; --orange-fond: #fffbeb;
  --rouge: #dc2626;  --rouge-fond: #fef2f2;
  --jaune: #a16207;  --jaune-fond: #fefce8;
  --gris-fond: #f1f5f9;
  --violet: #6d28d9; --violet-fond: #f3efff;
  /* Barre latérale, jour (proposition A) : blanche, la marque en #1d4ed8 (le bleu des plaques). */
  --barre: #ffffff; --barre-texte: #334155; --barre-fort: #0f172a; --barre-doux: #64748b; --barre-titre: #64748b;
  --barre-survol: #f1f4fb; --barre-actif: #e7eefd; --barre-actif-texte: #1d4ed8; --barre-bord: #e3e8ef;
  --marque: #1d4ed8;
  --ombre: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --ombre-haute: 0 10px 30px rgba(15, 23, 42, .08);
  --rayon: 12px;
  --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #0b0f17; --surface: #121826; --surface-2: #161d2d; --bord: #232c3d; --bord-fort: #2f3a4f;
    --texte: #e6eaf2; --texte-2: #a3aec2; --texte-3: #8b97ab;
    --accent: #5b8cff; --accent-plein: #1d4ed8; --accent-fond: #16214a; --accent-texte: #8fb0ff;
    --vert: #34d399; --vert-fond: #0f2a22; --orange: #fbbf24; --orange-fond: #2b2210;
    --rouge: #f87171; --rouge-fond: #2c1515; --jaune: #facc15; --jaune-fond: #29250f; --gris-fond: #1a2233;
    --violet: #c4b5fd; --violet-fond: #241a45;
    /* Barre latérale, nuit (proposition C) : nuit bleutée, #1d4ed8 pour la page ouverte. */
    --barre: #0b1430; --barre-texte: #c6cfe8; --barre-fort: #ffffff; --barre-doux: #9aa5c6; --barre-titre: #8b96b8;
    --barre-survol: #16214a; --barre-actif: #1d4ed8; --barre-actif-texte: #ffffff; --barre-bord: #1a2550; --marque: #5b8cff;
    --ombre: 0 1px 2px rgba(0, 0, 0, .3); --ombre-haute: 0 10px 30px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #0b0f17; --surface: #121826; --surface-2: #161d2d; --bord: #232c3d; --bord-fort: #2f3a4f;
  --texte: #e6eaf2; --texte-2: #a3aec2; --texte-3: #8b97ab;
  --accent: #5b8cff; --accent-plein: #1d4ed8; --accent-fond: #16214a; --accent-texte: #8fb0ff;
  --vert: #34d399; --vert-fond: #0f2a22; --orange: #fbbf24; --orange-fond: #2b2210;
  --rouge: #f87171; --rouge-fond: #2c1515; --jaune: #facc15; --jaune-fond: #29250f; --gris-fond: #1a2233;
    --violet: #c4b5fd; --violet-fond: #241a45;
  --barre: #0b1430; --barre-texte: #c6cfe8; --barre-fort: #ffffff; --barre-doux: #9aa5c6; --barre-titre: #8b96b8;
  --barre-survol: #16214a; --barre-actif: #1d4ed8; --barre-actif-texte: #ffffff; --barre-bord: #1a2550; --marque: #5b8cff;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3); --ombre-haute: 0 10px 30px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--police); font-size: 14px; line-height: 1.5; color: var(--texte); background: var(--fond);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-texte); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 650; }
.ic { flex: none; vertical-align: middle; }
.muet { color: var(--texte-2); }
.discret { color: var(--texte-3); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.chiffre { font-variant-numeric: tabular-nums; }
.droite { text-align: right; }

/* ------------------------------------------------------------------ structure */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.app > div { min-width: 0; }
.barre {
  background: var(--barre); color: var(--barre-texte); border-right: 1px solid var(--barre-bord); padding: 14px 10px 10px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
.marque { display: flex; flex-direction: column; gap: 1px; padding: 4px 12px 14px; color: var(--barre-fort); min-width: 0; }
/* En-tête de la barre : logo et cloche sur la première ligne, société et version dessous (comme AlternativeRH). */
.barre .marque { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 6px; row-gap: 0;
  padding: 4px 4px 14px 12px; }
.barre .marque .mot-symbole { text-decoration: none; }
.barre .marque .cloche { width: 32px; height: 30px; justify-self: end; margin-top: 4px; }
.barre .marque .cloche .nb-nouveautes { top: -7px; right: -7px; }
.barre .marque .version { font-size: 12px; color: var(--barre-titre); justify-self: end; padding-right: 2px; white-space: nowrap; }
/* Logo : le nom seul, « Flotte » à la couleur de la marque (#1d4ed8, éclairci la nuit), sans pictogramme. */
.mot-symbole { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; color: var(--barre-fort); white-space: nowrap; }
.mot-symbole b { font-weight: 800; color: var(--marque); }
.marque small { color: var(--barre-doux); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-haut .mot-symbole { color: var(--texte); font-size: 16px; }
.mobile-haut .mot-symbole b { color: var(--marque); }
/* Page de connexion : le fond est bleu, le logo est posé sur une pastille blanche pour que « Flotte » reste lisible. */
.connexion-visuel .marque { align-self: flex-start; background: #fff; border-radius: 10px; padding: 7px 14px !important; }
.connexion-visuel .mot-symbole { color: #0f172a; }
.connexion-visuel .mot-symbole b { color: #1d4ed8; }
.marque .logo {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #10b981); color: #fff;
}
.barre .titre-groupe { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--barre-titre); padding: 10px 12px 3px; }
.lien-nav {
  display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 8px; color: var(--barre-texte);
  font-weight: 500; font-size: 13.5px; flex: none;
}
.lien-nav:hover { background: var(--barre-survol); color: var(--barre-fort); text-decoration: none; }
.lien-nav.actif { background: var(--barre-actif); color: var(--barre-actif-texte); font-weight: 600; }
.lien-nav .compte { margin-left: auto; font-size: 12.5px; background: #dc2626; color: #fff; border-radius: 99px; padding: 0 7px; }
.barre .pied { margin-top: auto; border-top: 1px solid var(--barre-bord); padding-top: 8px; flex: none; }
/* Les liens défilent seuls : la marque en haut et le pied (raccourcis, utilisateur) restent toujours visibles. */
.barre-liens { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px;
  margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--barre-bord) transparent; }
.raccourcis { display: flex; gap: 4px; padding: 0 6px 6px; }
.raccourci-texte { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 8px; color: var(--barre-doux); font-size: 13px; }
.raccourci-texte:hover { background: var(--barre-survol); color: var(--barre-fort); text-decoration: none; }
.raccourci-texte.actif { background: var(--barre-actif); color: var(--barre-actif-texte); }
.raccourci { position: relative; display: grid; place-items: center; width: 34px; height: 32px; border-radius: 8px; color: var(--barre-doux); }
.raccourci:hover { background: var(--barre-survol); color: var(--barre-fort); text-decoration: none; }
.raccourci.actif { background: var(--barre-actif); color: var(--barre-actif-texte); }
.raccourci .nb-nouveautes { position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  font-size: 10px; margin: 0; border: 2px solid var(--barre); box-sizing: content-box; }
.utilisateur { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 12px;
  background: #1e293b; color: #e2e8f0; flex: none;
}
.utilisateur .nom { color: var(--barre-fort); font-weight: 600; font-size: 13px; line-height: 1.25; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.utilisateur form { margin-left: 0; }
.bouton-icone { background: none; border: 0; color: var(--barre-doux); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.bouton-icone:hover { background: var(--barre-survol); color: var(--barre-fort); }
.barre .avatar { background: var(--barre-survol); color: var(--barre-fort); }

/* Toute la largeur de l'écran (retours de test du 25/11/2026) : au-delà de 2200 px seulement, le contenu s'arrête. */
.contenu { padding: 28px 36px 60px; max-width: 2200px; width: 100%; }
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.entete .sous-titre { color: var(--texte-2); margin-top: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-haut { display: none; }
.voile-menu { display: none; }

/* ------------------------------------------------------------------ boutons */
.bouton {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px;
  font: 600 13.5px var(--police); border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte);
  cursor: pointer; white-space: nowrap;
}
.bouton:hover { background: var(--surface-2); text-decoration: none; }
.bouton.principal { background: var(--accent-plein); border-color: var(--accent-plein); color: #fff; }
.bouton.principal:hover { filter: brightness(1.07); }
.bouton.petit { height: 30px; padding: 0 10px; font-size: 12.5px; }

/* ------------------------------------------------------------------ cartes */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.carte-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.carte-tete .lien { font-size: 13px; font-weight: 600; }
.carte-corps { padding: 16px 18px 18px; }
.grille { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-principal { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mb { margin-bottom: 16px; }

.kpi { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .etiquette { display: flex; align-items: center; gap: 8px; color: var(--texte-2); font-weight: 550; font-size: 13px; }
.kpi .pictogramme { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-fond); color: var(--accent); }
.kpi .pictogramme.vert { background: var(--vert-fond); color: var(--vert); }
.kpi .pictogramme.orange { background: var(--orange-fond); color: var(--orange); }
.kpi .pictogramme.rouge { background: var(--rouge-fond); color: var(--rouge); }
.kpi .valeur { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .detail { color: var(--texte-2); font-size: 12.5px; }
.kpi .detail b { color: var(--texte); }

/* ------------------------------------------------------------------ pastilles, plaques */
.pastille {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gris-fond); color: var(--texte-2);
}
.pastille::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pastille.vert { background: var(--vert-fond); color: var(--vert); }
.pastille.bleu { background: var(--accent-fond); color: var(--accent-texte); }
.pastille.orange { background: var(--orange-fond); color: var(--orange); }
.pastille.rouge { background: var(--rouge-fond); color: var(--rouge); }
.pastille.jaune { background: var(--jaune-fond); color: var(--jaune); }
.pastille.violet { background: color-mix(in srgb, #7c3aed 13%, transparent); color: #6d28d9; }
:root[data-theme="dark"] .pastille.violet { color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pastille.violet { color: #c4b5fd; } }

.plaque {
  display: inline-flex; align-items: stretch; height: 24px; border: 1.5px solid #1f2937; border-radius: 5px; overflow: hidden;
  font: 700 12.5px/21px var(--mono); letter-spacing: .04em; background: #fff; color: #111827; white-space: nowrap;
  flex: none;
}
.plaque i { font-style: normal; background: #1d4ed8; color: #fff; font-size: 9.5px; padding: 0 4px; display: flex; align-items: flex-end; padding-bottom: 1px; }
.plaque { padding-right: 7px; }
.plaque i + * , .plaque i { margin-right: 6px; }
.plaque.grande { height: 34px; font-size: 18px; line-height: 30px; border-width: 2px; }
.plaque.grande i { font-size: 12px; padding: 0 6px 3px; }
.plaque-vide { border-style: dashed; color: var(--texte-3); background: transparent; padding: 0 8px; font-weight: 500; }

.energie { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--texte-2); }
.energie.el { color: var(--vert); }

/* ------------------------------------------------------------------ tableaux */
.tableau-conteneur { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: separate; border-spacing: 0; }
.tableau th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--texte-2); padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--bord); white-space: nowrap; position: sticky; top: 0;
}
.tableau td { padding: 12px 14px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr { transition: background .12s; }
.tableau tbody tr.cliquable { cursor: pointer; }
.tableau tbody tr:hover { background: var(--surface-2); }
.tableau .principal { font-weight: 600; color: var(--texte); white-space: nowrap; }
.tableau .secondaire { font-size: 12.5px; color: var(--texte-2); }
.personne { display: flex; align-items: center; gap: 10px; }
.personne .avatar { width: 28px; height: 28px; font-size: 12px; background: var(--accent-fond); color: var(--accent-texte); }

/* ------------------------------------------------------------------ outils de liste */
.outils { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; }
.puce {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--bord);
  color: var(--texte-2); font-weight: 550; font-size: 13px; background: var(--surface);
}
.puce:hover { text-decoration: none; border-color: var(--bord-fort); color: var(--texte); }
.puce.active { background: var(--texte); color: var(--surface); border-color: var(--texte); }
.puce .nb { font-size: 12.5px; opacity: .7; }
.champ-recherche { position: relative; min-width: 260px; flex: 0 1 340px; }
.champ-recherche .ic { position: absolute; left: 11px; top: 9px; color: var(--texte-3); }
.champ-recherche input {
  width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte);
  padding: 0 12px 0 36px; font: 14px var(--police); outline: none;
}
.champ-recherche input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.vide { text-align: center; padding: 48px 20px; color: var(--texte-2); }
.vide .ic { color: var(--texte-3); margin-bottom: 10px; }
.vide h2 { margin-bottom: 6px; color: var(--texte); }

/* ------------------------------------------------------------------ listes compactes */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--bord); }
.liste li:last-child { border-bottom: 0; }
.liste .texte { flex: 1; min-width: 0; }
.liste .texte .principal { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-prog { height: 8px; border-radius: 99px; background: var(--gris-fond); overflow: hidden; }
.barre-prog span { display: block; height: 100%; border-radius: 99px; background: var(--accent-plein); }
.horizons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.horizon { border: 1px solid var(--bord); border-radius: 10px; padding: 10px 12px; }
.horizon b { font-size: 22px; display: block; font-variant-numeric: tabular-nums; }
.horizon span { color: var(--texte-2); font-size: 12px; }

/* ------------------------------------------------------------------ fiche véhicule */
.retour { display: inline-flex; align-items: center; gap: 6px; color: var(--texte-2); font-weight: 550; margin-bottom: 14px; }
.hero { padding: 22px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.hero .vignette {
  width: 72px; height: 72px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent-fond), var(--vert-fond)); color: var(--accent);
}
.hero .identite { flex: 1; min-width: 240px; }
.hero .identite h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--texte-2); margin-top: 8px; font-size: 13px; }
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.faits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--bord); }
.fait { padding: 14px 22px; border-right: 1px solid var(--bord); }
.fait:last-child { border-right: 0; }
.fait .etiquette { color: var(--texte-2); font-size: 12px; font-weight: 550; }
.fait .valeur { font-size: 17px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--bord); margin-bottom: 18px; overflow-x: auto; }
.onglet {
  background: none; border: 0; padding: 11px 14px; font: 600 13.5px var(--police); color: var(--texte-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center;
}
.onglet:hover { color: var(--texte); }
.onglet.actif { color: var(--accent-texte); border-bottom-color: var(--accent); }
.onglet .nb { background: var(--gris-fond); color: var(--texte-2); font-size: 12px; border-radius: 99px; padding: 0 7px; }
.panneau { display: none; }
.panneau.actif { display: block; }

.definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.definitions div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bord); }
.definitions dt { color: var(--texte-2); }
.definitions dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

.histogramme { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 8px; }
.histogramme .colonne { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.histogramme .baton { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); }
.histogramme .colonne.anomalie .baton { background: var(--rouge); }
.histogramme small { color: var(--texte-3); font-size: 12px; white-space: nowrap; }

.chrono { list-style: none; margin: 0; padding: 0; position: relative; }
.chrono li { position: relative; padding: 0 0 18px 26px; }
.chrono li::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: -6px; width: 2px; background: var(--bord); }
.chrono li:last-child::before { display: none; }
.chrono li::after { content: ""; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--bord-fort); }
.chrono li.en-cours::after { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-fond); }

.bandeau { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--orange-fond); color: var(--texte); margin-bottom: 14px; }
.bandeau .ic { color: var(--orange); margin-top: 1px; }
.bandeau.info { background: var(--accent-fond); }
.bandeau.info .ic { color: var(--accent); }

/* ------------------------------------------------------------------ connexion */
.page-connexion { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.connexion-visuel {
  background: radial-gradient(1200px 600px at 20% 10%, #1d4ed8 0%, transparent 60%),
              radial-gradient(900px 500px at 90% 90%, #059669 0%, transparent 55%), #0b1220;
  color: #e2e8f0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.connexion-visuel h1 { font-size: 34px; line-height: 1.15; color: #fff; max-width: 440px; }
.connexion-visuel p { color: #94a3b8; max-width: 420px; font-size: 15px; }
.connexion-formulaire { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.connexion-formulaire form { width: 100%; max-width: 360px; }
.connexion-formulaire h2 { font-size: 22px; margin-bottom: 6px; }
.case-connexion { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 13px; line-height: 1.4; cursor: pointer; }
.case-connexion input { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.champ { margin-top: 16px; }
.champ label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.champ input {
  width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--bord-fort); padding: 0 12px; font: 15px var(--police);
  background: var(--surface); color: var(--texte); outline: none;
}
.champ input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.erreur { background: var(--rouge-fond); color: var(--rouge); padding: 10px 12px; border-radius: 9px; margin-top: 16px; font-weight: 550; }
.connexion-formulaire .bouton { width: 100%; height: 42px; justify-content: center; margin-top: 22px; font-size: 14.5px; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-principal, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .faits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fait:nth-child(2) { border-right: 0; }
  .fait:nth-child(-n+2) { border-bottom: 1px solid var(--bord); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .barre { position: fixed; z-index: 30; left: 0; top: 0; width: 264px; transform: translateX(-100%); transition: transform .2s; }
  .app.menu-ouvert .barre { transform: none; box-shadow: var(--ombre-haute); }
  .voile-menu { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .app.menu-ouvert .voile-menu { opacity: 1; pointer-events: auto; }
  html.menu-ouvert, html.menu-ouvert body { overflow: hidden; }
  .mobile-haut {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--bord);
    position: sticky; top: 0; z-index: 20; font-weight: 700;
  }
  .mobile-haut button { background: none; border: 0; color: var(--texte); padding: 4px; }
  .contenu { padding: 20px 16px 48px; }
  .g-2, .definitions { grid-template-columns: minmax(0, 1fr); }
  .liste li { flex-wrap: wrap; }
  .horizons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-connexion { grid-template-columns: 1fr; }
  .connexion-visuel { padding: 28px; min-height: 200px; }
  .champ-recherche { min-width: 0; flex: 1 1 100%; }
  .cacher-mobile { display: none; }
}
.bandeau p { margin: 4px 0 0; }

/* ------------------------------------------------------------------ formulaires de saisie */
.formulaire { max-width: 980px; }
.champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.champ-form.large { grid-column: 1 / -1; }
.champ-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--texte); }
.champ-form label i { color: var(--rouge); font-style: normal; }
.champ-form input:not([type=checkbox]), .champ-form select, .champ-form textarea {
  width: 100%; min-height: 40px; border-radius: 9px; border: 1px solid var(--bord-fort); padding: 8px 12px;
  font: 14px var(--police); background: var(--surface); color: var(--texte); outline: none;
}
.champ-form textarea { resize: vertical; min-height: 84px; }
/* Case grisée : remplie toute seule ou sans objet, on ne peut pas y écrire. */
.champ-form input:disabled, .champ-form select:disabled, .champ-form textarea:disabled { background: var(--gris-fond); color: var(--texte-3); border-style: dashed; cursor: not-allowed; }
.champ-form input:focus, .champ-form select:focus, .champ-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.champ-form input[type=file] { padding: 7px 10px; }
.champ-form.case label { display: flex; align-items: center; gap: 10px; font-weight: 550; margin-top: 26px; cursor: pointer; }
.champ-form.case input { width: 18px; height: 18px; accent-color: var(--accent); }
.champ-form.case input:disabled { opacity: .5; cursor: not-allowed; }
.champ-form.case input:disabled + span { color: var(--texte-3); }
.champ-form.case label:has(input:disabled) { cursor: not-allowed; }
.champ-form .aide { color: var(--texte-3); font-size: 12.5px; margin-top: 5px; }
.champ-form.en-erreur input, .champ-form.en-erreur select, .champ-form.en-erreur textarea { border-color: var(--rouge); }
.champ-form .message-erreur { color: var(--rouge); font-size: 12.5px; font-weight: 550; margin-top: 5px; }
.champ-form .clearable-file-input, .champ-form a { font-size: 12.5px; }
.pied-formulaire { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--bord); background: var(--surface-2); border-radius: 0 0 var(--rayon) var(--rayon); }

/* ------------------------------------------------------------------ cartes de catégories */
.categorie-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tarif-actuel { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vehicules-mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.menu-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }

@media (max-width: 820px) {
  .champs { grid-template-columns: minmax(0, 1fr); }
  .champ-form.case label { margin-top: 0; }
}

/* ------------------------------------------------------------------ sections et sous-fiches */
.titre-section { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2); margin: 26px 0 14px; padding-top: 18px; border-top: 1px solid var(--bord); }
.carte-corps > .titre-section:first-of-type, .bandeau + .titre-section { border-top: 0; padding-top: 0; margin-top: 4px; }
.champs-ligne { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ligne-saisie { border: 1px solid var(--bord); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--surface-2); }
.supprimer-ligne { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--rouge); font-size: 12.5px; font-weight: 550; cursor: pointer; }
.contacts { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--bord); display: grid; gap: 8px; }
.contacts li { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.contacts .avatar { width: 28px; height: 28px; font-size: 12px; background: var(--accent-fond); color: var(--accent-texte); }
.coordonnees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; font-size: 13px; }
.coordonnees .etiquette { color: var(--texte-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 820px) { .champs-ligne, .coordonnees { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ remplissage par SIREN */
.siren-ligne { display: flex; gap: 8px; }
.siren-ligne input { flex: 1; min-width: 0; }
.re-resultat { margin-top: 8px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; background: var(--vert-fond); }
.re-resultat.echec { background: var(--rouge-fond); color: var(--rouge); font-weight: 550; }
.re-resultat .avert { color: var(--orange); font-weight: 600; margin-top: 4px; }
.champ-form.rempli input, .champ-form.rempli select { border-color: var(--vert); box-shadow: 0 0 0 3px var(--vert-fond); }
.bandeau.succes { background: var(--vert-fond); }
.bandeau.succes .ic { color: var(--vert); }
.puce.attente { border-style: dashed; color: var(--orange); }
.proposition { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--accent-fond); }
.proposition > .ic { color: var(--accent); }
.proposition .texte { flex: 1; min-width: 220px; font-size: 13px; }
.proposition form { margin: 0; }

/* ------------------------------------------------------------------ grille de catégories */
.titre-grille { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-2); margin: 26px 0 12px; }
.cat-vehicules { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bord); }
.plaque-retirable { display: inline-flex; align-items: center; gap: 2px; margin: 0; }
.plaque-retirable button { background: none; border: 0; color: var(--texte-3); cursor: pointer; font-size: 12px; padding: 2px 4px; border-radius: 6px; }
.plaque-retirable button:hover { color: var(--rouge); background: var(--rouge-fond); }
.panneau-ajout { margin-top: 12px; border: 1px solid var(--bord); border-radius: 10px; background: var(--surface-2); padding: 12px; }
.liste-cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; max-height: 320px; overflow: auto; }
.case-vehicule { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; font-size: 12.5px; }
.case-vehicule:hover { background: var(--surface); border-color: var(--bord); }
.case-vehicule.propose { background: var(--accent-fond); }
.case-vehicule input { accent-color: var(--accent); width: 16px; height: 16px; }
.pied-ajout { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pied-ajout input[type=date] { border: 1px solid var(--bord-fort); border-radius: 8px; padding: 5px 8px; background: var(--surface); color: var(--texte); font: 13px var(--police); }
.cat-pied { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bord); }
.decomposition { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.decomposition li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--bord); }
.decomposition li.total { border-bottom: 0; font-weight: 700; font-size: 15px; }
.vehicule-conducteur { display: flex; gap: 10px; align-items: center; padding: 2px 0; }
.vehicule-conducteur:hover { text-decoration: none; }
.liste-plaques { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.vehicule-conducteur .secondaire { white-space: nowrap; }

/* Cartes et badges : onglets d'usage et sélecteur de fournisseur */
.onglets-usages .onglet { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 15px; }
.selecteur-fournisseur { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 12px; }

.resolution select { min-width: 230px; max-width: 280px; font-size: 12.5px; }

/* Champ rempli automatiquement (nouveau contrat) : bref surlignage. */
.rempli-auto { transition: box-shadow .3s; box-shadow: 0 0 0 3px color-mix(in srgb, #10b981 45%, transparent) !important; }
.bouton.danger { color: var(--rouge); border-color: color-mix(in srgb, var(--rouge) 40%, transparent); }
.bouton.danger:hover { background: var(--rouge-fond); }
.bouton.danger.arme { background: var(--rouge); border-color: var(--rouge); color: #fff; }
/* Partenaires : le nom garde toujours sa place ; si la colonne est étroite, l'étiquette passe en dessous. */
.liste-partenaires li { flex-wrap: wrap; row-gap: 4px; }
.liste-partenaires .texte { flex: 1 1 150px; }
.liste-partenaires .pastille { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Lecture d'un contrat PDF dans l'application : une page sous l'autre, comme une feuille. */
.lecteur-pdf { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.lecteur-pdf canvas { display: block; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.08); }
.lien-numero { color: var(--accent-texte); text-decoration: none; }
.lien-numero:hover { text-decoration: underline; }
/* Contrats arrivant à échéance : à renouveler (orange) ou terminés sans suite (rouge). */
.echeance-contrat { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: var(--orange-fond, #fff7ed); color: var(--texte); display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.echeance-contrat.terminee { background: var(--rouge-fond); }
.actions-echeance { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.etiquette-echeance { display: inline-block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--orange, #c2410c); }
.etiquette-echeance.terminee { color: var(--rouge); }
.onglet .nb.alerte { background: var(--orange-fond); color: var(--orange); }
/* Numéro de contrat : bleu en cours, orange à renouveler, rouge terminé, gris pour un brouillon. */
[data-panneau="a-renouveler"] .lien-numero { color: var(--orange); }
[data-panneau="clos"] .lien-numero { color: var(--rouge); }
.lien-numero.provisoire { color: var(--texte-2); }
.numero-brouillon { display: block; font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--texte-3, var(--texte-2)); }
.avancement-signature { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-family: var(--police); font-size: 12.5px; font-weight: 500; color: var(--texte-2); }
.avancement-signature .signe { color: var(--vert, #22c55e); }
.avancement-signature .a-vous { color: #ef4444; font-weight: 700; }
.plaque-retirable button.arme { background: var(--rouge); color: #fff; border-radius: 6px; padding: 0 6px; width: auto; font-size: 12px; font-weight: 600; }
/* Glisser-déposer des plaques entre catégories. */
[draggable="true"][data-vehicule] { cursor: grab; }
[draggable="true"][data-vehicule].glisse { opacity: .45; }
.zone-categorie.survolee { outline: 2px dashed var(--accent); outline-offset: 3px; background: var(--accent-fond); }
.fond-fenetre { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.fond-fenetre[hidden] { display: none; }
.fenetre { width: min(560px, 100%); margin: 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.fenetre .fd-ligne { display: block; margin-top: 12px; }
.fenetre .fd-choix { display: block; margin: 6px 0 0 4px; }
.fenetre input[type=date] { margin-left: 6px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--bord); background: var(--surface); color: var(--texte); font: inherit; }
/* Cases de refacturation : « à décider » en orange tant qu'aucun choix n'est fait. */
.case-refacturer { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 2px 6px; border-radius: 7px; border: 1px solid transparent; }
.case-refacturer.a-decider { border: 1px dashed var(--orange); background: var(--orange-fond); }
.matrice-frais th.centre, .matrice-frais td.centre { text-align: center; }
.matrice-frais th .bouton { margin-top: 6px; }
.onglet .nb.alerte { background: var(--orange-fond); color: var(--orange); }

/* Formulaires compacts (18/11/2026) : 3 colonnes sur grand écran, espacements réduits, pour tout voir sans défiler. */
.formulaire { max-width: 1180px; }
.formulaire .carte-corps { padding: 12px 18px 14px; }
.formulaire .champs { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 16px; }
.formulaire .champ-form label { margin-bottom: 3px; font-size: 12.5px; }
.formulaire .champ-form input:not([type=checkbox]), .formulaire .champ-form select { min-height: 34px; padding: 5px 10px; }
.formulaire .champ-form textarea { min-height: 60px; padding: 6px 10px; }
.formulaire .champ-form .aide, .formulaire .champ-form .message-erreur { margin-top: 3px; font-size: 12.5px; }
.formulaire .champ-form.case label { margin-top: 22px; }
.formulaire .titre-section { margin: 14px 0 8px; padding-top: 10px; font-size: 12px; }
.formulaire .bandeau { padding: 8px 12px; margin-bottom: 8px; font-size: 13px; }
.formulaire .pied-formulaire { padding: 10px 18px; }
@media (max-width: 820px) { .formulaire .champs { grid-template-columns: minmax(0, 1fr); } .formulaire .champ-form.case label { margin-top: 0; } }
/* Recherche à la frappe (véhicule, conducteur). */
.recherche-liste { position: relative; }
.recherche-cache { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; }
.recherche-choix { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow: auto; }
.recherche-choix li { padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.recherche-choix li:hover, .recherche-choix li.actif { background: var(--accent-fond); color: var(--accent-texte); }
.recherche-choix li.vide { color: var(--texte-3); cursor: default; background: none; }
.onglets { flex-wrap: wrap; overflow-x: visible; row-gap: 0; }
.info-conducteur { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--texte); }
.info-conducteur.incomplet a { color: var(--orange); font-weight: 500; }

/* ------------------------------------------------------------------ importations */
.zone-depot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: 28px 16px; border: 2px dashed var(--bord-fort); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.zone-depot input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.zone-depot .zone-icone { color: var(--accent); }
.zone-depot.survol, .zone-depot:hover { border-color: var(--accent); background: var(--accent-fond); }
.zone-depot.rempli { border-style: solid; border-color: var(--accent); }
.rapport { white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  margin: 0; max-height: 520px; overflow: auto; }
.carres-mois { display: flex; gap: 6px; }
.carre-mois { width: 46px; height: 42px; border-radius: 8px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; background: var(--surface-2); color: var(--texte-3); border: 1px solid var(--bord); cursor: default; }
.carre-mois b { font-size: 14px; line-height: 1; }
.carre-mois small { font-size: 10.5px; }
.carre-mois.ok { background: var(--vert-fond); color: var(--vert); border-color: transparent; }
.carre-mois.manquant { background: var(--rouge-fond); color: var(--rouge); border-color: transparent; }
.carre-mois.partiel { background: var(--jaune-fond); color: var(--jaune); border-color: transparent; }
.carre-mois { position: relative; }
.carre-mois .bulle { display: none; position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 20; width: max-content;
  max-width: 240px; padding: 8px 10px; border-radius: 8px; background: var(--texte); color: var(--surface);
  font-size: 12px; line-height: 1.45; text-align: left; box-shadow: 0 6px 18px rgba(0,0,0,.18); pointer-events: none; }
.carre-mois .bulle b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.carre-mois .bulle span { display: block; }
.carre-mois:hover .bulle, .carre-mois:focus .bulle { display: block; }
.tableau-conteneur.avec-bulles { overflow: visible; }
@media (max-width: 900px) { .tableau-conteneur.avec-bulles { overflow-x: auto; } }
a.carre-mois { text-decoration: none; cursor: pointer; }
a.carre-mois:hover { filter: brightness(.96); text-decoration: none; }
.carre-mois.global { background: var(--jaune-fond); color: var(--jaune); border-color: transparent; }
.carre-mois.en-cours, .carre-mois.en_cours { border: 1.5px dashed var(--bord-fort); background: transparent; color: var(--texte-2); }
.carre-mois.en-cours.ok, .carre-mois.en-cours.partiel { border-color: var(--vert); }
.carre-mois .bulle .discret-bulle { opacity: .7; margin-top: 3px; }
.carre-mois.vide { padding: 0; text-align: center; color: var(--texte-3); } /* pas le style « page vide » */
.mois-source tr.choisi td { background: var(--accent-fond); }
.lien-icone { color: var(--texte-3); vertical-align: middle; }
.lien-icone:hover { color: var(--accent); }
.lien-source { color: var(--texte); }

/* ------------------------------------------------------------------ formats d'import */
.cases-colonnes { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.cases-colonnes label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; margin: 0;
  padding: 5px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); cursor: pointer; }
.cases-colonnes input { accent-color: var(--accent); }

/* ------------------------------------------------------------------ avoirs */
.avoir-bloc { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--bord-fort); border-radius: 10px; background: var(--surface-2); }
.avoir-tete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.montant-avoir { width: 110px; text-align: right; padding: 6px 8px; border: 1px solid var(--bord); border-radius: 8px;
  background: var(--surface); color: var(--texte); font: inherit; }

/* ------------------------------------------------------------------ suivi des factures */
.texte-rouge { color: var(--rouge); font-weight: 600; }
.menu-plus { position: relative; }
.menu-plus summary { list-style: none; cursor: pointer; }
.menu-plus summary::-webkit-details-marker { display: none; }
.menu-plus-corps { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 10; display: flex; flex-direction: column;
  gap: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--bord); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); width: max-content; }
.suivi-facture { display: flex; gap: 6px; align-items: center; }
a.lien-avoir, a.lien-avoir b { color: var(--rouge); }

/* ------------------------------------------------------------------ traiter une facture comptable */
.traiter { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.traiter-pdf { overflow: hidden; position: sticky; top: 12px; }
.traiter-pdf iframe { width: 100%; height: calc(100vh - 140px); min-height: 520px; border: 0; display: block; background: #fff; }
.infos-piece { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.choix-destination { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choix-destination label { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--bord);
  border-radius: 10px; cursor: pointer; background: var(--surface); }
.choix-destination label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fond); }
.choix-destination input { accent-color: var(--accent); }
.choix-destination span { font-size: 12px; color: var(--texte-3); }
.ligne-vehicule { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ligne-vehicule select { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--bord); border-radius: 8px;
  background: var(--surface); color: var(--texte); font: inherit; }
@media (max-width: 900px) {
  .traiter { grid-template-columns: 1fr; }
  .traiter-pdf { position: static; }
  .traiter-pdf iframe { height: 70vh; }
  .choix-destination { grid-template-columns: 1fr; }
}
.ligne-vehicule .recherche-liste { flex: 1; min-width: 0; }
.ligne-vehicule .recherche-saisie { width: 100%; }

/* ------------------------------------------------------------------ coût par véhicule */
.ligne-cout { cursor: pointer; }
.ligne-cout:hover { background: var(--surface-2); }
.ligne-cout .chevron { display: inline-block; width: 14px; color: var(--texte-3); transition: transform .15s; }
.ligne-cout[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.detail-cout > td { background: var(--surface-2); padding: 12px 16px 18px; }
.detail-contenu .titre-section { margin: 14px 0 6px; }
.famille-cout { border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); margin-bottom: 6px; }
.famille-cout summary { display: flex; gap: 6px; align-items: center; padding: 8px 12px; cursor: pointer; list-style: none; }
.famille-cout summary::-webkit-details-marker { display: none; }
.famille-cout[open] summary { border-bottom: 1px solid var(--bord); }
.tableau.compact td, .tableau.compact th { padding-top: 6px; padding-bottom: 6px; font-size: 13px; }

/* ------------------------------------------------------------------ grille de refacturation */
.grille-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.grille-puce { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550; }
.grille-aide { color: var(--texte-3); font-size: 12.5px; margin-left: 6px; }
.grille-puce.c0, .segments label.c0:has(input:checked) { background: var(--violet-fond); color: var(--violet); }
.grille-puce.c1, .segments label.c1:has(input:checked) { background: var(--vert-fond); color: var(--vert); }
.grille-puce.c2, .segments label.c2:has(input:checked) { background: var(--accent-fond); color: var(--accent-texte); }
.grille-puce.c3, .segments label.c3:has(input:checked) { background: var(--orange-fond); color: var(--orange); }
.segments label.cq:has(input:checked) { background: var(--orange-fond); color: var(--orange); }
.segments label.cs:has(input:checked) { background: var(--surface); color: var(--texte-2); }
.grille-titre { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-3); margin: 0; padding: 14px 18px 8px; }
.grille-type { border-top: 1px solid var(--bord); }
.grille-ligne { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 18px; }
.grille-fournisseur { padding-top: 6px; padding-bottom: 6px; padding-left: 38px; position: relative; }
.grille-fournisseur::before { content: ""; position: absolute; left: 24px; top: 0; bottom: 50%; width: 8px; border-left: 1px solid var(--bord-fort); border-bottom: 1px solid var(--bord-fort); border-bottom-left-radius: 4px; }
.grille-fournisseur:last-child { padding-bottom: 12px; }
.grille-fournisseur .secondaire { font-size: 12px; }
.grille-nom { min-width: 0; }
.grille-libelle { font-weight: 650; font-size: 14.5px; }
.segments label.c0:has(input:checked) { box-shadow: inset 0 0 0 1px var(--bord-fort), var(--ombre); }
.segments { display: inline-flex; flex-shrink: 0; border: 1px solid var(--bord); border-radius: 9px; background: var(--surface-2); padding: 2px; gap: 2px; }
.segments label { position: relative; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; color: var(--texte-2); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.segments label:hover { background: var(--surface); color: var(--texte); }
.segments label b { font-variant-numeric: tabular-nums; }
.segments label:has(input:checked) { font-weight: 600; box-shadow: var(--ombre); }
.segments label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments.petits label { padding: 3px 9px; font-size: 12px; }
.grille-modifier { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.grille-modifier summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.grille-modifier summary::-webkit-details-marker { display: none; }
.grille-modifier .lien { font-size: 12.5px; font-weight: 600; color: var(--accent-texte); }
.grille-modifier[open] .lien { color: var(--texte-3); }
.grille-suit { font-size: 12px; color: var(--texte-3); }
.grille-fournisseur:not(.exception) .grille-modifier summary .grille-puce { opacity: .7; }
.grille-puce.cq { background: var(--orange-fond); color: var(--orange); }
.grille-ajout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 18px 16px; }
.grille-ajout label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--texte-2); font-weight: 550; }
.grille-ajout select { padding: 7px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); color: var(--texte); font: inherit; font-weight: 400; }
@media (max-width: 1000px) {
  .grille-ligne { flex-direction: column; align-items: flex-start; gap: 6px; }
  .grille-ajout { grid-template-columns: 1fr; }
}
.grille-famille-ligne td { background: var(--surface-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--texte-3); font-weight: 600; padding-top: 8px; padding-bottom: 8px; }
.grille-negocie td { background: var(--accent-fond); }
.grille-select { padding: 6px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); color: var(--texte); font: inherit; min-width: 220px; }
.conditions-client { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.conditions-client label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--texte-2); font-weight: 550; }
.conditions-client label.large { grid-column: 1 / -1; }
.conditions-client input, .conditions-client textarea, .client-conditions-champs input { padding: 7px 10px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface); color: var(--texte); font: inherit; font-weight: 400; }
.conditions-client .erreur { color: var(--rouge); font-size: 12px; font-weight: 500; }
.client-ligne { border-top: 1px solid var(--bord); }
.client-ligne.negociee { background: var(--accent-fond); }
.client-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.client-conditions summary { list-style: none; cursor: pointer; font-size: 12.5px; text-align: right; }
.client-conditions summary::-webkit-details-marker { display: none; }
.client-conditions-champs { display: flex; gap: 12px; margin-top: 6px; }
.client-conditions-champs label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--texte-2); font-weight: 550; }
.client-conditions-champs .muet { font-size: 12px; font-weight: 400; }
.client-conditions-champs input { width: 150px; }
@media (max-width: 1000px) { .conditions-client { grid-template-columns: 1fr 1fr; } .client-actions { align-items: flex-start; } }
.client-ligne:not(:has(input[type=radio][value="1"]:checked)) .champ-marge { display: none; }
.historique-ligne { margin-top: 10px; text-align: left; min-width: 320px; }
.etiquette-historique { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); font-weight: 600; margin-bottom: 4px; }
.historique-ligne ul, .historique ul { margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.historique-ligne li, .historique li { display: flex; gap: 6px; align-items: center; padding: 3px 0; border-top: 1px dashed var(--bord); }
.historique-ligne li:first-child, .historique li:first-child { border-top: 0; }
.historique { margin-top: 12px; }
.historique summary { cursor: pointer; font-size: 12.5px; }
.supprimer { margin-left: auto; font-size: 12.5px; color: var(--texte-3); display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.conditions-client .muet { font-size: 12.5px; font-weight: 400; }
.montant-unite { display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Compte client (groupe de sociétés) : un cadre autour de ses sociétés, sur l'écran Clients */
.compte-groupe { border: 1px solid var(--bord-fort); border-radius: 14px; padding: 14px 14px 2px; background: var(--surface-2); }
.compte-groupe > .carte { margin-left: 10px; }
.compte-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 4px 14px; }
.compte-tete h2 { margin: 2px 0 4px; font-size: 19px; }
.compte-tete .etiquette { color: var(--texte-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
/* Sélecteur de société de l'espace client */
.choix-societe { display: flex; align-items: center; gap: 8px; }
.choix-societe select { min-width: 220px; }
.acces-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.role-carte, .champ-form label.role-carte { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; cursor: pointer; }
.role-carte:has(input:checked) { border-color: var(--accent); background: var(--accent-fond); }
.role-carte input, .champ-form .role-carte input { margin-top: 3px; width: auto; flex: none; }
/* Nombre de contrats à signer, dans le menu de l'espace client */
.nb-a-signer, .nb-nouveautes { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Tableau de bord : chiffres cliquables et « À faire » en une ligne par sujet */
.kpi-lien { color: inherit; text-decoration: none; transition: border-color .15s; }
.kpi-lien:hover { border-color: var(--bord-fort); text-decoration: none; }
.kpi-orange { background: var(--orange-fond); border-color: transparent; }
.kpi-orange .valeur, .kpi-orange .etiquette { color: var(--orange); }
.kpi-rouge { background: var(--rouge-fond); border-color: transparent; }
.kpi-rouge .valeur, .kpi-rouge .etiquette { color: var(--rouge); }
.a-faire li { align-items: flex-start; }
.a-faire .bouton { align-self: center; }
.a-faire .texte .principal { white-space: normal; }
.compteur-sujet { min-width: 38px; padding: 3px 8px; border-radius: 8px; text-align: center; font-weight: 700;
  font-variant-numeric: tabular-nums; background: var(--gris-fond); color: var(--texte-2); }
.compteur-sujet.rouge { background: var(--rouge-fond); color: var(--rouge); }
.compteur-sujet.orange { background: var(--orange-fond); color: var(--orange); }
.plaques-sujet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.plaques-sujet a { text-decoration: none; }
.a-jour { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--bord);
  color: var(--vert); font-size: 12.5px; }

/* ------------------------------------------------------------------ écran Droits */
/* Un seul tableau par public : les noms des rôles restent en haut de l'écran pendant qu'on descend. */
.tableau-droits thead th { position: sticky; top: 0; z-index: 5; background: var(--surface-2); padding: 12px 14px;
  font-size: 12.5px; color: var(--texte); box-shadow: 0 1px 0 var(--bord); border-bottom: 0; }
.tableau-droits thead th:first-child { border-top-left-radius: var(--rayon); }
.tableau-droits thead th:last-child { border-top-right-radius: var(--rayon); }
.tableau-droits th.droits-role { width: 1%; white-space: nowrap; }
.tableau-droits td + td { white-space: nowrap; }
.tableau-droits tr.droits-groupe th { position: static; background: var(--fond); color: var(--texte-3); font-size: 12px;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 16px 14px 6px; border-bottom: 1px solid var(--bord); }
.tableau-droits tbody:first-of-type tr.droits-groupe th { padding-top: 12px; }
.tableau-droits tbody tr.droits-groupe:hover { background: none; }
.tableau-droits td { padding: 10px 14px; }
.tableau-droits td + td, .tableau-droits th.droits-role { padding-left: 6px; padding-right: 6px; }
.droits-intitule { font-weight: 600; min-width: 170px; }
.droits-precision { font-size: 12px; color: var(--texte-2); margin-top: 1px; line-height: 1.4; }
.droits-verrou { font-size: 12.5px; color: var(--texte-3); margin-left: 4px; }
.droits-change { margin-top: 5px; }

/* Rien | Voir | Agir : trois boutons collés, le choix actif prend sa couleur (gris, bleu, vert). */
.niveaux { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--bord); border-radius: 8px; background: var(--surface-2); }
.niveaux label { position: relative; cursor: pointer; }
.niveaux input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.niveaux span { display: block; min-width: 46px; padding: 4px 8px; border-radius: 6px; text-align: center; font-size: 12.5px;
  font-weight: 600; color: var(--texte-3); transition: background .12s, color .12s; user-select: none; }
.niveaux label:hover span { color: var(--texte); background: var(--gris-fond); }
.niveaux input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.niveaux .n-rien input:checked + span { background: var(--gris-fond); color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord-fort); }
.niveaux .n-voir input:checked + span { background: var(--accent-fond); color: var(--accent-texte); box-shadow: inset 0 0 0 1px var(--accent); }
.niveaux .n-agir input:checked + span { background: var(--vert-fond); color: var(--vert); box-shadow: inset 0 0 0 1px var(--vert); }

/* Écran trop étroit : le tableau défile de côté plutôt que d'écraser les intitulés (les rôles ne restent alors plus en haut). */
@media (max-width: 1180px) {
  .niveaux span { min-width: 0; padding: 4px 7px; }
  .droits-4-roles { overflow-x: auto; }
}
@media (max-width: 900px) { .tableau-droits { overflow-x: auto; } }

/* ------------------------------------------------------------------ Nouveautés et Prise en main */
.nouveautes { max-width: 760px; }
.nouveaute h3, .guide-fiche h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nouveaute p, .guide-fiche p { margin: 6px 0 0; color: var(--texte-2); }
.nouveaute.non-lue { border-left: 3px solid var(--accent); }
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.guide-fiche { padding: 16px 18px; display: flex; flex-direction: column; }
.guide-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.guide-fiche p { flex: 1; }
.guide-lien { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.nb-nouveautes { background: var(--accent-plein); }

/* Ligne que l'on vient d'enregistrer : surlignée quelques secondes au retour sur la liste. */
.surligne, .surligne > td { background: color-mix(in srgb, var(--vert) 16%, transparent) !important; transition: background 1.2s; }
.surligne > td:first-child { box-shadow: inset 3px 0 0 var(--vert); }
.surligne.surligne-fin, .surligne.surligne-fin > td { background: transparent !important; }
.surligne.surligne-fin > td:first-child { box-shadow: none; }
[data-barre-selection][hidden] { display: none !important; }
.onglets-facturation { margin-bottom: 14px; }
.bandeau.alerte { background: var(--rouge-fond); }
.bandeau.alerte .ic { color: var(--rouge); }
/* Espace client, PV : coordonnées de la personne à qui le véhicule était prêté. */
.autre-personne { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin: 4px 0; }
.autre-personne[hidden] { display: none; }
.autre-personne input { border: 1px solid var(--bord-fort); border-radius: 8px; padding: 5px 8px; background: var(--surface); color: var(--texte); font: 13px var(--police); min-width: 0; }
/* Aide repliée : un « ? » à côté du titre ; le texte s'ouvre au survol, au toucher ou au clic. */
.bulle-aide { display: inline-block; position: relative; vertical-align: middle; margin-left: 8px; font-size: 14px; font-weight: 400; line-height: 1.5; }
.bulle-aide > summary { list-style: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bord-fort); color: var(--texte-2); font-size: 13px; font-weight: 650; cursor: help; user-select: none; }
.bulle-aide > summary::-webkit-details-marker { display: none; }
.bulle-aide > summary:hover, .bulle-aide[open] > summary { border-color: var(--accent); color: var(--accent); background: var(--accent-fond); }
.bulle-texte { position: absolute; z-index: 40; top: 30px; left: -10px; width: min(380px, 80vw); padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre-haute); color: var(--texte); font-size: 13.5px; text-transform: none; letter-spacing: 0; }
.bulle-texte ul { margin: 6px 0 0 18px; padding: 0; }

/* Menu « … » des fiches clients : il s'ouvre vers le bas, une action par ligne. */
.menu-plus.vers-le-bas .menu-plus-corps { bottom: auto; top: calc(100% + 6px); min-width: 230px; padding: 6px; gap: 2px; }
.menu-plus .menu-plus-corps > a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--texte); font-size: 13.5px; text-decoration: none; }
.menu-plus .menu-plus-corps > a:hover { background: var(--surface-2); }
.menu-plus .menu-plus-corps > a .nb { margin-left: auto; }

/* Ligne de liste choisie au clavier (↑ ↓, Entrée pour l'ouvrir). */
tr.cliquable:focus { outline: none; }
tr.cliquable:focus-visible > td { background: var(--accent-fond); }
tr.cliquable:focus-visible > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* Listes vides : la même présentation partout (icône, puis le message centré), qu'il s'agisse d'un grand encadré
   « .vide » ou d'une simple ligne « Aucun … » dans un tableau ou une liste (retours de test du 25/11/2026). */
.tableau tbody td[colspan].muet, .tableau tbody td[colspan].petit, .liste > li.muet:only-child {
  text-align: center; padding: 30px 16px 26px; color: var(--texte-2); font-size: 14px;
}
.tableau tbody td[colspan].muet::before, .tableau tbody td[colspan].petit::before, .liste > li.muet:only-child::before {
  content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 10px; background: var(--texte-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.liste > li.muet:only-child { display: block; padding: 18px 10px 14px; font-size: 13.5px; }
.liste > li.muet:only-child::before { width: 24px; height: 24px; margin-bottom: 6px; }

/* Sur téléphone, un tableau qui masque des colonnes le dit (retours de test du 25/11/2026). */
@media (max-width: 820px) {
  .tableau-conteneur:has(.cacher-mobile)::before {
    content: "Certaines colonnes sont masquées sur téléphone : ouvrez la ligne ou tournez l'écran pour tout voir.";
    display: block; padding: 8px 12px; font-size: 12.5px; color: var(--texte-2); background: var(--surface-2);
    border-bottom: 1px solid var(--bord);
  }
}

/* Grille de refacturation en tableau (25/11/2026) : une ligne par type de frais, une colonne par choix. */
.grille-tableau th.grille-col, .grille-tableau td.grille-col { text-align: center; width: 13%; padding-left: 4px; padding-right: 4px; }
.grille-tableau thead .grille-puce { white-space: normal; justify-content: center; line-height: 1.25; font-size: 12px; padding: 4px 8px; }
.grille-puce.cs { background: var(--surface-2); color: var(--texte-2); }
.grille-famille-ligne th { background: var(--surface-2); text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); padding: 9px 14px 6px; }
.grille-case { display: grid; place-items: center; width: 100%; min-height: 34px; border-radius: 8px; cursor: pointer; }
.grille-case:hover { background: var(--surface-2); }
.grille-case input { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.grille-case.c0:has(input:checked) { background: var(--violet-fond); }
.grille-case.c0 input { accent-color: var(--violet); }
.grille-case.c2 input { accent-color: var(--accent); }
.grille-case.cs:has(input:checked) { background: var(--surface-2); }
.grille-case.cs input { accent-color: var(--texte-2); }
.grille-case { gap: 3px; }
.grille-suit { font-size: 11.5px; color: var(--texte-2); white-space: nowrap; display: block; }
.grille-case.c1:has(input:checked) { background: var(--vert-fond); }
.grille-case.c1 input { accent-color: var(--vert); }
.grille-case.c2:has(input:checked) { background: var(--accent-fond); }
.grille-case.c3:has(input:checked) { background: var(--orange-fond); }
.grille-case.c3 input { accent-color: var(--orange); }
.grille-exception { margin-left: 6px; text-decoration: none; }
tr.grille-a-exception > td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
/* Page Refacturation d'un client en tableau : « Conditions » ouvre une ligne sous le type de frais. */
button.bouton-lien { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--accent-texte); cursor: pointer; }
button.bouton-lien:hover { text-decoration: underline; }
tr.ligne-negociee > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
tr.ligne-conditions > td { background: var(--surface-2); padding: 12px 16px 14px; }
tr.ligne-conditions .client-conditions-champs { margin-bottom: 10px; }

/* Grille par défaut datée (27/11/2026) : date d'application à côté du bouton Enregistrer. */
.grille-date { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-2); }
.grille-date input { width: auto; }

/* ------------------------------------------------------------------ appli du conducteur (téléphone, 27/11/2026) */
/* Accueil : le véhicule en tête, puis de grosses tuiles faciles à toucher. */
.accueil-vehicule { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.accueil-vehicule .km { color: var(--texte-2); font-size: 13px; margin-top: 4px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tuile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; min-height: 108px;
  border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); color: var(--texte);
  box-shadow: var(--ombre); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.3;
}
.tuile:hover { text-decoration: none; border-color: var(--bord-fort); background: var(--surface-2); }
.tuile .pictogramme { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-fond); color: var(--accent); }
.tuile .pictogramme.rouge { background: var(--rouge-fond); color: var(--rouge); }
.tuile .pictogramme.vert { background: var(--vert-fond); color: var(--vert); }
.tuile .pictogramme.orange { background: var(--orange-fond); color: var(--orange); }
.tuile small { display: block; font-weight: 500; font-size: 12.5px; color: var(--texte-2); margin-top: 2px; }
.tuile.a-faire { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, var(--ombre); }
.tuile.inactive { opacity: .55; pointer-events: none; }
.tuile .texte-vert { color: var(--vert); font-weight: 600; }
.tuile .texte-orange { color: var(--orange); font-weight: 700; }

/* Prise en charge : quatre étapes, l'appareil photo s'ouvre d'un toucher. */
.pec-intro p { margin: 0 0 14px; line-height: 1.5; }
.pec-etapes { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.pec-etapes li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.pec-etapes .ic { flex: none; color: var(--accent); margin-top: 1px; }
.pec-grand { width: 100%; height: 50px; justify-content: center; font-size: 16px; border-radius: 12px; margin-top: 8px; }
.pec-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-plein); color: #fff; font-size: 13px; margin-right: 6px; vertical-align: 1px; }
.pec-aide { margin: 0 0 12px; font-size: 13px; }
.pec-requis { color: var(--rouge); }
.pec-zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pec-zone { position: relative; }
.pec-zone label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 120px;
  border: 1.5px dashed var(--bord-fort); border-radius: 12px; background: var(--surface-2); cursor: pointer;
  overflow: hidden; position: relative; color: var(--texte-2);
}
.pec-zone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pec-zone .pec-icone { color: var(--accent); }
.pec-zone .pec-libelle { font-weight: 600; font-size: 13px; color: var(--texte); }
.pec-zone.faite label { border-style: solid; border-color: var(--vert); }
.pec-zone.faite img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pec-zone.faite .pec-libelle { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: rgba(15, 23, 42, .62); color: #fff; text-align: center; }
.pec-zone.envoi label::after { content: "Envoi…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .85); color: var(--accent); font-weight: 700; }
.pec-retirer { position: absolute; top: 6px; right: 6px; }
.pec-lien { border: 0; border-radius: 99px; background: rgba(15, 23, 42, .62); color: #fff; font: 600 11.5px var(--police); padding: 4px 9px; cursor: pointer; }
.pec-case { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bord); cursor: pointer; font-size: 15px; line-height: 1.4; }
.pec-case:last-of-type { border-bottom: 0; }
.pec-case input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); margin: 0; }
.pec-km { font-size: 20px !important; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pec-recus { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.pec-recus li { display: flex; gap: 8px; align-items: center; }
.pec-recus .vert { color: var(--vert); }
.pec-non { color: var(--rouge); font-weight: 700; width: 16px; text-align: center; }
.pec-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pec-galerie figure { margin: 0; }
.pec-galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--bord); display: block; }
.pec-galerie figcaption { font-size: 12px; color: var(--texte-2); margin-top: 4px; }
.champ textarea { width: 100%; border-radius: 10px; border: 1px solid var(--bord-fort); padding: 10px 12px; font: 15px var(--police); background: var(--surface); color: var(--texte); resize: vertical; }
@media (max-width: 820px) {
  .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pec-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pec-galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Rappels sur ce téléphone (accueil du conducteur) */
.rappels { display: flex; align-items: center; gap: 14px; }
.rappels .pictogramme { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-fond); color: var(--accent); }
.rappels-texte { flex: 1; min-width: 0; }
.rappels-texte small { display: block; color: var(--texte-2); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.rappels-retirer { background: var(--gris-fond); color: var(--texte-2); }
.rappels [hidden] { display: none !important; }
#rappels.a-activer { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-fond), var(--ombre); }
#rappels.a-activer .rappels-texte > b { font-size: 15.5px; }
#rappels.a-activer [data-action="activer"] { height: 44px; padding: 0 18px; font-size: 15px; }
#rappels.reduit .carte-corps { padding: 10px 14px; }
#rappels:not(.porte) .rappels-continuer, #rappels:not(.porte) .rappels-porte-seulement { display: none !important; }
/* Écran plein à l'ouverture (« juste milieu » du 29/11/2026) : on ne passe qu'en répondant à la question. */
html.porte-ouverte, html.porte-ouverte body { overflow: hidden; }
#rappels.porte { position: fixed; inset: 0; z-index: 100; margin: 0; border: 0; border-radius: 0; box-shadow: none;
  background: var(--fond); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
#rappels.porte .rappels { flex-direction: column; align-items: stretch; text-align: center; max-width: 400px; width: 100%;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 20px; padding: 28px 22px; box-shadow: var(--ombre-haute); gap: 16px; }
#rappels.porte .pictogramme { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; }
#rappels.porte .pictogramme .ic { width: 32px; height: 32px; }
#rappels.porte .rappels-texte > b { font-size: 20px; line-height: 1.25; }
#rappels.porte .rappels-texte small { font-size: 14.5px; margin-top: 10px; }
#rappels.porte [data-action="activer"], #rappels.porte .rappels-continuer.bouton { width: 100%; height: 50px; justify-content: center; font-size: 16px; border-radius: 12px; }
#rappels.porte .rappels-sans { align-self: center; background: none; color: var(--texte-2); text-decoration: underline; font-size: 13.5px; }
#rappels.reduit .pictogramme { width: 30px; height: 30px; background: var(--vert-fond); color: var(--vert); }
@media (max-width: 520px) {
  #rappels.a-activer .rappels { flex-wrap: wrap; }
  #rappels.a-activer [data-action="activer"] { width: 100%; justify-content: center; }
}
/* Mot de passe (29/11/2026) : œil pour l'afficher, règles cochées pendant la frappe, case verte ou rouge. */
.mdp-case { position: relative; }
.mdp-case input { padding-right: 46px !important; }
.mdp-oeil { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--texte-3); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.mdp-oeil:hover { color: var(--texte); background: var(--gris-fond); }
.mdp-oeil .ouvert, .mdp-oeil[aria-pressed="true"] .ferme { display: none; }
.mdp-oeil[aria-pressed="true"] .ouvert { display: block; }
.champ input.mdp-bon { border-color: var(--vert) !important; box-shadow: 0 0 0 3px var(--vert-fond); }
.champ input.mdp-mauvais { border-color: var(--rouge) !important; box-shadow: 0 0 0 3px var(--rouge-fond); }
.mdp-regles { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: 13px; color: var(--texte-3); }
.mdp-regles li { display: flex; align-items: center; gap: 8px; }
.mdp-regles li::before { content: "•"; width: 16px; text-align: center; font-weight: 700; }
.mdp-regles li.ok { color: var(--vert); }
.mdp-regles li.ok::before { content: "✓"; }
.mdp-regles li.non { color: var(--rouge); }
.mdp-regles li.non::before { content: "✕"; }
.mdp-egal { font-size: 13px; margin-top: 6px; min-height: 18px; font-weight: 550; }
.mdp-egal.ok { color: var(--vert); }
.mdp-egal.non { color: var(--rouge); }
.connexion-formulaire .bouton-cle { margin: 18px 0 4px; height: 50px; font-size: 16px; }
.connexion-formulaire .bouton-second { margin-top: 10px; font-weight: 550; white-space: normal; text-align: center; height: auto; min-height: 42px; padding: 8px 12px; }
.connexion-formulaire .bouton:disabled { opacity: .45; cursor: not-allowed; filter: none; }
/* Numéros utiles (29/11/2026) : de gros boutons d'appel. */
.numeros-titre { font-size: 15px; margin: 0 0 12px; }
.appel { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--bord); border-radius: 12px; background: var(--surface); color: var(--texte); text-decoration: none; margin-bottom: 10px; }
.appel:hover { text-decoration: none; background: var(--surface-2); }
.appel b { display: block; font-size: 15.5px; }
.appel small { display: block; color: var(--texte-2); font-size: 12.5px; margin-top: 2px; line-height: 1.4; }
.appel-icone { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--vert-fond); color: var(--vert); }
.appel-icone.orange { background: var(--orange-fond); color: var(--orange); }
.appel.principal { border-color: var(--vert); box-shadow: 0 0 0 1px var(--vert) inset; }
.appel.principal .appel-icone { background: var(--vert); color: #fff; }
.appel.orange { border-color: var(--orange); }
.appel.inactif { opacity: .7; }
.appel.inactif .appel-icone { background: var(--gris-fond); color: var(--texte-3); }
.appel-memo { margin: 4px 0 0; font-size: 13px; color: var(--texte-2); line-height: 1.5; }
.appel-memo a { color: var(--rouge); }
.urgences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.urgences .appel { margin: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
.urgence-numero { font-size: 26px !important; color: var(--rouge); font-variant-numeric: tabular-nums; }
.souligne { text-decoration: underline; }
/* Choix à boutons ronds (« Pouvez-vous encore rouler ? ») : de gros boutons faciles à toucher (29/11/2026). */
.champ-form input[type=radio] { width: 20px !important; height: 20px; min-height: 0 !important; padding: 0 !important; margin: 0; flex: none; accent-color: var(--accent); box-shadow: none !important; }
.champ-form label:has(> input[type=radio]) { display: flex; align-items: center; gap: 12px; font-weight: 550; font-size: 14.5px; padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--bord-fort); border-radius: 10px; background: var(--surface); cursor: pointer; }
.champ-form label:has(> input[type=radio]:checked) { border-color: var(--accent); background: var(--accent-fond); }
/* Contraventions du conducteur : une fiche par PV (29/11/2026). */
.pv-fiche .carte-corps { display: grid; gap: 6px; }
.pv-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15.5px; }
.pv-montant { font-weight: 700; font-variant-numeric: tabular-nums; }
.pv-statut { display: grid; gap: 4px; margin: 4px 0; justify-items: start; }
.pv-statut small { color: var(--texte-2); font-size: 12.5px; line-height: 1.4; }
.pv-fiche .bouton { justify-self: start; margin-top: 4px; }
/* Pastille rouge des actions à faire sur une tuile (29/11/2026). */
.tuile { position: relative; }
.tuile-nb { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--rouge); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--fond); }
/* Photo gardée sur le téléphone, en attente du réseau (29/11/2026). */
.pec-zone.attente label { border-color: var(--orange) !important; border-style: dashed !important; }
.pec-attente { position: absolute; top: 6px; left: 6px; right: 6px; padding: 3px 8px; border-radius: 99px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
/* Signature tracée au doigt (29/11/2026). */
.cadre-signature { display: grid; gap: 8px; margin-top: 14px; }
.cadre-signature-titre { font-weight: 600; font-size: 13px; }
.cadre-signature canvas { width: 100%; height: 160px; border: 1.5px dashed var(--accent); border-radius: 10px; background: #f8fafc; touch-action: none; }
.cadre-signature-pied { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.signature-image { max-width: 260px; max-height: 110px; border: 1px solid var(--bord); border-radius: 8px; background: #fff; padding: 4px; }
/* Bloc « Se connecter avec Face ID » sur petit écran : les boutons passent sous le texte (29/11/2026). */
@media (max-width: 520px) {
  #proposer-cle .rappels { flex-wrap: wrap; }
  #proposer-cle .rappels-texte { flex: 1 1 calc(100% - 52px); }
  #proposer-cle .actions { width: 100%; justify-content: flex-start; padding-left: 52px; }
}
