/* Noralead CRM — DA « Graphite & Champagne »
   Typo système Apple (SF Pro), surfaces calmes, une seule couleur d'accent, mode sombre automatique. */
:root {
  color-scheme: light dark;
  --bg: #F5F5F7;
  --side: #FBFBFD;
  --bar: rgba(245, 245, 247, 0.78);
  --surface: #FFFFFF;
  --surface-2: #FAFAFC;
  --field: #FFFFFF;
  --fill: rgba(0, 0, 0, 0.035);
  --fill-2: rgba(0, 0, 0, 0.06);
  --fill-3: rgba(0, 0, 0, 0.1);
  --line: rgba(0, 0, 0, 0.1);
  --line-soft: rgba(0, 0, 0, 0.06);
  --ink: #1D1D1F;
  --ink-2: #6E6E73;
  --ink-3: #86868B;
  --on-ink: #FFFFFF;
  --accent: #B08D57;
  --accent-text: #8A6A36;
  --accent-bg: #F4EEE3;
  --accent-ring: rgba(176, 141, 87, 0.28);
  --dark: linear-gradient(155deg, #2C2C2E 0%, #121213 100%);
  --on-dark: #F5F5F7;
  --on-dark-2: rgba(245, 245, 247, 0.6);
  --accent-on-dark: #D8BC8C;
  --ok: #1D7A4B; --ok-bg: #E7F3EC;
  --bad: #C4281C; --bad-bg: #FCECEA; --bad-line: rgba(196, 40, 28, 0.28);
  --warn: #935A00; --warn-bg: #FBF2E1;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
  --pop-shadow: 0 24px 64px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --code: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar: 236px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --side: #111112;
    --bar: rgba(0, 0, 0, 0.72);
    --surface: #1C1C1E;
    --surface-2: #232325;
    --field: #2C2C2E;
    --fill: rgba(255, 255, 255, 0.05);
    --fill-2: rgba(255, 255, 255, 0.09);
    --fill-3: rgba(255, 255, 255, 0.14);
    --line: rgba(255, 255, 255, 0.14);
    --line-soft: rgba(255, 255, 255, 0.08);
    --ink: #F5F5F7;
    --ink-2: #A1A1A6;
    --ink-3: #8E8E93;
    --on-ink: #000000;
    --accent: #C9A86E;
    --accent-text: #D8BC8C;
    --accent-bg: rgba(201, 168, 110, 0.15);
    --accent-ring: rgba(201, 168, 110, 0.35);
    --dark: linear-gradient(155deg, #2C2C2E 0%, #1A1A1B 100%);
    --ok: #4CD07D; --ok-bg: rgba(76, 208, 125, 0.14);
    --bad: #FF6B60; --bad-bg: rgba(255, 107, 96, 0.14); --bad-line: rgba(255, 107, 96, 0.35);
    --warn: #F5B34B; --warn-bg: rgba(245, 179, 75, 0.14);
    --card-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --pop-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.47; letter-spacing: -0.008em; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'tnum' 0; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.028em; } h2 { font-size: 21px; } h3 { font-size: 16px; letter-spacing: -0.012em; } h4 { font-size: 14px; letter-spacing: -0.006em; }
p { margin: 0 0 8px; }
.mono { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12.5px; color: var(--ink-2); font-weight: 500; letter-spacing: -0.003em; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
::selection { background: var(--accent-ring); }

/* ---------- Marque ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); padding: 4px 10px 22px; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(155deg, #3A3A3C, #0E0E0F); display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.12); }
.brand .mark svg { width: 17px; height: 17px; }
.brand .mark path { stroke: #D8BC8C; }
.auth .side .brand .mark path { stroke: #1D1D1F; }
.brand small { font-size: 12px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; margin-left: -4px; }
.brand.flat { padding: 0; }

/* ---------- Mise en page ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--side); border-right: 0.5px solid var(--line); padding: 22px 12px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; color: var(--ink-2); padding: 8px 10px; border-radius: 9px; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a svg { color: var(--ink-3); transition: color .15s; }
.nav a:hover { background: var(--fill); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--fill-2); color: var(--ink); }
.nav a.active svg { color: var(--accent-text); }
.nav .badge { margin-left: auto; }
.nav-sep { height: 0.5px; background: var(--line); margin: 10px 10px; }
.sidebar .foot { margin-top: auto; padding: 14px 10px 0; border-top: 0.5px solid var(--line); font-size: 12.5px; color: var(--ink-3); line-height: 1.5; }
.sidebar .foot b { color: var(--ink); font-weight: 600; display: block; font-size: 13.5px; }
.sidebar .foot a { color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; }
.sidebar .client-name { padding: 0 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink); }
main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 32px; border-bottom: 0.5px solid var(--line); background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); position: sticky; top: 0; z-index: 20; }
.page { padding: 32px 32px 72px; max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.tabbar { display: none; }

/* ---------- Composants ---------- */
.card { min-width: 0; background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--card-shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-head { padding: 18px 20px 0; }
a.card { color: inherit; transition: transform .15s, box-shadow .15s; }
a.card:hover { text-decoration: none; box-shadow: var(--card-shadow), 0 6px 20px rgba(0,0,0,.06); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.kpi .value { font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 15px; color: var(--ink-3); font-weight: 500; letter-spacing: -0.01em; }
.kpi .hint { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.kpi.strong { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.kpi.strong .eyebrow, .kpi.strong .hint { color: var(--on-dark-2); }
.kpi.strong .value { color: var(--accent-on-dark); }
.kpi.strong .value small { color: var(--on-dark-2); }

.progress { height: 6px; background: var(--fill-2); border-radius: 99px; overflow: hidden; margin-top: 12px; position: relative; }
.progress > span { display: block; height: 100%; background: var(--ink); border-radius: 99px; transition: width .4s ease; }
.progress.key > span { background: var(--accent); }
.progress.ok > span { background: var(--ok); }
.kpi.strong .progress { background: rgba(255,255,255,.14); }
.kpi.strong .progress > span { background: var(--accent-on-dark); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 500; font-size: 14px; letter-spacing: -0.01em; padding: 8px 16px; border-radius: 99px; border: 0.5px solid transparent; cursor: pointer; background: var(--fill-2); color: var(--ink); white-space: nowrap; transition: background .15s, opacity .15s, transform .08s; line-height: 1.25; }
.btn:hover { text-decoration: none; background: var(--fill-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { background: var(--ink); opacity: .86; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--fill); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.lg { padding: 12px 22px; font-size: 15.5px; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .kbd { font-size: 11px; opacity: .5; font-weight: 500; font-variant-numeric: tabular-nums; border: 0.5px solid currentColor; border-radius: 5px; padding: 0 4px; line-height: 1.4; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: inline-flex; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--fill-2); color: var(--ink); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--fill-2); color: var(--ink); white-space: nowrap; line-height: 1.6; letter-spacing: -0.003em; }
.chip.key { background: var(--accent-bg); color: var(--accent-text); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.grey { background: var(--fill); color: var(--ink-3); }
.chip.solid { background: var(--ink); color: var(--on-ink); }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 0.5px var(--line); }
.badge { display: inline-flex; min-width: 19px; height: 19px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 99px; background: var(--fill-3); color: var(--ink); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn.primary .badge { background: var(--on-ink); color: var(--ink); }
.badge.alert { background: var(--bad); color: #fff; }

.tabs { display: flex; gap: 18px; border-bottom: 0.5px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { font: inherit; font-size: 14.5px; background: none; border: 0; padding: 10px 0; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -0.5px; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: color .15s; }
.tabs a:hover, .tabs button:hover { color: var(--ink); text-decoration: none; }
.tabs .active { color: var(--ink); border-bottom-color: var(--ink); }
.tabs .count { font-size: 11px; font-weight: 600; background: var(--fill-2); padding: 1px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.tabs .active .count { background: var(--ink); color: var(--on-ink); }

/* ---------- Tableaux ---------- */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 10px 14px; border-bottom: 0.5px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t td { padding: 12px 14px; border-bottom: 0.5px solid var(--line-soft); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--fill); }
.t td .main { font-weight: 500; color: var(--ink); }
.t td .sub { font-size: 12.5px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty h3 { margin-bottom: 6px; }

/* ---------- Formulaires ---------- */
label.f { display: block; font-size: 13px; color: var(--ink-2); font-weight: 500; }
label.f > span { display: block; margin-bottom: 6px; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--field); border: 0.5px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--ink); }
textarea { resize: vertical; min-height: 72px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { margin-top: 20px; padding-top: 16px; border-top: 0.5px solid var(--line); }
.form-section > h4 { margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { padding-left: 36px; background: var(--fill-2); border-color: transparent; border-radius: 99px; }
.search input:focus { background: var(--field); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border-radius: 14px; box-shadow: var(--pop-shadow); max-height: 440px; overflow-y: auto; z-index: 50; padding: 6px; }
.search-results .grp { padding: 8px 10px 4px; }
.search-results a { display: block; padding: 8px 10px; color: var(--ink); border-radius: 8px; }
.search-results a:hover { background: var(--fill-2); text-decoration: none; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { font: inherit; font-size: 12.5px; border: 0.5px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 11px; cursor: pointer; color: var(--ink); transition: background .15s; }
.quick button:hover { background: var(--fill); }
.quick button.on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; }
.seg { display: inline-flex; border-radius: 9px; padding: 2px; background: var(--fill-2); }
.seg button { font: inherit; font-size: 13px; border: 0; background: none; padding: 4px 12px; border-radius: 7px; cursor: pointer; color: var(--ink); font-weight: 500; transition: background .15s; }
.seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 0.5px rgba(0,0,0,.04); }

/* ---------- Fiches & historique ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 14px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--fill-3); }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 2px; width: 1px; background: var(--line-soft); }
.timeline li:last-child::after { display: none; }
.timeline li.call::before { background: var(--ink); }
.timeline li.status::before { background: var(--accent); }
.timeline li.alert::before { background: var(--bad); }
.timeline .meta { font-size: 12px; color: var(--ink-3); }
.stepper { display: flex; gap: 4px; margin: 4px 0 2px; overflow-x: auto; padding: 3px; background: var(--fill); border-radius: 12px; }
.stepper button { flex: 1; font: inherit; font-size: 12.5px; font-weight: 500; background: none; color: var(--ink-3); border: 0; padding: 8px 10px; cursor: pointer; border-radius: 9px; white-space: nowrap; min-width: 88px; transition: background .15s, color .15s; }
.stepper button.done { color: var(--ink); }
.stepper button.current { background: var(--ink); color: var(--on-ink); }
.stepper button.current.signe { background: var(--ok); color: #fff; }
.stepper button:hover:not(.current) { background: var(--fill-2); color: var(--ink); }

.outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.outcomes .btn { justify-content: flex-start; border-radius: 12px; padding: 11px 14px; }
.call-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.phone-link { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- Cartes de prospects (portail mobile) ---------- */
.lead-cards { display: grid; gap: 10px; }
.lead-card { background: var(--surface); border-radius: var(--radius); padding: 15px 17px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; cursor: pointer; box-shadow: var(--card-shadow); position: relative; overflow: hidden; transition: box-shadow .15s; }
.lead-card:hover { box-shadow: var(--card-shadow), 0 6px 20px rgba(0,0,0,.06); }
.lead-card.urgent::before, .lead-card.late::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.lead-card.late::before { background: var(--bad); }
.lead-card .name { font-weight: 600; font-size: 16px; color: var(--ink); letter-spacing: -0.015em; }
.lead-card .lfacts { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); }
.lead-card .acts { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(232px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kcol { background: var(--fill); border-radius: var(--radius); padding: 10px; min-height: 300px; transition: background .15s; }
.kcol.over { background: var(--accent-bg); }
.kcol h4 { display: flex; justify-content: space-between; padding: 4px 6px 12px; }
.kcard { background: var(--surface); border-radius: 11px; padding: 11px 13px; margin-bottom: 8px; cursor: grab; font-size: 13.5px; box-shadow: var(--card-shadow); }
.kcard .main { font-weight: 600; }
.kcard .sub { color: var(--ink-2); font-size: 12.5px; }

/* ---------- Graphiques ---------- */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); font-size: 10px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--ink); opacity: .82; }
.chart .bar.key { fill: var(--accent); opacity: 1; }
.chart .goal { stroke: var(--ink-3); stroke-dasharray: 3 3; stroke-width: 1; }
.chart .val { fill: var(--ink-2); font-size: 10px; }
.funnel .frow { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 12px; margin-bottom: 9px; font-size: 14px; }
.funnel .fbar { height: 20px; background: var(--fill); border-radius: 6px; overflow: hidden; }
.funnel .fbar span { display: block; height: 100%; background: var(--ink); opacity: .85; border-radius: 6px; min-width: 2px; }
.funnel .frow.key .fbar span { background: var(--accent); opacity: 1; }
.funnel .fnum { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.cond { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 0.5px solid var(--line-soft); }
.cond:last-child { border-bottom: 0; }
.cond .ic { width: 22px; height: 22px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.cond .ic.ok { background: var(--ok-bg); color: var(--ok); }
.cond .ic.bad { background: var(--bad-bg); color: var(--bad); }
.cond .ic.na { background: var(--fill-2); color: var(--ink-3); }
.guarantee { background: var(--dark); color: var(--on-dark); border-radius: var(--radius); padding: 26px; }
.guarantee h2, .guarantee h3 { color: var(--on-dark); }
.guarantee .eyebrow { color: var(--on-dark-2); }
.guarantee .big { font-size: 44px; font-weight: 600; letter-spacing: -0.035em; color: var(--accent-on-dark); line-height: 1; font-variant-numeric: tabular-nums; }
.guarantee .muted { color: var(--on-dark-2); }
.guarantee .chip { background: rgba(255,255,255,.12); color: var(--on-dark); }
.guarantee .chip.ok { background: rgba(76,208,125,.18); color: #7FE0A3; }
.guarantee .chip.bad { background: rgba(255,107,96,.18); color: #FF9A92; }
.guarantee .progress { background: rgba(255,255,255,.14); height: 8px; }
.guarantee .progress > span { background: var(--accent-on-dark); }
.guarantee .progress .proj { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .7; }

/* ---------- Session d'appels ---------- */
.callmode { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.callcard { padding: 30px; }
.callcard .company { font-size: 32px; letter-spacing: -0.03em; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 20px 0; }
.facts div { background: var(--fill); border-radius: 12px; padding: 11px 13px; font-size: 12.5px; color: var(--ink-2); }
.facts b { display: block; font-size: 16px; color: var(--ink); font-weight: 600; margin-top: 2px; }
.slotbar { display: flex; gap: 6px; align-items: center; }
.slotbar .s { font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 99px; background: var(--fill-2); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.slotbar .s.on { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.queue-item { padding: 10px 0; border-bottom: 0.5px solid var(--line-soft); font-size: 13.5px; cursor: pointer; }
.queue-item:last-child { border-bottom: 0; }
.queue-item.current { font-weight: 600; color: var(--ink); }

/* ---------- Fenêtres modales & notifications ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; animation: fade .18s ease; }
.modal { background: var(--surface); border-radius: 22px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--pop-shadow); animation: pop .22s cubic-bezier(.2,.9,.3,1.1); }
.modal.wide { max-width: 860px; }
.modal-head { padding: 22px 24px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 24px; }
.modal-foot { padding: 4px 24px 22px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--ink); color: var(--on-ink); padding: 11px 20px; border-radius: 99px; font-size: 14px; font-weight: 500; box-shadow: var(--pop-shadow); animation: up .22s ease; display: flex; gap: 12px; align-items: center; }
.toast.err { background: var(--bad); color: #fff; }
.toast a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.secret { font-family: var(--code); font-size: 13px; background: var(--fill); border: 0.5px dashed var(--line); border-radius: 10px; padding: 11px 13px; word-break: break-all; user-select: all; }
.notice { background: var(--warn-bg); color: var(--ink); border-radius: 12px; padding: 11px 15px; font-size: 14px; }
.notice.blue { background: var(--fill); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
code, pre { font-family: var(--code); font-size: 12.5px; }
pre { background: #161617; color: #E8E8ED; padding: 15px 17px; border-radius: 12px; overflow-x: auto; line-height: 1.6; box-shadow: inset 0 0 0 0.5px rgba(255,255,255,.08); }
code { background: var(--fill-2); padding: 1px 5px; border-radius: 5px; }
pre code { background: none; padding: 0; }
.endpoint { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 0.5px solid var(--line-soft); font-size: 14px; }
.endpoint .m { font-family: var(--code); font-size: 11px; font-weight: 600; width: 56px; flex: none; }

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); }
.auth .side { background: radial-gradient(120% 80% at 100% 0%, rgba(201,168,110,.22) 0%, rgba(201,168,110,0) 55%), linear-gradient(160deg, #2A2A2C 0%, #0A0A0B 100%); color: var(--on-dark); padding: 52px; display: flex; flex-direction: column; justify-content: space-between; }
.auth .side .brand { color: #F5F5F7; padding: 0; }
.auth .side .brand small { color: rgba(245,245,247,.5); }
.auth .side .brand .mark { background: linear-gradient(155deg, #F5F5F7, #CFCFD4); }
.auth .side h1 { color: #F5F5F7; font-size: 46px; max-width: 440px; letter-spacing: -0.035em; line-height: 1.05; }
.auth .side p { color: rgba(245,245,247,.62); max-width: 400px; font-size: 17px; }
.auth .form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.loading { padding: 60px; text-align: center; color: var(--ink-3); }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split, .callmode { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 10px 16px; }
  .page { padding: 20px 16px 104px; }
  h1 { font-size: 28px; }
  .page-head { margin-bottom: 20px; }
  .g2, .g3, .form-grid { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi .value { font-size: 27px; }
  .card { padding: 16px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 0.5px solid var(--line); z-index: 40; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; padding: 4px 8px; position: relative; flex: 1; }
  .tabbar a.active { color: var(--ink); }
  .tabbar a.active svg { color: var(--accent-text); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .badge { position: absolute; top: -2px; right: calc(50% - 22px); background: var(--bad); color: #fff; }
  .auth { grid-template-columns: 1fr; }
  .auth .side { padding: 30px 24px; gap: 28px; }
  .auth .side h1 { font-size: 32px; }
  .modal-back { align-items: flex-end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet .28s cubic-bezier(.2,.9,.3,1); }
  .kv { grid-template-columns: 110px 1fr; }
  .phone-link { font-size: 24px; }
  .callcard { padding: 20px; }
  .callcard .company { font-size: 26px; }
  .hide-mobile { display: none !important; }
  .funnel .frow { grid-template-columns: 100px 1fr 44px; }
  .toasts { bottom: 92px; }
  .outcomes { grid-template-columns: 1fr 1fr; }
  .outcomes .btn { white-space: normal; text-align: left; }
  .tabs { gap: 16px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 821px) { .show-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
