:root {
  --bg: #f5f6f8; --surface: #fff; --surface-2: #f0f2f5; --border: #e2e5ea; --text: #1d2330; --muted: #667085;
  --primary: #4f46e5; --primary-2: #4338ca; --primary-soft: #eef0ff; --side: #fbfbfd; --hot: #e5484d;
  --ok: #12805c; --ok-soft: #e3f5ee; --warn: #b54708; --warn-soft: #fef0e1; --bad: #c0362c; --bad-soft: #fdecea;
  --info: #0b6aa2; --info-soft: #e5f2fa;
  --radius: 10px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218; --surface: #171b23; --surface-2: #1f2430; --border: #2a303d; --text: #e6e8ee; --muted: #98a2b3;
    --primary: #8b85ff; --primary-2: #a5a0ff; --primary-soft: #25244a; --side: #13161d; --hot: #ff6369;
    --ok: #4fd1a1; --ok-soft: #133528; --warn: #f5a35c; --warn-soft: #3a2614; --bad: #f47a70; --bad-soft: #3b1a18;
    --info: #6cc0f0; --info-soft: #122b3a;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 0 0 8px; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--border); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 2px 6px 12px; }
.brand small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--primary), #9b5cf6); color: #fff; display: grid; place-items: center; font-size: 16px; }
.gsearch { position: relative; margin: 0 4px 10px; }
.gsearch input { padding: 7px 30px 7px 10px; font-size: 13px; background: var(--surface); }
.gsearch kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 11px ui-monospace, monospace; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
.nav { display: flex; flex-direction: column; flex: 1; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--text); margin-bottom: 1px; font-size: 13.5px; }
.nav a .ico { width: 18px; text-align: center; font-size: 14px; }
.nav a .lbl { flex: 1; }
.nav a .nb { font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.nav a .nb.hot { background: var(--hot); color: #fff; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav a.active .nb:not(.hot) { background: var(--primary); color: #fff; }
.nav .sep { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 14px 10px 4px; font-weight: 600; }
.nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.linklike { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; padding: 6px 10px; cursor: pointer; }
.linklike:hover { color: var(--text); }
.main { flex: 1; min-width: 0; padding: 22px 28px 60px; max-width: 1500px; }
.toast { position: fixed; top: 16px; right: 16px; z-index: 50; max-width: min(520px, calc(100vw - 32px)); display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.18); border: 1px solid var(--border); background: var(--surface); transition: opacity .4s, transform .4s; }
.toast.success { border-left: 4px solid var(--ok); } .toast.error { border-left: 4px solid var(--bad); } .toast.info { border-left: 4px solid var(--info); } .toast.warn { border-left: 4px solid var(--warn); }
.toast.fade { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.toast-x { background: none; border: 0; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 2px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subtitle { color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 18px 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--muted); font-size: 12px; }
.kpi.ok .value { color: var(--ok); } .kpi.bad .value { color: var(--bad); } .kpi.primary .value { color: var(--primary); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
thead th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; z-index: 1; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 35%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.st-sent, .badge.st-contacted, .badge.st-queued { background: var(--info-soft); color: var(--info); }
.badge.st-delivered, .badge.st-new { background: var(--surface-2); color: var(--text); }
.badge.st-opened, .badge.st-engaged, .badge.st-active { background: var(--primary-soft); color: var(--primary); }
.badge.st-clicked, .badge.st-replied, .badge.st-customer, .badge.st-ok { background: var(--ok-soft); color: var(--ok); }
.badge.st-soft_bounce, .badge.st-deferred, .badge.st-paused, .badge.st-sending { background: var(--warn-soft); color: var(--warn); }
.badge.st-lost, .badge.st-hard_bounce, .badge.st-blocked, .badge.st-invalid, .badge.st-spam, .badge.st-unsubscribed, .badge.st-bounced, .badge.st-error { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-block; background: var(--surface-2); border-radius: 4px; padding: 0 6px; font-size: 12px; margin: 1px 2px 1px 0; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: 8px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
label { display: block; font-weight: 500; margin-bottom: 4px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 12px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input[type=date], input[type=time], input[type=file], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit;
}
textarea { min-height: 280px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
select[multiple] { min-height: 120px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.field { margin-bottom: 14px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.filters .field { margin: 0; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 18px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--primary); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 10px; }
.timeline li:last-child { border: 0; }
.preview-frame { width: 100%; min-height: 380px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.vars code { cursor: pointer; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; margin: 2px; display: inline-block; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
pre { background: var(--surface-2); padding: 10px; border-radius: 8px; white-space: pre-wrap; margin: 0; }
.copy { display: flex; gap: 8px; } .copy input { font-family: ui-monospace, monospace; font-size: 12px; }
.login-box { max-width: 360px; margin: 12vh auto; }
.chart-box { position: relative; height: 260px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.toolbar select, .toolbar input { width: auto; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 16px; }
  .nav { display: none; } .nav.open { display: flex; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .brand { padding: 6px 0; }
  .main { padding: 16px; }
}
.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.sector-grid label.check { margin: 0; font-size: 13px; }
.target-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 12px 0; }
.target { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); text-decoration: none; color: inherit; }
.target:hover { border-color: var(--primary); }
details.card > summary { cursor: pointer; }
.hp-worth { color: var(--primary); }
.hp-check { color: var(--warn, #b45309); }
.hunter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hunter-row label { margin: 0; }
.hunter-row input { flex: 1; min-width: 200px; max-width: 360px; }
.hunter-result { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.domain-row { display: flex; gap: 4px; margin-top: 6px; align-items: center; }
.domain-row input { flex: 1; min-width: 160px; padding: 4px 8px; font-size: 12px; }
.hunter-found { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.hunter-found button { margin-top: 10px; }
.dlg { border: 1px solid var(--border); border-radius: 10px; padding: 20px; width: min(460px, calc(100vw - 32px)); background: var(--surface, #fff); color: inherit; }
.dlg.wide { width: min(720px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0, 0, 0, .35); }
.dlg h3 { margin-top: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.img-lib { display: flex; flex-wrap: wrap; gap: 6px; max-height: 180px; overflow-y: auto; }
.img-pick { width: 96px; height: 72px; padding: 2px; border: 2px solid var(--border); border-radius: 6px; background: var(--surface-2); cursor: pointer; }
.img-pick.on { border-color: var(--primary); }
.img-pick img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Éditeur visuel des modèles ---------- */
.with-select { display: flex; gap: 6px; }
.with-select input { flex: 1; min-width: 0; }
.with-select select { width: auto; max-width: 150px; }
.builder-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.starters { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.builder { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.builder-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.side-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.side-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.side-tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.side-panel h3 { margin: 0 0 10px; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.palette button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; cursor: grab; }
.palette button:hover { border-color: var(--primary); color: var(--primary); }
.palette .ico { font-size: 20px; line-height: 1; font-weight: 700; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
input[type=color] { width: 100%; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); cursor: pointer; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--text); padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.panel-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-panel textarea { min-height: 180px; }

.builder-main { min-width: 0; }
.text-toolbar { position: sticky; top: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.06); opacity: .55; transition: opacity .15s; }
.text-toolbar.active, .text-toolbar:hover { opacity: 1; }
.text-toolbar button { border: 1px solid transparent; background: none; color: var(--text); padding: 5px 8px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; }
.text-toolbar button:hover { background: var(--surface-2); border-color: var(--border); }
.text-toolbar select { width: auto; padding: 4px 6px; font-size: 13px; }
.text-toolbar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.tt-color { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; margin: 0; font-weight: 700; text-decoration: underline; cursor: pointer; border-radius: 6px; }
.tt-color:hover { background: var(--surface-2); }
.tt-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Canevas : rendu proche de l'e-mail final (mêmes couleurs, police, largeur 600 px) */
.builder-canvas { background: var(--c-bg); border-radius: 10px; padding: 24px 10px; min-height: 400px; }
.canvas-card { width: var(--c-width, 600px); max-width: 100%; margin: 0 auto; padding: 14px 0; background: var(--c-content); color: var(--c-text); font-family: var(--c-font); font-size: var(--c-size); line-height: 1.6; border-radius: 8px; color-scheme: light; }
.canvas-footer { width: var(--c-width, 600px); max-width: 100%; margin: 0 auto; padding: 18px 32px 0; text-align: center; font-family: var(--c-font); font-size: 11px; color: #8a8f98; }
.canvas-empty { margin: 24px 32px; padding: 40px 20px; border: 2px dashed #c9ced6; border-radius: 8px; text-align: center; color: #667085; font-family: system-ui, sans-serif; font-size: 14px; }
.blk { position: relative; outline: 1px dashed transparent; outline-offset: -1px; }
.blk:hover { outline-color: #9aa4b2; }
.blk.selected { outline: 2px solid #4f46e5; outline-offset: -2px; }
.blk.dragging { opacity: .35; }
.blk-tools { position: absolute; top: -14px; right: 8px; z-index: 3; display: none; gap: 2px; align-items: center; padding: 2px 4px; background: #4f46e5; border-radius: 6px; font-family: system-ui, sans-serif; }
.blk:hover .blk-tools, .blk.selected .blk-tools { display: flex; }
.blk-tools button { border: 0; background: none; color: #fff; padding: 2px 6px; font-size: 13px; cursor: pointer; border-radius: 4px; }
.blk-tools button:hover { background: rgba(255,255,255,.2); }
.blk-tools .blk-handle { cursor: grab; }
.blk-name { color: #fff; font-size: 11px; padding: 0 6px 0 2px; opacity: .85; }
.blk-pad { padding: 10px 32px; }
.blk-text { padding: 10px 32px 0; outline: none; min-height: 1.6em; cursor: text; overflow-wrap: anywhere; }
.blk-text p, .blk-html p { margin: 0 0 14px; }
.blk-text h1 { margin: 0 0 14px; font-size: calc(var(--c-size) + 11px); line-height: 1.25; }
.blk-text h2 { margin: 0 0 12px; font-size: calc(var(--c-size) + 5px); line-height: 1.3; }
.blk-text h3 { margin: 0 0 10px; font-size: calc(var(--c-size) + 2px); line-height: 1.3; }
.blk-text ul, .blk-text ol { margin: 0 0 14px; padding-left: 24px; }
.blk-text a, .blk-html a { color: var(--c-link); }
.blk-text:empty::before { content: 'Écris ton texte ici…'; color: #9aa4b2; }
.blk-button { display: inline-block; padding: 13px 26px; font-weight: bold; line-height: 1.2; }
.blk-placeholder { padding: 34px 16px; border: 2px dashed #c9ced6; border-radius: 8px; text-align: center; color: #475467; font-family: system-ui, sans-serif; font-size: 15px; background: #f8f9fb; cursor: pointer; }
.blk-placeholder span { font-size: 12px; color: #667085; }
.blk-spacer { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(154,164,178,.12) 6px 12px); }
.drop-line { height: 4px; margin: 0 24px; background: #4f46e5; border-radius: 2px; }

.preview-dlg { width: min(900px, calc(100vw - 32px)); }
.preview-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.preview-wrap { background: var(--surface-2); border-radius: 8px; padding: 12px; margin-top: 8px; }
#pv-frame { display: block; width: 100%; height: 65vh; margin: 0 auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; transition: width .2s; }

@media (max-width: 900px) {
  .builder { grid-template-columns: 1fr; }
  .builder-side { position: static; max-height: none; }
  .starters { margin-left: 0; }
}
.var-chip { display: inline-block; padding: 0 7px; margin: 0 1px; border-radius: 10px; background: #e8eaff; color: #3730a3; font-size: .88em; font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: default; user-select: all; }

/* Code HTML collé : mêmes largeurs fluides que dans l'e-mail envoyé */
.blk-html img { max-width: 100%; height: auto; }
.blk-html table, .blk-html div, .blk-html td { max-width: 100%; }
.checks { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.checks .ck-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; }
.check-ok .ck-ico, .ev-ok .ck-ico { background: var(--ok); }
.check-warn .ck-ico, .ev-warn .ck-ico, .ev-info .ck-ico { background: var(--warn); }
.check-error .ck-ico, .ev-error .ck-ico { background: var(--bad); }
.check-error { border-color: var(--bad) !important; background: var(--bad-soft); }
.ck-fix { margin-top: 4px; }
.track { margin-top: 10px; display: grid; gap: 10px; }
.track-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.track-item ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.track-item li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.track-item .ck-ico { width: 18px; height: 18px; font-size: 11px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }

/* ---------- Note des prospects ---------- */
.score-badge { display: inline-flex; align-items: center; white-space: nowrap; gap: 3px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: help; background: var(--surface-2); color: var(--muted); }
.score-badge sup { font-size: 9px; font-weight: 600; margin-left: 1px; opacity: .8; }
.lvl-hot.score-badge { background: var(--bad-soft); color: var(--bad); }
.lvl-warm.score-badge { background: var(--warn-soft); color: var(--warn); }
.lvl-cold.score-badge { background: var(--info-soft); color: var(--info); }
.lvl-customer.score-badge { background: var(--ok-soft); color: var(--ok); }
.qualif-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qualif-score { flex: none; min-width: 110px; text-align: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.qualif-score .big { font-size: 28px; font-weight: 800; line-height: 1.1; }
.qualif-score .big small { font-size: 13px; font-weight: 600; opacity: .7; }
.qualif-score.lvl-hot { background: var(--bad-soft); color: var(--bad); }
.qualif-score.lvl-warm { background: var(--warn-soft); color: var(--warn); }
.qualif-score.lvl-cold { background: var(--info-soft); color: var(--info); }
.qualif-score.lvl-customer { background: var(--ok-soft); color: var(--ok); }
.qualif-reasons { flex: 1; min-width: 240px; }
.qualif-actions { flex: none; }
.reasons { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.qualif-ai { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.qualif-ai p { margin: 6px 0; }
.recipients { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.no-email { margin-top: 12px; }
.no-email summary { cursor: pointer; }
.no-email ul { margin: 8px 0 0; padding-left: 20px; }
.recipients tr.rcpt-out td { opacity: .45; }
.recipients tr.rcpt-out td:first-child { opacity: 1; }
.badge.st-reply, .badge.st-replied { background: var(--ok-soft); color: var(--ok); }
.badge.st-auto_reply { background: var(--surface-2); color: var(--muted); }
.co-links { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-size: 12px; }
.co-links a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.co-links a:hover { color: var(--primary); text-decoration: underline; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

/* ---------- Ma journée ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.pipeline .step { display: flex; flex-direction: column; padding: 14px 18px; color: var(--text); border-right: 1px solid var(--border); position: relative; }
.pipeline .step:last-child { border-right: 0; }
.pipeline .step:hover { background: var(--surface-2); text-decoration: none; }
.pipeline .step .n { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pipeline .step .l { font-weight: 600; font-size: 13px; }
.pipeline .step .h { font-size: 11.5px; color: var(--muted); }
.pipeline .step-ready .n { color: var(--primary); } .pipeline .step-replied .n { color: var(--ok); } .pipeline .step-todo .n { color: var(--warn); }
.day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 18px; align-items: start; }
.day-card { margin: 0; }
.day-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.day-card header h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.day-card.urgent { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot) inset, var(--shadow); }
.nb { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.nb.hot { background: var(--hot); color: #fff; }
.worklist { list-style: none; margin: 0 0 10px; padding: 0; }
.worklist li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.worklist li:last-child { border-bottom: 0; }
.worklist.compact li { padding: 6px 0; }
.wl-main { flex: 1; min-width: 0; }
.wl-act { display: flex; gap: 6px; flex-shrink: 0; }
.btn.block { display: flex; width: 100%; justify-content: center; }
.empty.small { padding: 18px 10px; font-size: 13px; }
.quota { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 13px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.mini-kpis .v { display: block; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-kpis .l { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .pipeline { grid-template-columns: repeat(2, 1fr); } .pipeline .step { border-bottom: 1px solid var(--border); } .day-grid { grid-template-columns: 1fr; } }

/* ---------- Listes : onglets, assistant, menus ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 14px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; font-size: 13.5px; }
.tabs a span { font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.tabs a.on span { background: var(--primary); color: #fff; }
.assist { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; background: var(--warn-soft); margin-bottom: 14px; }
.assist-act { display: flex; gap: 6px; flex-wrap: wrap; }
.filters-box { padding: 12px 18px; }
.filters-box > summary { display: flex; align-items: center; gap: 8px; list-style: none; }
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box > summary::before { content: '▸'; color: var(--muted); }
.filters-box[open] > summary::before { content: '▾'; }
.sort-inline { margin: 0 0 0 auto !important; display: flex !important; gap: 6px; align-items: center; font-weight: 400; }
.menu-more { position: relative; }
.menu-more > summary { list-style: none; }
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(16,24,40,.15); padding: 6px; min-width: 240px; }
.menu-pop a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--text); white-space: nowrap; }
.menu-pop a:hover { background: var(--surface-2); text-decoration: none; }
.contact-nav { display: flex; align-items: center; gap: 12px; margin: -6px 0 10px; font-size: 13px; }
.contact-nav .cn-arrows { margin-left: auto; display: flex; gap: 6px; }
.status-bar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: -8px 0 16px; }
.status-bar .btn.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.status-bar .small-select { padding: 4px 8px; font-size: 13px; }
.writer .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.writer .seg button { border: 0; background: var(--surface); padding: 6px 14px; font: inherit; cursor: pointer; color: var(--muted); }
.writer .seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.writer-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.writer-bar input { flex: 1; min-width: 220px; }
textarea.plain { font-family: inherit; font-size: 14px; line-height: 1.55; min-height: 240px; }
/* Choix du type d'adresses à révéler (Hunter) */
.reveal-form { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.reveal-form select { width: auto; max-width: 100%; }
/* Programmation des campagnes */
.badge.st-scheduled { background: #ede9fe; color: #5b21b6; }
.schedule-card h2 { margin-top: 0; }
.sched-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.day { display: inline-flex; cursor: pointer; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span { padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: var(--surface); }
.day input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.day input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.slot-rate { margin: 12px 0 4px; font-size: 13px; }
.slot-rate ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.slot-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-right: 6px; }
.slot-good { background: #dcfce7; color: #166534; }
.slot-ok { background: #fef3c7; color: #92400e; }
.slot-bad { background: #fee2e2; color: #991b1b; }
.sched-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-advice { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #f5f3ff; font-size: 14px; line-height: 1.5; }
.ai-best { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) { .ai-advice { background: rgba(124, 58, 237, .12); } }
/* Trouver des prospects : barre d'import collée en bas de l'écran */
.select-bar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--surface-2); border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.select-bar.on { background: var(--primary-soft); box-shadow: 0 -6px 16px rgba(16, 24, 40, .08); }
.card.flush.sticky-ok { overflow: clip; } /* garde les coins arrondis sans empêcher la barre collée */
.search-box > summary { cursor: pointer; }
/* Campagne : ajout de contacts */
.add-contacts { margin: 4px 0 14px; }
.add-row { margin-top: 6px; max-width: 520px; }
.add-results { max-width: 720px; margin-top: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.add-item { display: flex; gap: 8px; align-items: baseline; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.add-item:last-child { border-bottom: 0; }
.add-item:hover { background: var(--primary-soft); }
.add-state { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 13px; white-space: nowrap; }
.warn-text { color: #b45309; }
.add-camp { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); min-width: 240px; }
.add-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.add-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 9px 12px; background: var(--primary-soft); font-size: 13px; }
/* Suppression d'un contact depuis la liste */
.row-del { border: 0; background: none; cursor: pointer; font-size: 15px; opacity: .35; padding: 4px 6px; border-radius: 6px; }
tr:hover .row-del, .row-del:focus-visible { opacity: 1; }
.row-del:hover { background: #fee2e2; }
.row-tools { display: flex; flex-direction: column; align-items: center; gap: 6px; }
