/* QG VEARTUS — habillage v3 (lisibilité d'abord : texte 16-17 px, contrastes forts,
   rangées 56 px, boutons 48 px, cibles ≥ 44 px). Thème sombre par défaut, thème clair complet (html[data-theme="light"]).
   Toutes les classes de la v2 existent encore : les pages des autres chantiers s'en servent. */
:root {
  --bg: #0b0714; --surface: #130d20; --surface2: #1b1430; --surface3: #241b3d; --bubble-out: #3a2a7a; --bubble-in: #1b1430;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --text: #ffffff; --sec: #b8b3c9; --mute: #6f6a85;
  --rose: #FFD166; --violet: #6DB3F2; --amber: #ffb020; --green: #2fd66f; --red: #ef4444;
  --grad: linear-gradient(115deg, #FFD166, #6DB3F2);
  --r9: 9px; --r14: 14px; --r17: 17px; --r19: 19px;
  --ease: cubic-bezier(.2,.9,.3,1);
  --top-h: 56px; --tab-h: 60px; --side-w: 248px;
  --disp: "Unbounded", system-ui, sans-serif;
  --ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --top-bg: rgba(11,7,20,.88); --tab-bg: rgba(11,7,20,.84);
  --hover: rgba(255,255,255,.035); --hover2: rgba(255,255,255,.06);
  --on-row: rgba(109,179,242,.12);
  --shadow: 0 12px 30px rgba(0,0,0,.45);
  --kbd-bg: rgba(255,255,255,.08);
  --av-bg: linear-gradient(150deg, #2a1b4e, #150e26);
  --white-btn: #ffffff; --white-btn-text: #0c0a14;
}
html[data-theme="light"] {
  --bg: #f6f5fa; --surface: #ffffff; --surface2: #efedf5; --surface3: #e6e2f0; --bubble-out: #e8e0ff; --bubble-in: #ffffff;
  --line: rgba(20,16,31,.09); --line2: rgba(20,16,31,.18);
  --text: #14101f; --sec: #5a5570; --mute: #8d889d;
  --top-bg: rgba(246,245,250,.9); --tab-bg: rgba(246,245,250,.9);
  --hover: rgba(20,16,31,.035); --hover2: rgba(20,16,31,.06);
  --on-row: rgba(109,179,242,.12);
  --shadow: 0 12px 30px rgba(20,16,31,.16);
  --kbd-bg: rgba(20,16,31,.07);
  --av-bg: linear-gradient(150deg, #e9e3f7, #d8d0ee);
  --white-btn: #14101f; --white-btn-text: #ffffff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui); font-size: 16px; line-height: 1.45; font-weight: 450; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--text); }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(255,209,102,.35); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.input:focus-visible, .flat:focus-visible, textarea:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- typographie ---------- */
.f-display { font-family: var(--disp); }
.lbl { display: flex; align-items: center; gap: 10px; font-family: var(--disp); font-size: 11.5px; color: var(--mute); margin: 24px 0 10px; font-weight: 400; }
.lbl::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lbl.nofilet::after { display: none; }
.lbl b { color: var(--sec); font-weight: 400; }
.h15 { font-size: 15px; font-weight: 650; }
.h16 { font-size: 16px; font-weight: 650; }
.h17 { font-size: 17px; font-weight: 650; }
.sec { color: var(--sec); }
.mute { color: var(--mute); }
.s12 { font-size: 12px; }
.s13 { font-size: 13px; }
.s14 { font-size: 14px; }
.meta { font-size: 13px; color: var(--sec); }
.rose { color: var(--rose); } .violet { color: var(--violet); } .amber { color: var(--amber); } .green { color: var(--green); } .red { color: var(--red); }
html[data-theme="light"] .green, html[data-theme="light"] .hero.green .n { color: #159a48; }
html[data-theme="light"] .amber, html[data-theme="light"] .hero.amber .n { color: #9a6200; }
.num { font-family: var(--disp); font-variant-numeric: tabular-nums; }
.ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -3px; }
.star { color: var(--amber); font-size: 11px; margin-right: 6px; }
.star.rose { color: var(--rose); }
kbd { display: inline-block; min-width: 24px; padding: 2px 7px; border-radius: 6px; background: var(--kbd-bg); border: 1px solid var(--line2); font-family: var(--disp); font-size: 11px; text-align: center; color: var(--text); line-height: 18px; }
.lead { font-size: 15px; color: var(--sec); margin: 0 0 12px; line-height: 1.5; }
p.sub, .sub { color: var(--sec); font-size: 15px; line-height: 1.5; }

/* ---------- marque ---------- */
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand .qg { font-family: var(--disp); font-weight: 700; font-size: 22px; letter-spacing: -.01em; line-height: 1; color: var(--text); display: inline-flex; align-items: baseline; }
.brand .qg i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); margin-left: 3px; }
.brand .pp { font-family: var(--disp); font-size: 11.5px; color: var(--sec); padding-left: 1px; }
.brand.big { align-items: center; gap: 8px; }
.brand.big .qg { font-size: 46px; }
.brand.big .qg i { width: 10px; height: 10px; margin-left: 5px; }
.brand.big .pp { font-size: 10px; letter-spacing: .4em; padding-left: .4em; }

/* ---------- connexion ---------- */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--sat)) 20px calc(24px + var(--sab)); background: var(--bg); z-index: 5; overflow: auto; }
.login-in { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: stretch; }
.login .brand { margin-bottom: 36px; }
.login .input { text-align: center; font-weight: 550; }
.pin-dots { display: flex; justify-content: center; gap: 12px; height: 44px; align-items: center; margin-top: 10px; }
.pin-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line2); transition: transform 150ms var(--ease), background 150ms; }
.pin-dots i.on { background: var(--text); border-color: var(--text); transform: scale(1.05); }
.pin-dots.shake { animation: shake 320ms var(--ease); }
@keyframes shake { 20% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 80% { transform: translateX(-3px); } }
.login-msg { min-height: 22px; text-align: center; color: var(--rose); font-size: 14px; font-weight: 550; margin-bottom: 6px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 60px; border-radius: var(--r14); background: var(--surface); border: 1px solid var(--line); font-family: var(--disp); font-size: 21px; font-weight: 400; color: var(--text); transition: transform 120ms var(--ease), background 120ms; display: flex; align-items: center; justify-content: center; }
.keypad button:active { transform: scale(.96); background: var(--surface2); }
.keypad button.soft { background: none; border-color: transparent; color: var(--sec); }
.keypad button.ok { grid-column: 1 / -1; background: var(--grad); border: 0; font-family: var(--ui); font-weight: 800; font-size: 16px; color: #fff; height: 52px; }
.keypad button.ok:disabled { opacity: .45; }
.keypad button .ico { width: 22px; height: 22px; }

/* ---------- structure ---------- */
.app { min-height: 100dvh; }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 8; height: calc(var(--top-h) + var(--sat)); padding: var(--sat) 6px 0 16px; display: flex; align-items: center; gap: 6px; background: var(--top-bg); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.top-brand { display: flex; align-items: baseline; gap: 10px; }
.top-brand .qg { font-family: var(--disp); font-weight: 700; font-size: 18px; color: var(--text); display: inline-flex; align-items: baseline; }
.top-brand .qg i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--rose); margin-left: 2px; }
.top-brand .pp { font-family: var(--disp); font-size: 11.5px; color: var(--sec); }
.top-title { font-size: 17px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title small { display: block; font-size: 12px; color: var(--mute); font-weight: 450; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) { .top-title.two { white-space: normal; font-size: 15px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: normal; } .top-title.two small { display: none; } }
.top-actions { display: flex; gap: 2px; margin-left: auto; align-items: center; }
@media (max-width: 1023px) { .top-actions .ibtn, .top-report { width: 40px; } .top-actions .btn.sm { padding: 0 10px; min-height: 38px; } }
.top-actions .pill { margin-right: 6px; }
.top-back { margin-left: -8px; }
.top-report { color: var(--sec); }
.top-report:hover { color: var(--text); }
.presence { display: none; align-items: center; gap: 0; margin-left: 4px; }
@media (min-width: 1024px) { .presence { display: flex; } }
.presence .pres { position: relative; display: inline-flex; margin-left: -6px; }
.presence .pres:first-child { margin-left: 0; }
.presence .pres i { position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 2px solid var(--bg); }
.presence .pres-more { font-size: 12px; color: var(--mute); margin-left: 4px; }
.helpbar { position: sticky; top: calc(var(--top-h) + var(--sat)); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 16px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--sec); line-height: 1.4; }
@media (min-width: 1024px) { .helpbar { font-size: 15px; } }
.helpbar .ico { width: 17px; height: 17px; color: var(--violet); }
.helpbar span { flex: 1; }
.view { padding: calc(var(--top-h) + var(--sat) + 10px) 16px calc(var(--tab-h) + var(--sab) + 28px); max-width: 960px; margin: 0 auto; }
.view.flush { padding-left: 0; padding-right: 0; }
.view .page { min-width: 0; max-width: 100%; }
.view { overflow-x: clip; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--sab); background: var(--tab-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tabbar button { height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute); position: relative; }
.tabbar button .ico { width: 23px; height: 23px; stroke-width: 1.9; }
.tabbar button span { font-size: 11px; font-weight: 550; letter-spacing: .01em; }
.tabbar button.on { color: var(--text); }
.tabbar button.on span { font-family: var(--disp); font-size: 11.5px; font-weight: 400; }
.tabbar button.on::before { content: ""; position: absolute; top: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--rose); }
.nb { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 8px; background: rgba(255,209,102,.16); border: 1px solid rgba(255,209,102,.45); color: var(--rose); font-family: var(--disp); font-size: 11.5px; line-height: 18px; text-align: center; display: inline-block; }
.nb.dot-only { min-width: 8px; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--rose); border: 0; }
.tabbar .nb { position: absolute; top: 6px; left: calc(50% + 6px); }
.tabbar .nb.dot-only { top: 9px; left: calc(50% + 10px); }

.sidebar { display: none; }
.side-nav { display: flex; flex-direction: column; margin-top: 22px; overflow-y: auto; scrollbar-width: thin; flex: 1; min-height: 0; padding-right: 4px; }
.side-sect { margin-bottom: 10px; }
.side-title { font-family: var(--disp); font-size: 11.5px; color: var(--mute); padding: 4px 12px 4px 14px; }
.side-nav { position: relative; }
.side-nav::after { content: ""; position: sticky; bottom: 0; display: block; height: 18px; flex: none; background: linear-gradient(180deg, transparent, var(--bg)); pointer-events: none; margin-top: -18px; }
.side-nav button { display: flex; align-items: center; gap: 11px; height: 36px; width: 100%; padding: 0 8px 0 14px; border-radius: var(--r9); color: var(--sec); font-size: 14.5px; font-weight: 550; position: relative; text-align: left; flex: none; }
.side-nav button .ico { width: 17px; height: 17px; }
.side-nav button > span:not(.nb) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-nav button:hover { color: var(--text); background: var(--hover); }
.side-nav button.on { color: var(--text); font-weight: 650; background: var(--hover); }
.side-nav button.on::before { content: ""; position: absolute; left: 3px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--rose); }
.side-nav button .nb { margin-left: auto; }
.side-nav .gap { height: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
/* v10 — dossier dans la barre latérale (Prospection) : la rangée ouvre la page, le chevron replie / déplie ; une sous-entrée par
   catégorie avec son nombre (chiffre éteint, pas un compteur de non-lus). Les libellés longs passent sur deux lignes (jamais coupés). */
.side-folder { position: relative; display: flex; align-items: center; }
.side-folder > button[data-nav] { flex: 1; min-width: 0; padding-right: 36px; }
.side-nav .side-fold { position: absolute; right: 0; top: 50%; margin-top: -16px; width: 32px; height: 32px; padding: 0; justify-content: center; color: var(--mute); border-radius: var(--r9); }
.side-nav .side-fold .ico { width: 14px; height: 14px; transition: transform 160ms var(--ease); }
.side-nav .side-fold[aria-expanded="true"] .ico { transform: rotate(90deg); }
.side-nav .side-fold:hover { color: var(--text); }
.side-folder > button[data-nav] .nb { margin-right: 2px; }
.side-nav button.in { color: var(--text); font-weight: 650; }
.side-subs { display: flex; flex-direction: column; margin: 0 0 6px 22px; padding-left: 8px; border-left: 1px solid var(--line); }
.side-nav .side-subs button { height: auto; min-height: 30px; padding: 5px 8px; gap: 8px; font-size: 13px; font-weight: 500; line-height: 1.25; align-items: center; }
.side-nav .side-subs button > span:not(.nb) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: normal; }
.side-nav .side-subs button.on { color: var(--text); font-weight: 650; background: var(--hover); }
.side-nav .side-subs button.on::before { left: -11px; }
.side-n { font-family: var(--disp); font-size: 11.5px; font-weight: 400; color: var(--mute); font-variant-numeric: tabular-nums; flex: none; margin-left: auto; }
.side-subs button.on .side-n { color: var(--sec); }
/* menu « Plus » (téléphone) : les sous-entrées d'un dossier, en retrait sous leur rangée */
.sheet .menu .menu-subs { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding: 0 0 6px 30px; }
.sheet .menu .menu-subs button { min-height: 44px; font-size: 15px; font-weight: 550; color: var(--sec); border-bottom: 1px solid var(--line); }
.sheet .menu .menu-subs button:last-child { border-bottom: 0; }
.sheet .menu .menu-subs .side-n { font-size: 10px; }

.side-me { margin-top: auto; padding: 14px 0 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.side-me > div { flex: 1; min-width: 0; }
.side-me .av { width: 34px; height: 34px; font-size: 12px; }
.side-me strong { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-me small { display: block; font-size: 12px; color: var(--mute); }
.side-theme { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--sec); border-radius: var(--r9); order: 5; }
.side-theme:hover { color: var(--text); background: var(--hover); }
.side-me .ibtn { order: 6; }

@media (min-width: 1024px) {
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); padding: 24px 12px 18px 16px; border-right: 1px solid var(--line); background: var(--bg); z-index: 9; }
  .tabbar { display: none; }
  .top { left: var(--side-w); padding-left: 28px; padding-right: 20px; gap: 10px; }
  .top-brand { display: none; }
  .top-title { font-size: 18px; }
  .top-actions { gap: 6px; }
  .helpbar { margin-left: var(--side-w); padding-left: 28px; }
  .view { margin-left: var(--side-w); max-width: none; padding: calc(var(--top-h) + 20px) 32px 48px; }
  .view.flush { padding-left: 0; padding-right: 0; }
  .view > .wrap, .page { max-width: 1040px; }
  .page.split, .page.wide { max-width: none; }
}
@media (min-width: 1440px) { .view > .wrap, .page { max-width: 1180px; } }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r14); font-size: 15px; font-weight: 650; color: var(--text); background: var(--surface); border: 1px solid var(--line2); transition: transform 120ms var(--ease), opacity 120ms, background 120ms; white-space: nowrap; }
.btn:hover { background: var(--surface2); }
.btn:active { transform: scale(.985); }
a.btn, a.ibtn { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.grad { background: var(--grad); border: 0; font-weight: 800; color: #fff; }
.btn.grad:hover { background: var(--grad); filter: brightness(1.06); }
.btn.white { background: var(--white-btn); color: var(--white-btn-text); border: 0; font-weight: 800; }
.btn.white:hover { background: var(--white-btn); opacity: .92; }
.btn.danger { color: var(--red); }
.btn.ghost { background: none; border-color: transparent; color: var(--sec); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--r9); }
.btn.xs { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: var(--r9); }
.btn.wide { width: 100%; }
.btn .ico { width: 17px; height: 17px; }
.btn.sm .ico { width: 16px; height: 16px; }
/* actions de décision : mêmes mots, mêmes couleurs partout */
.btn.ok { background: var(--green); color: #0c0a14; border: 0; font-weight: 800; }
.btn.ok:hover { background: var(--green); filter: brightness(1.06); }
.btn.no { background: transparent; color: var(--red); border-color: rgba(255,123,107,.6); }
.btn.no:hover { background: rgba(255,123,107,.08); }
.btn.later { background: transparent; color: var(--sec); border-color: var(--line2); }
.btn.later:hover { color: var(--text); background: var(--hover); }
.btn.open { background: transparent; color: var(--text); border-color: var(--line2); }
.btn.open:hover { background: var(--hover); }
.btn.reply { background: var(--white-btn); color: var(--white-btn-text); border: 0; font-weight: 800; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.actions .btn { flex: 1 1 auto; }
@media (min-width: 1024px) { .actions .btn { flex: 0 0 auto; min-width: 128px; } }
.ibtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--sec); border-radius: var(--r9); flex: none; }
.ibtn:hover { color: var(--text); background: var(--hover); }
.ibtn .ico { width: 20px; height: 20px; }
.ibtn.sm { width: 36px; height: 36px; }
.ibtn.sm .ico { width: 17px; height: 17px; }
.ibtn.on { color: var(--rose); }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btnrow .btn { flex: 1 1 auto; }
@media (min-width: 1024px) { .btnrow .btn { flex: 0 1 auto; min-width: 180px; } .btnrow .btn.wide { width: auto; } .btnrow .btn.sm, .btnrow .btn.xs { min-width: 0; } }
.btnrow.tight { margin-top: 8px; }
.btnrow.left .btn { flex: 0 0 auto; }
.link { color: var(--violet); text-decoration: none; font-weight: 550; }
.link:hover { text-decoration: underline; }
.linkbtn { color: var(--violet); font-weight: 550; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.chkbox { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: var(--mute); border-radius: var(--r9); flex: none; }
.chkbox.on { color: var(--rose); }
.chkbox .ico { width: 19px; height: 19px; }

/* ---------- champs ---------- */
.input { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; border: 1px solid var(--line2); border-radius: var(--r14); background: var(--surface); padding: 10px 14px; color: var(--text); transition: border-color 120ms; font-size: 16px; }
.input::placeholder { color: var(--mute); }
.input:focus { border-color: rgba(109,179,242,.75); }
textarea.input { min-height: 96px; resize: none; line-height: 1.45; }
textarea.grow { overflow: hidden; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--sec) 50%), linear-gradient(135deg, var(--sec) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { margin-bottom: 12px; }
.field .lbl { margin: 0 0 7px; color: var(--mute); }
.field .lbl::after { display: none; }
.field .hint { font-size: 13px; color: var(--mute); margin: 6px 2px 0; line-height: 1.45; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.inline-field { display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 12px; min-height: 50px; border-bottom: 1px solid var(--line); }
.inline-field > span { font-size: 13px; color: var(--mute); font-weight: 550; }
.inline-field .flat { appearance: none; -webkit-appearance: none; border-radius: 0; width: 100%; min-height: 48px; background: none; border: 0; padding: 0; color: var(--text); font-size: 16px; }
.inline-field .flat::placeholder { color: var(--mute); }
.inline-field textarea.flat { padding: 12px 0; resize: none; line-height: 1.45; overflow: hidden; min-height: 60px; }
.inline-field select.flat { appearance: none; -webkit-appearance: none; }
.inline-field .with { display: flex; align-items: center; gap: 4px; }
.inline-field .with .flat { flex: 1; min-width: 0; }
.inline-field.saved > span { color: var(--green); }
.search { position: relative; }
.search .ico { position: absolute; left: 14px; top: 50%; margin-top: -9px; color: var(--mute); pointer-events: none; }
.search .input { padding-left: 42px; }
.search .clear { position: absolute; right: 2px; top: 2px; }
.switch { position: relative; width: 48px; height: 28px; border-radius: 999px; background: var(--surface3); border: 1px solid var(--line2); transition: background 150ms; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 160ms var(--ease); }
.switch[aria-checked="true"] { background: var(--rose); border-color: var(--rose); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.switch-row > div { min-width: 0; }
.switch-row strong { display: block; font-size: 16px; font-weight: 650; }
.switch-row small { display: block; font-size: 13px; color: var(--sec); }
.seg { display: inline-flex; background: var(--hover); border: 1px solid var(--line); border-radius: var(--r9); padding: 2px; }
.seg button { min-height: 40px; padding: 0 12px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--sec); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.seg button .ico { width: 15px; height: 15px; }
.seg button.on { background: var(--white-btn); color: var(--white-btn-text); }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; padding: 0 6px; min-width: 0; }
.split-list .seg.wide button { font-size: 13.5px; padding: 0 4px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line2); color: var(--sec); font-size: 14px; font-weight: 550; white-space: nowrap; flex: none; }
.chip .ico { width: 14px; height: 14px; }
.chip.on { background: var(--white-btn); color: var(--white-btn-text); border-color: var(--white-btn); }
.chip.on .ico { color: var(--white-btn-text); }
.chip.set { border-color: rgba(109,179,242,.6); color: var(--text); }
.chip.day { width: 42px; padding: 0; justify-content: center; font-family: var(--disp); font-size: 11.5px; }
.chip b { font-family: var(--disp); font-size: 11.5px; font-weight: 400; color: var(--rose); }
.radio-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; padding: 0 2px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 550; color: var(--sec); text-align: left; }
.radio-list button.on { color: var(--text); font-weight: 650; }
.radio-list button .ico { color: var(--rose); }

/* ---------- rangées (listes sur lignes fines, jamais de cartes) ---------- */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); }
.row.tap { cursor: pointer; }
@media (hover: hover) { .row.tap:hover { background: var(--hover); } }
.row.on { background: rgba(255,209,102,.08); }
.row.cur { background: var(--on-row); }
.row.kb-cur { box-shadow: inset 3px 0 0 var(--violet); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row .s.wrap { white-space: normal; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.row .side time, .row time { font-family: var(--disp); font-size: 11.5px; color: var(--mute); }
.row .side .v { font-size: 13px; color: var(--mute); }
.row .chev { color: var(--mute); width: 16px; height: 16px; flex: none; }
.row .ico.lead { width: 18px; height: 18px; color: var(--sec); }
.row .val { font-size: 13px; color: var(--mute); text-align: right; flex: none; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .val.ok { color: var(--green); }
.row .val.warn { color: var(--amber); }
.row .val.err { color: var(--red); }
.row.compact { min-height: 48px; padding: 7px 0; }
.row.compact .t { font-size: 15px; font-weight: 550; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); font-size: 15px; }
.kv > span:first-child { color: var(--sec); }
.kv > span:last-child { font-weight: 600; text-align: right; }
.kv .num { font-size: 16px; }

/* ---------- pastilles (badges chuchotés) ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-family: var(--disp); font-size: 11.5px; white-space: nowrap; border: 1px solid; }
.pill.sec { color: var(--sec); border-color: rgba(157,151,176,.45); background: rgba(157,151,176,.12); }
.pill.mute { color: var(--mute); border-color: rgba(111,106,133,.5); background: rgba(111,106,133,.14); }
.pill.rose { color: var(--rose); border-color: rgba(255,209,102,.45); background: rgba(255,209,102,.14); }
.pill.violet { color: var(--violet); border-color: rgba(109,179,242,.5); background: rgba(109,179,242,.14); }
.pill.amber { color: var(--amber); border-color: rgba(255,159,69,.45); background: rgba(255,159,69,.14); }
.pill.green { color: var(--green); border-color: rgba(95,211,154,.45); background: rgba(95,211,154,.14); }
.pill.red { color: var(--red); border-color: rgba(255,123,107,.5); background: rgba(255,123,107,.14); }
.pill.lg { height: 24px; padding: 0 10px; font-size: 9.5px; }
html[data-theme="light"] .pill.amber { color: #9a6200; }
html[data-theme="light"] .pill.green { color: #137a3c; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.hdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--mute); box-shadow: 0 0 0 3px rgba(111,106,133,.18); }
.hdot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(95,211,154,.22); }
.hdot.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(255,159,69,.22); }
.hdot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(255,123,107,.22); }
.hdot.off { background: var(--mute); opacity: .7; }

/* ---------- avatar ---------- */
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--av-bg); border: 1px solid var(--line2); display: inline-flex; align-items: center; justify-content: center; font-family: var(--disp); font-size: 13px; font-weight: 400; color: var(--text); flex: none; position: relative; }
.av.unread::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1.5px solid var(--rose); }
.av.sm { width: 32px; height: 32px; font-size: 11px; }
.av.xs { width: 28px; height: 28px; font-size: 10px; border: 2px solid var(--bg); }
.av.lg { width: 48px; height: 48px; font-size: 16px; }

/* ---------- carte d'objet (uniquement les objets : proposition, carte IA, élément à faire) ---------- */
.card { position: relative; background: var(--surface); border-radius: var(--r17); padding: 14px 16px 14px 18px; overflow: hidden; border: 1px solid var(--line); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #FFD166, #6DB3F2); }
.card + .card { margin-top: 10px; }
.card .ct { font-size: 17px; font-weight: 650; }
.card .cs { font-size: 13px; color: var(--sec); margin-top: 2px; }
.card p { margin: 10px 0 0; font-size: 15px; color: var(--text); line-height: 1.5; }
.card .list { margin: 8px 0 0; padding: 0; list-style: none; }
.card .list li { font-size: 15px; padding: 3px 0 3px 16px; position: relative; line-height: 1.45; }
.card .list li::before { content: "✦"; position: absolute; left: 0; top: 4px; font-size: 9px; color: var(--amber); }
.card .list li.rose::before { color: var(--rose); }
.card .foot { display: flex; gap: 10px; margin-top: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
.card .acts { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; flex-wrap: wrap; }
.card.on { border-color: rgba(109,179,242,.5); }
.conf { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.conf i { width: 4px; background: var(--line2); border-radius: 1px; }
.conf i.on { background: var(--violet); }

/* ---------- héros (chiffres) ---------- */
.heroes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hero { padding: 16px 0 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.hero:nth-last-child(-n+2) { border-bottom: 0; }
.hero .n { font-family: var(--disp); font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 6px; }
.hero .n small { font-family: var(--disp); font-size: 11px; color: var(--mute); font-weight: 400; letter-spacing: 0; }
.hero .l { font-size: 13px; color: var(--sec); margin-top: 7px; font-weight: 550; }
.hero.rose .n { color: var(--rose); }
.hero.green .n { color: var(--green); }
.hero.amber .n { color: var(--amber); }
.bar { height: 4px; border-radius: 2px; background: var(--line2); margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--rose); border-radius: 2px; transition: width 400ms var(--ease); }
.bar i.violet { background: var(--violet); }
.bar i.green { background: var(--green); }
@media (min-width: 1024px) { .heroes { grid-template-columns: repeat(4, 1fr); } .hero { border-bottom: 0; } .hero .n { font-size: 40px; } .heroes.six { grid-template-columns: repeat(6, 1fr); } }

/* graphes (petits multiples maison) */
.spark { display: grid; grid-template-columns: 100px 1fr 48px; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--line); }
.spark .nm { font-size: 14px; font-weight: 550; color: var(--sec); display: flex; align-items: center; gap: 8px; }
.spark svg { width: 100%; height: 36px; display: block; }
.spark .tot { font-family: var(--disp); font-size: 16px; text-align: right; }
.spark-axis { display: grid; grid-template-columns: 100px 1fr 48px; gap: 12px; }
.spark-axis svg { width: 100%; height: 14px; display: block; }
.spark-axis text { font-family: var(--disp); font-size: 11.5px; fill: var(--mute); }
.hbars { display: flex; flex-direction: column; gap: 0; }
.hbar { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 12px; min-height: 42px; border-bottom: 1px solid var(--line); font-size: 15px; }
.hbar .nm { color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .bar { margin: 0; height: 10px; border-radius: 5px; }
.hbar .bar i { border-radius: 5px; }
.hbar .n { font-family: var(--disp); font-size: 14px; text-align: right; }
.hbar.tap { cursor: pointer; }
.hbar.tap:hover { background: var(--hover); }
@media (max-width: 1023px) { .hbar { grid-template-columns: 110px 1fr 48px; } }
.stat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
.stat-grid > div { min-width: 0; }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* alertes */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.alert .ico { width: 18px; height: 18px; margin-top: 2px; }
.alert.warn .ico { color: var(--amber); }
.alert.error .ico { color: var(--red); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r14); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--sec); line-height: 1.5; margin: 10px 0; }
.notice .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--amber); }
.notice b { color: var(--text); font-weight: 650; }
.notice.err .ico { color: var(--red); }
.notice.ok .ico { color: var(--green); }
.notice.info .ico { color: var(--violet); }
.lock { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r14); background: var(--surface); border: 1px dashed var(--line2); font-size: 15px; color: var(--sec); margin: 10px 0; }
.lock .ico { width: 18px; height: 18px; color: var(--amber); }

/* ---------- états vides, squelettes ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; text-align: center; color: var(--sec); font-size: 15px; line-height: 1.5; }
.empty .ico { width: 22px; height: 22px; color: var(--mute); }
.empty .act { margin-top: 6px; }
.empty.left { align-items: flex-start; text-align: left; padding: 24px 0; }
.empty.tall { padding: 80px 20px; }
.empty .h16 { color: var(--text); }
.skel { display: flex; flex-direction: column; gap: 0; }
.skel i { display: block; height: 56px; border-bottom: 1px solid var(--line); position: relative; }
.skel i::before { content: ""; position: absolute; left: 0; top: 18px; height: 11px; width: 55%; border-radius: 6px; background: var(--hover2); animation: pulse 1.2s ease-in-out infinite; }
.skel i::after { content: ""; position: absolute; left: 0; top: 36px; height: 8px; width: 30%; border-radius: 6px; background: var(--hover); animation: pulse 1.2s ease-in-out infinite; }
.skel.num i { height: 70px; border: 0; }
.skel.num i::before { height: 30px; width: 35%; }
@keyframes pulse { 50% { opacity: .5; } }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--rose); animation: spin 800ms linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 2px; background: var(--line2); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width 20s linear; }

/* ---------- feuille (bottom sheet) ---------- */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 20; opacity: 0; pointer-events: none; transition: opacity 180ms; }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--surface); border-radius: var(--r19) var(--r19) 0 0; max-height: 92dvh; overflow: auto; padding: 10px 18px calc(22px + var(--sab)); transform: translateY(100%); visibility: hidden; transition: transform 220ms var(--ease), visibility 0s linear 220ms; border: 1px solid var(--line); border-bottom: 0; }
.sheet.on { transform: translateY(0); visibility: visible; transition: transform 220ms var(--ease); }
.sheet .grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line2); margin: 0 auto 14px; }
.sheet .sheet-x { position: absolute; right: 8px; top: 10px; display: none; }
.sheet h2 { font-size: 17px; font-weight: 650; margin: 0 0 6px; padding-right: 36px; }
.sheet .sub { color: var(--sec); font-size: 15px; margin: 0 0 14px; }
.sheet .btnrow { margin-top: 18px; }
.sheet .menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 650; text-align: left; color: var(--text); }
.sheet .menu button .ico { width: 18px; height: 18px; color: var(--sec); }
.sheet .menu button > span:not(.nb) { flex: 1; }
.sheet .menu button .nb { margin-left: auto; }
.sheet .menu button.danger { color: var(--red); }
.sheet .menu button.danger .ico { color: var(--red); }
.sheet .menu button:last-child { border-bottom: 0; }
.sheet .lbl { margin-top: 16px; }
@media (min-width: 1024px) {
  .sheet { left: 50%; right: auto; width: 540px; margin-left: -270px; bottom: auto; top: 50%; transform: translate(0, -46%); border-radius: var(--r19); opacity: 0; transition: opacity 160ms, transform 200ms var(--ease), visibility 0s linear 200ms; max-height: 86vh; padding: 22px 24px 24px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .sheet.wide { width: 760px; margin-left: -380px; }
  .sheet.on { transform: translate(0, -50%); opacity: 1; }
  .sheet .grip { display: none; }
  .sheet .sheet-x { display: inline-flex; right: 12px; top: 14px; }
}

/* ---------- toast ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tab-h) + var(--sab) + 14px); z-index: 70; background: var(--surface); color: var(--text); padding: 13px 16px 13px 18px; border-radius: var(--r14); font-size: 15px; font-weight: 550; opacity: 0; transform: translateY(8px); transition: opacity 160ms, transform 160ms var(--ease); pointer-events: none; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.toast::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, #FFD166, #6DB3F2); }
.toast.on { opacity: 1; transform: none; }
@media (min-width: 1024px) { .toast { left: auto; right: 24px; bottom: 24px; width: 380px; } }

/* ---------- page : en-tête de section avec action ---------- */
.sect-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sect-h .lbl { flex: 1; }
.sect-h .lbl::after { display: none; }
.sect-h .lbl { margin-bottom: 6px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 10px; }
.page-head h1 { font-size: 17px; font-weight: 650; margin: 0; }
.page-head .acts { display: flex; gap: 6px; }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; }
.more { display: flex; justify-content: center; padding: 10px 0 0; }
.count { font-size: 13px; color: var(--mute); margin: 8px 0 0; }
.hint { font-size: 13px; color: var(--mute); }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
.two > .col { min-width: 0; }
@media (min-width: 1024px) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.two.sticky > .col.aside { position: sticky; top: calc(var(--top-h) + 20px); align-self: start; }
@media (max-width: 1023px) { .two.sticky > .col.aside { position: static; } }

/* ---------- vue maître-détail ---------- */
.split { --split-w: 380px; }
.split-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--mute); font-size: 15px; text-align: center; padding: 60px 20px; height: 100%; }
.split-empty .ico { width: 22px; height: 22px; }
@media (max-width: 1023px) {
  .split .split-detail { display: none; }
  .split.detail-on .split-list { display: none; }
  .split.detail-on .split-detail { display: block; }
  .split-empty { display: none; }
}
@media (min-width: 1024px) {
  .view .page.split { display: grid; grid-template-columns: var(--split-w) minmax(0, 1fr); gap: 0; height: calc(100dvh - var(--top-h) - 20px - 28px); margin: -4px 0 0; border: 1px solid var(--line); border-radius: var(--r17); overflow: hidden; background: var(--surface); }
  .split-list { overflow-y: auto; border-right: 1px solid var(--line); padding: 0 12px 24px; background: var(--bg); }
  .split-detail { overflow-y: auto; padding: 20px 28px 40px; min-width: 0; container-type: inline-size; }
  .split-detail .two { grid-template-columns: minmax(0, 1fr); }
  @container (min-width: 880px) { .split-detail .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
  .split-list .toolbar { position: sticky; top: 0; background: var(--bg); z-index: 2; padding: 12px 0 8px; margin: 0; }
  .split-list .rows .row, .split-list .conv-row { padding-left: 8px; padding-right: 8px; margin: 0 -8px; width: auto; border-radius: var(--r9); }
  /* liste large (tableau) : toute la largeur tant qu'aucun détail n'est ouvert, puis deux colonnes */
  .view .page.split.split-wide:not(.detail-on) { grid-template-columns: minmax(0, 1fr) 0; }
  .view .page.split.split-wide:not(.detail-on) .split-detail { display: none; }
  .view .page.split.split-wide:not(.detail-on) .split-list { border-right: 0; }
  .view .page.split.split-wide.detail-on { grid-template-columns: minmax(0, 1fr) minmax(460px, 1.05fr); }
  .split-list .tbl th { top: 0; }
}

/* ---------- tableau (ordinateur) ---------- */
.tbl-wrap { width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-family: var(--disp); font-size: 11.5px; color: var(--mute); font-weight: 400; padding: 10px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; position: sticky; top: calc(var(--top-h)); background: var(--bg); z-index: 1; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl th.on { color: var(--text); }
.tbl th .ico { width: 12px; height: 12px; margin-left: 4px; vertical-align: -2px; }
.tbl td { padding: 0 10px; height: 56px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.tbl td.nw { white-space: nowrap; }
.tbl td .t { font-weight: 650; }
.tbl td .s { font-size: 13px; color: var(--sec); }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th.chk, .tbl td.chk { width: 44px; padding: 0 4px; }
.tbl tr.tap { cursor: pointer; }
@media (hover: hover) { .tbl tbody tr:hover { background: var(--hover); } }
.tbl tbody tr.on { background: rgba(255,209,102,.08); }
.tbl tbody tr.cur { background: var(--on-row); }
.tbl tbody tr.kb-cur { box-shadow: inset 3px 0 0 var(--violet); }
.tbl td time { font-family: var(--disp); font-size: 11.5px; color: var(--mute); }
.tbl-rows .row .chkbox { margin-left: -8px; }
.tbl-rows:not(.selecting) .row .chkbox { display: none; }
.bulk { position: sticky; bottom: calc(var(--tab-h) + var(--sab) + 8px); z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; margin-top: 12px; border-radius: var(--r14); background: var(--surface); border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 15px; }
.bulk strong { font-family: var(--disp); font-size: 13px; margin-right: 6px; }
.bulk .btn { min-height: 40px; }
@media (min-width: 1024px) { .bulk { bottom: 16px; } }

/* ---------- entreprises ---------- */
.org-head { padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
.org-head .h1row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.org-head h1 { font-size: 22px; font-weight: 650; margin: 0; line-height: 1.2; font-family: var(--disp); flex: 1; min-width: 0; word-break: break-word; }
.org-head .h1row .ibtn { margin: -4px -8px 0 0; }
.org-head .st { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.org-head .st select { width: auto; min-height: 40px; padding: 6px 34px 6px 12px; border-radius: var(--r9); font-size: 14px; font-weight: 600; }
.tagline { display: flex; gap: 6px; flex-wrap: wrap; }
.histo { display: flex; flex-direction: column; gap: 8px; }
.bub { display: block; text-align: left; max-width: 86%; padding: 10px 13px; border-radius: var(--r14); font-size: 15px; line-height: 1.45; position: relative; white-space: pre-wrap; word-break: break-word; color: var(--text); }
.bub.in { align-self: flex-start; background: var(--bubble-in); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bub.out { align-self: flex-end; background: var(--bubble-out); border-bottom-right-radius: 4px; }
.bub time { display: block; font-family: var(--disp); font-size: 11.5px; color: var(--mute); margin-top: 5px; text-align: right; }
.bub .subj { font-size: 13px; font-weight: 650; color: var(--sec); margin-bottom: 4px; }
.bub.err { border: 1px solid rgba(255,123,107,.4); }
.bub .st { font-family: var(--disp); font-size: 11.5px; color: var(--red); margin-top: 4px; }
.day-sep { display: flex; align-items: center; gap: 10px; font-family: var(--disp); font-size: 11.5px; color: var(--mute); margin: 8px 0; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.map-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.map-table th { text-align: left; font-family: var(--disp); font-size: 11.5px; color: var(--mute); font-weight: 400; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.map-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.map-table td.col { font-weight: 650; }
.map-table td.ex { color: var(--mute); font-size: 13px; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-table select { min-height: 40px; padding: 4px 30px 4px 10px; border-radius: var(--r9); font-size: 14px; width: 100%; background: var(--surface2); border: 1px solid var(--line2); color: var(--text); appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sec) 50%), linear-gradient(135deg, var(--sec) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.summary { display: flex; gap: 18px; padding: 14px 0; }
.summary div { display: flex; flex-direction: column; gap: 4px; }
.summary .n { font-family: var(--disp); font-size: 26px; font-weight: 600; line-height: 1; }
.summary small { font-size: 13px; color: var(--sec); }

/* ---------- boîte (classes v2 gardées pour boite.js) ---------- */
.conv-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; color: var(--text); }
@media (hover: hover) { .conv-row:hover { background: var(--hover); } }
.conv-row.on { background: rgba(255,209,102,.08); }
.conv-row.cur { background: var(--on-row); }
.conv-row.kb-cur { box-shadow: inset 3px 0 0 var(--violet); }
.conv-row .main { flex: 1; min-width: 0; }
.conv-row .l1 { display: flex; align-items: baseline; gap: 8px; }
.conv-row .l1 strong { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row .l1 time { font-family: var(--disp); font-size: 11.5px; color: var(--mute); flex: none; }
.conv-row .l2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.conv-row .l2 .pv { flex: 1; min-width: 0; font-size: 14px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row .l2 .subj { font-size: 13px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row.unread .l1 strong { color: var(--text); }
.conv-row.unread .l1 time { color: var(--rose); }
.conv-row.unread .l2 .pv { color: var(--text); font-weight: 550; }
.conv-row .out { color: var(--mute); }
.conv-row .out .ico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 3px; }
.thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.ai-card .ct { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.ai-card .ct .ico { width: 15px; height: 15px; color: var(--sec); }
.ai-card .sum { font-size: 16px; line-height: 1.5; margin-top: 8px; }
.ai-card .lbl { margin: 12px 0 4px; }
.composer { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.composer .to { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sec); min-height: 32px; }
.composer .to b { color: var(--text); font-weight: 650; }
.composer textarea.input { min-height: 140px; font-size: 16px; margin-top: 8px; }
.composer .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.composer .send { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.composer .send .grad { flex: 1; }
.composer .to { flex-wrap: wrap; row-gap: 0; }
.composer .to .subj { width: 100%; font-size: 13px; color: var(--mute); padding-left: 26px; }
.confirm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 48px; padding: 8px 12px; border-radius: var(--r14); background: var(--surface2); font-size: 15px; margin-top: 10px; }
.confirm b { font-weight: 650; }
.confirm .btn { min-height: 38px; }
.unknown { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r14); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--sec); margin-bottom: 12px; }
.unknown .ico { color: var(--amber); width: 16px; height: 16px; }
.unknown .btn { margin-left: auto; }
.sync { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mute); }
.conv-head { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.conv-head .av { width: 44px; height: 44px; }
.conv-head .who { flex: 1; min-width: 0; }
.conv-head .who strong { display: block; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-head .who small { display: block; font-size: 13px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- campagne ---------- */
.state-line { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.state-line .big { font-family: var(--disp); font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.state-line .big .dot { width: 9px; height: 9px; }
.state-line .meta { flex: 1; }
.vars { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.vars button { min-height: 32px; padding: 0 9px; border-radius: 6px; background: rgba(109,179,242,.14); border: 1px solid rgba(109,179,242,.45); color: var(--violet); font-family: var(--disp); font-size: 11.5px; }
.ramp { display: flex; align-items: center; gap: 8px; font-family: var(--disp); font-size: 13px; }
.ramp i { color: var(--mute); font-style: normal; font-size: 11px; }
.ramp small { font-family: var(--ui); font-size: 13px; color: var(--mute); margin-left: 6px; }
.mailframe { width: 100%; height: 420px; border: 0; border-radius: var(--r14); background: #fff; display: block; }
.mailwrap { border-radius: var(--r14); overflow: hidden; background: #fff; margin-top: 10px; border: 1px solid var(--line); }
.mailwrap .mh { padding: 12px 16px; background: #f5f4f8; color: #1b1526; font-size: 14px; border-bottom: 1px solid #e6e3ee; }
.mailwrap .mh b { display: block; font-size: 15px; }
.mailwrap.live .mailframe { height: 560px; }
.logrow { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow time { font-family: var(--disp); font-size: 11.5px; color: var(--mute); width: 76px; flex: none; }
.logrow .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logrow .nm small { display: block; font-size: 12px; color: var(--red); white-space: normal; }
.logrow .dot { width: 7px; height: 7px; }
.logrow .k { font-size: 12px; color: var(--mute); }
.logrow.wrap .nm { white-space: normal; }
.bigswitch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bigswitch .l strong { display: block; font-size: 17px; font-weight: 650; }
.bigswitch .l small { display: block; font-size: 13px; color: var(--sec); margin-top: 2px; }

/* ---------- Léa ---------- */
.lea-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); }
.lea-head .av { width: 48px; height: 48px; font-size: 16px; }
.lea-head .who { flex: 1; min-width: 0; }
.lea-head .who strong { display: block; font-size: 17px; font-weight: 650; }
.lea-head .who small { display: block; font-size: 13px; color: var(--sec); margin-top: 2px; line-height: 1.45; }
.searching { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--sec); margin-top: 10px; }

/* ---------- console ---------- */
.console-wrap { position: fixed; left: 0; right: 0; top: calc(var(--top-h) + var(--sat)); bottom: calc(var(--tab-h) + var(--sab)); background: var(--bg); }
.console-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.console-wrap .fail { position: absolute; inset: 0; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--sec); font-size: 15px; }
.console-wrap .fail .ico { width: 20px; height: 20px; color: var(--mute); }
.console-wrap .wait { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); animation: slide 1.4s var(--ease) infinite; transform-origin: left; }
@keyframes slide { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
@media (min-width: 1024px) { .console-wrap { left: var(--side-w); bottom: 0; } }

/* ---------- équipe, santé ---------- */
.status-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.status-row .ico { width: 18px; height: 18px; color: var(--sec); }
.status-row .main { flex: 1; min-width: 0; }
.status-row .main strong { display: block; font-size: 16px; font-weight: 650; }
.status-row .main small { display: block; font-size: 13px; color: var(--sec); line-height: 1.4; }
.status-row .ok { color: var(--green); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-row .ko { color: var(--amber); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-row .bad { color: var(--red); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status-row .hdot { margin-right: 2px; }
.status-row .ms { font-family: var(--disp); font-size: 11px; color: var(--mute); white-space: nowrap; }
html[data-theme="light"] .status-row .ok { color: #137a3c; }
html[data-theme="light"] .status-row .ko { color: #9a6200; }
.health-sum { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.health-sum .big { font-family: var(--disp); font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.health-sum .big .hdot { width: 16px; height: 16px; }
.health-sum .meta { flex: 1; }
@media (max-width: 1023px) { .health-sum { flex-direction: column; align-items: flex-start; gap: 6px; } }
.soon { padding: 12px 0; border-bottom: 1px solid var(--line); }
.soon strong { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.soon ul { margin: 8px 0 0; padding: 0; list-style: none; }
.soon li { font-size: 14px; color: var(--sec); padding: 3px 0 3px 16px; position: relative; }
.soon li::before { content: "✦"; position: absolute; left: 0; top: 4px; font-size: 9px; color: var(--rose); }
.version { font-family: var(--disp); font-size: 11.5px; color: var(--mute); text-align: center; padding: 24px 0 8px; }
.steps { margin: 8px 0 0; padding-left: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 8px 0 8px 40px; font-size: 15px; line-height: 1.5; border-bottom: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line2); font-family: var(--disp); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.steps li b { font-weight: 650; }
.steps code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--kbd-bg); padding: 2px 6px; border-radius: 6px; }
pre.code { white-space: pre-wrap; word-break: break-word; padding: 12px 14px; border-radius: var(--r14); margin: 8px 0; line-height: 1.5; max-height: 320px; overflow: auto; border: 1px solid var(--line); }
.err-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.err-row .l1 { display: flex; gap: 10px; align-items: baseline; }
.err-row .l1 b { font-weight: 650; flex: 1; min-width: 0; word-break: break-word; }
.err-row time { font-family: var(--disp); font-size: 11.5px; color: var(--mute); flex: none; }
.err-row .l2 { font-size: 13px; color: var(--mute); margin-top: 2px; }

/* ---------- retours ---------- */
.fb-row { display: flex; gap: 12px; align-items: flex-start; }
.fb-row .ico.lead { margin-top: 10px; }
.fb-type { color: var(--sec); }
.fb-type.bug { color: var(--red); } .fb-type.idee { color: var(--amber); } .fb-type.question { color: var(--violet); }
.fb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.fb-head .seg { margin-left: auto; }
.fb-text { font-size: 16px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; padding: 14px 0; }
.fb-ctx { font-size: 13px; color: var(--sec); display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; padding: 8px 0; }
.fb-ctx b { color: var(--mute); font-weight: 550; }
.fb-reply { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.fb-reply .av { width: 30px; height: 30px; font-size: 10px; }
.fb-reply .who { font-size: 13px; color: var(--mute); }
.fb-reply .tx { white-space: pre-wrap; word-break: break-word; }

/* ---------- WhatsApp ---------- */
.wa-thread { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 16px; }
.wa-thread .bub { max-width: 78%; }
.wa-thread .bub.out { background: var(--bubble-out); }
.wa-thread .bub .ticks { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: -2px; color: var(--mute); }
.wa-thread .bub .ticks .ico { width: 12px; height: 12px; }
.wa-thread .bub .ticks.read { color: var(--violet); }
.wa-compose { position: sticky; bottom: calc(var(--tab-h) + var(--sab)); background: var(--surface); padding: 10px 0 10px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-end; }
.wa-compose textarea.input { flex: 1; min-height: 48px; max-height: 160px; }
.wa-compose .btn { min-width: 48px; padding: 0 14px; }
@media (min-width: 1024px) { .wa-compose { bottom: 0; } }
.wa-setup { max-width: 720px; }
.cost { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cost .n { font-family: var(--disp); font-size: 22px; min-width: 110px; }
.cost small { color: var(--sec); font-size: 13px; display: block; }

/* ---------- impression ---------- */
@media print {
  html, body { background: #fff; color: #000; }
  .top, .tabbar, .sidebar, .helpbar, .sheet, .sheet-bg, .toast, .top-report, .presence, .bulk { display: none !important; }
  .view { margin: 0; padding: 0; max-width: none; }
  .view .page.split { display: block; height: auto; border: 0; }
  .split-list { display: none; }
  .row, .kv, .tbl td, .status-row { border-color: #ddd; }
  a { color: #000; text-decoration: none; }
  .btn, .ibtn { display: none !important; }
}

/* v12 — dossiers de la barre latérale : une entrée « à part » au-dessus des sous-entrées (Prospection › Réponses), avec le compteur
   carré-adouci rose (.nb) quand il y a des réponses à traiter ; la même chose dans le menu « Plus » du téléphone */
.side-top { display: flex; flex-direction: column; margin: 0 0 2px 22px; padding-left: 8px; border-left: 1px solid var(--line); }
.side-nav .side-top button { height: auto; min-height: 32px; padding: 5px 8px; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.25; align-items: center; color: var(--text); }
.side-nav .side-top button > span:not(.nb) { white-space: normal; overflow: visible; text-overflow: clip; }
.side-nav .side-top button.on { font-weight: 650; background: var(--hover); }
.side-nav .side-top button.on::before { left: -11px; }
.side-nav .side-top .nb { min-width: 18px; height: 18px; line-height: 16px; padding: 0 5px; font-size: 9.5px; }
.side-top + .side-subs { padding-top: 4px; }
.sheet .menu .menu-top { display: flex; flex-direction: column; padding: 0 0 0 30px; }
.sheet .menu .menu-top button { min-height: 44px; font-size: 15px; font-weight: 650; color: var(--text); border-bottom: 1px solid var(--line); }
.sheet .menu .menu-top b.side-n { font-size: 10px; }
.sheet .menu .menu-top .nb { margin-left: auto; }
.ml-replink { color: var(--rose); }
.s b.pend{color:#ffb020;font-weight:650}

/* v12.1 : changer de compte */
.side-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; padding: 4px; margin: -4px; border-radius: 9px; color: inherit; }
.side-who:hover { background: rgba(255,255,255,0.04); }
.side-who > div { flex: 1; min-width: 0; }
.acc-list { display: flex; flex-direction: column; margin-bottom: 8px; }
.acc-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); padding: 6px 2px; }
.acc-row > span:not(.av) { flex: 1; min-width: 0; }
.acc-row > .av { flex: 0 0 34px; width: 34px; height: 34px; font-size: 12px; }
.acc-row strong { display: block; font-size: 15px; font-weight: 650; }
.acc-row small { display: block; font-size: 12px; color: var(--mute); }
.acc-row.on small { color: var(--green, #2fd66f); }
.acc-row.pend small { color: #ffb020; }
.acc-row[disabled] { opacity: .55; }
.acc-row .ico { width: 17px; height: 17px; color: var(--sec); }
.login-who { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* ---------- v13 : Équipe & réglages (rôles, comptes bloqués, limites d'envoi) et compte « Démarchage » ---------- */
.eq-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 640px) { .sect-h { flex-wrap: wrap; row-gap: 4px; } .sect-h > .eq-acts { order: 2; flex: 1 0 100%; justify-content: flex-start; } .sect-h > .eq-acts .btn { flex: 1 1 auto; } } /* v13 : sur téléphone, les deux boutons sous « Comptes » */
.row.blocked .t, .row.blocked .av { opacity: .55; }
.blk { color: var(--red); font-weight: 650; }
.acc-row.blocked { opacity: .5; }
.caps { padding: 12px 14px; border-radius: var(--r14); border: 1px solid var(--line); background: var(--surface); }
.caps.on { border-color: rgba(255,159,69,.45); }
.caps-state { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 14px; line-height: 1.5; color: var(--sec); }
.caps-state .ico { width: 17px; height: 17px; margin-top: 2px; color: var(--green); flex: none; }
.caps.on .caps-state .ico { color: var(--amber); }
.caps-state b { color: var(--text); font-weight: 650; }
.caps-opt { margin-top: 10px; border-top: 1px solid var(--line); }
.caps-opt summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--sec); list-style: none; }
.caps-opt summary::-webkit-details-marker { display: none; }
.caps-opt summary .ico { width: 15px; height: 15px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr; } }
/* v13 : sur téléphone, les boutons d'un compte (code, rôle, bloquer, retirer) passent sous le nom : le prénom, le rôle et l'état restent lisibles */
@media (max-width: 640px) {
  #uList .row { flex-wrap: wrap; row-gap: 2px; }
  #uList .row .main { flex: 1 1 calc(100% - 52px); }
  #uList .row .main + .ibtn, #uList .row .main + .btn { margin-left: 34px; }
}
