/* Pages du serveur hébergé (connexion, invitation, accueil, administration) :
   mêmes couleurs que l'éditeur, clair / sombre selon le choix mémorisé
   (clé ivrb-theme, partagée avec l'éditeur) ou le système. */
:root {
  /* ── Jetons (charte : changer ces valeurs suffit ; l'accent indigo est la couleur de marque par défaut) ── */
  --accent: #4f46e5; --accent-fg: #fff; --accent-soft: #eef0ff;
  --bg: #fff; --surface: #f4f6f9; --surface-2: #eef1f5; --card: #fff; --fg: #1b1f27; --muted: #5b6472; --border: #dde2ea;
  --ok: #167a3a; --ok-soft: #e7f6ec; --warn: #9a5b00; --warn-soft: #fff4dc; --danger: #c62828; --danger-soft: #fdecec;
  --info: #1f6fb2; --info-soft: #e8f2fb; --idle: #8a93a3;
  --warn-bg: var(--warn-soft); --warn-fg: var(--warn);
  --on-solid: #fff; /* texte sur fond plein (succès, erreur, pastilles) */
  --radius: 6px; --radius-card: 10px; --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  color-scheme: light;
}
:root[data-theme=dark] {
  --accent: #8b8cf8; --accent-fg: #0f1117; --accent-soft: #23244a;
  --bg: #12141a; --surface: #0f1116; --surface-2: #1f232c; --card: #171a21; --fg: #e7e9ee; --muted: #9aa3b2; --border: #2a2f3a;
  --ok: #45c26a; --ok-soft: #11301c; --warn: #f0b84a; --warn-soft: #33270c; --danger: #f47174; --danger-soft: #3a1618;
  --info: #6cb2f0; --info-soft: #12283c; --idle: #6b7383;
  --on-solid: #0f1117;
  --shadow-card: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
/* Estampille : version du serveur dans la barre du haut. */
.version { font-size: var(--fs-11, 11px); color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-10, 10px); padding: 1px 8px; white-space: nowrap; }
body { font: 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--fg); background: var(--surface); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-6, 6px); padding: 6px 12px; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
button.danger { color: var(--danger); }
button.link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; }
input, select, textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--r-6, 6px); background: var(--bg); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-12h, 12.5px); }
input[type=checkbox] { width: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-13, 13px); color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--fg); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-12h, 12.5px); }
.error { color: var(--danger); }
.ok { color: var(--ok); }
.hidden { display: none !important; }

/* Connexion, invitation : carte centrée */
.center { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-10, 10px); padding: 24px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.card h1 { margin: 0; font-size: var(--fs-20, 20px); }
.brand { font-weight: var(--fw-strong, 700); letter-spacing: .01em; }
.brand span { color: var(--accent); }
.brand { display: inline-flex; align-items: center; white-space: pre; }
.brand img { display: block; margin-right: 8px; }

/* Barre du haut (accueil, administration) */
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 16px; height: 46px; background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { padding: 5px 10px; border-radius: var(--r-6, 6px); text-decoration: none; color: var(--fg); }
.topbar nav a.active { background: var(--surface-2); font-weight: 600; }
.topbar .spacer { flex: 1; }
.app { height: 100%; display: flex; flex-direction: column; }
.app ivr-builder { flex: 1; min-height: 0; position: relative; display: block; }

/* Petit écran : invitation à ouvrir l'éditeur sur un ordinateur (index.html). */
.small-screen { flex: 1; display: grid; place-items: center; padding: 24px 16px; }
.small-screen .card { max-width: 420px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 1px solid var(--border); border-radius: var(--r-6, 6px); padding: 6px 12px; color: var(--fg); background: var(--card); }
a.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }

/* Accueil d'un client sans IVR */
.welcome { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.welcome-head { padding: 14px 18px 0; }
.welcome-head h1 { margin: 0 0 4px; }
.welcome-head p { margin: 0 0 10px; }
.welcome ivr-library { flex: 1; min-height: 0; display: block; position: relative; border-top: 1px solid var(--border); }
.welcome-inner { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.welcome h1 { margin: 0; font-size: var(--fs-22, 22px); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tpl { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-8, 8px); }
.tpl.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tpl b { font-size: var(--fs-14, 14px); }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 200px; }

/* Administration */
.admin { flex: 1; overflow: auto; padding: 20px 16px 40px; }
.admin-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-card); }
.panel h2 { margin: 0; font-size: var(--fs-20, 20px); font-weight: var(--fw-strong, 650); letter-spacing: -.01em; }
.panel h3 { margin: 4px 0 0; font-size: var(--fs-14, 14px); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-13, 13px); }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: var(--fs-12, 12px); text-transform: var(--caps, uppercase); letter-spacing: .03em; background: var(--surface-2); }
th:first-child { border-top-left-radius: var(--radius); } th:last-child { border-top-right-radius: var(--radius); }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
tr.selected td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
td .actions { display: flex; gap: 6px; flex-wrap: wrap; }

.secret { font-family: ui-monospace, monospace; font-size: var(--fs-12h, 12.5px); word-break: break-all; background: var(--warn-bg); color: var(--warn-fg); padding: 8px 10px; border-radius: var(--r-6, 6px); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.modules { display: flex; flex-wrap: wrap; gap: 4px 14px; }
/* Petit écran : tableaux en cartes (une ligne = une carte, titre de colonne devant chaque valeur, toutes les actions
   gardées) ; data-label posé par labelTables (common.js). */
@media (max-width: 640px) {
  .admin table, .admin tbody, .admin tr, .admin td { display: block; width: 100%; }
  .admin thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .admin tbody tr { border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 6px 10px; margin-bottom: 8px; background: var(--card); }
  .admin td { border: none; padding: 3px 0; display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr); gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
  .admin td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-12, 12px); }
  .admin td > .tag, .admin td > select { justify-self: start; }
  .admin td[data-label=""] { display: block; }
  .admin td[data-label=""]::before { display: none; }
  .admin td:empty { display: none; }
}
.token-box { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--bg); font-size: var(--fs-12h, 12.5px); white-space: pre-wrap; word-break: break-all; user-select: all; }
a.who { color: inherit; text-decoration: none; }
a.who:hover, a.who.active { text-decoration: underline; }

.health-head h2 { margin: 0; }
.health-summary { display: flex; gap: 6px; }

/* Administration : navigation à gauche, une rubrique à la fois (admin.html / admin.js). */
.admin-layout { flex: 1; min-height: 0; display: flex; }
.admin-layout > .admin { min-width: 0; }
.admin-nav { width: 220px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; border-right: 1px solid var(--border); background: var(--card); overflow: auto; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: var(--r-6, 6px); text-decoration: none; color: var(--fg); }
.admin-nav a .icon { color: var(--muted); }
.admin-nav a.active .icon { color: var(--accent); }
.nav-group { margin: 14px 12px 4px; font-size: var(--fs-11, 11px); font-weight: var(--fw-strong, 650); letter-spacing: .06em; text-transform: var(--caps, uppercase); color: var(--muted); }
/* Tableau de bord : tuiles des chiffres clés. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--card); color: var(--fg); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile .icon { grid-row: 1 / 3; color: var(--accent); }
.tile b { font-size: var(--fs-22, 22px); line-height: 1.1; }
.tile span { font-size: var(--fs-12h, 12.5px); color: var(--muted); }
.todo-list li > .icon { color: var(--warn); }
.todo-list li.danger > .icon { color: var(--danger); }
.todo-list li.info > .icon { color: var(--info); }
.todo-list li.done > .icon { color: var(--ok); }
.todo-go { white-space: nowrap; font-weight: 600; text-decoration: none; }
.admin-nav a:hover { background: var(--surface-2); }
.admin-nav a.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-9, 9px); font-size: var(--fs-11, 11px); font-weight: var(--fw-strong, 700); display: inline-grid; place-items: center; color: var(--on-solid); background: var(--muted); }
.nav-badge.off { background: var(--danger); }
.nav-badge.warn { background: var(--warn); color: var(--card); }
.panel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.panel-head input[type=search] { width: 260px; }
.panel-head select, .panel-head input[type=month] { width: auto; }
.subcard { border-top: 1px solid var(--border); padding-top: 14px; }
.subcard > h3 { margin: 0 0 8px; }
details.subcard > summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; list-style: none; }
details.subcard > summary::before { content: '▸'; color: var(--muted); }
details.subcard[open] > summary::before { content: '▾'; }
details.subcard > summary h3 { margin: 0; display: inline; }
details.subcard[open] > summary { margin-bottom: 10px; }
.platform-section.subcard { padding-top: 14px; }
.row > label.narrow { flex: 0 0 140px; min-width: 120px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.inline input { width: auto; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }
@media (max-width: 820px) {
  .admin-layout { flex-direction: column; }
  .admin-nav { width: auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 8px; }
  .admin-nav a { white-space: nowrap; }
  .nav-group { display: none; }
  .panel-head input[type=search] { width: 100%; }
}

/* Assistant IA : fournisseurs branchés */
.ai-providers td { vertical-align: top; }
.ai-providers .where { word-break: break-all; }
.ai-providers .models code { font-size: var(--fs-11h, 11.5px); }
.ai-providers .model { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; padding: 2px 0; }
.ai-providers .model.bad code { color: var(--danger); }
.ai-providers .model .detail { flex-basis: 100%; }
.ai-providers .model button { padding: 0 6px; font-size: var(--fs-11h, 11.5px); }
/* Formulaire : liste des modèles, modèle par modèle (ordre = paliers) */
.ai-models-box { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-13, 13px); color: var(--muted); grid-column: 1 / -1; }
.ai-models { list-style: decimal; margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; color: var(--fg); }
.ai-models li { padding-left: 2px; }
.ai-models .line { display: flex; gap: 4px; align-items: center; }
.ai-models input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-12h, 12.5px); padding: 4px 8px; }
.ai-models button { padding: 3px 8px; }
.ai-models-box .row input { flex: 1; min-width: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-12h, 12.5px); }

/* Connexions de données (data.html / data.js) : liste, fiche d'une connexion, assistant de requête */
.db-page { max-width: 1320px; }
.db-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.db-note { padding: 8px 12px; border-radius: var(--r-6, 6px); background: var(--warn-bg); color: var(--warn-fg); font-size: var(--fs-13, 13px); }
.db-table td code { font-size: var(--fs-12h, 12.5px); word-break: break-all; }
.db-form { display: flex; flex-direction: column; gap: 8px; }
.db-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; flex-direction: unset; color: var(--fg); font-size: var(--fs-13, 13px); }
.db-row > span:first-child { color: var(--muted); }
.db-pair { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.db-pair > input:first-child, .db-pair > select:first-child { flex: 1; min-width: 160px; }
.db-pair > input[type=number] { width: 90px; flex: none; }
.db-pair .db-cc { width: 90px; flex: none; }
.db-ivrs { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-6, 6px); overflow: hidden; flex-wrap: wrap; }
.seg button { border: none; border-radius: 0; border-right: 1px solid var(--border); padding: 6px 12px; background: var(--bg); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.db-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.db-actions .spacer, .panel-head .spacer { flex: 1; }
.db-box { border-radius: var(--r-8, 8px); padding: 10px 12px; border: 1px solid var(--border); font-size: var(--fs-13, 13px); }
.db-box ul { margin: 6px 0 0; padding-left: 18px; }
.db-box.good { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.db-box.warn { border-color: var(--warn); background: var(--warn-bg); color: var(--warn-fg); }
.db-box.bad { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.db-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--r-8, 8px); overflow: hidden; }
.db-steps li { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-right: 1px solid var(--border); color: var(--muted); background: var(--bg); }
.db-steps li:last-child { border-right: none; }
.db-steps li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); font-size: var(--fs-12, 12px); font-weight: var(--fw-strong, 700); }
.db-steps li span:empty { display: none; }
.db-steps li.on { color: var(--fg); font-weight: 600; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.db-steps li.on span { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.db-steps li.done span { background: var(--ok); border-color: var(--ok); color: var(--on-solid); }
.db-tables { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; }
.db-pick { flex-direction: row; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--r-6, 6px); color: var(--fg); cursor: pointer; }
.db-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.db-pick .spacer { flex: 1; }
.db-cond { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--bg); }
.db-cols { display: flex; flex-direction: column; gap: 4px; }
.db-colrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 10px; border-radius: var(--r-6, 6px); border: 1px solid transparent; }
.db-colrow.on { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.db-sort label { flex: 0 1 200px; }
.db-sql summary { cursor: pointer; color: var(--muted); font-size: var(--fs-13, 13px); }
.db-sql pre { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--r-6, 6px); background: var(--surface-2); font-size: var(--fs-12h, 12.5px); white-space: pre-wrap; word-break: break-word; }
.db-try { display: flex; flex-direction: column; gap: 6px; }
.db-rows th, .db-rows td { font-size: var(--fs-12h, 12.5px); }
.db-param > input { min-width: 110px; flex: 1; }
.db-param > select { flex: 0 1 180px; }
@media (max-width: 980px) { .db-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .db-row { grid-template-columns: 1fr; gap: 4px; } .db-steps { grid-auto-flow: row; } .db-colrow { grid-template-columns: 1fr; } }
.db-table .tag { white-space: nowrap; }
/* Barre du haut : produit, contexte, pages, menu du compte ; menu (☰) sur petit écran, rien de tronqué. */
.topbar { position: relative; z-index: 40; }
.topbar-menu { display: contents; }
.nav-toggle { display: none; }
.topbar nav a { white-space: nowrap; display: inline-flex; align-items: center; }
.topbar-ctx { max-width: 240px; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-12h, 12.5px); color: var(--fg); background: var(--surface-2); border-color: transparent; }
.account { position: relative; }
.account-btn { display: inline-flex; align-items: center; gap: 8px; border: none; background: none; padding: 4px 6px; color: var(--muted); }
.account-btn:hover:not(:disabled) { color: var(--fg); }
.account-name { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-13, 13px); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-13, 13px); font-weight: var(--fw-strong, 700); background: var(--accent-soft); color: var(--accent); }
.account-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 310px; flex-direction: column; gap: 6px; padding: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-10, 10px); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.account.open .account-pop { display: flex; }
.account-pop .who { font-weight: 600; font-size: var(--fs-13, 13px); padding: 2px 4px 6px; border-bottom: 1px solid var(--border); white-space: normal; }
.account-pop .account-item { padding: 6px 4px; color: var(--fg); text-decoration: none; border-radius: var(--r-6, 6px); }
.account-pop .account-item:hover { background: var(--surface-2); }
.account-theme { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px; }
.account-theme .seg { flex-wrap: nowrap; }
.account-theme .seg button { padding: 3px 9px; font-size: var(--fs-12h, 12.5px); white-space: nowrap; }
button.link { text-align: left; }
.account-version { padding: 2px 4px; }
.account-pop .logout { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-start; }
@media (max-width: 640px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar-ctx { flex: 1; max-width: none; min-width: 0; }
  .nav-toggle { display: inline-grid; place-items: center; margin-left: auto; padding: 5px 8px; }
  .topbar-menu { display: none; position: absolute; z-index: 50; top: 100%; right: 8px; left: 8px; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--r-10, 10px); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
  .topbar-menu.open { display: flex; }
  .topbar-menu nav { flex-direction: column; }
  .topbar-menu nav a { padding: 8px 10px; }
  .topbar-menu .spacer { display: none; }
  .account-btn { display: none; }
  .account-pop { display: flex; position: static; box-shadow: none; border: none; border-top: 1px solid var(--border); border-radius: 0; padding: 8px 0 0; min-width: 0; }
}
/* Section ouverte par l'adresse (#client=…&section=…) : mise en évidence brève. */
@keyframes section-flash { from { box-shadow: 0 0 0 3px var(--accent, #2f6feb); } to { box-shadow: 0 0 0 3px transparent; } }
.section-flash { animation: section-flash 1.6s ease-out; scroll-margin-top: 12px; }

/* ════════ Composants communs (administration, connexions de données, sections des modules de plateforme) ════════ */
/* Icônes (common.js : icon(nom)) : SVG au trait, couleur du texte. */
.icon { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: -3px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.lg { width: 20px; height: 20px; }
/* Puces : neutre, accent, ok, warn, danger, info (.tag : ancien nom, mêmes variantes ; off = danger). Jamais la couleur seule : texte explicite. */
.chip, .tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-11h, 11.5px); line-height: 18px; padding: 0 8px; border-radius: var(--r-999, 999px); border: 1px solid var(--border); color: var(--muted); background: var(--card); white-space: nowrap; vertical-align: middle; }
.chip.accent, .tag.accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.chip.ok, .tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-soft); }
.chip.warn, .tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.tag { white-space: normal; text-align: left; }
.chip.danger, .tag.off, .chip.off { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }
.chip.info, .tag.info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: var(--info-soft); }
/* Voyant : pastille + texte (ok, warn, danger, idle, busy). */
.status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-12h, 12.5px); font-weight: 600; color: var(--muted); white-space: nowrap; }
.status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--idle); flex: none; }
.status.ok { color: var(--ok); } .status.ok::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.status.warn { color: var(--warn); } .status.warn::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.status.danger, .status.ko { color: var(--danger); } .status.danger::before, .status.ko::before { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.status.busy::before { background: var(--warn); animation: status-busy 1s ease-in-out infinite alternate; }
@keyframes status-busy { to { opacity: .3; } }
/* Carte secondaire (dans un panneau) : en-tête titre + résumé + actions, corps. */
.card-sub { border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h3, .card-head h4 { margin: 0; font-size: var(--fs-15, 15px); font-weight: 600; }
.card-sub > h3, .card-sub > h4 { margin: 0; font-size: var(--fs-14h, 14.5px); font-weight: 600; }
.card-head .spacer { flex: 1; }
/* Onglets (common.js : tabs()) : soulignés, compteur ou puce d'état, flèches du clavier. */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin; }
.tabs [role=tab] { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 14px; margin-bottom: -1px; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.tabs [role=tab]:hover:not(:disabled) { color: var(--fg); border-color: transparent; border-bottom-color: var(--border); }
.tabs [role=tab][aria-selected=true] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs.sub [role=tab] { padding: 6px 12px; font-size: var(--fs-13, 13px); }
.tab-count { font-size: var(--fs-11, 11px); font-weight: 600; min-width: 18px; padding: 0 6px; border-radius: var(--r-999, 999px); background: var(--surface-2); color: var(--muted); line-height: 17px; text-align: center; }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.tab-dot.danger { background: var(--danger); }
[role=tabpanel][hidden] { display: none !important; }
/* Résumé repliable : icône, titre, résumé d'une ligne, voyant, chevron. */
details.summary-row { border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--card); }
details.summary-row > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
details.summary-row > summary::-webkit-details-marker { display: none; }
details.summary-row > summary::after { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); margin-left: 4px; transition: transform .15s; }
details.summary-row[open] > summary::after { transform: rotate(45deg); }
details.summary-row > summary h3 { margin: 0; font-size: var(--fs-15, 15px); font-weight: 600; }
details.summary-row > summary .sum { color: var(--muted); font-size: var(--fs-13, 13px); flex: 1; min-width: 0; }
details.summary-row > .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
/* État vide : icône, une phrase, une action. */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--r-8, 8px); }
.empty .icon { width: 28px; height: 28px; stroke-width: 1.4; }
/* À faire : niveau, phrase, lien d'action. */
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-left: 3px solid var(--warn); border-radius: var(--r-6, 6px); background: var(--card); }
.todo-list li.danger { border-left-color: var(--danger); }
.todo-list li.info { border-left-color: var(--info); }
.todo-list li .what { flex: 1; min-width: 0; }
.todo-list li .who { color: var(--muted); font-size: var(--fs-12h, 12.5px); }
.todo-list .done { border-left-color: var(--ok); color: var(--muted); }
/* Liste de contrôle horizontale (mise en service) : pastilles numérotées cliquables. */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.checklist li > * { width: 100%; height: 100%; text-align: left; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); background: var(--card); }
.checklist .dot { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-12, 12px); font-weight: var(--fw-strong, 700); border: 2px solid var(--border); color: var(--muted); }
.checklist .done .dot { background: var(--ok); border-color: var(--ok); color: var(--on-solid); }
.checklist .todo .dot { border-color: var(--warn); color: var(--warn); }
.checklist b { display: block; font-size: var(--fs-13, 13px); }
.checklist span.txt { display: block; font-size: var(--fs-12, 12px); color: var(--muted); }
/* Zone sensible : actions destructives, confirmées. */
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border)); border-radius: var(--r-8, 8px); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.danger-zone h3 { margin: 0; font-size: var(--fs-15, 15px); color: var(--danger); }
button.danger-solid { background: var(--danger); border-color: var(--danger); color: var(--on-solid); font-weight: 600; }
/* Panneau latéral (formulaires longs). */
.drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .35); }
.drawer { position: fixed !important; z-index: 91; top: 0; right: 0; bottom: 0; margin: 0 !important; width: min(600px, 100vw); max-width: 100vw; background: var(--card); border: none; border-left: 1px solid var(--border); border-radius: 0;
  box-shadow: -12px 0 30px rgba(15, 23, 42, .18); overflow: auto; padding: 0 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 0; margin-bottom: 2px; border-bottom: 1px solid var(--border); background: var(--card); }
.drawer-head h3 { margin: 0; font-size: var(--fs-16, 16px); flex: 1; }
.drawer-close { border: none; background: none; padding: 4px; }
/* Bulle d'aide « ? » repliée. */
details.help { font-size: var(--fs-12h, 12.5px); color: var(--muted); }
details.help > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
details.help > summary::-webkit-details-marker { display: none; }
details.help[open] > summary { margin-bottom: 6px; }
/* Grille de formulaire, tableau d'édition compact. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.edit-grid { width: 100%; border-collapse: collapse; font-size: var(--fs-12h, 12.5px); }
.edit-grid th { text-align: left; font-weight: 600; color: var(--muted); font-size: var(--fs-11h, 11.5px); padding: 4px; background: none; text-transform: none; letter-spacing: 0; }
.edit-grid td { padding: 3px 4px; vertical-align: middle; border: none; }
.edit-grid input, .edit-grid select { width: 100%; min-width: 0; padding: 4px 6px; font-size: var(--fs-12h, 12.5px); }
.edit-grid input[type=checkbox] { width: auto; }
/* Bandeau d'identifiant copié (Alt + clic sur un libellé) */
.id-toast { position: fixed; z-index: 1000; max-width: 360px; padding: 6px 10px; border-radius: var(--r-6, 6px); font-size: var(--fs-12, 12px); background: #1d2129; color: #fff; word-break: break-all; pointer-events: none; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-row .spacer { flex: 1; }
.nowrap { white-space: nowrap; }

/* ════════ Fiche d'un client : en-tête, onglets, sections ════════ */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tenant-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.tenant-head h2 { font-size: var(--fs-24, 24px); }
.tenant-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tenant-head .spacer { flex: 1; }
.tab-body { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
button.tile { font: inherit; text-align: left; cursor: pointer; }
details.settings > summary { display: none; }
details.settings > form { display: flex; flex-direction: column; gap: 14px; }
/* Modules du client en cartes (case + nom + rôle en une phrase). */
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.module-card { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-8, 8px); color: var(--fg); cursor: pointer; }
.module-card > span { display: flex; flex-direction: column; gap: 2px; }
.module-card input { margin-top: 3px; }
.module-card:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); background: var(--accent-soft); }
.module-cards.ro .module-card { cursor: default; }
.module-cards.ro .module-card.on .icon { color: var(--ok); }
.module-cards.ro .module-card.off { opacity: .75; }
/* Listes d'adresses en puces éditables. */
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); min-height: 38px; }
.chips-edit .chip { color: var(--fg); font-size: var(--fs-12h, 12.5px); padding-right: 2px; }
.chips-edit .chip button { border: none; background: none; padding: 0 2px; line-height: 0; color: var(--muted); }
.chips-edit .chip .icon { width: 12px; height: 12px; }
.chips-edit .chip-input { flex: 1; min-width: 160px; border: none; padding: 4px; background: transparent; }
.chips-edit .chip-input:focus-visible { outline: none; }
.chips-edit:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea.chips-src { display: none; }
/* Menu « … » d'une ligne de tableau. */
details.more { position: relative; display: inline-block; }
details.more > summary { list-style: none; cursor: pointer; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius); line-height: 0; background: var(--card); }
details.more > summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; display: flex; flex-direction: column; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-8, 8px); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.more-pop button { border: none; text-align: left; background: none; padding: 7px 10px; }
.more-pop button:hover:not(:disabled) { background: var(--surface-2); }
.more-pop a { padding: 7px 10px; border-radius: var(--r-6, 6px); color: var(--fg); text-decoration: none; }
.more-pop a:hover { background: var(--surface-2); }
/* Rubrique « IVR » : filtres de production sous l'en-tête, à leur largeur. */
#ivr-show { align-self: flex-start; width: fit-content; max-width: 100%; margin: 10px 0 12px; }
.empty .btn { margin-top: 4px; }
td .actions { align-items: center; }
@media (max-width: 640px) { .tenant-head h2 { font-size: var(--fs-20, 20px); } .tenant-head > button { width: 100%; } }
.tabs [role=tab][hidden] { display: none; }
form.db-policy { display: flex; flex-direction: column; gap: 14px; }

/* ════════ Connexions de données : en-tête compact, liste en cartes, fiche à onglets, assistant à la place de la fiche ════════ */
.db-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.db-head h1 { margin: 0; font-size: var(--fs-20, 20px); font-weight: var(--fw-strong, 650); }
.db-head .spacer { flex: 1; }
.db-help { max-width: 520px; }
.db-help[open] { flex-basis: 100%; max-width: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 8px 12px; }
.db-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-card { border: 1px solid var(--border); border-radius: var(--r-8, 8px); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: var(--card); }
.db-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.db-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--card)); }
.db-card.error { border-left: 3px solid var(--danger); }
.db-card .card-head { gap: 8px; }
.db-card .card-head .icon { color: var(--accent); }
.db-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
#db-detail > .tabs { margin-top: -4px; }
.db-layout.wizard-open { grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); }
.db-layout.wizard-open > #db-detail { display: none; }
.db-layout > #db-wizard { grid-column: 2; grid-row: 1; }
@media (max-width: 980px) { .db-layout > #db-wizard { grid-column: 1; grid-row: auto; } .db-layout.wizard-open { grid-template-columns: 1fr; } }

/* ════════ Connexion : refus d'une plateforme au-dessus du formulaire ════════ */
.center-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 420px; }
.center-stack .card { max-width: 420px; }
#platform-refused { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }

/* ════════ Accessibilité : mouvement réduit ════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Interrupteur de thème (Système → Clair → Sombre) : barre du haut, coin des pages sans barre (connexion, invitation). */
.theme-toggle { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: var(--r-8, 8px); border: 1px solid var(--border); background: var(--card); color: var(--muted); flex: none; }
.theme-toggle:hover:not(:disabled) { color: var(--fg); }
.theme-toggle[data-theme-pref=light], .theme-toggle[data-theme-pref=dark] { color: var(--accent); }
.theme-corner { position: fixed; top: 12px; right: 12px; z-index: 40; }

/* État de l'administration tenu à jour : « mis à jour il y a … » et « Actualiser » (en haut de la rubrique). */
.live-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: -8px; font-size: var(--fs-12, 12px); color: var(--muted); }
.live-bar button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: var(--fs-12h, 12.5px); }
.live-bar.busy .icon { animation: live-spin 1s linear infinite; }
.live-bar.stale #live-ago { color: var(--warn); }
@keyframes live-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .live-bar.busy .icon { animation: none; } }

/* ── Dialogue de confirmation (charte § 5.8) : voile, boîte 440 px, Annuler à gauche, verbe destructeur à droite ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.confirm-scrim { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: var(--color-scrim, rgba(15, 23, 42, .45)); }
.confirm-box { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 24px;
  background: var(--card); color: var(--fg); border: 1px solid var(--border); border-radius: var(--r-12, 12px); box-shadow: var(--elevation-3, 0 20px 40px rgba(15, 23, 42, .25)); }
.confirm-title { margin: 0; font-size: var(--fs-16, 16px); font-weight: 600; line-height: 1.4; }
.confirm-body { color: var(--muted); }
.confirm-body p, .confirm-body ul { margin: 0 0 8px; }
.confirm-body ul { padding-left: 20px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; flex-wrap: wrap; }

/* ── Notifications (charte § 5.9) : pile en bas à droite, icône + couleur + gravité lue ── */
.notif-stack { position: fixed; z-index: 190; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.notif, .notif-list li { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: start; }
.notif { padding: 12px; background: var(--card); color: var(--fg); border: 1px solid var(--border); border-left: 4px solid var(--n-color, var(--muted));
  border-radius: var(--r-8, 8px); box-shadow: var(--elevation-2, 0 6px 16px rgba(15, 23, 42, .16)); }
.notif > .icon, .notif-list li > .icon { width: 20px; height: 20px; color: var(--n-color, var(--muted)); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notif-success { --n-color: var(--ok); } .notif-warning { --n-color: var(--warn); } .notif-error { --n-color: var(--danger); } .notif-info { --n-color: var(--info); }
.notif-text { min-width: 0; overflow-wrap: anywhere; }
.notif-close { border: none; background: none; padding: 2px; min-height: 24px; min-width: 24px; display: inline-flex; align-items: center; justify-content: center; }
.notif-close .icon { width: 16px; height: 16px; }
.notif-detail summary { cursor: pointer; color: var(--accent); margin-top: 4px; }
.notif-detail pre { white-space: pre-wrap; font-size: var(--fs-12, 12px); margin: 4px 0 0; max-height: 160px; overflow: auto; }
.notif-retry { margin-top: 4px; }
/* Cloche et historique de la session */
.notif-bell { position: relative; }
.notif-bell-btn { position: relative; border: none; background: none; padding: 6px; min-height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; }
.notif-count { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: var(--on-solid);
  font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; }
.notif-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-8, 8px); box-shadow: var(--elevation-2, 0 6px 16px rgba(15, 23, 42, .16)); }
.notif-bell.open .notif-pop { display: block; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notif-list li { grid-template-columns: 20px 1fr; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.notif-list li:last-child { border-bottom: none; }
.notif-empty { margin: 8px; }
@media (prefers-reduced-motion: no-preference) { .notif { animation: notif-in 160ms cubic-bezier(.2, 0, 0, 1); } }
@keyframes notif-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; padding: 2px 4px; }
.icon-inline { display: inline-flex; vertical-align: middle; }

/* Tableaux (charte § 5.4) : nombres à droite et tabulaires, zéro atténué, valeur inconnue « — » avec sa raison. */
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num.zero { color: var(--idle, var(--muted)); }
.unknown-value { color: var(--idle, var(--muted)); text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

/* Utilitaires d'espacement et de disposition (charte § 1.8 : aucun style en ligne) ; valeur de repli = apparence classique,
   la charte les remet sur la grille de 4 px. */
.u-m0 { margin: 0; } .u-mt6 { margin: var(--u-6, 6px) 0 0; } .u-mt8 { margin-top: var(--u-8, 8px); } .u-mt10 { margin-top: var(--u-10, 10px); }
.u-mt12 { margin-top: var(--u-12, 12px); } .u-mb4 { margin: 0 0 var(--u-4, 4px) 0; }
.u-flex1 { flex: 1; } .u-flex320 { flex: 1 1 320px; } .u-w100 { width: 100%; } .u-self-end { align-self: end; } .u-nolist { list-style: none; } .u-basis100 { flex-basis: 100%; }

/* Détail technique d'une erreur (charte § 7.3), replié. */
.err-detail { margin-top: 4px; font-size: var(--fs-12, 12px); color: var(--muted); }
.err-detail summary { cursor: pointer; color: var(--accent); }
.err-detail code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }

/* « À faire » : menu « Masquer » d'un point (pour ce compte) et rappel des points masqués. */
.todo-mute { position: relative; flex: none; }
.todo-mute > summary { list-style: none; cursor: pointer; font-size: var(--fs-12, 12px); color: var(--muted); padding: 2px 6px; border-radius: var(--r-6, 6px); }
.todo-mute > summary::-webkit-details-marker { display: none; }
.todo-mute > summary:hover { color: var(--fg); background: var(--surface-2); }
.todo-mute-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: flex; flex-direction: column; gap: 4px; padding: 6px; min-width: 200px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-8, 8px); box-shadow: var(--elevation-2, 0 6px 16px rgba(15, 23, 42, .16)); }
.todo-mute-pop button { text-align: left; }
li.todo-muted { color: var(--muted); }
/* Cloche : en-tête de l'historique (« Tout effacer ») et croix par message. */
.notif-pop-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.notif-list li { grid-template-columns: 20px 1fr auto; }
