/* VocalScope : identité proche de Docform.ai (violet, corail, bleu marine), sobre, bureau. */
:root {
  --violet: #5b3df5; --violet-dark: #3f28b8; --violet-light: #ece8ff;
  --coral: #ff6b5b; --coral-light: #ffe6e2;
  --navy: #1b2340; --navy-soft: #3a4466;
  --bg: #f6f6fb; --card: #ffffff; --border: #e3e4ee; --text: #1f2333; --muted: #6c7390;
  --green: #1f9d6b; --green-light: #e3f6ee; --amber: #d98b00; --amber-light: #fff3d9; --red: #d6365a; --red-light: #fde4ea;
  --radius: 10px; --shadow: 0 1px 2px rgba(27,35,64,.06), 0 4px 14px rgba(27,35,64,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }
/* En-tête : hauteur libre (le menu passe sur plusieurs lignes au lieu d'être rogné), menu replié sous 900 px */
header.topbar { background: var(--navy); color: #fff; display: flex; align-items: center; flex-wrap: wrap; column-gap: 20px; row-gap: 4px; padding: 8px 24px; min-height: 56px; position: sticky; top: 0; z-index: 10; }
header .brand { font-weight: 700; font-size: 17px; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; color: #fff; white-space: nowrap; }
header .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); display: inline-block; }
header nav { display: flex; gap: 2px; flex-wrap: wrap; min-width: 0; }
header nav a { color: #c9cde3; padding: 7px 9px; border-radius: 6px; font-size: 13px; white-space: nowrap; }
header nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
header nav a.active { background: var(--violet); color: #fff; }
.banner { background: var(--coral-light); color: #9b2b1f; border-bottom: 1px solid #ffc9c1; padding: 8px 24px; font-size: 13px; display: none; }
.banner.show { display: block; }
.banner strong { color: #c0392b; }
main { max-width: 1280px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 16px; margin: 0 0 12px; color: var(--navy); }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--navy-soft); text-transform: uppercase; letter-spacing: .4px; }
.subtitle { color: var(--muted); margin: 0 0 20px; }
.grid { display: grid; gap: 16px; }
/* minmax(0, 1fr) : une colonne ne s'élargit jamais au-delà de sa part (contenu large, tableau), la page ne défile pas */
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid.cols-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .grid.cols-6, .grid.cols-4, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); } }
/* carte d'une grille : un tableau plus large que la carte y défile, jamais la page (en-têtes alors non collants) */
.grid > .card { min-width: 0; overflow-x: auto; overflow-wrap: break-word; }
.grid > .card th { position: static; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.kpi .value { font-size: 26px; font-weight: 700; color: var(--navy); margin-top: 4px; }
.kpi .hint { color: var(--muted); font-size: 12px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--violet-light); border-color: var(--violet); }
textarea { width: 100%; min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
button, .btn { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--violet); background: var(--violet); color: #fff; cursor: pointer; font-weight: 600; }
button:hover, .btn:hover { background: var(--violet-dark); text-decoration: none; }
button.secondary, .btn.secondary { background: #fff; color: var(--violet); }
button.secondary:hover { background: var(--violet-light); }
button.danger { background: var(--red); border-color: var(--red); }
button.small, .btn.small { padding: 4px 9px; font-size: 12px; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; background: #fafafe; position: sticky; top: var(--topbar-h, 56px); }
tr:hover td { background: #fafaff; }
td.num, th.num { text-align: right; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--violet-light); color: var(--violet-dark); white-space: nowrap; }
.badge.green { background: var(--green-light); color: var(--green); }
.badge.amber { background: var(--amber-light); color: var(--amber); }
.badge.red { background: var(--red-light); color: var(--red); }
tr.late td:first-child { color: var(--red); font-weight: 600; }
.action-type { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--violet-dark); font-weight: 600; font-size: 12.5px; }
.action-type .action-icon { flex: none; }
.due-hint { display: block; color: var(--muted, #6b7280); font-weight: 400; font-size: 11px; }
.badge.grey { background: #eef0f6; color: var(--muted); }
.badge.coral { background: var(--coral-light); color: #c0392b; }
.badge.navy { background: #e4e8f7; color: var(--navy); }
.score { font-weight: 700; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; color: var(--muted); font-size: 13px; }
.pagination select { padding: 3px 6px; font-size: 12px; }
p.backlink { margin: 0 0 10px; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.transcript { max-height: 520px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: #fcfcff; }
.seg { display: grid; grid-template-columns: 56px 92px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #eceef5; }
.seg .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.seg .who { font-weight: 600; }
.seg.agent .who { color: var(--violet-dark); }
.seg.prospect .who { color: #b7412f; }
.seg.hl { background: #fff8e5; }
.evidence { border-left: 3px solid var(--coral); padding: 6px 10px; margin: 6px 0; background: #fff9f8; border-radius: 0 6px 6px 0; }
.evidence .time { color: var(--muted); font-size: 12px; }
.evidence .time a { margin-left: 6px; }
.response { border-left: 3px solid var(--violet); padding: 6px 10px; margin: 6px 0; background: #f8f6ff; border-radius: 0 6px 6px 0; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 14px; border-bottom: 2px solid transparent; border-radius: 0; font-weight: 600; }
.tabs button.active { color: var(--violet); border-bottom-color: var(--violet); }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow); display: none; max-width: 420px; z-index: 50; }
.toast.show { display: block; }
.toast.error { background: var(--red); }
.vs-dialog { border: none; border-radius: 10px; padding: 20px 22px; box-shadow: var(--shadow); max-width: 440px; width: calc(100% - 32px); }
.vs-dialog::backdrop { background: rgba(27, 35, 64, .45); }
.vs-dialog p { margin: 0 0 12px; color: var(--navy); font-weight: 600; }
.vs-dialog input { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid #c9cde0; border-radius: 6px; margin-bottom: 14px; }
.vs-dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.vs-dialog.vs-mail { max-width: 720px; }
.vs-mail .md-field { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.vs-mail .md-field input, .vs-mail .md-field textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; color: var(--text); font-weight: 400; padding: 8px 10px; border: 1px solid #c9cde0; border-radius: 6px; margin: 4px 0 10px; }
.vs-mail .md-field textarea { line-height: 1.5; resize: vertical; min-height: 220px; }
.warn-box { background: var(--amber-light); color: #7a4e00; border-radius: 6px; padding: 10px 12px; margin: 0 0 14px; font-size: 13px; }
.warn-box strong { color: #5c3a00; }
.vs-mail .md-warn { background: var(--amber-light); color: #7a4e00; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.vs-mail .md-list { font-size: 13px; margin-bottom: 8px; }
.vs-mail .md-list ul { margin: 4px 0 0 18px; padding: 0; }
.vs-mail .actions { flex-wrap: wrap; margin-top: 12px; }
.vs-mail .md-regen { margin-top: 12px; padding: 12px; background: var(--violet-light); border-radius: 8px; }
.vs-mail .md-regen .md-field textarea { min-height: 0; }
.vs-mail .md-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 10px; }
.vs-mail .chip { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--violet); background: #fff; color: var(--violet-dark); cursor: pointer; }
.vs-mail .chip:hover { background: var(--violet); color: #fff; }
.vs-mail .md-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 10px; }
.vs-mail .md-regen-actions { display: flex; gap: 8px; justify-content: flex-end; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.chart-box { position: relative; height: 260px; }
.prov { font-size: 10.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 6px; vertical-align: middle; }
.prov.manual { border-color: var(--green); color: var(--green); }
.prov.ai { border-color: var(--amber); color: var(--amber); }
.bar { height: 8px; background: #eceef6; border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--violet); }
.flex { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
details summary { cursor: pointer; color: var(--violet); font-weight: 600; }
pre.json { background: #f4f4fa; border-radius: 6px; padding: 10px; font-size: 12px; overflow: auto; }

/* Utilisateur connecté (barre du haut) : espace de travail, puis menu du compte (mot de passe, déconnexion) */
.topbar .userbox { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar .userbox select { max-width: 200px; padding: 5px 8px; font-size: 13px; }
.topbar .userbox > .muted { color: #c9cde3; white-space: nowrap; }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 13px; padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 6px; max-width: 220px; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary::after { content: '▾'; color: #c9cde3; }
.usermenu > summary:hover { background: rgba(255,255,255,.08); }
.usermenu-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 10px; min-width: 230px; display: flex; flex-direction: column; gap: 6px; z-index: 30; }
.usermenu-who { display: flex; flex-direction: column; gap: 2px; padding: 0 2px 6px; border-bottom: 1px solid var(--border); margin-bottom: 2px; overflow-wrap: anywhere; }
.nav-toggle { display: none; background: transparent; border-color: rgba(255,255,255,.35); color: #fff; padding: 6px 12px; font-size: 13px; }
.nav-toggle:hover { background: rgba(255,255,255,.08); }
@media (max-width: 899px) {
  header.topbar { position: static; padding: 8px 16px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  header nav, .topbar .userbox { display: none; flex-basis: 100%; }
  header.topbar.nav-open nav { display: flex; flex-direction: column; padding: 6px 0; }
  header.topbar.nav-open nav a { padding: 9px 10px; }
  header.topbar.nav-open .userbox { display: flex; flex-wrap: wrap; margin: 0 0 6px; }
  .usermenu-panel { left: 0; right: auto; }
  main { padding: 16px; }
}

/* Super Admin dans un espace client (support) */
.banner.support { background: #e4e8f7; color: var(--navy); border-bottom-color: #c8d0ee; }
.banner.support strong { color: var(--navy); }
/* Champs étiquetés d'une boîte de dialogue (mot de passe) */
.vs-dialog .dlg-field { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.vs-dialog .dlg-field input { margin-top: 4px; font-weight: 400; color: var(--text); }
/* Formulaire en boîte de dialogue (VS.formDialog : décisions et suggestions d'outils cités) */
.vs-dialog.vs-form { max-width: 520px; }
.vs-dialog .dlg-field { margin-bottom: 10px; }
.vs-dialog .dlg-field select, .vs-dialog .dlg-field textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-weight: 400;
  padding: 7px 9px; border: 1px solid #c9cde0; border-radius: 6px; color: var(--text); }
.vs-dialog .dlg-field textarea { min-height: 70px; }
.vs-dialog .dlg-field input { margin-bottom: 4px; }
.vs-dialog .dlg-field .hint { display: block; font-weight: 400; }
/* Paramétrage > Outils cités */
.tool-queue td { vertical-align: top; }
.tool-queue .excerpt { max-width: 320px; }
/* Formulaires de Paramétrage (profil vendeur, utilisateurs de l'espace) */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid textarea { min-height: 70px; font-family: inherit; font-size: 13px; }
.form-grid .hint { font-weight: 400; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
tr.self td:first-child { font-weight: 600; }
/* Paramétrage > Téléphonie et imports : état de la clé enregistrée, sur toute la largeur du formulaire */
.form-grid .cred-state { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* Relances : sections repliables par température du prospect (chauds, tièdes, froids) */
.fu-summary { margin: -6px 0 10px; }
.fu-prospect { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fu-older { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--amber-light); color: #7a4e00; border: 1px solid #f3d9a6;
  border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.fu-older[hidden] { display: none; }
.fu-older strong { color: #5c3a00; }
/* Relances : recherche en tête (société, contact, e-mail ou mot-clé), mots trouvés surlignés */
.fu-search { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); flex: 1 1 300px; min-width: 0; max-width: 480px; }
.fu-search-box { position: relative; display: flex; }
.fu-search-box input { width: 100%; padding-right: 32px; }
.fu-search-box input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.fu-search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); padding: 0 8px; line-height: 24px; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted); font-size: 17px; font-weight: 400; }
.fu-search-clear:hover { background: var(--violet-light); color: var(--violet); }
.fu-search-clear[hidden] { display: none; }
.fu-table mark { background: #fff0a6; color: inherit; border-radius: 2px; padding: 0 1px; }
.fu-section { padding: 0; margin-bottom: 14px; }
.fu-section > summary { list-style: none; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; color: var(--navy); }
.fu-section > summary::-webkit-details-marker { display: none; }
.fu-section > summary::before { content: '▸'; color: var(--muted); width: 12px; }
.fu-section[open] > summary::before { content: '▾'; }
.fu-section[open] > summary { border-bottom: 1px solid var(--border); }
.fu-section > summary .fu-title { font-size: 15px; }
.fu-section .empty { padding: 16px; }
.fu-more { padding: 10px 16px; text-align: center; }

/* Tableau des relances : six colonnes regroupées, largeurs fixes, contenu toujours dans la carte (1024 px et plus) */
.fu-table { table-layout: fixed; width: 100%; }
.fu-table col.fu-c-due { width: 118px; }
.fu-table col.fu-c-who { width: 22%; }
.fu-table col.fu-c-exch { width: 96px; }
.fu-table col.fu-c-status { width: 112px; }
.fu-table col.fu-c-btns { width: 204px; }
.fu-table td { overflow-wrap: anywhere; }
.fu-table th:first-child, .fu-table td:first-child { padding-left: 16px; }
.fu-table th:last-child, .fu-table td:last-child { padding-right: 16px; }
.fu-due .fu-due-date { display: block; font-weight: 600; }
.fu-due .badge { margin-top: 3px; }
.fu-who .fu-name { display: block; color: var(--navy); }
.fu-who .fu-company { display: block; color: var(--navy-soft); }
.fu-who .fu-email { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--muted); font-weight: 400; }
.fu-who .fu-email:hover { color: var(--violet); }
.fu-who .fu-score { margin-top: 4px; }
.fu-type { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; color: var(--navy); margin-bottom: 3px; }
.fu-type .action-type { color: var(--violet-dark); }
.fu-origin { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.fu-origin::before { content: '· '; }
.fu-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; color: var(--text); }
.fu-desc.open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.fu-toggle[hidden] { display: none; }
.fu-status .badge { margin: 0 4px 4px 0; }
.fu-label { display: none; }
.fu-btn-group { display: flex; flex-direction: column; gap: 5px; }
.fu-btn-group button { width: 100%; white-space: nowrap; padding: 5px 8px; text-align: center; }
.fu-btn-row { display: flex; gap: 5px; flex-wrap: wrap; }
.fu-btn-row > button { flex: 1 1 auto; width: auto; padding: 5px 6px; }
tr.late td.fu-due { color: var(--red); }

/* Boutons secondaires discrets et liens-boutons */
button.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
button.ghost:hover { background: var(--red-light); color: var(--red); }
button.linklike { background: none; border: 0; padding: 0; color: var(--violet); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
button.linklike:hover { background: none; text-decoration: underline; }
.badge.wrap { white-space: normal; text-align: left; }
.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; }

/* Relances sous 1024 px : une carte par action (prospect et échéance, action, échange et statut, boutons) */
@media (max-width: 1023px) {
  .fu-table, .fu-table tbody { display: block; }
  .fu-table colgroup, .fu-table thead { display: none; }
  .fu-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who due" "action action" "exch status" "btns btns";
    gap: 8px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .fu-table tr:last-child { border-bottom: 0; }
  .fu-table tr:hover td { background: none; }
  .fu-table td, .fu-table td:first-child, .fu-table td:last-child { display: block; padding: 0; border: 0; }
  .fu-table .fu-who { grid-area: who; }
  .fu-table .fu-due { grid-area: due; text-align: right; }
  .fu-table .fu-action { grid-area: action; }
  .fu-table .fu-exch { grid-area: exch; align-self: center; }
  .fu-table .fu-status { grid-area: status; text-align: right; align-self: center; }
  .fu-table .fu-btns { grid-area: btns; }
  .fu-label { display: inline; color: var(--muted); }
  .fu-btn-group { flex-direction: row; flex-wrap: wrap; }
  .fu-btn-group > button, .fu-btn-row { flex: 1 1 auto; width: auto; }
  .fu-btn-group > button { min-width: 160px; }
}
@media (max-width: 520px) {
  .fu-table tr { grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "due" "action" "exch" "status" "btns"; }
  .fu-table .fu-due, .fu-table .fu-status { text-align: left; }
  .fu-due .fu-due-date { display: inline; margin-right: 6px; }
  .fu-btn-group > button { min-width: 0; flex-basis: 100%; }
}

/* Liste des appels : action recommandée sur trois lignes au plus (texte complet au survol) */
.calls-table td.reco { min-width: 190px; }
.clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* Listes larges (Appels) : sous 1280 px, défilement horizontal dans la carte plutôt que dans la page */
@media (max-width: 1279px) {
  .calls-table { min-width: 1100px; }
  .table-scroll { overflow-x: auto; }
  .table-scroll th, .table-scroll td { padding: 8px 7px; }
  /* le conteneur défilant devient la référence des en-têtes collants : en-têtes fixes dans le tableau */
  .table-scroll th { position: static; }
}
/* Paramétrage > Profil vendeur > Mails de relance */
.form-grid > div.wide { grid-column: 1 / -1; }
.mail-variants { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.mail-variant { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.mail-variant textarea { min-height: 70px; font-family: inherit; font-size: 13px; width: 100%; box-sizing: border-box; }
.mail-rule { display: flex; flex-direction: column; gap: 6px; }
.mail-rule-body { display: flex; flex-direction: column; gap: 6px; }
.form-grid .mail-rule label { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 400; color: var(--text, inherit); }
.mail-preview { border-left: 3px solid var(--border); padding: 2px 10px; margin: 8px 0; }
.mail-preview p { margin: 4px 0; font-size: 13px; }
@media (max-width: 800px) { .mail-variant { grid-template-columns: 1fr; } }

/* Menu du compte : lien d'aide au format des boutons */
.usermenu-panel a.button { display: block; text-align: center; text-decoration: none; padding: 5px 10px; border: 1px solid var(--border); border-radius: 6px; color: var(--navy); background: var(--card); font-size: 13px; }
.usermenu-panel a.button:hover { background: var(--bg, #f4f5fa); }
/* Signalements (Mes signalements, Paramétrage, Administration) */
.vs-dialog.vs-wide { max-width: 760px; }
.feedback-list { max-height: 60vh; overflow: auto; margin-bottom: 12px; }
.feedback-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.feedback-item .flex { flex-wrap: wrap; gap: 8px; align-items: center; }
.feedback-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.feedback-response { background: var(--green-light); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Mails de relance : variables du modèle et variables utilisées */
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.var-chips button { font-size: 12px; padding: 3px 8px; }
.mail-vars { font-size: 13px; border-collapse: collapse; width: 100%; margin: 6px 0; }
.mail-vars td { padding: 3px 6px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.mail-vars td:first-child { white-space: nowrap; color: var(--muted, #667); width: 1%; }

/* Tableau de bord : appels par tranche de 30 minutes (catégories à choix multiple) */
.h-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.h-cats button { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--navy-soft); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 6px; }
.h-cats button:hover { background: var(--violet-light); }
.h-cats button .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); opacity: .35; }
.h-cats button[aria-pressed="true"] { border-color: var(--c); color: var(--text); }
.h-cats button[aria-pressed="true"] .sw { opacity: 1; }
.h-cats .sep { width: 1px; background: var(--border); margin: 0 4px; }
@media (max-width: 600px) { #hourlyCard .toolbar label, #hourlyCard .h-ref { flex: 1 1 100%; } }
#hourlyCard .h-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 6px; }
#hourlyCard .h-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
table.heat { border-collapse: separate; border-spacing: 2px; width: auto; min-width: 100%; }
table.heat th { font-size: 11px; font-weight: 600; color: var(--muted); text-align: left; padding: 0 2px; white-space: nowrap; background: none; position: static; top: auto; border: 0; text-transform: none; letter-spacing: 0; vertical-align: middle; }
table.heat th.h-name { min-width: 84px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; top: auto; background: var(--card); z-index: 1; color: var(--text); }
table.heat td { min-width: 24px; height: 26px; padding: 0; text-align: center; font-size: 10px; border-radius: 3px; cursor: pointer; border: 1px solid #f0f0f6; }
table.heat td:empty { cursor: default; }
table.heat td.few { background: repeating-linear-gradient(45deg, #f3f3f8, #f3f3f8 3px, #e9e9f1 3px, #e9e9f1 6px) !important; cursor: pointer; }
table.heat td.h-total { min-width: 52px; font-size: 11px; font-weight: 600; cursor: default; background: none; border: 0; line-height: 1.2; }
table.heat td[data-d]:hover, table.heat td[data-r]:hover { outline: 2px solid var(--navy); }
