/* Chantier n° 2 (30/10, antichambre 12 h 55) — Leads « façon SpiderVO ». Préfixe « l2- ».
   Règle de JB : un mot + une couleur, le détail au survol ; mêmes composants que la fiche voiture
   (barre de gestes .t1-barre, bandeau sombre .t1-sombre, frise .s2-frise). La page défile (liste et
   fiche) : plus de colonnes à hauteur fixe. Chargé après demandes.css et fiche-s2.css. */
.dm-app.l2-liste,.dm-app.l2-fiche{display:block;height:auto;min-height:0;overflow:visible;position:static}
.dm-app.l2-liste>.dm-file,.dm-app.l2-fiche>.dm-conv{position:static;transform:none;inset:auto;box-shadow:none}

/* ---------- la liste ---------- */
.dm-app.l2-liste .l2-liste{border-right:0;background:hsl(var(--carte));min-height:calc(100dvh - var(--dm-haut) - var(--dm-bas,0px))}
.l2-filtres{display:flex;align-items:center;gap:var(--ap-e2) var(--ap-e3);flex-wrap:wrap}
.l2-filtres .dm-pills{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
.l2-filtres .dm-cherche{flex:1 1 220px;max-width:360px;margin-left:auto}
.l2-liste .dm-items{overflow:visible;flex:none}
.l2-entete,.l2-l{display:grid;grid-template-columns:6px 58px minmax(150px,1.1fr) minmax(180px,1.5fr) minmax(110px,.6fr) minmax(200px,1fr) 26px;align-items:center;gap:0 var(--ap-e3)}
.l2-entete{padding:8px var(--ap-e4) 6px 0;font-size:13px;font-weight:var(--ap-g-titre);color:hsl(var(--doux));text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid hsl(var(--trait))}
.l2-l{position:relative;min-height:56px;padding:6px var(--ap-e4) 6px 0;border-bottom:1px solid hsl(var(--trait));background:hsl(var(--carte));cursor:pointer;transition:background .12s}
.l2-l:hover{background:hsl(var(--gris-doux)/.55)}
.l2-l.on{background:hsl(var(--azur-doux)/.6)}
.l2-l:focus-visible{outline:2px solid hsl(var(--azur));outline-offset:-2px}
.l2-temp{align-self:stretch;width:6px;border-radius:0 3px 3px 0;background:hsl(var(--trait-fort))}
.t-chaud>.l2-temp{background:hsl(var(--rouge))}
.t-tiede>.l2-temp{background:hsl(var(--orange-vif))}
.t-froid>.l2-temp{background:hsl(213 75% 62%)}
.t-clos>.l2-temp{background:hsl(var(--trait))}
.l2-q{font-size:15px;font-weight:var(--ap-g-titre);color:hsl(var(--doux));white-space:nowrap}
.l2-nom{display:flex;align-items:center;gap:6px;min-width:0}
.l2-nom b{font-size:16px;font-weight:var(--ap-g-titre);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.l2-vo{display:flex;align-items:center;gap:8px;min-width:0;font-size:15px}
.l2-vo img{width:46px;height:32px;border-radius:6px;object-fit:cover;flex:none}
.l2-vo>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.l2-src{display:flex;align-items:center;min-width:0}
.l2-src .dm-cn{grid-row:auto;width:auto;min-width:34px;height:24px;padding:0 7px;border-radius:999px;font-size:12px}
.l2-act{display:flex;align-items:center;gap:8px;min-width:0}
.dm .l2-go{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;border-radius:var(--ap-r-s);font-size:15px;font-weight:var(--ap-g-titre);background:hsl(var(--gris-doux));color:hsl(var(--encre));white-space:nowrap;text-decoration:none;transition:filter .12s,transform 90ms}
.dm .l2-go:hover{filter:brightness(.94)}.dm .l2-go:active{transform:scale(.97)}
.dm .l2-go.rouge{background:hsl(var(--rouge));color:#fff}
.dm .l2-go.orange{background:hsl(var(--orange-vif));color:#fff}
.dm .l2-go.bleu,.dm .l2-go.vert{background:hsl(var(--azur));color:#fff}
.dm .l2-go.grand{height:44px;padding:0 22px;font-size:17px}
.l2-delai{height:24px;font-size:13px}
.l2-l .dm-vd{justify-self:end}
.l2-l .dm-vd.personne{background:none;box-shadow:0 0 0 1px dashed hsl(var(--trait-fort)) inset}
.l2-liste .dm-vide{padding:60px var(--ap-e4)}

/* ---------- la fiche lead ---------- */
.dm-app.l2-fiche .l2-fiche-w{display:block;background:hsl(var(--fond));padding:var(--ap-e3) var(--ap-e4) 0;min-height:calc(100dvh - var(--dm-haut) - var(--dm-bas,0px))}
.dm .pv.l2-fiche{max-width:1360px;margin:0 auto;padding:0 0 120px}
.dm .l2-tete.dm-ct{display:block;padding:0;min-height:0;background:none;border:0}
.l2-retour{display:none}
.dm .l2-barre button.t1-g,.dm .l2-barre a.t1-g{cursor:pointer}
.l2-barre .t1-g svg.dm-i{width:17px;height:17px}
.dm .t1-plus .t1-chev{margin-left:2px}
.dm .l2-perdre{color:hsl(var(--rouge))}
.l2-vois{display:inline-flex;align-items:center;gap:4px}
.dm .l2-vb{width:40px;height:40px;border-radius:var(--ap-r-m);font-size:22px;line-height:1;display:grid;place-items:center;box-shadow:0 0 0 1px hsl(var(--trait)) inset;color:hsl(var(--encre))}
.dm .l2-vb:disabled{opacity:.35;cursor:default}
.dm button.l2-fermer{display:inline-flex;align-items:center;gap:4px;height:40px;padding:0 12px;border-radius:var(--ap-r-m);font-size:15px;font-weight:var(--ap-g-titre);box-shadow:0 0 0 1px hsl(var(--trait)) inset}
.t1-menu .t1-tel-l2{display:none!important}
.l2-bandeau .s2-photo{overflow:hidden;display:block}
.l2-bandeau .s2-photo img{width:100%;height:100%;object-fit:cover;display:block}
.l2-sans-photo{display:grid!important;place-items:center;background:rgba(255,255,255,.12);color:#fff}
.l2-sans-photo svg.dm-i{width:40px;height:40px}
.l2-bandeau .s2-l1{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px}
.l2-bandeau .dm-etoiles button{color:rgba(255,255,255,.35)}
.l2-bandeau .dm-etoiles button.on{color:hsl(var(--orange-vif))}
.t1-sombre .s2-puces li a{color:#fff;text-decoration:none}
.t1-sombre .s2-puces li a:hover{text-decoration:underline}
.t1-sombre .s2-puces li .dm-cn{display:inline-grid;width:auto;min-width:28px;height:20px;padding:0 6px;margin-right:6px;border-radius:999px;font-size:11px}
.l2-vd button{display:inline-flex;align-items:center;height:100%;color:inherit;font:inherit;cursor:pointer}
.l2-vd .dm-menu-w{position:relative;display:inline-flex;height:100%}
.l2-vd .t1-menu{color:hsl(var(--encre))}
.l2-etat{border-radius:999px}
.l2-etat.rouge{background:hsl(var(--rouge));color:#fff}
.l2-etat.orange{background:hsl(var(--orange-vif));color:#fff}
.l2-etat.bleu{background:hsl(var(--azur));color:#fff}
.l2-etat.gris{background:rgba(255,255,255,.2);color:#fff}
.l2-temp-p{display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;font-size:15px;font-weight:var(--ap-g-titre);cursor:default}
.l2-temp-p.t-chaud{background:hsl(var(--rouge-doux));color:hsl(var(--rouge))}
.l2-temp-p.t-tiede{background:hsl(var(--orange-doux));color:hsl(var(--orange))}
.l2-temp-p.t-froid{background:hsl(213 90% 94%);color:hsl(213 70% 40%)}
.l2-temp-p.t-clos{background:rgba(255,255,255,.15);color:#fff}
/* La frise : cinq étapes, lisibles aussi au téléphone. */
.l2-frise .s2-etapes{grid-template-columns:repeat(5,minmax(0,1fr))}
.l2-frise .l2-j{cursor:default}
/* Le corps : prochaine action, réponse, historique ; voiture et client à côté. */
.l2-corps{display:grid;grid-template-columns:minmax(0,1fr) 420px;gap:var(--ap-e3);align-items:start;margin-top:var(--ap-e2)}
.l2-g{min-width:0;display:grid;gap:var(--ap-e2)}
.dm-app.l2-fiche .dm-pan.l2-pan{position:static;transform:none;width:auto;box-shadow:none;border:0;background:none;overflow:visible;z-index:auto}
.l2-pan .dm-pan-in{padding:0}
.l2-pro{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px var(--ap-e3);background:hsl(var(--carte));border-radius:var(--ap-r-l);box-shadow:0 0 0 1px hsl(var(--trait)) inset}
.l2-fiche .dm-comp{border-top:0;border-radius:var(--ap-r-l);box-shadow:0 0 0 1px hsl(var(--trait)) inset}
.l2-fiche .dm-vendue{border-radius:var(--ap-r-l)}
.l2-histo{background:hsl(var(--carte));border-radius:var(--ap-r-l);box-shadow:0 0 0 1px hsl(var(--trait)) inset;padding:var(--ap-e2) 0 4px}
.l2-histo h3{margin:0;padding:2px var(--ap-e3) 8px;font-size:13px;font-weight:var(--ap-g-titre);color:hsl(var(--doux));text-transform:uppercase;letter-spacing:.04em}
.dm .dm-fil.l2-fil{display:block;flex:none;overflow:visible;padding:0;max-height:none}
.l2-h{display:grid;grid-template-columns:20px 64px minmax(80px,150px) minmax(0,1fr);gap:2px 10px;align-items:center;min-height:42px;padding:6px var(--ap-e3);border-top:1px solid hsl(var(--trait));font-size:15px;cursor:pointer}
.l2-h:hover{background:hsl(var(--gris-doux)/.5)}
.l2-h-i{display:grid;place-items:center;color:hsl(var(--doux))}
.l2-h-i svg.dm-i{width:16px;height:16px}
.l2-h.cl .l2-h-i{color:hsl(var(--azur))}
.l2-h.nous .l2-h-i,.l2-h.appel .l2-h-i{color:hsl(var(--vert))}
.l2-h.appel.sans .l2-h-i,.l2-h.rappel .l2-h-i{color:hsl(var(--orange))}
.l2-h.note .l2-h-i{color:hsl(35 70% 40%)}
.l2-h.note{background:hsl(var(--jaune-doux)/.6)}
.l2-h.agent .l2-h-i{color:hsl(var(--violet))}
.l2-h-q{font-size:14px;color:hsl(var(--doux));white-space:nowrap}
.l2-h-a{font-weight:var(--ap-g-titre);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.l2-h-t{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.l2-h .bu{display:inline;padding:0;background:none;box-shadow:none;border-radius:0}
.l2-h.ouvert .l2-h-t{white-space:pre-wrap;overflow:visible;overflow-wrap:anywhere}
.l2-h>.dm-brut,.l2-h>.dm-pjc,.l2-h>.kv{grid-column:4;display:none;justify-self:start}
.l2-h.ouvert>.dm-brut,.l2-h.ouvert>.dm-pjc,.l2-h.ouvert>.kv{display:flex}
.l2-h.ouvert>.dm-brut{display:block}
@media (max-width:1100px){
  .l2-corps{grid-template-columns:minmax(0,1fr)}
  .l2-entete,.l2-l{grid-template-columns:6px 54px minmax(120px,1fr) minmax(140px,1.2fr) 70px minmax(150px,1fr) 24px}
}

/* ---------- téléphone ---------- */
@media (max-width:760px){
  .dm-app.l2-liste,.dm-app.l2-fiche{height:auto}
  .l2-filtres .dm-cherche{flex:1 1 100%;max-width:none;margin:0}
  .l2-entete{display:none}
  .l2-l{grid-template-columns:6px minmax(0,1fr) auto auto;grid-template-areas:"t nom src q" "t vo vd act";gap:4px 8px;padding:8px var(--ap-e3) 8px 0;min-height:0}
  .dm .l2-l .l2-go{height:32px;padding:0 12px}
  .l2-l .l2-delai{display:none}
  .l2-temp{grid-area:t}
  .l2-q{grid-area:q;justify-self:end;font-size:14px}
  .l2-nom{grid-area:nom}
  .l2-vo{grid-area:vo;font-size:14px}
  .l2-vo img{width:40px;height:28px}
  .l2-src{grid-area:src;justify-self:end}
  .l2-act{grid-area:act;justify-self:end}
  .l2-l .dm-vd{grid-area:vd}
  .dm-app.l2-fiche .l2-fiche-w{padding:var(--ap-e2) var(--ap-e2) 0}
  .l2-retour{display:inline-flex;align-items:center;gap:2px;order:-3;margin-right:auto;height:40px;padding:0 8px 0 2px;font-size:15px;font-weight:var(--ap-g-titre);color:hsl(var(--azur-fort))}
  .l2-barre .s2-esp{display:none}
  .l2-barre .s2-g{flex-wrap:wrap!important}
  .l2-barre .s2-g>.t1-g,.l2-barre .s2-g>a.t1-g,.l2-barre .s2-g>.t1-plus{flex:1 0 auto!important;min-width:0}
  .l2-barre .s2-g>.t1-plus>.t1-g{width:100%;justify-content:center}
  .l2-barre .s2-g>.t1-plus:last-child{flex:0 0 auto!important}
  .l2-barre .s2-g>.t1-plus:last-child>.t1-g{width:44px}
  .l2-barre .t1-g svg.dm-i{display:none}
  .l2-bandeau .dm-etoiles{flex:none;display:inline-flex}
  .l2-bandeau .dm-etoiles button{width:30px!important;min-width:0!important;height:30px;min-height:0!important;flex:none}
  .l2-tete-liste{display:flex;flex-wrap:wrap;align-items:flex-start}
  .l2-tete-liste>.dm-l1{order:2;margin-left:auto;flex:none}
  .l2-tete-liste>.l2-filtres{order:1;flex:1 1 0;min-width:0}
  .l2-barre{padding:6px var(--ap-e2);gap:6px}
  .l2-barre .s2-g{gap:6px;order:3;flex:1 1 100%}
  .dm .l2-barre .t1-g{height:40px;padding:0 10px;font-size:15px}
  .l2-barre .t1-fermer-l{display:none}
  .dm button.l2-fermer{padding:0 10px}
  .t1-menu .t1-tel-l2{display:flex!important}
  .t1-menu p.t1-tel-l2{display:block!important}
  .l2-barre .t1-menu{left:auto;right:0}
  .l2-barre .s2-g>.t1-plus:first-of-type .t1-menu{left:0;right:auto}
  .l2-bandeau .s2-ident{grid-template-columns:64px minmax(0,1fr)}
  .l2-bandeau .s2-photo{width:64px!important;height:48px!important}
  .pv.l2-fiche .t1-sombre h1.s2-titre{font-size:22px}
  .l2-temp-p,.t1-sombre .l2-etat{height:24px;font-size:13px;padding:0 9px}
  .l2-frise .s2-etapes .e,.l2-frise .s2-etapes .d{display:block;font-size:12px}
  .l2-frise .s2-j button{padding:4px 0}
  .l2-h{grid-template-columns:18px 50px minmax(0,1fr);padding:6px var(--ap-e2)}
  .l2-h-a{display:none}
  .l2-h>.dm-brut,.l2-h>.dm-pjc,.l2-h>.kv{grid-column:3}
  .l2-pro{padding:8px var(--ap-e2)}
  .dm .l2-go.grand{height:44px;flex:1}
}
.dm button.l2-fermer{color:hsl(var(--encre))}

/* ── Rectifications de l'antichambre (30/10, 16 h 25) ── */
/* R4 : une signification par couleur. Le bouton dit le geste (bleu action) ; l'urgence est sur la pastille du
   délai (vert < 1 h, orange < 4 h, rouge au-delà) ; la température sur la barre gauche et la flamme seulement
   (le rouge reste à l'urgence). */
.t-chaud>.l2-temp{background:hsl(var(--orange-vif))}
.t-tiede>.l2-temp{background:hsl(45 92% 55%)}
.t-froid>.l2-temp{background:hsl(213 75% 62%)}
.dm .l2-go.bleu{background:hsl(var(--azur));color:#fff}
.l2-att{display:none}
.l2-flamme{display:inline-grid}
.l2-flamme svg.dm-i{width:22px;height:22px}
.l2-flamme.t-chaud{color:hsl(var(--orange-vif))}.l2-flamme.t-chaud svg.dm-i{fill:hsl(var(--orange-vif)/.35)}
.l2-flamme.t-tiede{color:hsl(45 92% 60%)}
.l2-flamme.t-froid{color:hsl(213 80% 72%)}.l2-flamme.t-froid svg.dm-i{fill:none}
.l2-flamme.t-clos{color:rgba(255,255,255,.4)}
.l2-etoiles{background:none!important;padding:0!important;box-shadow:none!important}
.l2-etoiles .dm-etoiles{margin:0}
.t1-sombre .s2-puces li .dm-lu{margin-left:6px;height:18px;background:rgba(255,255,255,.2);color:#fff}
/* R6 : l'étape courante est à faire (anneau), pas faite (point plein). */
.l2-frise .s2-j.courante .pt{background:hsl(var(--ap-carte));box-shadow:0 0 0 2px hsl(var(--ap-action)) inset}
/* R1 : le dernier message du client, en premier sous le bandeau. */
.l2-msg{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;align-items:start;padding:10px var(--ap-e3);background:hsl(var(--carte));border-radius:var(--ap-r-l);box-shadow:0 0 0 1px hsl(var(--trait)) inset;cursor:pointer}
.l2-msg-q{display:inline-flex;align-items:center;gap:6px;font-size:14px;font-weight:var(--ap-g-titre);color:hsl(var(--azur-fort));white-space:nowrap;padding-top:2px}
.l2-msg-q svg.dm-i{width:16px;height:16px}
.l2-msg-t{margin:0;font-size:16px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.l2-msg.ouvert .l2-msg-t{-webkit-line-clamp:unset;display:block}
.l2-frise{margin:0;border-radius:var(--ap-r-l)}
/* R7 : la voiture en une ligne. */
.l2-voiture-l{padding:6px!important}
.dm a.l2-vl{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:6px;border-radius:var(--ap-r-m);text-decoration:none}
.dm a.l2-vl:hover{background:hsl(var(--gris-doux)/.6)}
.l2-vl img,.l2-vl-sans{width:64px;height:44px;border-radius:8px;object-fit:cover;display:grid;place-items:center;background:hsl(var(--gris-doux))}
.l2-vl-n{min-width:0;display:grid}
.l2-vl-n b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.l2-vl-n small{font-size:13px;color:hsl(var(--doux))}
.l2-vl-p{font-size:15px}
.l2-vl-f{font-size:14px;font-weight:var(--ap-g-titre);color:hsl(var(--azur-fort));white-space:nowrap}
.l2-voiture-l .dm-boutons{padding:4px 6px 2px}
.l2-voiture-l .dm-boutons:empty{display:none}
/* R8 : la bulle des idées au-dessus de la barre du bas, avec une marge ; masquée sur la liste au téléphone (≡). */
@media (max-width:760px){
  body:has(.n1-bas) .bl-bouton{bottom:calc(72px + env(safe-area-inset-bottom))!important}
  body:has(.dm-app.l2-liste) .bl-bouton,body:has(.st[data-stock]) .bl-bouton{display:none!important}
}
/* Téléphone : R2 (pas de rangée d'onglets sur la liste et la fiche lead), R3 (une rangée de gestes, Perdre
   dans ⋮), R5 (le délai à droite), R1 (bandeau compact : le message du client dans le premier écran). */
@media (max-width:760px){
  body:has(.dm-app.l2-liste) .n1-onglets,body:has(.dm-app.l2-fiche) .n1-onglets{display:none!important}
  .l2-l .l2-q{display:none}
  .l2-l .l2-att{display:block;grid-area:q;justify-self:end;font-size:15px;font-weight:var(--ap-g-titre);color:hsl(var(--doux));white-space:nowrap}
  .l2-l .l2-att.vert{color:hsl(var(--vert))}.l2-l .l2-att.orange{color:hsl(var(--orange))}.l2-l .l2-att.rouge{color:hsl(var(--rouge))}
  .l2-barre .s2-g{flex-wrap:nowrap!important;gap:4px}
  .l2-barre .s2-g>.t1-g,.l2-barre .s2-g>a.t1-g,.l2-barre .s2-g>.t1-plus{flex:1 1 auto!important;min-width:0}
  .dm .l2-barre .t1-g{padding:0 6px;font-size:15px;justify-content:center;min-height:44px}
  .l2-barre .s2-g>.l2-perdre{display:none!important}
  .l2-barre .t1-chev{display:none}
  .l2-barre .t1-v1{height:14px;padding:0 3px;font-size:10px}
  .dm .l2-barre .s2-g>.t1-plus:last-child>.t1-g{width:40px}
  .l2-bandeau{padding:8px!important}
  .l2-bandeau .s2-ident{grid-template-columns:48px minmax(0,1fr)!important;gap:6px 8px!important;align-items:center}
  .l2-bandeau .s2-photo{width:48px!important;height:36px!important}
  .l2-bandeau .s2-l1{flex-wrap:nowrap;gap:6px;min-width:0}
  .pv.l2-fiche .t1-sombre h1.s2-titre{font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
  .l2-bandeau .s2-l1 .l2-etat{flex:none}
  .l2-bandeau .t1-puces{margin-top:6px;gap:5px}
  .l2-bandeau .s2-puces{gap:5px}
  .l2-bandeau .s2-puces li{height:28px;padding:0 9px;font-size:14px}
  .l2-bandeau .s2-puces li.s2-prix{font-size:15px}
  .l2-bandeau .s2-puces.t1-sec{flex-wrap:nowrap;overflow:hidden}
  .l2-bandeau .s2-puces.t1-sec li{height:26px;font-size:13px;flex:none}
  .l2-bandeau [data-puce=situation]{display:none!important}
  .l2-bandeau .dm-etoiles button{width:24px!important;height:24px}
  .l2-msg{padding:8px var(--ap-e2)}
  .l2-msg-t{font-size:15px;-webkit-line-clamp:3}
  .l2-corps{gap:var(--ap-e2);margin-top:6px}
  .l2-g{gap:6px}
  .dm-app.l2-fiche .l2-fiche-w{padding-top:6px}
}
@media (max-width:760px){
  .l2-vo{font-size:15px}
  .dm .l2-vb{width:44px;height:44px}
  .dm button.l2-fermer{min-width:44px;height:44px;justify-content:center}
  .l2-bandeau .s2-puces li{font-size:15px}
  .l2-bandeau .s2-puces.t1-sec li{font-size:15px}
  .l2-msg-q{font-size:15px}
}
@media (max-width:760px){.t1-sombre .l2-etat{height:28px;font-size:15px;padding:0 10px}}
@media (max-width:760px){.l2-h-q,.l2-vl-f,.l2-vl-n small,.dm-ch.l2-delai{font-size:15px}.dm-ch.l2-delai{height:28px}}

/* ── Retour de JB (30/10, 18 h 35) : R11–R13 ── */
.l2-tri{display:inline-flex;align-items:center;height:34px;padding:0 12px;border-radius:999px;font-size:15px;font-weight:var(--ap-g-titre);box-shadow:0 0 0 1px hsl(var(--trait-fort)) inset;background:hsl(var(--carte));white-space:nowrap}
.l2-loupe{display:none}
.l2-filtres-m{display:none}
.l2-vo-court,.l2-deplier{display:none}
.l2-sous-champ{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.l2-sous-champ .dm-pretes{display:contents}
.l2-sous-champ .dm-pretes .t{display:none}
.l2-sous-champ .dm-ty .cp{display:none}
.l2-ia{display:contents}
.dm .l2-ia-v.on{background:hsl(var(--azur));color:#fff;box-shadow:none}
.l2-ia-etat{height:30px;font-size:14px}
@media (max-width:760px){
  /* R11 : la liste commence sous l'en-tête — pas de pastilles, recherche derrière la loupe, filtres dans « ⋯ ». */
  .l2-filtres .dm-pills,.l2-filtres .dm-cherche{display:none!important}
  .l2-filtres.l2-cherche-ouverte .dm-cherche{display:block!important;flex:1 1 100%}
  .l2-tete-liste>.l2-filtres{flex:1 1 100%;order:3}
  .l2-tete-liste>.l2-filtres:not(.l2-cherche-ouverte){display:none}
  .l2-tete-liste>.dm-l1{order:1;flex:1 1 100%;margin:0;justify-content:flex-end;gap:8px}
  .l2-tete-liste{padding:6px var(--ap-e3)!important}
  .l2-tri{height:44px;margin-right:auto}
  .l2-loupe{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:var(--ap-r-m);box-shadow:0 0 0 1px hsl(var(--trait-fort)) inset;background:hsl(var(--carte))}
  .l2-filtres-m{display:grid;gap:2px;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid hsl(var(--trait))}
  .l2-filtres-m button{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 10px;border-radius:var(--ap-r-s);font-size:15px;text-align:left}
  .l2-filtres-m button.on{background:hsl(var(--azur-doux));font-weight:var(--ap-g-titre)}
  .l2-filtres-m b{min-width:28px}
  /* R12 : un lead ouvert = la messagerie. En-tête compact (nom · voiture · flamme · état), le reste replié. */
  .pv.l2-fiche:not(.deplie) .l2-bandeau .t1-puces,
  .pv.l2-fiche:not(.deplie) [data-frise-lead],
  .pv.l2-fiche:not(.deplie) [data-prochaine-action],
  .pv.l2-fiche:not(.deplie) [data-dernier-message],
  .pv.l2-fiche:not(.deplie) .l2-pan{display:none!important}
  .pv.l2-fiche:not(.deplie) .l2-bandeau{padding:6px 8px!important}
  .l2-vo-court{display:block;flex:0 1 auto;min-width:0;max-width:34%;font-size:15px;color:rgba(255,255,255,.85);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-decoration:none}
  .l2-deplier{display:inline-grid;place-items:center;flex:none;width:44px;height:44px;margin-left:auto;color:#fff;font-size:18px}
  .l2-g{display:flex!important;flex-direction:column}
  .l2-g>[data-historique]{order:1}
  .l2-g>.dm-comp{order:2;position:sticky;bottom:calc(52px + env(safe-area-inset-bottom));z-index:6;box-shadow:0 -6px 16px rgba(10,22,40,.08),0 0 0 1px hsl(var(--trait)) inset}
  .l2-g>.dm-vendue{order:0}
  .l2-histo{padding:0}
  .l2-histo h3{display:none}
  .dm .l2-fil.dm-fil{display:flex;flex-direction:column-reverse}
  .l2-h{align-items:start}
  .l2-h .l2-h-t{white-space:pre-wrap;overflow:visible;overflow-wrap:anywhere}
  .l2-fiche .dm-zone textarea{min-height:64px}
  /* Pendant la saisie (champ sélectionné), la barre du bas s'efface ; elle revient dès que le champ est quitté. */
  body:has(.l2-fiche #dm-txt:focus) .ux-barre-bas{display:none!important}
  body:has(.l2-fiche #dm-txt:focus) .l2-g>.dm-comp{bottom:0}
}
@media (max-width:760px){
  /* R12 : le nom reste entier — la voiture passe sur la deuxième ligne de l'en-tête compact. */
  .l2-bandeau .s2-l1{flex-wrap:wrap!important;row-gap:2px}
  .l2-bandeau .s2-l1 h1.s2-titre{flex:0 1 auto;max-width:calc(100% - 150px)}
  .l2-deplier{order:4}
  .l2-vo-court{order:5;flex:1 1 100%!important;max-width:none!important;font-size:15px}
  .l2-bandeau .s2-photo{align-self:start}
}
@media (max-width:760px){.l2-ia-etat{font-size:15px;height:32px}}
@media (max-width:760px){
  /* R12 : la réponse reste au pouce (tiers bas) même sur un lead court — le fil s'étire, ses messages au plus bas. */
  .dm .pv.l2-fiche{display:flex;flex-direction:column;min-height:calc(100dvh - 114px - env(safe-area-inset-bottom));padding-bottom:6px}
  .pv.l2-fiche>.l2-corps{flex:1 1 auto;display:flex!important;flex-direction:column}
  .pv.l2-fiche>.l2-corps>.l2-g{flex:1 1 auto}
  .pv.l2-fiche:not(.deplie) .l2-g>[data-historique]{flex:1 1 auto;display:flex;flex-direction:column;justify-content:flex-end;background:none;box-shadow:none}
}
@media (max-width:760px){.l2-sous-champ{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -8px;padding:0 8px}.l2-sous-champ::-webkit-scrollbar{display:none}.l2-sous-champ>*{flex:none}}
@media (max-width:760px){.l2-fiche .dm-zone textarea{min-height:52px}.l2-fiche .dm-comp{gap:6px}}
@media (max-width:760px){.dm .l2-fiche .dm-zone textarea{min-height:0;height:56px}.dm .l2-fiche .dm-comp{padding:6px 8px}}
@media (max-width:760px){
  /* Une seule loupe sur la liste des leads (celle de la liste cherche un lead) ; la recherche générale reste sur les autres écrans. */
  body:has(.dm-app.l2-liste) header.v2-entete .v2-search,body:has(.dm-app.l2-liste) header.v2-entete [data-geste="recherche"],body:has(.dm-app.l2-liste) header.v2-entete .n1-loupe,body:has(.dm-app.l2-liste) header.v2-entete .ux-loupe{display:none!important}
  /* Un fil court se lit juste sous l'en-tête (plus de vide au-dessus) ; la réponse reste en bas, au pouce. */
  .pv.l2-fiche:not(.deplie) .l2-g>[data-historique]{justify-content:flex-start}
}
