/* NOVA Prospection — système de design (v2, « outil de travail »)
   Blanc minimal, une seule famille (Geist), une couleur d'action (bleu NOVA), trois couleurs d'état.
   Hiérarchie par la typographie et l'espace, pas par des cartes : surfaces plates, filets de 1 px, rayons sobres.
   Le seul élément appuyé : la phrase d'objectif en tête de « Aujourd'hui ». */

:root {
  --bg: #FFFFFF;
  --side: #F7F7F8;
  --surface: #F4F4F6;
  --surface-2: #ECECEF;
  --line: #E7E7EB;
  --line-2: #D6D6DC;
  --ink: #17181D;
  --ink-2: #5B5E69;
  --ink-3: #8D909B;
  --accent: #3346F0;
  --accent-ink: #2433C4;
  --accent-soft: #EEF0FE;
  --good: #1E8E4E;
  --good-soft: #E8F5EE;
  --wait: #B26B00;
  --wait-soft: #FBF2E3;
  --alert: #CC3434;
  --alert-soft: #FCECEC;
  --bar: #C9CBD3;
  --bar-strong: #5B5E69;
  --shadow: 0 1px 2px rgba(23, 24, 29, 0.06), 0 8px 24px rgba(23, 24, 29, 0.08);
  --r-s: 6px;
  --r-m: 8px;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side-w: 236px;
  --max: 1160px;
  /* compat. anciens noms */
  --paper: var(--bg); --panel: var(--surface); --panel-2: var(--surface-2); --rule: var(--line);
  --radius-s: var(--r-s); --radius-m: var(--r-m); --serif: var(--font); --sans: var(--font);
}
:root[data-theme="dark"] {
  --bg: #101114; --side: #0C0D0F; --surface: #17181C; --surface-2: #1F2025; --line: #24262C; --line-2: #33353D;
  --ink: #EDEDF0; --ink-2: #A4A7B2; --ink-3: #6F727D;
  --accent: #7D8BFF; --accent-ink: #A7B0FF; --accent-soft: #1B1F3D;
  --good: #4CC383; --good-soft: #12261B; --wait: #E0A33F; --wait-soft: #2A2112; --alert: #F06A6A; --alert-soft: #2E1717;
  --bar: #3A3C45; --bar-strong: #A4A7B2; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101114; --side: #0C0D0F; --surface: #17181C; --surface-2: #1F2025; --line: #24262C; --line-2: #33353D;
    --ink: #EDEDF0; --ink-2: #A4A7B2; --ink-3: #6F727D;
    --accent: #7D8BFF; --accent-ink: #A7B0FF; --accent-soft: #1B1F3D;
    --good: #4CC383; --good-soft: #12261B; --wait: #E0A33F; --wait-soft: #2A2112; --alert: #F06A6A; --alert-soft: #2E1717;
    --bar: #3A3C45; --bar-strong: #A4A7B2; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  }
}

* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.5; font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--ink); }
h1 { font-size: 1.43rem; letter-spacing: -0.02em; line-height: 1.25; }
h2 { font-size: 1rem; letter-spacing: -0.01em; line-height: 1.35; }
h3 { font-size: 0.93rem; font-weight: 550; color: var(--ink-2); }
p { margin: 0 0 0.6rem; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.86em; }
pre { background: var(--surface); padding: 10px 12px; border-radius: var(--r-s); overflow: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Coque : barre latérale + contenu ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--side) calc(var(--side-w) - 1px), var(--line) calc(var(--side-w) - 1px), var(--line) var(--side-w), var(--bg) var(--side-w)); }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px;
  background: var(--side); border-right: 1px solid var(--line); padding: 14px 12px 12px;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 0.98rem; color: var(--ink); letter-spacing: 0.01em; white-space: nowrap; }
.wordmark span:not(.mark) { color: var(--ink-3); font-weight: 450; }
.wordmark:hover { text-decoration: none; }
.wordmark .mark { width: 16px; height: 16px; border-radius: 4px; background: var(--ink); position: relative; flex: none; }
.wordmark .mark::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg); }
.icon-btn { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-s); background: transparent; padding: 0; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--side); }
.new-email { justify-content: center; text-align: center; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 9px; color: var(--ink-2); padding: 6px 8px; border-radius: var(--r-s); font-size: 0.95rem; font-weight: 450; white-space: nowrap; }
.nav a svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a.active { color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-weight: 550; }
.nav a .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding: 0 4px; }
.user-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.86rem; color: var(--ink-3); }
.sender { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ink-3); font-size: 0.86rem; }
.sender select { width: auto; padding: 3px 6px; font-size: 0.86rem; background: transparent; }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); }
button.link { background: none; padding: 0; color: var(--ink-3); font-size: 0.86rem; }
button.link:hover { background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.theme-toggle { font: inherit; font-size: 0.86rem; color: var(--ink-3); background: none; border: 0; padding: 0; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: none; }

/* Objectif (pied de barre latérale) */
.objective-text { font-size: 0.86rem; color: var(--ink-2); line-height: 1.35; margin-bottom: 7px; }
.objective-text strong { color: var(--ink); font-weight: 600; }
.objective-bar { position: relative; height: 4px; background: var(--surface-2); border-radius: 2px; }
.objective-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; transition: width 500ms ease; }
.objective-fill.over { background: var(--good); }
.objective-pace { position: absolute; top: -3px; width: 2px; height: 10px; background: var(--accent); transform: translateX(-1px); border-radius: 1px; }
.objective-tick { display: none; }

/* ---------- Contenu ---------- */
.view { padding: 22px 36px 80px; max-width: calc(var(--max) + 72px); width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; min-height: 34px; }
.page-head .sub { color: var(--ink-3); margin-top: 2px; font-size: 0.93rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head .muted { font-size: 0.86rem; }
.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; }
@media (max-width: 1050px) { .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--r-m); padding: 16px 18px; }
.panel.quiet { background: transparent; border: 1px solid var(--line); }

/* ---------- Boutons & champs ---------- */
button, .btn {
  font: inherit; font-size: 0.93rem; font-weight: 500; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 6px 12px; cursor: pointer; line-height: 1.3;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 1px rgba(23,24,29,.04);
}
button:hover, .btn:hover { background: var(--surface); text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
:root[data-theme="dark"] button.primary, :root[data-theme="dark"] .btn.primary { color: #0D0F22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.primary, :root:not([data-theme="light"]) .btn.primary { color: #0D0F22; } }
button.ghost { background: transparent; border-color: transparent; color: var(--accent); box-shadow: none; padding-inline: 6px; }
button.ghost:hover { background: var(--accent-soft); }
button.danger { background: transparent; border-color: transparent; color: var(--alert); box-shadow: none; }
button.danger:hover { background: var(--alert-soft); }
button.sm, .btn.sm { font-size: 0.86rem; padding: 3px 9px; }
button.big, .btn.big { padding: 9px 16px; font-size: 1rem; }
button[disabled] { opacity: 0.45; cursor: not-allowed; }
button[aria-busy="true"] { opacity: 0.6; cursor: progress; }
a.btn { display: inline-flex; }
input, select, textarea {
  font: inherit; font-size: 0.93rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-s);
  padding: 6px 9px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
input[type="range"] { accent-color: var(--accent); padding: 0; border: 0; }
label { display: block; font-size: 0.86rem; color: var(--ink-2); font-weight: 450; }
label > input, label > select, label > textarea { margin-top: 5px; }
.field { margin-bottom: 12px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields .full { grid-column: 1 / -1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[type="search"] { min-width: 220px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 0.86rem; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .name { font-weight: 550; color: var(--ink); }
td .sub { display: block; color: var(--ink-3); font-size: 0.86rem; }
.empty { padding: 32px 10px; color: var(--ink-3); text-align: center; }

/* ---------- États, score ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; padding: 1px 0; color: var(--ink-2); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink-3); flex: none; }
.chip.won::before { background: var(--good); border-color: var(--good); }
.chip.won { color: var(--ink); }
.chip.live::before { border-color: var(--accent); background: var(--accent); }
.chip.alert { color: var(--alert); }
.chip.alert::before { border-color: var(--alert); background: var(--alert); }
.chip.off { color: var(--ink-3); }
.chip.off::before { border-style: dashed; }
.score { display: inline-flex; align-items: center; gap: 8px; min-width: 112px; }
.score .track { flex: 1; height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.score .fill { height: 100%; background: var(--bar-strong); border-radius: 2px; }
.score .fill.high { background: var(--accent); }
.score .val { font-variant-numeric: tabular-nums; font-size: 0.86rem; min-width: 34px; text-align: right; color: var(--ink-2); }
.prio-haute { color: var(--accent-ink); font-weight: 550; }
.prio-veille { color: var(--ink-3); }

/* ---------- Aujourd'hui ---------- */
.headline { font-size: clamp(1.6rem, 2.6vw, 2.15rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.18; max-width: 30ch; margin: 4px 0 6px; }
.headline .quiet { color: var(--ink-3); }
.headline-meter { position: relative; height: 6px; background: var(--surface-2); border-radius: 3px; max-width: 620px; margin: 14px 0 8px; }
.headline-meter .fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 3px; }
.headline-meter .fill.over { background: var(--good); }
.headline-meter .pace { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--accent); transform: translateX(-1px); }
.headline-legend { display: flex; gap: 18px; color: var(--ink-3); font-size: 0.86rem; flex-wrap: wrap; }
.headline-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; background: var(--ink); }
.headline-legend i.pace { background: var(--accent); width: 2px; height: 10px; vertical-align: -1px; }

.inbox { border: 1px solid var(--line); border-radius: var(--r-m); }
.inbox a.item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.inbox a.item:last-child { border-bottom: 0; }
.inbox a.item:hover { background: var(--surface); text-decoration: none; }
.inbox .ic { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 0.72rem; font-weight: 650; color: var(--ink-2); background: var(--surface-2); }
.inbox .ic.go { background: var(--accent-soft); color: var(--accent-ink); }
.inbox .ic.alert { background: var(--alert-soft); color: var(--alert); }
.inbox .ic.good { background: var(--good-soft); color: var(--good); }
.inbox .t { font-weight: 500; }
.inbox .t .sub { color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.inbox .n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 0.93rem; }
.inbox .calm { padding: 14px; color: var(--ink-3); }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 1050px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 14px 16px 14px 0; }
.kpi + .kpi { padding-left: 16px; border-left: 1px solid var(--line); }
.kpi .n { font-size: 1.6rem; font-weight: 550; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .n small { font-size: 0.93rem; color: var(--ink-3); margin-left: 3px; font-weight: 450; }
.kpi .l { color: var(--ink-2); font-size: 0.86rem; margin-top: 4px; }
.kpi .d { color: var(--ink-3); font-size: 0.8rem; }
.todo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.todo a { display: inline-flex; gap: 8px; padding: 7px 12px; border-radius: var(--r-s); border: 1px solid var(--line); color: var(--ink); }
.todo a:hover { background: var(--surface); text-decoration: none; }
.todo a.quiet { color: var(--ink-2); }

/* ---------- Graphiques ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11.5px; fill: var(--ink-3); }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .mark { fill: var(--bar); }
.chart .mark.hl { fill: var(--accent); }
.chart .mark.ink { fill: var(--ink); }
.chart .mark.soft { fill: var(--surface-2); }
.chart .mark.good { fill: var(--good); }
.chart .objective-line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hit { fill: transparent; }
.chart g:hover .mark { opacity: 0.8; }
.chart .label-strong { fill: var(--ink); font-weight: 550; }
.chart .sub { fill: var(--ink-3); font-weight: 400; }
.legend { display: flex; gap: 14px; font-size: 0.86rem; color: var(--ink-3); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--bar); }
.legend i.hl { background: var(--accent); }
.legend i.ink { background: var(--ink); }
.legend i.good { background: var(--good); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.feed li:last-child { border-bottom: 0; }
.feed li .when { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Détail compte ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head .meta { color: var(--ink-3); margin-top: 4px; }
.scorer { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.scorer label { display: contents; }
.scorer .crit { font-size: 0.93rem; color: var(--ink-2); }
.scorer .w { color: var(--ink-3); font-size: 0.8rem; margin-left: 6px; }
.scorer select { width: 64px; }
.score-big { font-size: 2rem; font-weight: 550; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.contact-card { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.contact-card .who { font-weight: 550; }
.contact-card .role { color: var(--ink-2); font-size: 0.93rem; }
.contact-card .links { color: var(--ink-3); font-size: 0.86rem; display: flex; gap: 10px; flex-wrap: wrap; }
.contact-card .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; }
.warn { background: var(--alert-soft); color: var(--alert); padding: 9px 12px; border-radius: var(--r-s); font-size: 0.93rem; margin-bottom: 12px; }
.note-form { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: start; }

/* ---------- Emails ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 7px 10px 9px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 450; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 550; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a .cnt { color: var(--ink-3); margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 400; }
.msg { border-bottom: 1px solid var(--line); padding: 12px 0; }
.msg-head { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; cursor: pointer; }
.msg-head .subject { font-weight: 550; }
.msg-head .meta { color: var(--ink-3); font-size: 0.86rem; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.msg-body { margin-top: 12px; }
.msg-body textarea { min-height: 220px; }
.msg-body .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.msg-body input[type="datetime-local"] { width: auto; }
.step-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 0.75rem; margin-right: 8px; font-weight: 600; }

/* ---------- Modèles ---------- */
.tpl-list { display: grid; grid-template-columns: 280px 1fr; gap: 28px; }
@media (max-width: 900px) { .tpl-list { grid-template-columns: 1fr; } }
.tpl-list ul { list-style: none; margin: 0; padding: 0; }
.tpl-list li a { display: block; padding: 7px 10px; border-radius: var(--r-s); color: var(--ink-2); }
.tpl-list li a.active, .tpl-list li a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.tpl-list li .k { display: block; font-size: 0.8rem; color: var(--ink-3); }
.vars { display: flex; gap: 6px; flex-wrap: wrap; }
.vars code { background: var(--surface); padding: 2px 6px; border-radius: 4px; }

/* ---------- Guide ---------- */
.doc { max-width: 760px; line-height: 1.6; }
.doc h1 { margin: 0 0 14px; }
.doc h2 { margin: 28px 0 8px; font-size: 1.14rem; }
.doc h3 { margin: 18px 0 6px; color: var(--ink); font-size: 1rem; }
.doc table { margin: 10px 0 16px; font-size: 0.93rem; }
.doc td, .doc th { vertical-align: top; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 3px 0; }
.doc blockquote { margin: 10px 0; padding: 4px 14px; border-left: 2px solid var(--line-2); color: var(--ink-2); }
.doc pre { font-size: 0.82rem; }
.doc-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.doc-nav a { padding: 4px 10px; border-radius: var(--r-s); color: var(--ink-2); font-size: 0.93rem; }
.doc-nav a.active { background: var(--surface-2); color: var(--ink); }
.doc-nav a:hover { text-decoration: none; background: var(--surface); }

/* ---------- Réglages ---------- */
.status-line { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.status-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-line .dot.ok { background: var(--good); }
.status-line .dot.ko { background: var(--alert); }

/* ---------- Badges, bandeaux ---------- */
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); font-size: 0.78rem; line-height: 18px; text-align: center; font-weight: 550; font-variant-numeric: tabular-nums; }
.nav a.active .badge { background: var(--accent); color: #fff; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); padding: 12px 14px; border-radius: var(--r-m); margin-bottom: 18px; flex-wrap: wrap; }
.notice strong { color: var(--ink); font-weight: 550; }
.notice.ok { background: var(--surface); border-color: transparent; }
.hint { color: var(--ink-3); font-size: 0.86rem; margin: 6px 0 0; }
.note { background: var(--surface); border-radius: var(--r-s); padding: 8px 12px; color: var(--ink-2); font-size: 0.93rem; margin-top: 8px; }
.step-label { display: inline-block; font-size: 0.8rem; color: var(--ink-2); background: var(--surface-2); border-radius: 4px; padding: 1px 7px; margin-right: 8px; font-weight: 550; vertical-align: 1px; }
.step-label.first { background: var(--accent-soft); color: var(--accent-ink); }
.to-line { color: var(--ink-2); }
.to-line strong { color: var(--ink); font-weight: 550; }

/* ---------- Écran « Nouvel email » ---------- */
.composer { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 36px; align-items: start; }
@media (max-width: 1050px) { .composer { grid-template-columns: 1fr; } }
.cstep { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.cstep:last-child { border-bottom: 0; }
.cstep textarea { min-height: 64px; }
.cstep-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.cstep-title .n { font-size: 0.86rem; font-weight: 600; color: var(--ink-3); min-width: 14px; font-variant-numeric: tabular-nums; }
.cstep-title h2 { font-size: 1rem; }
.row-inline { display: flex; gap: 8px; align-items: flex-end; }
.row-inline > label { flex: 1; }
.recipients { display: grid; gap: 6px; margin: 12px 0 4px; }
.recipient { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; color: var(--ink-2); }
.recipient:hover { border-color: var(--line-2); }
.recipient:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.recipient input { width: auto; margin: 3px 0 0; }
.recipient .r-name { font-weight: 550; color: var(--ink); }
.recipient .r-sub { color: var(--ink-3); font-size: 0.86rem; display: block; }
.recipient.disabled { opacity: 0.5; cursor: not-allowed; }
.new-contact { margin-top: 10px; }
.seg { display: inline-flex; background: var(--surface); border-radius: var(--r-s); padding: 2px; gap: 2px; flex-wrap: wrap; border: 1px solid var(--line); }
.seg label { position: relative; display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 5px; cursor: pointer; color: var(--ink-2); font-size: 0.93rem; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label:has(input:checked) { background: var(--bg); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(23,24,29,.06); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg label:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.composer-preview { position: sticky; top: 16px; }
.mail-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.mail-card:focus-within { border-color: var(--line-2); box-shadow: var(--shadow); }
.mail-meta { display: grid; grid-template-columns: 60px 1fr; gap: 6px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.93rem; color: var(--ink); }
.mail-meta .k, .mail-subject .k { color: var(--ink-3); }
.mail-subject { display: grid; grid-template-columns: 60px 1fr; align-items: center; gap: 10px; padding: 2px 16px; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.mail-subject input { border: 0; padding: 8px 0; margin: 0; font-weight: 550; background: transparent; box-shadow: none; }
.mail-subject input:focus, .mail-body:focus { outline: none; box-shadow: none; }
.mail-body { display: block; border: 0; border-radius: 0; min-height: 440px; margin: 0; padding: 14px 16px; background: transparent; line-height: 1.65; }
.mail-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--ink-3); }
.mail-empty { padding: 70px 24px; text-align: center; color: var(--ink-3); }
.mail-empty strong { display: block; font-weight: 550; font-size: 1.07rem; color: var(--ink-2); margin-bottom: 6px; }
.followups { margin-top: 14px; font-size: 0.93rem; }
.followups details { margin-top: 8px; }
.followups summary { cursor: pointer; color: var(--accent); }
.fu-card { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin-top: 8px; }
.fu-card input { font-weight: 550; }
.fu-card textarea { min-height: 120px; margin-top: 6px; }
.send-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.send-bar .schedule { display: inline-flex; gap: 6px; align-items: center; }
.send-bar .schedule input { width: auto; }
.provider-help { background: var(--surface); border-radius: var(--r-s); padding: 10px 12px; font-size: 0.93rem; color: var(--ink-2); }

/* ---------- Découvertes & ciblage ---------- */
.batches { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 22px; }
.batch { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.batch .when { font-size: 0.86rem; color: var(--ink-3); }
.batch .big { font-size: 1.6rem; font-weight: 550; letter-spacing: -0.02em; line-height: 1.2; }
.batch .big small { font-size: 0.86rem; color: var(--ink-2); margin-left: 6px; font-weight: 450; letter-spacing: 0; }
.batch .line { font-size: 0.86rem; color: var(--ink-2); margin-top: 3px; }
.why { max-width: 420px; }
.why .src { display: block; font-size: 0.86rem; color: var(--ink-3); margin-top: 2px; }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 6px 0 4px; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr 1fr; } }
.how div { font-size: 0.93rem; color: var(--ink-2); }
.how strong { display: block; color: var(--ink); font-weight: 550; margin-bottom: 2px; }
.how .n { font-size: 0.86rem; font-weight: 600; color: var(--ink-3); display: block; margin-bottom: 4px; }
.seg-row td { vertical-align: top; }
.seg-row .refs { color: var(--ink-3); font-size: 0.86rem; max-width: 320px; }
.seg-row.off td { opacity: 0.5; }
.codes { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; font-size: 0.86rem; color: var(--ink-2); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.93rem; color: var(--ink-2); }
.score-notes { margin: 10px 0 0; padding: 0; list-style: none; font-size: 0.86rem; color: var(--ink-2); }
.score-notes li { padding: 3px 0; }
.score-notes b { color: var(--ink); font-weight: 550; }
.toggle-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.toggle-row input[type="number"] { width: 90px; }

/* ---------- Notifications ---------- */
.notif-panel { position: fixed; z-index: 40; left: calc(var(--side-w) - 8px); top: 10px; width: min(380px, 92vw); max-height: min(560px, 80vh); overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); }
.notif-panel header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); }
.notif-panel a.n-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.notif-panel a.n-item:hover { background: var(--surface); text-decoration: none; }
.notif-panel a.n-item.unread .n-title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; }
.notif-panel .n-title { font-weight: 550; }
.notif-panel .n-body { color: var(--ink-2); font-size: 0.93rem; }
.notif-panel .n-when { color: var(--ink-3); font-size: 0.8rem; margin-top: 2px; }
.notif-panel .calm { padding: 22px 14px; color: var(--ink-3); text-align: center; }

/* ---------- Toast, modal, infobulle ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; transform: translateY(12px); background: var(--ink); color: var(--bg); padding: 9px 14px; border-radius: var(--r-s); font-size: 0.93rem; opacity: 0; pointer-events: none; transition: opacity 160ms, transform 160ms; max-width: min(460px, 90vw); box-shadow: var(--shadow); z-index: 60; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--alert); color: #fff; }
.modal { border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; width: min(640px, 92vw); max-height: 90vh; overflow: auto; background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(16, 17, 20, 0.32); }
.modal h2 { margin-bottom: 14px; font-size: 1.07rem; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.tooltip { position: fixed; z-index: 50; background: var(--ink); color: var(--bg); font-size: 0.86rem; padding: 4px 8px; border-radius: 5px; pointer-events: none; white-space: nowrap; }

/* ---------- Mobile : barre latérale → barre du haut ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .inbox .t .sub { display: none; }
  .kpi, .kpi + .kpi { padding: 12px 0; border-left: 0; }
  .kpis { column-gap: 16px; }
  .page-head .actions .btn:not(.primary) { display: none; }
  .headline-legend { gap: 6px 14px; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); padding-top: max(10px, env(safe-area-inset-top)); }
  .side-head { flex: 1; padding: 0; }
  .new-email { order: 2; padding: 5px 10px; }
  .nav { order: 3; flex-direction: row; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 5px 9px; }
  .nav a svg { display: none; }
  .nav-sep { display: none; }
  .side-foot { display: none; }
  .view { padding: 18px 16px 70px; }
  .notif-panel { left: 8px; right: 8px; top: 56px; width: auto; }
  .fields { grid-template-columns: 1fr; }
  table { font-size: 0.86rem; }
}
