:root{
  --orange:#F97316; --orange-d:#ea670c; --orange-l:#fff3ea;
  --bg:#f6f7f9; --panel:#ffffff; --ink:#1c2128; --muted:#6b7480;
  --line:#e7eaee; --line-d:#d7dce2;
  --green:#16a34a; --green-l:#e9f7ef; --teal:#0d9488; --teal-l:#e6f6f4;
  /* Pastille téléphone en CONTOUR du CRM (12/09) — valeurs pour fond CLAIR.
     ⚠️ INERTE aujourd'hui : le :root « THÈME SOMBRE » en bas de ce fichier n'est derrière
     AUCUNE condition (pas de prefers-color-scheme, pas de classe) — il écrase donc toujours
     ce bloc, et l'app est sombre point. Gardées par cohérence avec --green / --orange / --bg,
     eux aussi doublés ici, pour le jour où un vrai thème clair existera. */
  --phone-txt:#15803d; --phone-line:rgba(22,163,74,.5);
  --red:#dc2626; --red-l:#fdecec; --gray:#64748b; --gray-l:#eef1f4;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 1px 3px rgba(16,24,40,.06);
  --shadow-lg:0 12px 32px rgba(16,24,40,.16);
  --r:12px;
}
*{box-sizing:border-box}
html{margin:0;height:100%}body{margin:0}
body{
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); display:flex; min-height:100vh;
  -webkit-font-smoothing:antialiased; font-size:14px;
}
.muted{color:var(--muted)}
button{font-family:inherit;cursor:pointer}

/* ---------- Sidebar ---------- */
.sidebar{
  width:240px; flex-shrink:0; background:var(--panel); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:18px 14px; position:sticky; top:0; height:100vh; align-self:flex-start;
}
.brand{display:flex;align-items:center;gap:10px;padding:6px 8px 18px}
.brand-logo{width:34px;height:34px;border-radius:9px;background:var(--orange-l);display:grid;place-items:center;font-size:18px}
.brand-name{font-weight:800;font-size:18px;letter-spacing:-.3px}
.brand-name span{color:var(--orange)}
.nav{display:flex;flex-direction:column;gap:3px;margin-top:6px}
.nav-item{
  display:flex;align-items:center;gap:10px;border:none;background:transparent;color:var(--muted);
  padding:10px 11px;border-radius:9px;font-size:14px;font-weight:600;text-align:left;transition:.12s;
}
.nav-item .ico{width:18px;text-align:center;opacity:.9}
.nav-item:hover{background:var(--bg);color:var(--ink)}
.nav-item.active{background:var(--orange-l);color:var(--orange-d)}
.sidebar-foot{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.src-hint{font-size:11px;color:var(--muted);line-height:1.4;padding:0 4px}
/* « ⚙️ Paramètres » : même allure que les onglets, mais en bas de la barre (18/09). */
.nav-params{width:100%;cursor:pointer}

/* ---------- Buttons ---------- */
.btn{border:1px solid var(--line-d);background:#fff;color:var(--ink);padding:9px 14px;border-radius:9px;font-weight:600;font-size:13px;transition:.12s;display:inline-flex;align-items:center;gap:7px}
.btn:hover{border-color:var(--muted)}
.btn-primary{background:var(--orange);border-color:var(--orange);color:#fff}
.btn-primary:hover{background:var(--orange-d);border-color:var(--orange-d)}
.btn-block{width:100%;justify-content:center}
.btn-sm{padding:6px 10px;font-size:12px}
.btn-ghost{background:transparent;border-color:transparent;color:var(--muted)}
.btn-ghost:hover{background:var(--gray-l);color:var(--ink)}
.btn-danger{color:var(--red);border-color:transparent;background:transparent}
.btn-danger:hover{background:var(--red-l)}

/* ---------- Main ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 28px 14px}
.topbar h1{margin:0;font-size:22px;letter-spacing:-.4px}
.topbar p{margin:3px 0 0;font-size:13px}
.topbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
/* Fiche prospect : barre de titre masquee pour gagner de la place */
body.lead-fiche .topbar{display:none}
body.lead-fiche .view{padding-top:20px}
/* ---------- Statistiques ---------- */
.stats-pige{border:1px solid var(--line-d);border-radius:9px;padding:8px 10px;font-size:13px;font-family:inherit;background:var(--panel);color:var(--ink);font-weight:600}
.stat.hot .v{color:#ef4444}
.stat-note{padding:2px 18px 14px;font-size:13px;color:var(--muted)}
.pctlbl{font-size:12px;color:var(--muted);font-weight:600}
.bars{display:flex;align-items:flex-end;gap:6px;padding:14px 18px 12px}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
.bar-stack{width:100%;max-width:34px;display:flex;flex-direction:column-reverse;border-radius:5px 5px 0 0;overflow:hidden}
.bar-empty{height:3px;width:100%;background:var(--line)}
.seg{width:100%}
.seg-a{background:#16a34a}.seg-n{background:#f97316}.seg-u{background:#cbd5e1}
.bar-num{font-size:11px;font-weight:700;color:var(--muted);height:14px;line-height:14px}
.bar-lbl{font-size:11px;color:var(--muted);white-space:nowrap}
.bar-col.hot .bar-lbl{color:var(--orange);font-weight:800}
.bars-legend{display:flex;gap:16px;padding:0 18px 14px;font-size:12px;color:var(--muted);flex-wrap:wrap}
.bars-legend span{display:inline-flex;align-items:center;gap:6px}
.bars-legend .dot{width:9px;height:9px;border-radius:3px;display:inline-block}
.stat-table{width:100%;border-collapse:collapse;font-size:13px}
.stat-table th,.stat-table td{padding:9px 18px;text-align:right;border-top:1px solid var(--line)}
.stat-table th:first-child,.stat-table td:first-child{text-align:left}
.stat-table thead th{border-top:none;color:var(--muted);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.3px}
.stat-table tbody tr:hover{background:var(--gray-l)}
.stat-table td:first-child{font-weight:600}
.d-up{color:var(--green);font-weight:700}.d-down{color:var(--red);font-weight:700}.d-flat{color:var(--muted)}
.view{padding:6px 28px 14px}

/* ---------- Barres de défilement fines et discrètes ---------- */
*{scrollbar-width:thin;scrollbar-color:var(--line-d) transparent}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line-d);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:var(--muted)}
::-webkit-scrollbar-corner{background:transparent}

/* ---------- Dashboard ---------- */
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}
.stat{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;box-shadow:var(--shadow)}
.stat .k{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.4px}
.stat .v{font-size:28px;font-weight:800;margin-top:6px;letter-spacing:-.5px}
.stat .v small{font-size:14px;font-weight:600;color:var(--muted)}
.stat.accent .v{color:var(--orange)}
.stat.good .v{color:var(--green)}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.panel h3{margin:0;padding:16px 18px;border-bottom:1px solid var(--line);font-size:15px}
/* Date de rappel modifiable en place (14/09, demande Simon) : le champ REMPLACE le texte en
   gras + le bouton « ✏️ Modifier », il doit donc se lire comme une valeur, pas comme un
   formulaire — d'où la graisse 700 et la taille 15px. */
.rem-dt-inline{background:var(--bg);border:1px solid var(--line-d);color:var(--ink);border-radius:9px;
  padding:9px 12px;font-size:15px;font-weight:700;font-family:inherit;cursor:pointer}
.rem-dt-inline:hover{border-color:var(--orange)}
.rem-dt-inline:focus{outline:2px solid var(--orange);outline-offset:1px;border-color:var(--orange)}
/* Confirmation du RDV par Google Agenda (15/09) — mêmes codes visuels que le bloc
   « Confirmer le RDV avec Google Meet » du Pipeline artisan-net : bleu indigo pour l'action,
   vert pour l'état confirmé. */
.rdv-g{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
/* ⚠️ `.btn.rdv-g-…` et PAS `.rdv-g-…` (corrigé le 19/09) : le thème sombre redéfinit `.btn`
   PLUS BAS dans ce fichier, à spécificité égale — ces deux boutons sortaient donc GRIS au
   lieu d'indigo et de vert. Même piège que .btn.wa-confirm, mesuré :
   fond attendu rgba(99,102,241,.1), fond réel rgb(30,39,48). */
/* ⚠️ `justify-content:center` (20/09) : `.btn` est en `inline-flex`, donc à pleine largeur
   son contenu se colle À GAUCHE. `.btn.wa-confirm` centrait déjà, pas celui-ci — les deux
   boutons empilés n'étaient pas alignés pareil. Vaut pour tout bouton pleine largeur ici. */
.btn.rdv-g-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  box-sizing:border-box;background:rgba(99,102,241,0.10);border:1px solid rgba(99,102,241,0.45);
  color:#818cf8;font-weight:700;font-size:13.5px;padding:10px 14px}
.btn.rdv-g-btn:hover{background:rgba(99,102,241,0.20);border-color:rgba(99,102,241,0.7)}
.btn.rdv-g-ok{background:rgba(34,197,94,0.12);border:1px solid rgba(34,197,94,0.45);
  color:#4ade80;font-weight:700;font-size:13.5px;padding:10px 14px}
.btn.rdv-g-ok:hover{background:rgba(34,197,94,0.22);border-color:rgba(34,197,94,0.7)}
/* « ✕ Non » : neutre, volontairement moins appuyé que le « oui » — c'est le chemin par
   défaut qui doit sauter aux yeux, pas le repli. */
.btn.rdv-g-non{background:rgba(148,163,184,0.10);border:1px solid rgba(148,163,184,0.38);
  color:#cbd5e1;font-weight:700;font-size:13.5px;padding:10px 14px}
.btn.rdv-g-non:hover{background:rgba(148,163,184,0.20);border-color:rgba(148,163,184,0.6)}
/* Les deux réponses côte à côte, à parts égales. `min-width:0` : sans lui un libellé long
   empêcherait le bouton de rétrécir et la paire déborderait sur mobile. */
.rdv-g-duo{display:flex;gap:8px}
.rdv-g-duo .btn{flex:1 1 0;min-width:0;justify-content:center;white-space:nowrap}
.rdv-g-q{font-size:12px;color:var(--muted);margin-bottom:8px;line-height:1.4}
/* Triangle rouge « ce prospect n'a pas d'e-mail » sur le bouton Google (21/09).
   `display:flex` pour centrer le SVG sur la ligne de texte, `flex:0 0 auto` pour qu'il ne
   soit pas écrasé quand le libellé prend toute la largeur sur un écran étroit.
   ⚠️ Pas de marge : `.btn.rdv-g-btn` a déjà `gap:8px`. */
.rdv-g-alerte{display:flex;align-items:center;flex:0 0 auto}
/* ── Onglet HistoVec (19/09) ─────────────────────────────────────────────────────────── */
/* Onglet HistoVec : carte CENTRÉE (demande Simon 19/09). La vue est vide tout autour —
   une colonne collée en haut à gauche donnait un écran bancal. */
.hv-centre{display:flex;justify-content:center}
/* La largeur vit sur la COLONNE, pas sur chaque carte : les deux panneaux (saisie et
   historique) doivent être alignés au pixel près. */
.hv-col{width:100%;max-width:540px;display:flex;flex-direction:column;gap:14px}
/* Historique À DROITE de la saisie sur grand écran (19/09, demande Simon).
   ⚠️ Seuil à 1280 px de FENÊTRE, pas 1100 : la barre latérale mange ~236 px et le
   padding de la vue 32 — à 1100 les deux cartes de 540 déborderaient. Ici la paire fait
   au plus 1094 (540+14+540) et RÉTRÉCIT au lieu de dépasser.
   ⚠️ flex:0 1 540px et PAS flex:1 : quand l'historique est vide il est `hidden`, et une
   carte seule doit rester à 540 px centrée, pas s'étaler sur toute la largeur.
   (`:only-child` ne peut pas servir : le panneau historique est TOUJOURS dans le DOM.) */
@media (min-width:1280px){
  .hv-col{flex-direction:row;align-items:flex-start;justify-content:center;max-width:1094px}
  .hv-col > .hv-panel{flex:0 1 540px;min-width:0}
}
.hv-panel{width:100%;box-sizing:border-box;padding:24px 24px 26px}
@media (min-width:900px){
  /* Centrage vertical aussi, mais avec min-height et PAS height : quand le formulaire et
     le lien apparaissent, la carte doit pousser la page, pas se faire rogner. */
  .hv-centre{align-items:center;min-height:calc(100vh - 150px)}
}
/* ⚠️ `.btn.hv-photo` : le thème sombre redéfinit `.btn` plus bas, une règle `.hv-photo`
   seule sortirait grise (piège déjà rencontré 3 fois dans ce fichier). */
/* Les deux entrées côte à côte, à parts égales ; elles passent l'une sous l'autre quand
   l'écran est étroit (`flex-wrap` + `min-width`), au lieu de déborder. */
.hv-actions{display:flex;gap:8px;flex-wrap:wrap}
.btn.hv-photo,.btn.hv-fichier{display:flex;align-items:center;justify-content:center;gap:8px;
  flex:1 1 200px;min-width:0;box-sizing:border-box;font-weight:700;font-size:14px;padding:13px 16px}
.btn.hv-photo{background:rgba(59,130,246,0.14);border:1px solid rgba(59,130,246,0.45);color:#93c5fd}
.btn.hv-photo:hover{background:rgba(59,130,246,0.24);border-color:rgba(59,130,246,0.7)}
/* Le téléversement est le chemin secondaire : neutre, pour que la photo reste l'évidence. */
.btn.hv-fichier{background:rgba(148,163,184,0.10);border:1px solid rgba(148,163,184,0.38);color:#cbd5e1}
.btn.hv-fichier:hover{background:rgba(148,163,184,0.20);border-color:rgba(148,163,184,0.6)}
.btn.hv-photo:disabled,.btn.hv-fichier:disabled{opacity:.65;cursor:default}
.hv-etat{font-size:12.5px;color:var(--muted);margin-top:12px;line-height:1.5;text-align:center}
/* Au repos la ligne d'état est VIDE : sans ça sa marge haute creuserait un blanc sous
   les boutons. `hvEtat()` écrit dans `innerHTML`, donc `:empty` suit bien l'état réel. */
.hv-etat:empty{display:none}
.hv-form{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.hv-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hv-grid input{width:100%;box-sizing:border-box;background:var(--bg);border:1px solid var(--line-d);
  border-radius:8px;padding:9px 11px;color:var(--ink);font-size:13.5px;font-family:inherit;outline:none}
.hv-grid input:focus{border-color:var(--orange)}
/* 08/10 — champs HistoVec copiables : clic = copier (lecture seule), double-clic = modifier */
.hv-grid input.hv-copiable{touch-action:manipulation}
.hv-grid input.hv-copiable[readonly]{cursor:copy}
.hv-grid input.hv-copiable[readonly]:hover{border-color:var(--orange)}
.hv-grid input.hv-copiable.copied{border-color:#22c55e;background:rgba(34,197,94,.12)}
.hv-astuce{font-size:11.5px;color:var(--muted);margin:8px 0 2px}
.btn.hv-valider{width:100%;margin-top:10px;justify-content:center}
.hv-lien{margin-top:14px;padding-top:14px;border-top:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* ⚠️ BUG CORRIGÉ 19/09 : `hidden` ne suffisait PAS ici. La règle auteur `display:flex`
   bat la règle `[hidden]{display:none}` de la feuille du navigateur : le bloc restait dans
   le flux et dessinait un trait en travers de la carte, vide, en permanence.
   Vérifié : seul élément du fichier posé avec `hidden` dont une classe fixe `display`
   (audit des 10 classes concernées). */
.hv-lien[hidden]{display:none}
/* ---- Historique des HistoVec (19/09) ---- */
.hv-histo{padding:18px 20px 20px}
.hv-histo-haut{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.hv-histo-t{font-size:13px;font-weight:700;display:flex;align-items:center;gap:7px;white-space:nowrap}
.hv-histo-n{font-size:11px;font-weight:700;color:var(--muted);background:var(--bg);
  border:1px solid var(--line-d);border-radius:20px;padding:1px 8px}
.hv-q{flex:1 1 150px;min-width:0;background:var(--bg);border:1px solid var(--line-d);border-radius:8px;
  padding:7px 10px;color:var(--ink);font-size:12.5px;font-family:inherit;outline:none}
.hv-q:focus{border-color:var(--orange)}
.hv-ligne{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line)}
.hv-ligne-g{flex:1;min-width:0}
.hv-ligne-immat{font-size:13px;font-weight:700;letter-spacing:.3px}
.hv-ligne-sub{font-size:11.5px;color:var(--muted);margin-top:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hv-ligne-d{display:flex;gap:6px;flex-shrink:0}
.hv-ligne-d a.btn{text-decoration:none}
/* ⚠️ Double classe obligatoire : le thème sombre redéfinit `.btn` plus bas (cf. §7). */
.btn.hv-sup{color:var(--muted)}
.btn.hv-sup:hover{color:#f87171;border-color:rgba(248,113,113,.5)}
/* Étiquettes de statut de la file d'attente (19/09). Pas des `.btn` → pas concernées
   par le piège du thème sombre. */
.hv-b{display:inline-block;font-size:9.5px;font-weight:700;border-radius:20px;padding:1px 7px;
  margin-left:8px;vertical-align:2px;letter-spacing:0}
.hv-b-att{color:#93c5fd;background:rgba(59,130,246,.14);border:1px solid rgba(59,130,246,.40)}
.hv-b-enc{color:#fbbf24;background:rgba(251,191,36,.12);border:1px solid rgba(251,191,36,.40)}
.hv-b-ech{color:#f87171;background:rgba(248,113,113,.12);border:1px solid rgba(248,113,113,.40)}
.hv-ligne-err{font-size:11px;color:#f87171;margin-top:3px;line-height:1.4}
.hv-histo-vide{font-size:12px;color:var(--muted);line-height:1.5}
.hv-lien-t{flex-basis:100%;font-size:11.5px;color:var(--muted)}
.hv-lien a.btn{text-decoration:none}
.hv-lien input{flex:1;min-width:200px;background:var(--bg);border:1px solid var(--line-d);
  border-radius:8px;padding:9px 11px;color:#4ade80;font-size:12.5px;font-family:inherit;outline:none}
@media (max-width:700px){ .hv-grid{grid-template-columns:1fr} }
.rdv-g-ok-txt{font-size:13px;font-weight:700;color:#4ade80}
/* « Confirmer par WhatsApp » (15/09) : le vert officiel de WhatsApp, comme le bouton
   WhatsApp du haut de fiche — c'est le même geste, on le reconnaît à la couleur. */
.btn.wa-confirm{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  box-sizing:border-box;margin-top:8px;background:#25D366;border:1px solid #25D366;color:#fff;
  font-weight:700;font-size:13.5px;padding:10px 14px;text-decoration:none}
.btn.wa-confirm:hover{background:#1da851;border-color:#1da851;color:#fff}
/* « Remplir depuis une photo » (17/09). ⚠️ `.btn.al-ocr-btn` et PAS `.al-ocr-btn` : le thème
   sombre redéfinit `.btn` plus bas dans ce fichier et écraserait la couleur (cf. le piège
   documenté pour .btn.wa-confirm). */
.al-ocr{display:block}
/* Deux boutons côte à côte (20/09) : appareil photo et sélecteur de fichiers ne peuvent
   pas partager un même input (cf. le commentaire du gabarit). ⚠️ Double classe
   `.btn.al-ocr-fichier` : piège du thème sombre, §7. */
.al-ocr-duo{display:flex;gap:8px;flex-wrap:wrap}
.btn.al-ocr-fichier{display:flex;align-items:center;justify-content:center;gap:8px;
  flex:1 1 150px;min-width:0;box-sizing:border-box;font-weight:700;font-size:14px;padding:13px 16px;
  background:rgba(148,163,184,0.10);border:1px solid rgba(148,163,184,0.38);color:#cbd5e1}
.btn.al-ocr-fichier:hover{background:rgba(148,163,184,0.20);border-color:rgba(148,163,184,0.6)}
.btn.al-ocr-fichier:disabled{opacity:.65;cursor:default}
.btn.al-ocr-btn{display:flex;align-items:center;justify-content:center;gap:8px;flex:1 1 150px;min-width:0;
  box-sizing:border-box;background:rgba(59,130,246,0.14);border:1px solid rgba(59,130,246,0.45);
  color:#93c5fd;font-weight:700;font-size:13.5px;padding:11px 14px}
.btn.al-ocr-btn:hover{background:rgba(59,130,246,0.24);border-color:rgba(59,130,246,0.7)}
.btn.al-ocr-btn:disabled{opacity:.65;cursor:default}
/* Modale ⚙️ Paramètres (18/09) — la saisie de la clé Gemini a quitté la modale de création. */
.param-cle{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.param-cle input{flex:1;min-width:180px;background:var(--bg);border:1px solid var(--line-d);
  border-radius:8px;padding:9px 11px;color:var(--ink);font-size:13px;font-family:inherit;outline:none}
.param-cle input:focus{border-color:var(--orange)}
.param-aide{font-size:11.5px;color:var(--muted);line-height:1.5;margin-top:8px}
.param-etat{font-size:12px;margin-top:8px;line-height:1.45;color:var(--muted)}
.btn.param-oubli{margin-top:10px;color:#f87171;border-color:rgba(248,113,113,.35);background:transparent}
.btn.param-oubli:hover{background:rgba(248,113,113,.12);border-color:#f87171}
.al-ocr-etat{font-size:11.5px;margin-top:7px;line-height:1.45;color:var(--muted)}
.rdv-g-hint{font-size:11.5px;color:var(--muted);margin-top:6px;line-height:1.4}
/* Le badge d'alerte de la ligne CRM : même rouge que « ⚠ MAIL RDV » du pipeline. */
.crm-rdv-todo{font-size:10px;font-weight:900;letter-spacing:.05em;padding:1px 7px;border-radius:5px;
  background:rgba(239,68,68,0.18);border:1px solid rgba(239,68,68,0.55);color:#f87171;white-space:nowrap}
/* 2e badge (20/09) : « à confirmer PAR MESSAGE ».
   ⚠️ PASSÉ EN ROUGE LE 21/09 (demande de Simon). Il était vert WhatsApp, pour rappeler la
   couleur du bouton qui le fait disparaître — sauf que dans une liste le vert se lit comme
   « c'est bon », alors que le badge dit exactement l'inverse : le prospect n'a RIEN reçu.
   Les deux badges sont donc du même rouge « il reste quelque chose à faire », et c'est le
   TEXTE (SUR GOOGLE / PAR MESSAGE) qui les distingue. Ils peuvent être côte à côte. */
.crm-rdv-msg{font-size:10px;font-weight:900;letter-spacing:.05em;padding:1px 7px;border-radius:5px;
  background:rgba(239,68,68,0.18);border:1px solid rgba(239,68,68,0.55);color:#f87171;white-space:nowrap}
/* La boîte WhatsApp doit occuper sa propre ligne : le bouton est en pleine largeur. */
.wa-conf{margin-top:10px}
/* Modale « quel message envoyer ? » (20/09). ⚠️ Double classe partout : le thème sombre
   redéfinit `.btn` plus bas, une règle `.msg-choix-x` seule sortirait grise (cf. §7). */
/* ⚠️ `.modal-body` est une GRILLE à DEUX COLONNES (mesuré : 194px 194px) : sans
   `grid-column:1/-1` la liste n'occupait qu'une colonne et les trois boutons sortaient à
   moitié largeur. Vu à la capture d'écran, pas dans le code. */
.msg-choix-liste{display:flex;flex-direction:column;gap:10px;grid-column:1/-1}
.btn.msg-choix{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;
  box-sizing:border-box;text-align:left;padding:12px 14px;text-decoration:none}
.msg-choix-t{font-size:14px;font-weight:700}
.msg-choix-s{font-size:11.5px;font-weight:500;color:var(--muted);line-height:1.45;white-space:normal}
.btn.msg-choix-reprise{background:rgba(59,130,246,0.14);border:1px solid rgba(59,130,246,0.45);color:#93c5fd}
.btn.msg-choix-reprise:hover{background:rgba(59,130,246,0.24);border-color:rgba(59,130,246,0.7)}
.btn.msg-choix-mandat{background:rgba(37,211,102,0.13);border:1px solid rgba(37,211,102,0.45);color:#4ade80}
.btn.msg-choix-mandat:hover{background:rgba(37,211,102,0.22);border-color:rgba(37,211,102,0.7)}
.btn.msg-choix-classique{background:rgba(148,163,184,0.10);border:1px solid rgba(148,163,184,0.38);color:#cbd5e1}
.btn.msg-choix-classique:hover{background:rgba(148,163,184,0.20);border-color:rgba(148,163,184,0.6)}
.funnel{padding:16px 18px;display:flex;flex-direction:column;gap:10px}
.funnel-row{display:flex;align-items:center;gap:12px}
.funnel-row .lbl{width:120px;font-size:13px;color:var(--muted);font-weight:600;text-transform:capitalize}
.funnel-bar{flex:1;height:26px;background:var(--gray-l);border-radius:7px;overflow:hidden}
.funnel-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--orange),#fb923c);border-radius:7px}
.funnel-row .n{width:30px;text-align:right;font-weight:700}
.two-col{display:grid;grid-template-columns:1.4fr 1fr;gap:14px;margin-top:18px}

/* ---------- Filters ---------- */
.filters{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
.filters input,.filters select{
  border:1px solid var(--line-d);border-radius:9px;padding:8px 10px;font-size:13px;font-family:inherit;background:#fff;color:var(--ink);
}
.filters input{width:150px}
.filters input::placeholder{color:#9aa3ad}
.chip-toggle{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--line-d);border-radius:9px;font-size:13px;font-weight:600;user-select:none}
.chip-toggle.on{background:var(--green-l);border-color:transparent;color:var(--green)}

/* ---------- Ads grid ---------- */
.veh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.pige-grid{display:flex;flex-direction:column;gap:16px;max-width:780px}
.pige-grid .veh-foot .btn{font-size:14px;padding:11px 14px}
.veh-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow);display:flex;flex-direction:column;transition:.14s}
.veh-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.veh-thumb{position:relative;aspect-ratio:3/2;background:#e9edf1 center/cover}
.veh-thumb .badge{position:absolute;top:10px;left:10px}
.veh-thumb .seller{position:absolute;top:10px;right:10px;background:rgba(0,0,0,.6);color:#fff;font-size:10px;font-weight:700;padding:3px 7px;border-radius:6px;text-transform:uppercase;letter-spacing:.3px}
.veh-body{padding:12px 13px;display:flex;flex-direction:column;gap:7px;flex:1}
.veh-title{font-weight:700;font-size:14px;line-height:1.25;letter-spacing:-.2px}
.veh-meta{display:flex;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--muted)}
.veh-meta span{background:var(--gray-l);padding:2px 7px;border-radius:6px}
.veh-price{display:flex;align-items:baseline;justify-content:space-between;margin-top:2px}
.veh-price .p{font-size:19px;font-weight:800;letter-spacing:-.5px}
.veh-foot{display:flex;gap:7px;margin-top:auto;padding-top:4px}
.veh-foot .btn{flex:1;justify-content:center}

/* ---------- Badges ---------- */
.badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:800;padding:4px 9px;border-radius:7px;letter-spacing:.2px}

/* ---------- Kanban ---------- */
.kanban{display:flex;gap:14px;overflow-x:auto;padding-bottom:14px;align-items:flex-start}
.col{flex:0 0 calc((100% - 42px) / 4);min-width:250px;background:#eef1f4;border-radius:var(--r);display:flex;flex-direction:column;height:calc(100vh - 200px)}
.col-head{display:flex;align-items:center;justify-content:space-between;padding:12px 13px;font-weight:700;font-size:13px;position:sticky;top:0}
.col-head .count{background:#fff;color:var(--muted);font-size:11px;font-weight:800;padding:2px 8px;border-radius:20px;border:1px solid var(--line)}
.col-head .dot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:7px}
.col-body{padding:0 9px 9px;display:flex;flex-direction:column;gap:9px;overflow-y:auto;min-height:60px;flex:1}
.col.drag-over .col-body{outline:2px dashed var(--orange);outline-offset:-4px;border-radius:8px}
.lead-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px;box-shadow:var(--shadow);cursor:grab;transition:.1s}
.lc-thumb{width:100%;aspect-ratio:16/10;background:#e9edf1 center/cover;border-radius:8px;margin-bottom:9px}
.lead-card:hover{border-color:var(--line-d);box-shadow:var(--shadow-lg)}
.lead-card.dragging{opacity:.45}
.lead-card .lc-top{display:flex;justify-content:space-between;align-items:flex-start;gap:6px}
.lead-card .lc-title{font-weight:700;font-size:13px;line-height:1.25;letter-spacing:-.2px}
.lead-card .lc-meta{font-size:11px;color:var(--muted);margin-top:5px;display:flex;gap:6px;flex-wrap:wrap}
.lead-card .lc-price{font-weight:800;font-size:15px;margin-top:7px}
.lead-card .lc-price small{font-size:11px;color:var(--muted);font-weight:600}
.empty-col{font-size:12px;color:#9aa3ad;text-align:center;padding:14px 6px;border:1px dashed var(--line-d);border-radius:8px;margin:2px}

/* ---------- Sous-menu « Pipeline » du menu latéral (1 pige = 1 pipeline) ---------- */
.nav-caret{margin-left:auto;font-size:10px;opacity:.7;transition:transform .15s}
.nav-caret.open{transform:rotate(180deg)}
.nav-sub{display:flex;flex-direction:column;gap:2px;margin:2px 0 6px}
.nav-sub.open{display:flex}
.nav-subitem{display:block;text-align:left;border:none;background:transparent;color:var(--muted);padding:8px 12px 8px 42px;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-subitem:hover{background:var(--orange-l);color:var(--orange-d)}
.nav-subitem.active{background:var(--orange-l);color:var(--orange-d)}
.nav-sub-empty{color:var(--muted);font-size:12px;padding:6px 12px 6px 42px}

/* ---------- Recherche dans le pipeline ---------- */
.search-bar{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.search-input{flex:1;min-width:220px;background:var(--panel);border:1px solid var(--line-d);color:var(--ink);border-radius:9px;padding:11px 14px;font-size:14px}
/* Croix « effacer » dans une barre de recherche (12/09, demande Simon — posée sur le CRM).
   C'est le WRAPPER qui porte flex/min-width à la place de l'input : sans lui, positionner la
   croix en absolu la ferait sortir du champ. L'input garde `flex:1` mais repasse en
   `min-width:0`, sinon son min-width:220px déborde du wrapper sur mobile.
   La visibilité vient d'une classe posée en JS, PAS de :placeholder-shown — ce dernier ne dit
   rien d'utile quand la valeur est injectée au rendu plutôt que tapée.
   Classes GÉNÉRIQUES : réutilisables telles quelles sur Recherche / Pige / Pipeline. */
.search-clearable{position:relative;flex:1;min-width:220px;display:flex}
.search-clearable .search-input{flex:1;min-width:0;padding-right:62px}
/* Croix « effacer » : PASTILLE ALLONGÉE, pas un rond (14/09, demande Simon — « plus facilement
   cliquable sur ordinateur »). 46 × 28 au lieu de 24 × 24 : presque le double de surface, et
   une cible bien plus tolérante à la souris. Le padding-right de l'input suit (62 = 46 + 9 de
   décalage + 7 de marge) — ⚠️ les deux valeurs vont ENSEMBLE, sinon le texte passe dessous.
   28 px de haut tient dans l'input (≈44 px) avec 8 px de marge de chaque côté. */
.search-clear{position:absolute;right:9px;top:50%;transform:translateY(-50%);display:none;align-items:center;justify-content:center;width:46px;height:28px;padding:0;border:0;border-radius:14px;background:var(--line-d);color:var(--ink);font-size:12.5px;line-height:1;cursor:pointer;font-family:inherit;transition:.12s}
.search-clear:hover{background:var(--orange);color:#fff}
.search-clearable.has-text .search-clear{display:flex}
.search-sel{background:var(--panel);border:1px solid var(--line-d);color:var(--ink);border-radius:9px;padding:0 12px;font-size:13px;font-weight:600;cursor:pointer}
.rech-row{display:flex;align-items:center;gap:14px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin-bottom:8px;cursor:pointer;transition:.12s}
.rech-row:hover{border-color:var(--line-d);box-shadow:var(--shadow)}
.rech-thumb{width:64px;height:48px;border-radius:8px;background:#e9edf1 center/cover;flex:0 0 auto}
.rech-main{flex:1;min-width:0}
.rech-title{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rech-meta{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted);margin-top:4px;align-items:center}
.rech-side{text-align:right;flex:0 0 auto}
.rech-price{font-weight:800;font-size:16px}
.rech-tags{display:flex;gap:6px;justify-content:flex-end;margin-top:5px;flex-wrap:wrap}
.rech-pige{font-size:11px;font-weight:700;background:var(--orange-l);color:var(--orange-d);padding:2px 8px;border-radius:6px}
.rech-stage{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--muted);border:1px solid var(--line);padding:2px 8px;border-radius:6px}
/* 09/10 — Recherche (demande de Simon) : la pige en retrait (gris, sans orange) et le statut en pastille pleine de sa couleur.
   Classes posées par rechRow seulement : la ligne du CRM (même .rech-pige) garde son orange. */
.rech-pige.rech-pige-sobre{background:transparent;color:var(--muted);font-weight:600;border:1px solid var(--line);padding:2px 7px}
.rech-pige-ico{filter:grayscale(1);opacity:.6}
.rech-statut{display:inline-flex;align-items:center;font-size:12px;font-weight:800;padding:3px 11px;border-radius:999px;white-space:nowrap;letter-spacing:.1px;box-shadow:0 1px 2px rgba(0,0,0,.35)}

/* ---------- Filtres du pipeline ---------- */
.pipe-filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px;align-items:center}
.pipe-search{background:var(--panel);border:1px solid var(--line-d);color:var(--ink);border-radius:9px;padding:9px 12px;font-size:13px;min-width:240px}
.pipe-sort{margin-left:auto;background:var(--panel);border:1px solid var(--line-d);color:var(--ink);border-radius:9px;padding:8px 10px;font-size:13px;font-weight:600;cursor:pointer}
.pipe-filters .chip-toggle{cursor:pointer}

/* ---------- Graphique du tableau de bord ---------- */
.daily-chart{width:100%;height:auto;display:block;overflow:visible;font-family:system-ui,sans-serif}
.ch-grid{stroke:var(--line-d);stroke-width:1;stroke-dasharray:3 5;opacity:.45}
.ch-line{fill:none;stroke:var(--orange);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.ch-dot{fill:var(--orange-l);stroke:var(--orange);stroke-width:2}
.ch-basedot{fill:var(--orange);opacity:.55}
.ch-hit{fill:transparent;pointer-events:all;cursor:pointer}
.ch-hit:hover{fill:var(--orange);opacity:.16}
.ch-tip{position:fixed;z-index:99999;pointer-events:none;background:var(--panel);color:var(--ink);border:1px solid var(--line-d);border-radius:8px;padding:5px 9px;font-size:12px;font-weight:600;box-shadow:var(--shadow-lg);transform:translate(-50%,calc(-100% - 12px));white-space:nowrap;opacity:0;transition:opacity .1s}
.ch-tip.show{opacity:1}
.ch-tip .tv{color:var(--orange);font-weight:800;font-size:13px}
.ch-ylab{fill:var(--muted);font-size:11px;text-anchor:end}
.ch-xlab{fill:var(--muted);font-size:11px;text-anchor:middle}

/* ---------- Fiche détaillée (page entière) ---------- */
.detail-bar{display:flex;justify-content:space-between;gap:10px;margin:0 0 16px;flex-wrap:wrap}
.detail-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:20px;align-items:start;padding-bottom:24px}
.detail-main{min-width:0}
.detail-img{width:100%;max-width:820px;aspect-ratio:16/9;background:#e9edf1 center/cover;border-radius:14px;margin-bottom:16px}
.detail-price-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}
.detail-price{font-size:30px;font-weight:800;color:var(--orange);letter-spacing:-.5px}
.detail-title{margin:14px 0 12px}
.detail-title-name{font-size:22px;font-weight:800;letter-spacing:-.3px;line-height:1.2}
.detail-title-loc{font-size:13px;color:var(--muted);margin-top:3px}
.cell.copyable{cursor:pointer;transition:background .15s,border-color .15s}
.cell.copyable:hover{border-color:var(--orange);background:rgba(249,115,22,.06)}
.cell.copyable.copied{border-color:#22c55e;background:rgba(34,197,94,.12)}
.detail-kv{grid-template-columns:repeat(3,1fr)}
.detail-side .panel{padding:14px 16px}
.detail-side .panel h3{margin:0 0 12px;padding:0;border-bottom:none}
.detail-side .panel + .panel{margin-top:16px}
@media(max-width:900px){.detail-grid{grid-template-columns:1fr}.detail-side .panel{position:static}}

/* ---------- Chronologie (fiche prospect) ---------- */
.timeline{display:flex;flex-direction:column;gap:14px;margin-top:4px;position:relative}
.tl-item{display:flex;gap:12px;align-items:flex-start;position:relative}
.tl-item:not(:last-child)::before{content:'';position:absolute;left:15px;top:15px;height:calc(100% + 14px);width:2px;background:var(--line);z-index:0}
.tl-dot{position:relative;z-index:1;flex:0 0 auto;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#64748b}
.tl-dot svg{width:15px;height:15px}
.tl-dot-veh{background:#2563eb}
.tl-dot-note{background:#6366f1}
.tl-dot-drop{background:#dc2626}
.tl-dot-repub{background:#7c3aed}
.tl-dot-call{background:#22c55e}
.tl-dot-nosolicit{background:#dc2626}
.nosolicit-banner{background:rgba(220,38,38,.12);border:1px solid rgba(220,38,38,.4);color:#ef4444;border-radius:9px;padding:9px 12px;font-size:13px;font-weight:700;margin:0 0 14px}
.call-btns{display:inline-flex;gap:6px;margin-left:auto}
.call-btn{border:1px solid var(--line-d);background:transparent;color:var(--muted);border-radius:7px;padding:2px 9px;font-size:11px;font-weight:700;cursor:pointer}
.call-btn:hover{border-color:var(--muted)}
.call-btn.ok.on{background:rgba(34,197,94,.18);border-color:rgba(34,197,94,.55);color:#22c55e}
.call-btn.no.on{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.55);color:#ef4444}
.tl-body{flex:1;min-width:0}
.tl-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tl-title{font-weight:700;font-size:14px}
.tl-price{font-weight:800;font-size:12px;background:var(--orange-l);color:var(--orange-d);padding:2px 9px;border-radius:20px}
.tl-drop .tl-price{background:#fde8e8;color:#dc2626}
.tl-sub{font-size:12px;color:var(--muted);margin-top:3px}
.tl-link{display:inline-block;margin-top:4px;font-size:12px;color:var(--orange);text-decoration:none}
.tl-link:hover{text-decoration:underline}
.tl-author{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;display:inline-flex;align-items:center;gap:4px}
.tl-note-text{margin-top:6px;background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:9px 11px;font-size:14px;color:var(--ink);white-space:pre-wrap;word-break:break-word}
.tl-del{cursor:pointer;color:var(--muted)}
.tl-del:hover{color:#dc2626;text-decoration:underline}
.ctx-item:hover{background:var(--bg)}
.tl-status-badge{padding:3px 10px;border-radius:20px;font-weight:700;font-size:12px;display:inline-block}

/* ---------- Carte distance Lead/Agence ---------- */
/* z-index:0 (09/09) = la carte devient un CONTEXTE D'EMPILEMENT isole. Leaflet pose ses
   couches internes tres haut (.leaflet-pane 400, .leaflet-control 800, .leaflet-top 1000),
   au-dessus de TOUTE l'echelle du site (.status-list 30, .drawer 50, .modal-backdrop 60,
   .toasts 80) : sans ce confinement la carte recouvrait le menu deroulant de statut en mode
   Focus (les statuts Vendu/Supprime disparaissaient dessous), et aurait fait pareil avec un
   modal ou un toast qui la chevauche. Ne pas retirer. */
.lead-map{position:relative;z-index:0;width:100%;height:170px;border-radius:10px;overflow:hidden;margin-bottom:10px;background:#e9edf1}
.map-legend{display:flex;align-items:center;font-size:13px;color:var(--muted);margin-bottom:6px}
.map-legend .dot{width:9px;height:9px}
.map-stats{font-size:15px;font-weight:800;margin-bottom:6px}

/* ---------- Drawer ---------- */
.drawer-backdrop{position:fixed;inset:0;background:rgba(16,24,40,.35);opacity:0;pointer-events:none;transition:.2s;z-index:40}
.drawer-backdrop.open{opacity:1;pointer-events:auto}
.drawer{position:fixed;top:0;right:0;height:100vh;width:420px;max-width:92vw;background:var(--panel);box-shadow:var(--shadow-lg);transform:translateX(100%);transition:.22s cubic-bezier(.4,0,.2,1);z-index:50;overflow-y:auto}
.drawer.open{transform:translateX(0)}
.drawer-img{aspect-ratio:16/10;background:#e9edf1 center/cover;position:relative}
.drawer-close{position:absolute;top:12px;right:12px;background:rgba(0,0,0,.55);color:#fff;border:none;width:32px;height:32px;border-radius:8px;font-size:16px}
.drawer-pad{padding:18px 20px;display:flex;flex-direction:column;gap:16px}
.drawer h2{margin:0;font-size:19px;letter-spacing:-.4px}
.kv{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.kv .cell{background:var(--bg);border:1px solid var(--line);border-radius:9px;padding:9px 11px}
.kv .cell .k{font-size:11px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.3px}
.kv .cell .v{font-size:15px;font-weight:700;margin-top:2px;min-height:20px}
/* ── Fiche modifiable en place (13/09) ──────────────────────────────────────
   Deux affordances distinctes sur la même cellule : le curseur dit « cliquable »,
   le liseré au survol dit « on peut agir ici ». Une cellule VIDE reste modifiable
   (double-clic) même si elle n'est pas copiable — d'où les deux classes séparées. */
.kv .cell.copyable{cursor:pointer}
.kv .cell.editable{cursor:pointer}
.kv .cell.copyable:hover,.kv .cell.editable:hover{border-color:var(--orange)}
.kv .cell.copied{border-color:var(--green);background:var(--green-l)}
.kv .cell.saving{opacity:.5;pointer-events:none}
/* L'éditeur reprend EXACTEMENT la typo de la valeur affichée : le champ ne doit pas
   « sauter » au double-clic, sinon la ligne se décale sous le curseur. */
.cell-input{width:100%;box-sizing:border-box;font-family:inherit;font-size:15px;font-weight:700;
  color:var(--ink);background:var(--panel);border:1px solid var(--orange);border-radius:6px;
  padding:1px 5px;margin:-2px 0;outline:none}
.cell-input.title-input{font-size:inherit;font-weight:inherit;padding:2px 8px}
.detail-title-name[data-key]{cursor:text;border-radius:6px;padding:1px 6px;margin-left:-6px}
.detail-title-name[data-key]:hover{background:var(--gray-l)}
/* Rappel discret du geste, en tête de bloc. */
/* .veh-hint retiré le 13/09 (demande Simon : « enlève l'écriture clic = copier · double-clic =
   modifier »). Le geste s'apprend en deux essais, le rappel restait à l'écran pour toujours. */
/* Chronologie vide (13/09) : possible depuis le retrait de « Prospect créé » sur un prospect
   manuel créé sans note ni rappel. Sans cette ligne, le panneau finissait sur du vide. */
.tl-vide{font-size:13px;color:var(--muted);font-style:italic;padding:4px 2px}
/* Cellule pleine largeur (notes du véhicule recherché) + valeur multiligne (13/09).
   `pre-wrap` garde les retours à la ligne saisis ; `break-word` empêche un lien collé
   de déborder de la cellule. */
.kv .cell.full{grid-column:1/-1}
.kv .cell.multiligne .v{white-space:pre-wrap;word-break:break-word;font-weight:600;font-size:13.5px;line-height:1.45}
.cell-input[rows]{resize:vertical;min-height:62px;line-height:1.45;font-weight:600;font-size:13.5px}
.field label{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.3px;display:block;margin-bottom:6px}
.field select,.field textarea{width:100%;border:1px solid var(--line-d);border-radius:9px;padding:9px 11px;font-family:inherit;font-size:14px;color:var(--ink);background:#fff}
.field textarea{min-height:90px;resize:vertical}
.status-select{position:relative;display:flex;align-items:center;gap:9px;border:1px solid var(--line-d);border-radius:10px;padding:0 12px;background:#fff}
.status-select .status-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.status-select select{flex:1;border:none;background:transparent;padding:11px 0;font-family:inherit;font-size:14px;font-weight:600;color:var(--ink);appearance:none;-webkit-appearance:none;cursor:pointer;outline:none}
.status-select::after{content:'▾';color:var(--muted);font-size:12px;pointer-events:none}
.status-dd{position:relative}
.status-cur{display:flex;align-items:center;gap:9px;width:100%;border:1px solid var(--line-d);border-radius:10px;padding:11px 12px;background:#fff;font-family:inherit;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer;text-align:left}
.status-cur .status-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.status-cur .status-caret{margin-left:auto;color:var(--muted);font-size:12px}
.status-list{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:30;background:var(--panel);border:1px solid var(--line-d);border-radius:10px;box-shadow:var(--shadow-lg);padding:5px;max-height:300px;overflow:auto}
.status-opt{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:8px;font-size:14px;font-weight:600;color:var(--ink);cursor:pointer}
.status-opt .dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.status-opt:hover{background:var(--bg)}
.status-opt.sel{background:var(--bg)}
.drawer-actions{display:flex;gap:8px}
.drawer-actions .btn{flex:1;justify-content:center}
.contact-row{display:flex;gap:8px}
.contact-row a{flex:1;text-decoration:none}
.wa{background:#25D366;border-color:#25D366;color:#fff}
.wa:hover{filter:brightness(.95)}

/* ---------- Modal ---------- */
/* Fond assombri + flou (10/09) : on ne veut plus lire le contenu derrière une fenêtre ouverte.
   -webkit- gardé pour Safari/iOS ; sans support du flou, l'opacité seule suffit déjà. */
.modal-backdrop{position:fixed;inset:0;background:rgba(6,10,18,.78);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;z-index:60;padding:20px}
.modal-backdrop.open{display:flex}
.modal{background:#fff;border-radius:16px;width:440px;max-width:100%;box-shadow:var(--shadow-lg);overflow:hidden}
.modal-head{padding:18px 20px 4px}
.modal-head h3{margin:0;font-size:18px}
.modal-head p{margin:5px 0 0;font-size:13px;color:var(--muted)}
.modal-body{padding:14px 20px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.modal-body .field{grid-column:span 1}
.modal-body .field.full{grid-column:span 2}
.modal-foot{padding:14px 20px 20px;display:flex;gap:8px;justify-content:flex-end}

/* ---------- Toasts ---------- */
.toasts{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:80}
.toast{background:#1c2128;color:#fff;padding:11px 16px;border-radius:10px;font-size:13px;font-weight:600;box-shadow:var(--shadow-lg);animation:rise .25s ease}
.toast.ok{background:#15803d}
.toast.err{background:#b91c1c}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1}}

.spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}
.loading{display:grid;place-items:center;padding:60px;color:var(--muted)}

/* ---------- Bell / alertes ---------- */
.topbar-right{display:flex;align-items:center;gap:10px}
.alert-item{display:flex;gap:11px;padding:11px;border:1px solid var(--line);border-radius:10px;cursor:pointer;transition:.1s;align-items:center}
.alert-item:hover{border-color:var(--line-d);box-shadow:var(--shadow)}
.alert-item.unread{background:var(--orange-l);border-color:#fbd9bd}
.alert-thumb{width:54px;height:42px;border-radius:7px;background:#e9edf1 center/cover;flex-shrink:0}
.alert-main{flex:1;min-width:0}
.alert-main .t{font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.alert-main .m{font-size:12px;color:var(--muted);margin-top:2px}
.alert-time{font-size:11px;color:#9aa3ad;white-space:nowrap}

/* ---------- Toggle switch ---------- */
.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:11px 13px}
.toggle-row .tl{font-size:13px;font-weight:700}
.toggle-row .ts{font-size:12px;color:var(--muted);margin-top:2px}
.switch{position:relative;width:44px;height:25px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;background:#cbd2da;border-radius:25px;transition:.2s;cursor:pointer}
.slider:before{content:"";position:absolute;width:19px;height:19px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:var(--shadow)}
.switch input:checked + .slider{background:var(--green)}
.switch input:checked + .slider:before{transform:translateX(19px)}

/* ---------- Responsive ---------- */
/* ══════════════ MOBILE — barre de navigation EN BAS (12/09) ══════════════
   Demande de Simon, cible iPhone 13 Pro Max (428 × 926 px CSS).

   AVANT (mesuré, pas supposé) : sous 880px la sidebar devenait une barre
   horizontale EN HAUT, mais ses 7 entrées + le sous-menu de pige occupaient
   970px sans jamais passer à la ligne ni défiler. Résultat : la PAGE faisait
   1138px de large dans un écran de 428 → les 7 vues défilaient latéralement de
   710px, seules « Statistiques » et « Recherche » étaient visibles, et les
   lignes du CRM se disloquaient (titres coupés à « Minam… », numéros à cheval
   sur 3 lignes, colonne de droite par-dessus le contenu).

   APRÈS : la sidebar devient une barre FIXE EN BAS qui défile du doigt (choix de
   Simon) — tout reste atteignable au pouce, rien n'est caché derrière un
   « Plus ». Le `position:fixed` la SORT DU FLUX : c'est ça qui règle le
   débordement à la racine, le contenu ne peut plus être élargi par la nav.

   ⚠️ PWA `display:standalone` : en mode installé, AUCUNE barre de navigateur
   n'absorbe l'encoche ni le trait d'accueil. D'où viewport-fit=cover dans
   index.html et les env(safe-area-inset-*) ci-dessous — sans eux la barre passe
   sous le trait d'accueil et les deux dernières entrées sont inatteignables. */
@media(max-width:880px){
  body{flex-direction:column;min-height:100dvh}

  /* ── la sidebar devient la barre du bas ── */
  .sidebar{
    position:fixed;left:0;right:0;bottom:0;top:auto;
    width:100%;height:auto;align-self:auto;
    flex-direction:row;padding:0;gap:0;
    border-right:none;border-top:1px solid var(--line);
    box-shadow:0 -6px 20px rgba(0,0,0,.35);
    /* SOUS le tiroir (40) et les modales (60) : ouvrir une fiche la recouvre,
       au lieu de laisser la barre flotter par-dessus. */
    z-index:35;
  }
  .brand{display:none}
  /* ⚠️ Le pied de barre était masqué EN ENTIER sur mobile. On le garde visible pour le seul
     bouton Paramètres : c'est LÀ qu'on saisit la clé Gemini, et le remplissage par photo est
     justement une fonction de téléphone. `.src-hint`, lui, reste masqué (plus bas). */
  .sidebar-foot{display:flex;flex:0 0 auto;margin:0;align-items:center;
    padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) 2px;
    border-left:1px solid var(--line)}
  .nav-params{width:auto;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-width:62px;min-height:52px;padding:6px 8px;font-size:10.5px;line-height:1.15;white-space:nowrap}
  .nav-params .ico{width:auto;font-size:17px;line-height:1}

  /* ── la nav défile horizontalement ── */
  .nav{
    /* `flex:1 1 auto` et non `width:100%` (18/09) : il faut laisser sa place au bouton
       Paramètres posé à droite de la barre, sinon la nav le pousserait hors de l'écran. */
    flex-direction:row;flex:1 1 auto;min-width:0;margin:0;gap:2px;
    overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  }
  .nav::-webkit-scrollbar{display:none}

  /* Icône AU-DESSUS du libellé : c'est ce qui rend chaque entrée assez étroite
     pour qu'il en tienne 4 d'un coup, tout en gardant 52px de haut (Apple
     demande 44px minimum pour une cible tactile — on était à 32px). */
  .nav-item{
    position:relative;flex:0 0 auto;
    flex-direction:column;align-items:center;justify-content:center;gap:3px;
    min-width:66px;min-height:52px;padding:6px 10px;
    font-size:10.5px;line-height:1.15;text-align:center;white-space:nowrap;
  }
  .nav-item .ico{width:auto;font-size:17px;line-height:1}
  .nav-badge{position:absolute;top:2px;right:8px;margin-left:0}

  /* ── Ordre de la barre SUR MOBILE seulement (l'ordre du DOM, donc du bureau,
     ne bouge pas) ──────────────────────────────────────────────────────────
     La barre fait ~550px de contenu pour 428px d'écran : 2 entrées finissent
     toujours hors champ. Autant choisir LESQUELLES. Sur le téléphone on est
     debout en train de prospecter, et l'ordre de ce geste est : qui appeler
     (CRM) → les appeler (Focus) → rattraper les RDV manqués (Relance).
     Les vues d'analyse et de navigation suivent. Le sous-menu des piges part en
     dernier : c'est lui qui poussait le CRM hors de l'écran, et il fait doublon
     avec « Pipeline » sur un téléphone.
     ⚠️ 24/09 — HistoVec (onglet ajouté le 19/09) n'avait PAS d'order → 0 → il passait
     DEVANT le CRM sur le téléphone. TOUTE nouvelle vue de la barre doit recevoir son order
     ici. Il se place juste après le trio du téléphone : photographier une carte grise est
     aussi un geste de terrain. */
  /* 09/10 (demande de Simon : « l'onglet recherche doit être le deuxième onglet ») : Recherche passe en 2ᵉ, ici aussi. */
  .nav-item[data-view="crm"]{order:1}
  .nav-item[data-view="recherche"]{order:2}
  .nav-item[data-view="focus"]{order:3}
  .nav-item[data-view="relance"]{order:4}
  .nav-item[data-view="vendus"]{order:5}     /* 25/09 : juste après Relance, même geste (rappeler) */
  .nav-item[data-view="histovec"]{order:6}
  .nav-item[data-view="statistiques"]{order:7}
  .nav-item[data-view="pipeline"]{order:8}
  .nav-item[data-view="pige"]{order:9}
  .nav-sub{order:10}

  .nav-sub{flex-direction:row;margin:0;gap:2px}
  .nav-subitem{
    flex:0 0 auto;display:flex;align-items:center;
    min-height:52px;max-width:132px;padding:6px 12px;font-size:11px;border-radius:9px;
  }

  /* ── le contenu ne doit pas finir sous la barre ── */
  .main{
    padding-bottom:calc(64px + env(safe-area-inset-bottom));
    padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);
  }
  .toasts{bottom:calc(76px + env(safe-area-inset-bottom))}

  /* ── densité : 28px de marge latérale, c'était 13% de la largeur de l'écran ── */
  .topbar{padding:calc(12px + env(safe-area-inset-top)) 16px 10px}
  .topbar h1{font-size:19px}
  .view{padding:4px 16px 14px}

  /* ── Safari iOS ZOOME sur tout champ sous 16px, et ne dézoome jamais après ──
     Ce n'est pas une préférence, c'est le comportement du navigateur : 16px est
     un PLANCHER sur tout ce qui peut recevoir le focus. On était à 13-14px. */
  .search-input,.search-sel,.stats-pige,.pipe-sort,
  input[type=text],input[type=search],input[type=tel],input[type=email],
  input[type=number],input[type=date],input[type=datetime-local],select,textarea{
    font-size:16px;
  }
  .search-sel,.stats-pige,.pipe-sort,.chip-toggle{min-height:44px}

  /* ── ce qui est plus large que l'écran défile SEUL, jamais la page ── */
  .panel:has(.stat-table){overflow-x:auto}
  .stat-table th,.stat-table td{padding:9px 10px}
  .lead-map{max-width:100%}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .two-col{grid-template-columns:1fr}
  .src-hint{display:none}

  /* Cibles tactiles : 44px est le minimum Apple. Les .btn étaient à 37px,
     .btn-sm à 30px, .contact-chip à 29px — tous ratables au pouce. */
  .btn,.btn-sm,.contact-chip,.status-cur{min-height:44px}
  /* Filet de sécurité : TOUT champ focusable à 16px minimum. La liste nominative
     ci-dessus laissait passer .pipe-search, resté à 13px → Safari zoomait dessus. */
  input,select,textarea{font-size:16px}
  .lead-card{overflow:hidden}
}

/* ════════════ TÉLÉPHONE (≤560px) — la ligne du CRM se replie ════════════
   Le débordement réglé, il restait le vrai sujet : à 428px, `.rech-side`
   (EN RETARD + échéance + prix + pige) mange ~190px de la largeur, donc
   `.rech-main` tombe à ~90px — d'où les titres coupés à « Voiture Mer… », le
   numéro à cheval sur 2 lignes, et la méta empilée en colonne : une seule ligne
   de prospect faisait 340px de haut, soit 2 par écran.

   Ici on PLIE la ligne en deux étages plutôt que de la comprimer :
     [vignette] Titre du prospect (2 lignes max)
                année · km · ville
                📞 numéro
     ─────────────────────────────────────────
     EN RETARD aujourd'hui · 10:00      12 500 €
     🎯 EWIGO Cergy-Pontoise
   Le titre récupère toute la largeur, le numéro tient sur une ligne, et la
   hauteur tombe à ~150px — soit 5 prospects visibles au lieu de 2.
   ⚠️ `.rech-row` sert AUSSI à la Recherche : elle profite du même repli, c'est
   voulu (même structure, même problème). */
@media(max-width:560px){
  .rech-row{flex-wrap:wrap;gap:10px;padding:11px 12px}
  .rech-thumb{width:52px;height:40px}
  .rech-main{flex:1 1 0;min-width:0}

  /* 2 lignes puis « … » : sur une liste d'appel il faut savoir QUELLE voiture,
     mais un titre d'annonce LeBonCoin peut faire 90 caractères. */
  .rech-title{
    white-space:normal;overflow:hidden;text-overflow:clip;line-height:1.25;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  }
  .rech-meta{gap:5px 9px}
  .crm-phone{white-space:nowrap}

  /* La colonne de droite passe SOUS le prospect, sur toute la largeur, et
     redevient une ligne lisible de gauche à droite. */
  .rech-side{
    flex:1 0 100%;text-align:left;
    display:flex;align-items:center;justify-content:space-between;
    gap:8px;flex-wrap:wrap;
    padding-top:9px;border-top:1px solid var(--line);
  }
  .rech-side .crm-due{margin-bottom:0}
  .rech-tags{margin-top:0;justify-content:flex-start}

  /* Le bandeau du haut s'empile au lieu de se serrer : le filtre de pige et
     « ＋ Ajouter » se partagent une ligne pleine largeur. */
  .topbar{flex-direction:column;align-items:stretch;gap:10px}
  .topbar-right,.topbar-actions{width:100%}
  .topbar-actions{flex-wrap:nowrap}
  .topbar-actions .stats-pige{flex:1;min-width:0}
  .topbar-actions .btn{flex:0 0 auto;white-space:nowrap}
}

/* ============================= THÈME SOMBRE ============================= */
:root{
  --bg:#0e1217; --panel:#171d24; --ink:#e7eaee; --muted:#98a2ad;
  --line:#262e38; --line-d:#374049;
  --orange-l:rgba(249,115,22,.16);
  --green-l:rgba(22,163,74,.16); --teal-l:rgba(13,148,136,.20);
  /* Contour téléphone : vert-400, seul vert assez clair pour tenir sur le panneau #171d24.
     C'est CETTE valeur qui s'applique (cf. la note du :root du haut). */
  --phone-txt:#4ade80; --phone-line:rgba(34,197,94,.55);
  --red-l:rgba(220,38,38,.18); --gray:#94a3b8; --gray-l:#232b34;
  --shadow:0 1px 2px rgba(0,0,0,.45); --shadow-lg:0 16px 40px rgba(0,0,0,.6);
}
.btn{background:#1e2730;border-color:var(--line-d);color:var(--ink)}
.btn:hover{background:#26313b;border-color:var(--muted)}
.btn-primary{background:var(--orange);border-color:var(--orange);color:#fff}
.btn-primary:hover{background:var(--orange-d);border-color:var(--orange-d)}
.btn-ghost{background:transparent;border-color:transparent}
.btn-ghost:hover{background:#1e2730}
.nav-item:hover{background:#1e2730}
.filters input,.filters select,.field input,.field select,.field textarea{background:#1e2730;color:var(--ink);border:1px solid var(--line-d)}
.status-select{background:#1e2730;border-color:var(--line-d)}
.status-select select{background:#1e2730}
.status-cur{background:#1e2730}
.field input{width:100%;box-sizing:border-box;border-radius:9px;padding:9px 11px;font-family:inherit;font-size:14px}
.filters input::placeholder,.field input::placeholder,.field textarea::placeholder{color:#6c7681}
.veh-thumb,.drawer-img,.alert-thumb{background-color:#222b35}
.col{background:#10151b}
.col-head .count{background:#1e2730;border-color:var(--line)}
.lead-card{background:#1e2730;border-color:var(--line)}
.kv .cell{background:#10151b;border-color:var(--line)}
.toggle-row{background:#10151b;border-color:var(--line)}
.slider{background:#3a434f}
.modal{background:var(--panel)}
.empty-col{color:#6c7681}
.toast{background:#05070a}

/* ===================== ÉTIQUETTE CHAUD / PRIX ===================== */
:root{ --hotc:#ef4444; }
.badge.hot{background:#ef4444;color:#fff}
.badge.repub{background:#7c3aed;color:#fff}
.stat.hot .v{color:#ef4444}
.veh-price{justify-content:flex-start;gap:10px}
.veh-price .old{font-size:13px;color:var(--muted);text-decoration:line-through}
.lc-price{font-weight:800;font-size:15px;margin-top:7px}
.price-hist{display:flex;flex-direction:column;gap:4px;background:#10151b;border:1px solid var(--line);border-radius:9px;padding:8px 11px}
.price-hist > div{display:flex;justify-content:space-between;font-size:13px}
.price-hist > div span{color:var(--muted)}
.price-
/* ---------- Focus appels ---------- */
.focus-stage{padding-bottom:24px}
.focus-nav{display:flex;align-items:center;gap:16px;margin:0 0 12px}
.focus-nav .btn{white-space:nowrap}
.focus-progress{flex:1;min-width:0}
.focus-count{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:5px;text-align:center}
.focus-count b{color:var(--ink)}
.focus-bar{height:7px;border-radius:5px;background:var(--line);overflow:hidden}
.focus-bar span{display:block;height:100%;background:var(--orange);border-radius:5px;transition:width .25s}
.focus-outcomes{display:flex;gap:10px;margin:0 0 18px}
.focus-outcomes .btn{flex:1;justify-content:center;font-weight:700;font-size:15px;padding:12px}
.focus-ans{background:var(--green-l);color:var(--green);border-color:transparent}
.focus-ans:hover{background:var(--green);color:#fff}
.focus-no{background:var(--orange-l);color:var(--orange-d);border-color:transparent}
.focus-no:hover{background:var(--orange);color:#fff}
.focus-outcomes.did-ans .focus-ans{background:var(--green);color:#fff;box-shadow:0 0 0 3px var(--green-l)}
.focus-outcomes.did-no .focus-no{background:var(--orange);color:#fff;box-shadow:0 0 0 3px var(--orange-l)}
.focus-empty{padding:60px 20px;text-align:center;font-size:18px;font-weight:700;color:var(--ink)}
.detail-call{display:inline-flex;align-items:center;gap:8px;background:#22c55e;color:#fff;text-decoration:none;font-weight:700;font-size:17px;padding:11px 20px;border-radius:26px}
.detail-wa{display:inline-flex;align-items:center;gap:8px;background:#25D366;color:#fff;text-decoration:none;font-weight:700;font-size:17px;padding:11px 20px;border-radius:26px}

/* ---------- Focus : fond bleu sombre ---------- */
body.focus-bg .main{background:#0a1728}
body.focus-bg .panel{background:#0f1e34;border-color:#1a2f4a}
body.focus-bg .kv .cell{background:#0c1a2c;border-color:#1a2f4a}
body.focus-bg .status-cur{background:#0f1e34;border-color:#1a2f4a}
body.focus-bg .detail-img{margin-left:auto;margin-right:auto}
.nav-item .ico .focus-ico{display:block;width:13px;height:13px;margin:0 auto;border-radius:50%;background:#0c2a32;border:1px solid var(--line-d)}

/* ---------- Onglets CRM & Relance RDV (10/09) ---------- */
/* Pastille de retard sur l'entrée « Relance RDV » : nombre de RDV dépassés de +3 h. */
.nav-badge{margin-left:auto;background:#dc2626;color:#fff;font-size:11px;font-weight:800;line-height:1;padding:3px 7px;border-radius:99px;min-width:18px;text-align:center}
/* En-tête de section du CRM — la couleur du statut est passée par --sc. */
.crm-sec{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:22px 0 10px;padding:9px 13px;border-radius:9px;
  background:linear-gradient(90deg,color-mix(in srgb,var(--sc) 14%,transparent) 0%,transparent 100%);
  border-top:2px solid color-mix(in srgb,var(--sc) 45%,transparent);
  border-bottom:1px solid color-mix(in srgb,var(--sc) 25%,transparent)}
.crm-sec:first-child{margin-top:4px}
.crm-sec-label{font-size:13px;font-weight:900;color:var(--sc);letter-spacing:.03em}
.crm-sec-count{font-size:11px;font-weight:800;color:var(--sc);background:color-mix(in srgb,var(--sc) 16%,transparent);border:1px solid color-mix(in srgb,var(--sc) 35%,transparent);border-radius:99px;padding:1px 9px}
.crm-badge{color:#fff;font-size:9px;font-weight:900;padding:2px 8px;border-radius:4px;letter-spacing:.04em}
.crm-empty{padding:10px 13px;color:var(--muted);font-size:12.5px;font-style:italic}
.crm-due{display:block;font-size:12px;font-weight:700;margin-bottom:3px;white-space:nowrap}
/* Barre de navigation de la file Relance RDV. */
.relance-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 16px;padding:10px 14px;background:var(--panel);border:1px solid var(--line);border-radius:var(--r)}
.relance-pos{display:flex;flex-direction:column;align-items:center;font-size:14px;font-weight:800;text-align:center}
.relance-late{font-size:11.5px;font-weight:600;color:#f87171;margin-top:2px}
/* Onglet Vendus (25/09) : « 💰 Vendu depuis … » sous le compteur, en ambre (une info, pas une alerte). */
.vendus-depuis{font-size:11.5px;font-weight:600;color:#fbbf24;margin-top:2px}
/* Mention « EN RETARD » sur une ligne du CRM dont l'échéance est dépassée (10/09). */
.crm-due-late{color:#f87171}
.crm-late{display:inline-block;background:#dc2626;color:#fff;font-size:9px;font-weight:900;padding:2px 6px;border-radius:4px;letter-spacing:.04em;margin-right:6px;vertical-align:1px}
/* Pastille téléphone du CRM en CONTOUR (12/09, option « C »). Reprend la géométrie de .badge
   mais en 3px/8px : le filet de 1px compense les 4px/9px d'origine, la pastille garde donc la
   même hauteur que les badges voisins (reprise, annonce supprimée) et la ligne ne bouge pas.
   `tabular-nums` aligne les chiffres d'une ligne à l'autre — sur 25 numéros, ça se voit.
   ⚠️ Classe DÉDIÉE au CRM : l'aplat plein de .badge reste en place dans Recherche, le kanban
   et les deux fiches. Cf. crmPhoneBadge() dans app.js. */
.crm-phone{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:700;
  padding:3px 8px;border-radius:7px;letter-spacing:.2px;font-variant-numeric:tabular-nums;
  background:transparent;color:var(--phone-txt);border:1px solid var(--phone-line)}
/* Sans numéro : même forme, teintes neutres — l'absence ne doit pas crier plus fort qu'un numéro. */
.crm-phone-off{color:var(--muted);border-color:var(--line-d)}
/* 08/10 — annonce Facebook sans numéro : on écrit au vendeur par Messenger (bleu Facebook). */
.crm-phone.crm-phone-fb{color:#1877f2;border-color:#1877f2}
.detail-call.detail-fb{background:#1877f2}
/* Grande fenêtre (10/09) — utilisée par « ＋ Ajouter un prospect », qui a beaucoup de champs.
   Posée par openAddLeadModal, retirée par closeModal : les autres fenêtres gardent leurs 440px.
   max-height + défilement pour rester utilisable sur un petit écran. */
.modal.modal-lg{width:780px;max-height:88vh;display:flex;flex-direction:column}
.modal.modal-lg .modal-head{padding:24px 28px 6px}
.modal.modal-lg .modal-head h3{font-size:21px}
.modal.modal-lg .modal-body{padding:18px 28px;gap:16px;overflow:auto}
.modal.modal-lg .modal-foot{padding:16px 28px 24px}
.modal.modal-lg .field input,.modal.modal-lg .field select{padding:11px 13px;font-size:14.5px}
.modal.modal-lg .field textarea{min-height:110px;padding:11px 13px;font-size:14.5px}
@media(max-width:860px){.modal.modal-lg{width:100%}}
/* Pastilles prénom / email sous les boutons d'appel (10/09). Prénom et ⧉ copient au clic
   (via copySpec), l'adresse elle-même ouvre le client mail. */
.contact-extra{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:-4px 0 14px}
.contact-chip{display:inline-flex;align-items:center;gap:6px;background:var(--bg);border:1px solid var(--line-d);border-radius:20px;padding:5px 12px;font-size:13px;font-weight:600;color:var(--ink);text-decoration:none;cursor:pointer;transition:border-color .15s,color .15s}
.contact-chip:hover{border-color:var(--orange);color:var(--orange)}
.contact-chip.copied{border-color:#22c55e;color:#22c55e}
/* Ligne sans photo (prospect saisi à la main) : la gouttière reste, pour que les lignes
   restent alignées, mais elle devient invisible — plus de carré clair (10/09). */
.rech-thumb-empty{background:transparent}

/* ---- « Reprise / mandat » dans le modal d'ajout (10/09) ---------------------
   La case et son bloc dépliant occupent une ligne entière de la grille du modal.
   ⚠️ Volontairement SANS la classe .field : `.field input{width:100%;padding:9px}`
   étirerait la case à cocher sur toute la largeur. */
.modal-body .al-check{grid-column:span 2;display:flex;align-items:center;gap:11px;flex-wrap:wrap;
  cursor:pointer;background:#1e2730;border:1px solid var(--line-d);border-radius:10px;padding:13px 15px}
.modal-body .al-check:hover{border-color:#f97316}
.al-check input[type=checkbox]{width:18px;height:18px;flex:0 0 auto;margin:0;padding:0;accent-color:#f97316;cursor:pointer}
.al-check span{font-size:14.5px;font-weight:700;color:var(--ink)}
.al-check em{font-style:normal;font-size:12.5px;color:var(--muted);flex:1 1 100%;margin:-2px 0 0 29px}
.modal-body .al-rep{grid-column:span 2;display:grid;grid-template-columns:1fr 1fr;gap:16px;
  border-left:3px solid #f97316;padding:2px 0 2px 15px;margin-left:3px}
.modal-body .al-rep[hidden]{display:none}
/* Bloc « véhicule recherché » (13/09) : même géométrie que .al-rep, filet TEAL au lieu
   d'orange. Les deux blocs peuvent être ouverts en même temps sur un prospect qui fait
   reprendre sa voiture ET en cherche une autre — la couleur est ce qui les distingue
   d'un coup d'œil dans une modale déjà longue. */
.modal-body .al-int{grid-column:span 2;display:grid;grid-template-columns:1fr 1fr;gap:16px;
  border-left:3px solid var(--teal);padding:2px 0 2px 15px;margin-left:3px}
.modal-body .al-int[hidden]{display:none}
/* Notes du véhicule recherché, sur la fiche. `pre-wrap` garde les retours à la ligne saisis,
   `break-word` empêche un lien collé de déborder de la carte. */
.int-notes{margin-top:10px;font-size:13.5px;color:var(--ink);background:var(--bg);
  border:1px solid var(--line);border-radius:9px;padding:10px 12px;
  white-space:pre-wrap;word-break:break-word}
.int-notes a{color:var(--orange);word-break:break-all}

/* Badge / pastille « reprise ou mandat » : un prospect qui a une voiture à vendre. */
.badge.reprise{background:#f97316;color:#fff}
.crm-reprise{display:inline-flex;align-items:center;gap:4px;font-weight:800;color:#f97316}

/* Véhicule d'une reprise/mandat, sous le prénom du prospect : c'est l'info clé de la
   fiche (le prospect a une voiture à vendre) → nettement plus gros que la ville. */
.detail-title-veh{font-size:20px;font-weight:700;color:var(--ink);margin-top:7px;
  display:flex;align-items:center;gap:8px;letter-spacing:-.2px}

/* ---- Confirmation de suppression d'un prospect (10/09) ----
   .modal-body est une grille 2 colonnes : on repasse en flux normal pour ce modal. */
.modal-body.del-body{display:block}
.del-card{background:#1e2730;border:1px solid var(--line-d);border-left:3px solid #ef4444;
  border-radius:10px;padding:13px 15px}
.del-name{font-size:17px;font-weight:800;color:var(--ink)}
.del-sub{font-size:13px;color:var(--muted);margin-top:4px}
.del-warn{font-size:13px;color:var(--muted);line-height:1.55;margin:13px 0 0}
.btn.btn-del{background:#dc2626;color:#fff;border-color:#dc2626;font-weight:700}
.btn.btn-del:hover{background:#b91c1c;border-color:#b91c1c}
.btn.btn-del:disabled{opacity:.6;cursor:default}

/* Rappel discret du raccourci clavier, dans le sous-titre du modal d'ajout (11/09). */
.al-kbd{display:inline-block;margin-left:9px;font-size:11.5px;font-weight:700;color:var(--muted);
  background:#1e2730;border:1px solid var(--line-d);border-radius:6px;padding:2px 8px;white-space:nowrap}

/* ---- Édition d'une fiche saisie à la main (11/09) ---- */
.veh-edit{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 9px}
.veh-edit span{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.3px}
/* Case à cocher d'un titre de section de fiche (13/09, demande Simon) : décochée, elle replie
   TOUTE la section. Le <span> hérite de la règle juste au-dessus — le libellé de la case EST
   le titre, il n'y a donc pas deux textes à lire. Zone de clic ≥ 28 px de haut (tactile). */
.veh-edit .sec-check{display:flex;align-items:center;gap:9px;cursor:pointer;user-select:none;min-height:28px}
.veh-edit .sec-check input[type=checkbox]{width:16px;height:16px;flex:0 0 auto;margin:0;padding:0;accent-color:#f97316;cursor:pointer}
.veh-edit .sec-check:hover span{color:var(--ink)}
/* Toggle Oui / Non (28/09, « Intéressé par un véhicule ») : titre + toggle côte à côte. */
.sec-yn{display:flex;align-items:center;gap:12px;min-height:28px}
/* 28/09 (2ᵉ demande) — « rail à curseur » arrondi (choix D de Simon, arrondi comme A) : le curseur (::before) glisse
   de Non (ROUGE) à Oui (VERT) selon la classe du rail, `yn-non` / `yn-oui`. Couleurs du thème sombre (toujours actif). */
.yn-toggle{position:relative;display:inline-grid;grid-template-columns:1fr 1fr;width:112px;padding:3px;border-radius:999px;
  background:var(--bg);border:1px solid var(--line-d);flex:0 0 auto}
.yn-toggle::before{content:'';position:absolute;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:999px;opacity:0;
  background:rgba(239,68,68,.22);box-shadow:inset 0 0 0 1px #ef4444;transition:left .18s ease,background-color .18s ease,box-shadow .18s ease,opacity .18s ease}
/* 28/09 : rail NEUTRE (ni Oui ni Non : jamais choisi) = pas de curseur ; il n'apparaît qu'avec `yn-non` / `yn-oui`. */
.yn-toggle.yn-non::before,.yn-toggle.yn-oui::before{opacity:1}
.yn-toggle.yn-oui::before{left:50%;background:rgba(34,197,94,.22);box-shadow:inset 0 0 0 1px #22c55e}
.yn-btn{position:relative;z-index:1;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:700;
  padding:4px 0;border-radius:999px;cursor:pointer;line-height:1.5;text-align:center;text-transform:none;letter-spacing:0}
.yn-btn:hover{color:var(--ink)}
.yn-toggle.yn-non .yn-btn[data-v="0"]{color:#fca5a5}
.yn-toggle.yn-oui .yn-btn[data-v="1"]{color:#86efac}
.modal-body .al-yn{cursor:default}
.al-yn em{margin-left:0}
/* Séparateur de section dans le modal : occupe une ligne entière de la grille 2 colonnes. */
.modal-body .ed-sep{grid-column:span 2;font-size:12px;font-weight:800;color:var(--muted);
  text-transform:uppercase;letter-spacing:.4px;border-top:1px solid var(--line-d);padding-top:14px;margin-top:2px}

/* Date d'une note : à DROITE du titre « Note » plutôt que sous le texte (11/09, demande
   Simon). « 🗑 Supprimer » file au bout de la même ligne — la 3e ligne disparaît. */
.tl-when{font-size:12px;color:var(--muted);font-weight:500}
.tl-note .tl-del{margin-left:auto;font-size:12px}

/* Liens dans le texte d'une note (11/09) : couleur d'accent + coupure autorisée, sinon une
   longue URL déborde de la bulle (white-space:pre-wrap n'autorise pas la coupure). */
.tl-note-text a{color:var(--orange);text-decoration:underline;word-break:break-all}
.tl-note-text a:hover{color:var(--orange-d)}

/* « Le dernier appel a-t-il répondu ? » dans le modal de programmation d'un rappel (11/09) */
.rem-ask{background:#1e2730;border:1px solid var(--line-d);border-left:3px solid #f97316;border-radius:10px;padding:12px 14px}
.rem-ask-btns{display:flex;gap:8px}
.rem-ask .call-btn{font-size:13px;padding:7px 15px}
.rem-ask-sub{font-size:12px;color:var(--muted);margin-top:9px}
.btn:disabled{opacity:.5;cursor:not-allowed}
