:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #475467;
  --text-3: #98a2b3;
  --accent: #2f4bdc;
  --accent-hover: #2440c4;
  --accent-soft: #eef1fd;
  --side: #0d1424;
  --side-2: #151e33;
  --side-text: #c3cad9;
  --side-muted: #6b7690;
  --ok: #079455;
  --ok-soft: #ecfdf3;
  --warn: #dc6803;
  --warn-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --info: #1570ef;
  --info-soft: #eff8ff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .25);
  font-family: Inter, Heebo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- structure ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--side-muted); letter-spacing: .02em; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: var(--side-2); text-decoration: none; color: #fff; }
.nav a.active { background: var(--side-2); color: #fff; box-shadow: inset 2px 0 0 #6d84ff; }
.nav a .count { margin-left: auto; background: #26304a; color: #dfe4f0; border-radius: 99px; font-size: 11px; padding: 1px 8px; font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid #1f2a42; padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.me:hover { background: var(--side-2); }
.me .who { line-height: 1.25; min-width: 0; }
.me .who b { color: #fff; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; color: var(--side-muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #2a3654; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top h1 { font-size: 18px; font-weight: 600; }
.top .sub { color: var(--text-3); font-size: 13px; }
.top .spacer { flex: 1; }
.burger { display: none; }
.page { padding: 24px 28px 48px; max-width: 1440px; width: 100%; }

/* ---------- éléments ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg.i { width: 16px; height: 16px; }

.input, select.input, textarea.input { height: 38px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 12px; background: var(--surface); outline: none; box-shadow: var(--shadow); min-width: 0; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; line-height: 1.45; }
.input:focus { border-color: #8ea0f5; box-shadow: 0 0 0 4px #e6eafd; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 10px; color: var(--text-3); }
.search .input { padding-left: 36px; width: 280px; }
label.field { display: grid; gap: 6px; font-weight: 500; font-size: 13px; color: var(--text-2); }
.check { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-weight: 500; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-h h2 { font-size: 15px; font-weight: 600; }
.card-h .hint { color: var(--text-3); font-size: 13px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 20px; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.kpi { padding: 18px 20px; }
.kpi .lbl { color: var(--text-2); font-weight: 500; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .lbl svg { color: var(--text-3); width: 16px; height: 16px; }
.kpi .val { font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .foot { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.cols-2 { grid-template-columns: 1.6fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f2f4f7; color: #344054; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.nouveau { background: #f2f4f7; color: #475467; }
.pill.injoignable { background: var(--warn-soft); color: #b54708; }
.pill.a_rappeler { background: var(--info-soft); color: #175cd3; }
.pill.interesse { background: var(--ok-soft); color: #067647; }
.pill.rdv { background: #f0fdf9; color: #107569; }
.pill.client { background: #067647; color: #fff; }
.pill.pas_interesse { background: #fef3f2; color: #b42318; }
.pill.ne_plus_appeler { background: #b42318; color: #fff; }
.pill.a_un_site { background: #f2f4f7; color: #98a2b3; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.tag.mob { background: #f4f3ff; border-color: #e0dcff; color: #5925dc; }
.tag.soc { background: #eff8ff; border-color: #d1e9ff; color: #175cd3; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- tableau ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.t td { padding: 12px 16px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover { background: #fafbfc; }
.t tr:last-child td { border-bottom: 0; }
.t .name { font-weight: 600; }
.t .cat { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.score { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.score .bar { width: 46px; height: 6px; border-radius: 99px; background: #eaecf0; overflow: hidden; }
.score .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--text-2); }
.pager .spacer { flex: 1; }
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

/* ---------- graphiques ---------- */
.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 16px; color: var(--text-2); font-size: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.hbar .row { grid-column: 1 / -1; display: grid; grid-template-columns: 130px 1fr 54px; gap: 12px; align-items: center; }
.hbar .track { height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.hbar .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 11px 20px; border-bottom: 1px solid #eef0f3; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; }
.feed .txt { flex: 1; min-width: 0; line-height: 1.45; }
.feed .when { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.progress { height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #2f4bdc, #6d84ff); border-radius: 99px; }
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--ok); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(7, 148, 85, .5); animation: pulse 1.8s infinite; }
.live.paused { color: var(--text-3); }
.live.paused::before { background: var(--text-3); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(7, 148, 85, .45); } 70% { box-shadow: 0 0 0 8px rgba(7, 148, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(7, 148, 85, 0); } }

/* ---------- session d'appels ---------- */
.call-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.call-card .head { padding: 24px 28px; border-bottom: 1px solid var(--border); display: flex; gap: 20px; align-items: flex-start; }
.call-card .head h2 { font-size: 24px; font-weight: 700; }
.call-card .meta { color: var(--text-2); margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.phone-big { font-size: 30px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.dial { display: flex; align-items: center; gap: 18px; padding: 22px 28px; background: linear-gradient(180deg, #f7f8ff, #fff); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.outcomes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.outcome { height: auto; min-height: 56px; flex-direction: column; gap: 2px; font-size: 13px; }
.outcome small { font-weight: 500; color: var(--text-3); font-size: 11px; }
.outcome.sel { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px #e3e8fd; }
.script { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 14px 16px; line-height: 1.6; color: var(--text-2); }
.script b { color: var(--text); }
.kbd { font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--text-3); font-weight: 600; }
.section-t { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }

/* ---------- panneau latéral ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 20, 36, .35); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; background: var(--surface); z-index: 41; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease-out; }
.drawer .d-h { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer .d-h h2 { font-size: 19px; }
.drawer .d-b { padding: 20px 24px; overflow-y: auto; flex: 1; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 14px; margin-bottom: 22px; }
.kv dt { color: var(--text-3); font-weight: 500; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--border-strong); }
.timeline li.call::before { border-color: var(--accent); }
.timeline .note { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin-top: 6px; white-space: pre-wrap; color: var(--text-2); }
.modal { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: 460px; max-width: calc(100vw - 32px); background: var(--surface); border-radius: 14px; z-index: 51; box-shadow: var(--shadow-lg); animation: pop .16s ease-out; }
.modal .m-h { padding: 20px 24px 0; }
.modal .m-h h2 { font-size: 17px; }
.modal .m-h p { color: var(--text-2); margin: 6px 0 0; }
.modal .m-b { padding: 18px 24px; display: grid; gap: 14px; }
.modal .m-f { padding: 14px 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.overlay.m { z-index: 50; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; text-align: center; letter-spacing: .05em; user-select: all; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, 8px); opacity: 0; } }

#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 60; display: grid; gap: 8px; }
.toast { background: #101828; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 500; max-width: 360px; animation: pop2 .2s; }
.toast.err { background: #b42318; }
@keyframes pop2 { from { transform: translateY(8px); opacity: 0; } }

/* ---------- connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 0% 0%, #1d2b55 0%, var(--side) 60%); color: #fff; padding: 48px; display: flex; flex-direction: column; }
.auth-art .brand { padding: 0; font-size: 18px; }
.auth-art h2 { font-size: 34px; line-height: 1.15; font-weight: 700; margin-top: auto; max-width: 460px; letter-spacing: -.02em; }
.auth-art p { color: #aab4cc; max-width: 440px; line-height: 1.6; font-size: 15px; }
.auth-art ul { list-style: none; padding: 0; margin: 26px 0 auto; display: grid; gap: 12px; color: #d4daea; }
.auth-art li { display: flex; gap: 10px; align-items: center; }
.auth-art li svg { color: #8ea0ff; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; background: var(--surface); }
.auth-form { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.auth-form form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.auth-form h1 { font-size: 24px; }
.auth-form p { color: var(--text-2); margin: -8px 0 6px; }
.err-msg { color: var(--danger); font-weight: 500; min-height: 18px; }

.loading { height: 3px; border-radius: 99px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: load 1s linear infinite; margin: 4px 0 20px; opacity: .7; }
@keyframes load { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ---------- langues ---------- */
.lang-switch { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.lang-switch button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-weight: 600; font-size: 12px; color: var(--text-2); cursor: pointer; min-width: 38px; }
.lang-switch button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.side-lang { margin-bottom: 10px; }
.side-lang .lang-switch { width: 100%; background: #151e33; border-color: #1f2a42; }
.side-lang .lang-switch button { flex: 1; color: var(--side-muted); }
.side-lang .lang-switch button.on { background: #26304a; color: #fff; box-shadow: none; }
.auth-form { position: relative; }
.auth-lang { position: absolute; top: calc(20px + env(safe-area-inset-top)); inset-inline-end: 20px; }
bdi[dir="ltr"] { unicode-bidi: isolate; }
.chart { direction: ltr; }

/* ---------- hébreu : lecture de droite à gauche ---------- */
html[lang="he"] { font-family: Heebo, Inter, system-ui, sans-serif; }
[dir="rtl"] .search svg { left: auto; right: 11px; }
[dir="rtl"] .search .input { padding-left: 12px; padding-right: 36px; }
[dir="rtl"] .nav a.active { box-shadow: inset -2px 0 0 #6d84ff; }
[dir="rtl"] .t th { text-align: right; }
[dir="rtl"] .hbar .n { text-align: left; }
[dir="rtl"] .drawer { right: auto; left: 0; animation-name: slide-rtl; }
[dir="rtl"] .timeline { border-left: 0; border-right: 2px solid var(--border); margin-left: 0; margin-right: 6px; }
[dir="rtl"] .timeline li { padding: 0 18px 16px 0; }
[dir="rtl"] .timeline li::before { left: auto; right: -7px; }
[dir="rtl"] #toasts { right: auto; left: 20px; }
[dir="rtl"] svg.i.flip { transform: scaleX(-1); }
[dir="rtl"] .section-t, [dir="rtl"] .nav-label { letter-spacing: 0; }
@keyframes slide-rtl { from { transform: translateX(-30px); opacity: 0; } }

/* ---------- application installée / mobile ---------- */
.install-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin-bottom: 8px; border-radius: 8px; color: #c9d2ff; font-weight: 600; background: #18234a; }
.install-link:hover { text-decoration: none; background: #1f2d5c; color: #fff; }
.install-link[hidden], .install-banner[hidden] { display: none; }
.install-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; }
.install-banner img { border-radius: 10px; flex: none; }
.filters-more { display: contents; }
.show-sm { display: none !important; }
.call-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.call-actions .spacer { flex: 1; }
.tabbar { display: none; }
.side-scrim { display: none; }
.auth-mobile-brand { display: none; }
@media (hover: none) { .kbd, .kbd-hint { display: none; } }

/* ---------- adaptatif ---------- */
@media (max-width: 1360px) {
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .call-layout { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .cols-3 > :last-child { grid-column: auto; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; z-index: 35; width: 280px; max-width: 85vw; transform: translateX(-105%); transition: transform .22s ease; padding-top: calc(18px + env(safe-area-inset-top)); padding-bottom: calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  [dir="rtl"] .side { left: auto; right: 0; transform: translateX(105%); }
  [dir="rtl"] .side.open { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 34; background: rgba(13, 20, 36, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .side-scrim.open { opacity: 1; pointer-events: auto; }
  .burger { display: inline-flex; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; color: var(--text); padding: 0 0 8px; }
  .auth-mobile-brand small { color: var(--text-3); }
  .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { font-size: 15px; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline-flex !important; }
  .input, select.input, textarea.input { font-size: 16px; } /* évite le zoom automatique d'iOS */

  /* barre du haut + onglets du bas, en tenant compte de l'encoche et de la barre système */
  .top { height: auto; min-height: 56px; padding: env(safe-area-inset-top) 12px 0; gap: 8px; background: var(--side); border-bottom: 0; color: #fff; }
  .top h1 { font-size: 17px; }
  .top .burger { color: #fff; }
  .top .burger:hover { background: var(--side-2); }
  .top .sub, .top .search, .top > .btn.primary { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 58px; color: var(--text-3); font-size: 11px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a svg.i { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--accent); }
  .tabbar a[data-nav="call"] svg.i { background: var(--accent); color: #fff; border-radius: 10px; padding: 5px; width: 32px; height: 32px; margin-top: -6px; box-shadow: 0 4px 12px rgba(47, 75, 220, .35); }
  .tabbar .dot { position: absolute; top: 9px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
  .page { padding: 12px 12px calc(84px + env(safe-area-inset-bottom)); }

  .grid { gap: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; }
  .kpis > :first-child { grid-column: 1 / -1; }
  .kpi { padding: 14px 16px; }
  .kpi .val { font-size: 24px; margin-top: 6px; }
  .card-h { padding: 14px 16px; flex-wrap: wrap; }
  .card-b { padding: 16px; }
  .legend { width: 100%; }
  .hbar .row { grid-template-columns: 110px 1fr 44px; }
  .feed li { padding: 11px 16px; }
  .t th, .t td { padding: 10px 12px; }

  /* filtres repliables */
  .toolbar { padding: 12px; gap: 8px; }
  .toolbar .grow { flex: 1; min-width: 0; }
  .search .input { width: 100%; }
  .filters-more { display: none; }
  .toolbar.open .filters-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .filters-more .spacer { display: none; }
  .filters-more .input { width: 100% !important; }
  .filters-more .btn { width: 100%; }

  /* liste des prospects en cartes */
  table.biz thead { display: none; }
  table.biz, table.biz tbody { display: block; }
  table.biz tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 14px; border-bottom: 1px solid #eef0f3; }
  table.biz td { display: block; padding: 0; border: 0; }
  table.biz td:nth-child(1) { grid-column: 1; grid-row: 1; }
  table.biz td:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; }
  table.biz td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--text-2); }
  table.biz td:nth-child(3) { grid-column: 2; grid-row: 2; justify-self: end; font-weight: 600; }
  table.biz td:nth-child(3) .tag { display: none; }

  /* tableaux d'administration empilés */
  table.stack thead { display: none; }
  table.stack, table.stack tbody { display: block; }
  table.stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid #eef0f3; }
  table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0; min-width: 0 !important; }
  table.stack td[data-label]::before { content: attr(data-label); color: var(--text-3); font-weight: 500; font-size: 13px; }
  table.stack td.full { display: block; }
  table.stack td.actions { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px; }
  table.stack td:first-child { padding-bottom: 8px; }

  /* session d'appels */
  .kbd-hint { display: none; }
  #cf { display: grid; grid-template-columns: 1fr 1fr; }
  #cf > span { display: none; }
  #cf .input { width: 100% !important; }
  #cf input { grid-column: 1 / -1; }
  .call-card .head { padding: 16px; gap: 12px; }
  .call-card .head h2 { font-size: 20px; }
  .dial { padding: 16px; gap: 12px; }
  .dial > .btn { flex: 1; }
  .phone-big { font-size: 26px; }
  .links { width: 100%; }
  .links .btn { flex: 1 1 calc(50% - 8px); }
  .outcome { min-height: 52px; }
  .call-actions { position: sticky; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 5; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); margin: 0 -16px; padding: 10px 16px; border-top: 1px solid var(--border); flex-wrap: nowrap; }
  .call-actions #save { flex: 1; }
  .call-fab { width: 46px; padding: 0; background: var(--ok); border-color: var(--ok); color: #fff; }

  /* fiche et fenêtres */
  .drawer { width: 100vw; padding-top: env(safe-area-inset-top); }
  .drawer .d-h { padding: 16px; }
  .drawer .d-b { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet .2s ease-out; max-height: 90vh; overflow-y: auto; }
  .modal .m-f { flex-wrap: wrap; }
  .modal .m-f .btn { flex: 1; }
  #toasts, [dir="rtl"] #toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .auth-lang { inset-inline-end: 12px; }
  .toast { max-width: none; }
  .auth-form { place-items: start center; padding-top: calc(40px + env(safe-area-inset-top)); }
}
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
