/* pro-smtp — espace client et administration (1.12.0).
   Thème clair / sombre par jetons de couleur : automatique (système) par défaut, ou choisi
   (attribut data-theme sur <html>, posé par theme-init.js avant l'affichage).
   CSP style-src 'self' : aucun style dans le HTML ; les largeurs variables sont dessinées en SVG.
   Tout est local : aucune police ni bibliothèque externe. */

/* ================================================================ jetons */
:root {
  color-scheme: light;
  --brand: #35549D;          /* bleu historique pro-smtp */
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eceff5;
  --border: #dfe4ec;
  --border-2: #cbd3df;
  --text: #1d2532;
  --text-2: #5a6475;
  --text-3: #808a9b;
  --accent: #35549D;
  --accent-ink: #ffffff;
  --accent-soft: #e7edf8;
  --focus: #4d8fe0;
  --ok: #17803d;   --ok-soft: #e1f3e6;
  --warn: #9a5b00; --warn-soft: #fdf0d5;
  --bad: #b42525;  --bad-soft: #fbe2e2;
  --info: #2a5ab0; --info-soft: #e5eefb;
  --series: #35549D;
  --st-sent: #22a04b; --st-deferred: #e2a21b; --st-bounced: #d03b3b; --st-expired: #e07a4f;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .05);
  --shadow-pop: 0 8px 30px rgba(20, 30, 50, .18);
  --radius: 10px;
  --font: "Segoe UI", "Noto Sans", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #8aa6ea;
    --bg: #0e131a; --surface: #151c26; --surface-2: #1a2230; --surface-3: #212b3a;
    --border: #273244; --border-2: #344157;
    --text: #e4e9f1; --text-2: #a3aec0; --text-3: #7c889c;
    --accent: #7f9de6; --accent-ink: #0e131a; --accent-soft: #1e2a42; --focus: #7fb4ff;
    --ok: #5fcf85;   --ok-soft: #15301f;
    --warn: #f0b955; --warn-soft: #33270f;
    --bad: #ff8080;  --bad-soft: #3a1a1d;
    --info: #8fb4ff; --info-soft: #18263f;
    --series: #8aa6ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-pop: 0 10px 40px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --brand: #8aa6ea;
  --bg: #0e131a; --surface: #151c26; --surface-2: #1a2230; --surface-3: #212b3a;
  --border: #273244; --border-2: #344157;
  --text: #e4e9f1; --text-2: #a3aec0; --text-3: #7c889c;
  --accent: #7f9de6; --accent-ink: #0e131a; --accent-soft: #1e2a42; --focus: #7fb4ff;
  --ok: #5fcf85;   --ok-soft: #15301f;
  --warn: #f0b955; --warn-soft: #33270f;
  --bad: #ff8080;  --bad-soft: #3a1a1d;
  --info: #8fb4ff; --info-soft: #18263f;
  --series: #8aa6ea;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-pop: 0 10px 40px rgba(0, 0, 0, .55);
}

/* ================================================================ base */
* { box-sizing: border-box; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; margin-bottom: 18px; }
h2 { font-size: 16px; margin-bottom: 10px; }
h3 { font-size: 15px; margin-bottom: 10px; }
h3 small, h3 span, h2 small { color: var(--text-3); font-weight: 400; font-size: 12.5px; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; margin: 0 0 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
pre code { background: none; padding: 0; }
.muted, .hint { color: var(--text-2); }
.hint { font-size: 12.5px; }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.bad { color: var(--bad) !important; font-weight: 600; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.val { color: var(--accent); font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
html:not(.js) .js-only { display: none !important; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i .fill { fill: currentColor; }

/* ================================================================ cadre (barre latérale) */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; }
body.admin .side { background: color-mix(in srgb, var(--surface) 92%, var(--accent)); }
.side .logo { padding: 2px 8px 14px; }
.side .env { margin: 0 8px 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.side .env b { display: block; font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.nav { display: grid; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
/* Lien du menu qui est un bouton de formulaire (administration : ouvrir l'espace client) */
form.nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 7px; background: none;
  color: var(--text-2); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
form.nav button:hover { background: var(--surface-3); color: var(--text); }
.nav a .badge { margin-left: auto; }
.nav .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 600; padding: 10px 10px 2px; }
.side .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.me { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; min-width: 0; }
.me .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.me .who { min-width: 0; font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.me .who span { display: block; color: var(--text-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 28px; min-height: 54px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.topbar .crumb { color: var(--text-3); font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar .sp { flex: 1; }
.solde { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; text-decoration: none !important; }
.health { display: flex; gap: 6px; flex-wrap: wrap; }
.health .chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; color: var(--text-2); text-decoration: none; }
.health .chip:hover { color: var(--text); border-color: var(--border-2); }
.content { padding: 24px 28px 32px; width: 100%; max-width: 1180px; flex: 1; }
body.wide .content { max-width: 1500px; }
.foot-note { margin: 32px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); text-align: center; }
.topbar .burger { display: none; }

/* Connexion : carte centrée, sans barre latérale */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-box { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 24px 26px; }
.auth-box .logo { margin-bottom: 20px; }
.auth-box h1 { font-size: 19px; margin-bottom: 14px; }
.auth-box form.stack { max-width: none; margin-bottom: 14px; }
.auth-box .foot-note { margin-top: 18px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  /* Sans script, le menu reste en tête de page ; avec, il passe derrière le bouton « Menu » */
  .side { position: static; height: auto; }
  .js .side { position: fixed; z-index: 50; left: 0; top: 0; height: 100vh; width: 270px; transform: translateX(-100%); visibility: hidden;
    transition: transform .2s, visibility .2s; box-shadow: var(--shadow-pop); }
  .js .shell.nav-open .side { transform: none; visibility: visible; }
  .js .shell.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(8, 12, 20, .45); }
  .topbar .burger { display: inline-flex; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { gap: 8px; }
  .topbar .crumb .host { display: none; }
}
@media (max-width: 560px) {
  .health .chip { padding: 2px 7px; font-size: 0; gap: 0; }
  .health .chip .dot { width: 10px; height: 10px; }
  h1 { font-size: 19px; }
}

/* ================================================================ logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.logo .mark { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(145deg, #2a8fe0, #1667b8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); flex: none; }
.logo .mark svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logo .word { font-size: 18px; font-weight: 300; letter-spacing: -.02em; line-height: 1; }
.logo .word b { font-weight: 600; }
.logo .sub { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; letter-spacing: 0; margin-top: 3px; overflow-wrap: anywhere; }

/* ================================================================ blocs (cartes) */
.bloc, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; min-width: 0; }
.bloc > :last-child, .card > :last-child { margin-bottom: 0; }
.bloc.closed { opacity: .65; }
.narrow-bloc { max-width: 520px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.contenu { display: flex; gap: 16px; align-items: flex-start; }
.col_left { flex: 0 0 260px; min-width: 0; }
.col_right { flex: 1 1 auto; min-width: 0; }
.col_left .bloc { margin-bottom: 12px; }
.col_left .bloc p > span:not(.badge):not(.muted):not(.hint) { color: var(--accent); font-weight: 600; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head h3 { margin: 0; }

/* En-tête de page : titre, sous-titre, action principale */
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-h h1 { margin: 0; }
.page-h p { margin: 4px 0 0; color: var(--text-2); }
.page-h .title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-h .actions form { margin: 0; }
/* Tableaux de bord : graphique et résultats côte à côte */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 0 16px; align-items: stretch; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; }

/* Fil « À traiter » : une ligne par sujet, action à droite */
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.todo li:last-child { border-bottom: 0; }
.todo li > .badge { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.todo .what { min-width: 0; overflow-wrap: anywhere; }
.todo .what b { font-weight: 600; }
.todo .what .sub { display: block; color: var(--text-2); font-size: 12.5px; }
.todo-empty { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin: 0; }
details.inline { margin-top: 6px; }
details.inline > summary { cursor: pointer; color: var(--text-2); font-size: 12.5px; list-style: none; padding: 4px 0; }
details.inline > summary::-webkit-details-marker { display: none; }
details.inline > summary::after { content: " ▾"; }
details.inline[open] > summary::after { content: " ▴"; }
@media (max-width: 560px) {
  .todo li { grid-template-columns: minmax(0, 1fr) auto; }
  .todo li > .badge { grid-column: 1 / -1; }
}

/* Chiffres clés */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile .label, .tile .value, .tile .sub { display: block; }
.tile .label { color: var(--text-2); font-size: 12.5px; }
.tile .value { font-size: 26px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--text); }
.tile .sub { color: var(--text-3); font-size: 12px; }
.tile .value small { font-size: 16px; font-weight: 400; }
.tile .meter { margin: 2px 0 4px; }

/* ================================================================ messages */
.flash { position: relative; padding: 10px 14px 10px 44px; margin: 0 0 16px; border-radius: 8px;
  background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); color: var(--text); }
.flash::before { position: absolute; left: 13px; top: 11px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 11px; line-height: 1; color: var(--surface); background: var(--info); content: "i"; }
.flash.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash.ok::before { content: "✓"; background: var(--ok); }
.flash.error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.error::before { content: "✕"; background: var(--bad); }
.flash.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.flash.warn::before { content: "!"; background: var(--warn); }
.flash code { background: color-mix(in srgb, var(--surface) 60%, transparent); }

ul.warnings { list-style: none; margin: 0 0 12px; padding: 0; }
ul.warnings li { position: relative; padding: 6px 10px 6px 32px; margin-bottom: 4px; border-radius: 6px; }
ul.warnings li::before { position: absolute; left: 12px; top: 6px; font-weight: 700; }
ul.warnings li.w-bad { background: var(--bad-soft); }
ul.warnings li.w-bad::before { content: "✕"; color: var(--bad); }
ul.warnings li.w-warn { background: var(--warn-soft); color: var(--text); font-weight: 400; }
ul.warnings li.w-warn::before { content: "!"; color: var(--warn); }
ul.warnings li.w-info { background: var(--info-soft); }
ul.warnings li.w-info::before { content: "i"; color: var(--info); }
.w-warn { color: var(--warn); font-weight: 600; }

/* ================================================================ pastilles */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); font-weight: 500; vertical-align: middle; }
.badge.ok, .badge.active, .badge.done { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.pending, .badge.lvl-warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad, .badge.empty, .badge.suspended, .badge.refused, .badge.rejected, .badge.lvl-bad { background: var(--bad-soft); color: var(--bad); }
.badge.info, .badge.kind, .badge.lvl-info { background: var(--info-soft); color: var(--info); }
.badge.disabled, .badge.closed, .badge.cancelled { background: var(--surface-3); color: var(--text-3); }
.badge.count { min-width: 20px; justify-content: center; padding: 0 6px; font-weight: 600; }
span.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
span.dot.ok { background: var(--ok); } span.dot.warn { background: var(--warn); } span.dot.bad { background: var(--bad); } span.dot.info { background: var(--info); }
.chip { display: inline-block; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; line-height: 20px; background: var(--surface-2); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { padding: 1px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.dns { display: inline-block; padding: 0 5px; border-radius: 4px; font-size: 11px; line-height: 17px; font-weight: 700; cursor: help; }
.dns.ok { background: var(--ok-soft); color: var(--ok); }
.dns.ko { background: var(--bad-soft); color: var(--bad); }
.dns.na { background: var(--surface-3); color: var(--text-3); font-weight: 400; }
.wcount { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-right: 4px; text-decoration: none; }
.wcount.w-bad { background: var(--bad-soft); color: var(--bad); }
.wcount.w-warn { background: var(--warn-soft); color: var(--warn); }
.dom-list { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.dom { padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 12px; line-height: 18px; }

/* ================================================================ boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px; margin: 2px 0; border-radius: 7px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; text-decoration: none !important;
  white-space: nowrap; vertical-align: middle; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { min-height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* ================================================================ formulaires */
form.stack { display: grid; gap: 12px; max-width: 560px; }
form.stack.wide-form { max-width: 820px; }
.grid2 > form.stack { max-width: none; }
form.stack label, .field { display: grid; gap: 4px; font-weight: 500; }
form.stack label .hint, .field .hint { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=number], select, textarea {
  font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: 7px; padding: 5px 10px; min-height: 34px; max-width: 100%; }
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input.num-in { width: 9em; text-align: right; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 0; min-width: 0; }
legend { color: var(--text-2); padding: 0 4px; font-weight: 600; font-size: 13px; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; padding: 8px; border-radius: 7px; cursor: pointer; font-weight: 400 !important; }
.choice:hover { background: var(--surface-2); }
.choice input { margin-top: 4px; }
.choice small { grid-column: 2; color: var(--text-2); }
form.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-bottom: 14px; }
form.filters label { display: grid; gap: 2px; font-size: 13px; }
form.inline { display: inline; }
.new-pool { display: none; gap: 10px; padding: 4px 8px 8px 30px; }
fieldset:has(input[name="compte"][value="new"]:checked) .new-pool { display: grid; }
.new-pool label { display: grid; gap: 3px; }
fieldset:has(input[name="offer"][value="custom"]:checked) .custom-volume,
fieldset:has(input[name="pool_offer"][value="custom"]:checked) .custom-volume { display: grid; }
textarea.mailbody { width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.45; resize: vertical; }
fieldset.mail-preview { display: grid; gap: 10px; }
fieldset.mail-preview legend .choice { padding: 2px 6px; }

/* ================================================================ tableaux */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 0 0 12px; }
th, td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
th.num { text-align: right; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tfoot td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: 0; }
td.err { color: var(--text-2); font-size: 12px; max-width: 460px; overflow-wrap: anywhere; }
table.sends td { font-size: 13px; }
tr.closed td { color: var(--text-3); }
td.st { white-space: nowrap; }
td.st::before { display: inline-block; width: 16px; font-weight: 700; color: var(--st, var(--text-3)); }
td.st-sent::before { content: "✓"; }
td.st-deferred::before { content: "↻"; }
td.st-bounced::before { content: "✕"; }
td.st-expired::before { content: "⊘"; }
td.st-pending::before { content: "…"; }
td.nowrap { white-space: nowrap; }

/* Liste clé / valeur */
dl.kv, .docs dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
dl.kv dt, .docs dt { color: var(--text-2); }
dl.kv dd, .docs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ================================================================ jauges et graphiques */
.meter { display: block; width: 100%; height: 6px; margin-top: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter rect { fill: var(--series); }
.meter.warn rect { fill: var(--st-deferred); }
.meter.bad rect { fill: var(--st-bounced); }
.share { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--surface-3); vertical-align: middle; overflow: hidden; }
.share rect { fill: var(--st-bounced); }

.chart { margin: 0; position: relative; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .tick { fill: var(--text-3); font-size: 14px; font-family: var(--font); }
.chart .area { fill: var(--series); fill-opacity: .14; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--series); stroke: var(--surface); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .pt:hover .dot, .chart .pt.on .dot { r: 6; }
.chart .pt:focus { outline: none; }
.chart .pt:focus-visible .hit { fill: color-mix(in srgb, var(--series) 12%, transparent); }
.chart .crosshair { stroke: var(--text-3); stroke-width: 1; opacity: 0; pointer-events: none; }
.chart.hovering .crosshair { opacity: 1; }
.chart-tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 7px; padding: 4px 10px; font-size: 13px; white-space: nowrap; box-shadow: var(--shadow-pop); }
.chart-tip strong { color: var(--text); font-size: 15px; display: block; }
.chart-tip span { color: var(--text-2); }
.chart-data { margin: 6px 0 0; font-size: 12px; }
.chart-data a { color: var(--text-2); }
.chart-table { max-height: min(60vh, 520px); overflow-y: auto; }
.chart-table table { width: 100%; }
.chart-table thead th { position: sticky; top: 0; background: var(--surface); }
.period, .presets { display: inline-flex; gap: 2px; font-size: 13px; border: 1px solid var(--border); border-radius: 7px; padding: 2px; flex-wrap: wrap; }
.period a, .presets a { padding: 1px 9px; border-radius: 5px; text-decoration: none; color: var(--text-2); }
.period a:hover, .presets a:hover { background: var(--surface-3); color: var(--text); }
.period a.on, .presets a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.presets { margin: -4px 0 12px; }

/* Barre empilée des statuts */
.stackbar { display: block; width: 100%; height: 14px; border-radius: 6px; margin: 6px 0 10px; }
.st-sent { --st: var(--st-sent); } .st-deferred { --st: var(--st-deferred); }
.st-bounced { --st: var(--st-bounced); } .st-expired { --st: var(--st-expired); }
.stackbar rect { fill: var(--st); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.legend .key { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; color: #fff; font-size: 11px; line-height: 1; background: var(--st); }
.legend strong { color: var(--text); }

/* Causes d'erreurs */
.cause { padding: 10px 0; border-bottom: 1px solid var(--border); }
.cause:last-child { border-bottom: 0; }
.cause-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cause p { margin: 3px 0; font-size: 13px; }
.cause .sample { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }

/* ================================================================ pages particulières */
/* Mot de passe affiché une fois */
.secret { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.secret code { font-size: 18px; letter-spacing: 1px; padding: 6px 10px; background: var(--surface-2); border: 1px dashed var(--accent); user-select: all; }

/* Documentation : sommaire collant à gauche sur grand écran, en tête sinon */
.toc { columns: 2 220px; margin: 0; padding-left: 18px; }
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 16px; align-items: start; }
.docs-toc { position: sticky; top: 70px; }
.docs-toc .toc { columns: auto; }
.docs-toc .toc li { padding: 2px 0; }
.docs-main > .bloc { scroll-margin-top: 70px; }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: minmax(0, 1fr); } .docs-toc { position: static; } .docs-toc .toc { columns: 2 220px; } }
.docs h2 { margin-top: 6px; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 2px 8px; margin: 10px 0; }
.check .ico { font-weight: 700; font-size: 16px; }
.check.ok .ico { color: var(--ok); }
.check.ko .ico { color: var(--bad); }
.check pre { grid-column: 2; margin: 4px 0 0; }

/* Demandes, devis */
.req, .quote { border: 1px solid var(--border); border-left: 4px solid var(--st-deferred); border-radius: 8px; background: var(--surface-2); padding: 10px 12px; margin-bottom: 10px; }
.quote { border-left-color: var(--accent); }
.quote .amount { font-size: 18px; color: var(--accent); font-weight: 700; }
.req-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.req form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-top: 8px; }
.req form label { display: grid; gap: 2px; font-size: 13px; }
.req textarea { min-width: 260px; }

/* Comptes */
.pool-figures { font-size: 13px; color: var(--text-2); }
.pool-figures strong { color: var(--accent); }

/* Domaines d'envoi, clés DKIM */
table.senders .acts { margin-top: 2px; font-size: 12px; }
table.senders .acts form { display: inline; }
table.senders .acts .btn-link { margin-right: 10px; white-space: nowrap; }
table.senders tr.closed td { color: var(--text-3); }
.admin-senders { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
table.senders details.dkim { margin-top: 4px; font-size: 12px; }
table.senders details.dkim summary { cursor: pointer; }
table.senders details.dkim pre { margin: 6px 0; font-size: 12px; white-space: pre; }
table.senders details.dkim ul.dkim-keys { margin: 0 0 4px; padding-left: 18px; }
table.senders details.dkim .acts form { display: inline; }
table.senders details.dkim .acts .btn-link { margin-right: 10px; }

/* Surveillance, facturation */
table.anomalies tr.closed td { color: var(--text-3); }
table.anomalies td form { display: inline; }
table.billing td.num, table.billing th.num { white-space: nowrap; }

/* Courriels d'avertissement */
table.mails th.sw, table.mails td.sw { text-align: center; width: 70px; }
table.mails td.sw input { width: 18px; height: 18px; margin: 2px 0 0; }
table.mails tr.editing td { background: var(--accent-soft); }
pre.mailtext { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-height: 320px; overflow-y: auto; }
details.vars summary { cursor: pointer; color: var(--accent); }
details.vars ul { margin: 6px 0; padding-left: 18px; }

/* ================================================================ composants communs */
/* Fenêtres : <dialog> (modale par app.js, ou rendue ouverte par le serveur) */
dialog { border: 1px solid var(--border); border-radius: 12px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; }
dialog::backdrop { background: rgba(8, 12, 20, .45); backdrop-filter: blur(2px); }
dialog.wide, dialog.mail-dialog { width: min(820px, calc(100vw - 32px)); }
dialog .dh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1; }
dialog .dh h2 { margin: 0; }
dialog .db { padding: 16px 18px; }
dialog .df { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2);
  position: sticky; bottom: 0; }
dialog.mail-dialog { padding: 14px 18px; z-index: 10; }
dialog.mail-dialog form.stack { max-width: none; }
dialog.mail-dialog .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
dialog.mail-dialog .acts .close { margin-left: auto; }
dialog.confirm p { margin: 0; white-space: pre-line; }
/* Fenêtre de formulaire (inline-nojs) : sans script, affichée dans la page, à sa place */
html:not(.js) dialog.inline-nojs { display: block; position: static; width: auto; max-width: none; max-height: none; margin: 0 0 16px; box-shadow: var(--shadow); }
html:not(.js) dialog.inline-nojs .dh form { display: none; }

/* Menus déroulants : <details class="pop"> (fonctionne sans script ; app.js ferme au clic dehors) */
.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; }
.pop > summary::-webkit-details-marker { display: none; }
.pop > summary:hover { background: var(--surface-3); }
.pop-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.pop.right .pop-menu { left: auto; right: 0; }
.pop.up .pop-menu { top: auto; bottom: calc(100% + 6px); }
.pop-menu form { margin: 0; }
.pop-menu a, .pop-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 6px; color: var(--text); background: none;
  border: 0; font: inherit; text-align: left; cursor: pointer; text-decoration: none !important; }
.pop-menu a:hover, .pop-menu button:hover { background: var(--surface-3); }
.pop-menu button[aria-checked="true"] { color: var(--accent); font-weight: 600; }
.pop-menu .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.pop-menu .hd { padding: 6px 10px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.pop-menu a, .pop-menu button { flex-wrap: wrap; row-gap: 0; }
.pop-menu .desc { display: block; flex-basis: 100%; font-size: 12px; font-weight: 400; color: var(--text-3); }
.pop-menu .danger { color: var(--bad); }

/* Encarts repliés : <details class="fold"><summary>…</summary><div class="body">…</div></details> */
details.fold { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 16px; }
details.fold > summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-radius: var(--radius); flex-wrap: wrap; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(-45deg);
  transition: transform .15s; flex: none; margin-right: 2px; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold > summary:hover { background: var(--surface-2); }
details.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
details.fold > summary .title { font-weight: 600; }
details.fold > summary .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
details.fold > .body { padding: 4px 16px 16px; overflow-x: auto; }

/* Onglets : .tabs > button[data-tab=id] ; panneaux .tab-panel#id (le premier .on) */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { background: none; border: 0; border-bottom: 2px solid transparent; padding: 9px 12px; font: inherit; color: var(--text-2); cursor: pointer;
  white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; margin-bottom: -1px; text-decoration: none; }
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs [aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.js .tab-panel:not(.on) { display: none; }

/* Bulle d'aide « ? » : <span class="help" tabindex="0" data-tip="…">?</span> */
.help { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--border-2); color: var(--text-3);
  font-size: 11px; font-weight: 600; cursor: help; position: relative; vertical-align: middle; }
.help:hover::after, .help:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); width: max-content;
  max-width: min(280px, 80vw); background: var(--text); color: var(--surface); font-weight: 400; font-size: 12px; line-height: 1.4; padding: 7px 10px; border-radius: 6px;
  z-index: 40; white-space: normal; text-align: left; }

@media (max-width: 760px) {
  .contenu { flex-direction: column; align-items: stretch; }
  .col_left { flex-basis: auto; width: 100%; }
  dl.kv, .docs dl { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd, .docs dd { margin-bottom: 6px; }
  .bloc, .card { padding: 14px; }
  .req textarea { min-width: 0; width: 100%; }
}

/* ================================================================ 1.13.0 */
/* Bonnes pratiques d'envoi (partials/practices.php) : responsabilité, puis règles numérotées */
.practices .resp { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; margin: 4px 0 14px; }
.practices .resp p { margin: 0 0 6px; }
.practices .resp p:last-child { margin-bottom: 0; }
.practices .rules { margin: 0 0 10px; padding-left: 22px; }
.practices .rules > li { margin-bottom: 10px; }
.practices .rules > li::marker { font-weight: 600; color: var(--accent); }
.practices .rules h3, .practices .rules h4 { font-size: 14.5px; margin: 0 0 2px; }
.practices .rules p { margin: 0; color: var(--text-2); }
.practices .rules.short { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.practices .rules.short li { margin: 0; padding: 8px 10px 8px 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); position: relative; font-weight: 500; }
.practices .rules.short li::before { content: "✓"; position: absolute; left: 10px; top: 8px; color: var(--ok); font-weight: 700; }
.practices-card { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.practices-card .actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 12px; }
.practices-card .actions form { margin: 0; }
.practices-fold { margin-top: 16px; }
.engage { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--surface-2); }
.engage .hint { margin: 2px 8px 6px 34px; }
.tile .sub.offers { color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }

/* Recharges (Facturation) : prix d'un montant personnalisé calculé en direct par app.js */
.oneshot-price { margin: 0; min-height: 1.4em; font-weight: 600; color: var(--accent); }
.oneshot-price.bad-in { color: var(--bad); font-weight: 400; }
table.oneshots td:last-child { width: 1%; white-space: nowrap; }

/* Assistance : coordonnées */
.contact-card { align-self: start; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 12px 16px; }
.contact-card p { margin: 0 0 8px; }
.contact-line { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.contact-line .i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.contact-grid > * { min-width: 0; }
.contact-grid select, .contact-grid textarea, .contact-grid input { max-width: 100%; min-width: 0; box-sizing: border-box; }

/* Fonctions du client (administration) */
.feature-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feature-head h3 { margin: 0; }
.feature p { margin: 8px 0; }
.feature form { margin-top: 10px; }

/* Barre latérale client (1.17.0) : encadré « Mon compte » (lien vers la page), puis le menu, dont
   l'entrée Abonnement(s) se déplie sur les abonnements et leurs accès SMTP ; outils en bas */
.me-card { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); color: var(--text); text-decoration: none; min-width: 0; }
.me-card:hover { background: var(--surface-3); }
.me-card.active { border-color: var(--accent); background: var(--accent-soft); }
.me-card .av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center;
  font-weight: 700; font-size: 12px; flex: none; }
.me-card.active .av { background: var(--surface); }
.me-card .who { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
.me-card .who span { display: block; color: var(--accent); font-weight: 600; }
.me-card .go { width: 7px; height: 7px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(-45deg);
  flex: none; margin-right: 4px; }
.nav-tree > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 7px; color: var(--text-2);
  font-weight: 500; cursor: pointer; }
.nav-tree > summary::-webkit-details-marker, .nav-tree .pool > summary::-webkit-details-marker { display: none; }
.nav-tree > summary:hover { background: var(--surface-3); color: var(--text); }
.nav-tree > summary.active { background: var(--accent-soft); color: var(--accent); }
.nav-tree > summary .n { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.nav-tree > summary .chev, .nav-tree .pool > summary::before { width: 7px; height: 7px; border-right: 1.8px solid var(--text-3);
  border-bottom: 1.8px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; flex: none; }
.nav-tree > summary .chev { margin: 0 2px 4px 0; }
.nav-tree[open] > summary .chev { transform: rotate(-135deg); margin: 4px 2px 0 0; }
.nav-tree .me-list { margin: 2px 0 4px 18px; padding: 2px 0 2px 8px; border-left: 1px solid var(--border); }
.me-list { display: grid; gap: 1px; max-height: 50vh; overflow-y: auto; }
.me-list a { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-size: 13px; min-width: 0; }
.me-list a:hover { background: var(--surface-3); color: var(--text); }
.me-list a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.me-list .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-list .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-3); }
.me-list .dot.active { background: var(--ok); }
.me-list .dot.pending { background: var(--warn); }
.me-list .dot.suspended, .me-list .dot.empty { background: var(--bad); }
.me-list .empty { padding: 5px 8px; font-size: 12.5px; color: var(--text-3); }
.me-list a.add { color: var(--accent); }
.me-list a.add .i { width: 14px; height: 14px; }
.nav-tree .pool > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text); }
.nav-tree .pool > summary::before { content: ""; transform: rotate(-45deg); }
.nav-tree .pool[open] > summary::before { transform: rotate(45deg); }
.nav-tree .pool > summary:hover { background: var(--surface-3); }
.nav-tree .pool .n { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.nav-tree .pool .accs { display: grid; gap: 1px; padding-left: 14px; }
.me-list a.sub { font-size: 12px; color: var(--text-3); }
.me-list a.sub.active { color: var(--accent); }
.foot-tools { display: flex; align-items: center; gap: 4px; padding: 4px 6px 0; }
.foot-tools form { margin: 0; }
.foot-tools a, .foot-tools button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 0; background: none;
  color: var(--text-2); cursor: pointer; padding: 0; }
.foot-tools a:hover, .foot-tools button:hover { background: var(--surface-3); color: var(--text); }
.foot-tools a.active { background: var(--accent-soft); color: var(--accent); }
.theme-set { display: flex; gap: 2px; margin-right: auto; padding: 2px; border: 1px solid var(--border); border-radius: 9px; }
.theme-set button { width: 26px; height: 26px; }
.theme-set button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent); }

/* Cloche de la barre du haut : fil « À vérifier » / « À traiter » (partials/bell.php) */
.bell > summary { list-style: none; position: relative; }
.bell > summary::-webkit-details-marker { display: none; }
.bell-count { position: absolute; top: -2px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700; line-height: 1; color: #fff; background: var(--warn); border: 2px solid var(--surface); box-sizing: border-box; }
.bell-count.is-bad { background: var(--bad); }
.bell-menu { width: min(380px, calc(100vw - 24px)); padding: 6px; }
.bell-list { max-height: min(60vh, 460px); overflow-y: auto; display: grid; gap: 1px; }
.bell-menu .bell-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 8px 10px; border-radius: 6px;
  color: var(--text); text-decoration: none; flex-wrap: nowrap; }
.bell-menu a.bell-item:hover { background: var(--surface-3); }
.bell-item .badge { margin-top: 1px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.bell-item .what { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.bell-item .what b { font-weight: 600; }
.bell-item .what .sub { display: block; color: var(--text-2); font-size: 12px; }
.bell-item.is-info { opacity: .85; }
.bell-empty { display: flex; align-items: center; gap: 8px; margin: 6px 10px 8px; color: var(--text-2); }
.bell-menu .bell-all { justify-content: center; color: var(--accent); font-weight: 500; }
@media (max-width: 760px) {
  .pop.right.bell .bell-menu { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; min-width: 0; }
}

/* Solde de la barre du haut, multi : pastille + menu détaillé par abonnement (partials/solde.php) */
.solde-pop > summary.solde { cursor: pointer; }
.solde-pop > summary.solde:hover, .solde-pop[open] > summary.solde { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.solde .dot { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--surface); }
.solde-menu { width: min(360px, calc(100vw - 24px)); padding: 6px; }
.solde-list { max-height: min(60vh, 460px); overflow-y: auto; display: grid; gap: 1px; }
.solde-menu .solde-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 8px 10px; border-radius: 6px;
  color: var(--text); text-decoration: none; flex-wrap: nowrap; }
.solde-item .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.solde-item .n { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; white-space: nowrap; }
.solde-item .n.muted { font-weight: 400; font-size: 12px; }
.solde-item .meter { grid-column: 1 / -1; margin-top: 2px; }
.solde-item .desc { grid-column: 1 / -1; font-size: 12px; }
.solde-item.is-warn .n, .solde-item.is-warn .desc { color: var(--warn); }
.solde-item.is-bad .n, .solde-item.is-bad .desc { color: var(--bad); }
.solde-total { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.solde-total .n { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.solde-links { display: flex; gap: 4px; }
.solde-menu .solde-links a { flex: 1 1 auto; width: auto; white-space: nowrap; justify-content: center; color: var(--accent); font-weight: 500; }
@media (max-width: 760px) {
  .pop.right.solde-pop .solde-menu { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; min-width: 0; }
}

/* Bonnes pratiques à valider : fenêtre (partials/practices_dialog), bandeau du tableau de bord */
dialog.practices-dlg[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog.practices-dlg .db { overflow-y: auto; min-height: 0; }
.practices-ack { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.practices-ack .choice { flex: 1 1 260px; margin-right: auto; padding: 4px 0; }
.practices-ack .choice:hover { background: none; }
.practices-ack.inline { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.practices-nudge { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--border)); background: var(--bad-soft); color: var(--text); }
.practices-nudge > svg { color: var(--bad); flex: none; }
.practices-nudge span { flex: 1 1 260px; }

/* Creaweb consulte l'espace d'un client (session ouverte depuis l'administration) */
.cw-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 8px 16px; background: var(--warn-soft); color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border)); font-size: 13.5px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; }
.cw-banner > svg { color: var(--warn); flex: none; }
.cw-banner span { flex: 1 1 300px; }
.cw-banner form { margin: 0; }

/* Message bref en bas de l'écran (app.js : toast) */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100;
  max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-pop); font-size: 13.5px; }

/* Abonnements (multi) : demander un abonnement supplémentaire (1.17.0) */
.page-h .actions { display: flex; flex-wrap: wrap; gap: 8px; }
a.pool-add { display: flex; align-items: center; gap: 12px; border-style: dashed; color: var(--accent); text-decoration: none; }
a.pool-add:hover { background: var(--accent-soft); }
a.pool-add > svg { flex: none; width: 22px; height: 22px; }
a.pool-add span { display: grid; gap: 2px; }
a.pool-add small { color: var(--text-2); font-weight: 400; }
ul.plain { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.js .nojs-only { display: none !important; }

/* Page Envois (1.17.0) : période, abonnement et accès en haut ; graphique et résultats ; liste */
.sends-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.sends-scope .presets { margin: 0; }
.sends-scope .scope-form { margin: 0; }
.sends-scope .scope-form select { max-width: 260px; }
#liste .chart-head { align-items: flex-end; }
#liste .list-form { margin: 0; }
table.sends .col-acc small { display: block; font-size: 11.5px; }
.chart .pt.out .dot { opacity: .35; }
@media (max-width: 760px) {
  table.sends .col-from { display: none; }
  .sends-scope .scope-form select { max-width: none; }
}
/* Mon compte (1.17.0) : deux colonnes égales, empilées sur petit écran */
.profil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 16px; align-items: start; }

/* Domaines d'envoi à déclarer avant la fin de la tolérance (1.18.0) : bandeau à décompte en tête
   de chaque page (partials/domains_deadline), rouge dans les 3 derniers jours (is-bad) */
.deadline { --dl: var(--warn); --dl-soft: var(--warn-soft);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 20px; align-items: start; margin: 0 0 18px; padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--dl) 45%, var(--border)); border-left: 6px solid var(--dl); border-radius: var(--radius);
  background: var(--dl-soft); color: var(--text); box-shadow: var(--shadow); }
.deadline.is-bad { --dl: var(--bad); --dl-soft: var(--bad-soft); }
.dl-clock { display: grid; grid-template-columns: repeat(3, auto); gap: 2px 14px; padding: 10px 16px; border-radius: 8px; text-align: center;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--dl) 30%, var(--border)); }
.dl-k { grid-column: 1 / -1; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.dl-n b { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--dl); font-variant-numeric: tabular-nums; }
.dl-n i { display: block; font-style: normal; font-size: 12px; color: var(--text-2); }
.dl-body h2 { margin: 0 0 6px; font-size: 17px; text-wrap: balance; }
.dl-body p { margin: 0 0 8px; }
.dl-acc { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.dl-seen { color: var(--dl); font-size: 13px; }
.dl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dl-ack { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.dl-ack .choice { padding: 4px 0; }
.dl-ack .choice:hover { background: none; }
@media (max-width: 560px) {
  .deadline { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .dl-clock { justify-self: start; }
  .dl-n b { font-size: 26px; }
}
/* IP d'envoi supplémentaires (1.18.0) : page Réputation, fenêtre de demande */
ul.ip-uses, ul.ip-notes { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }

/* Réglages > IP d'envoi (1.19.0) : une IP ne se coupe pas */
.ip-groups code { white-space: nowrap; }
