/* Kemenn — feuille de style unique (pas de build). Couleurs en variables, mode sombre automatique. */

:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --text: #0f1b2d;
  --text-2: #344054;
  --muted: #667085;
  --line: #e3e7ec;
  --line-strong: #cfd5dd;

  --primary: #0b5c7a;
  --primary-hover: #094c65;
  --primary-soft: #e4f1f6;
  --primary-text: #ffffff;
  --focus: rgba(11, 92, 122, .28);

  --accent: #f2b400;
  --accent-soft: #fff6d9;
  --accent-text: #6b4e00;

  --ok: #157a48;
  --ok-soft: #e5f5ec;
  --warn: #a95c00;
  --warn-soft: #fff3e0;
  --danger: #c0362c;
  --danger-soft: #fdecea;

  --me: #0b5c7a;
  --me-bubble: #e4f1f6;
  --them: #6d43b5;
  --them-bubble: #f1f3f5;

  --side-bg: #0f1b2d;
  --side-text: #c4cedb;
  --side-muted: #7d8ba0;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active: rgba(255, 255, 255, .1);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1118;
    --surface: #121a23;
    --surface-2: #17212c;
    --text: #e7edf3;
    --text-2: #c3ccd6;
    --muted: #8d9aaa;
    --line: #233040;
    --line-strong: #314154;

    --primary: #3aa6cb;
    --primary-hover: #5bb8d8;
    --primary-soft: #11303d;
    --primary-text: #04141b;
    --focus: rgba(58, 166, 203, .35);

    --accent: #f5c542;
    --accent-soft: #33290c;
    --accent-text: #f5d77a;

    --ok: #46c381;
    --ok-soft: #0f2d1f;
    --warn: #f0a640;
    --warn-soft: #33230c;
    --danger: #ff7a70;
    --danger-soft: #3a1714;

    --me: #5bb8d8;
    --me-bubble: #11303d;
    --them: #b593f0;
    --them-bubble: #1c2733;

    --side-bg: #070c12;
    --side-text: #b5c0cd;
    --side-muted: #6f7d8f;

    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 1rem/1.55 var(--font); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text); letter-spacing: -.01em; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 650; margin: 0 0 1.25rem; }
h2 { font-size: 1.1rem; font-weight: 650; margin: 0 0 .9rem; }
h3 { font-size: .8rem; font-weight: 650; margin: 1.25rem 0 .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
h4 { font-size: .95rem; margin: 1rem 0 .4rem; }
p { margin: 0 0 .8rem; }
code, pre { font-family: var(--mono); font-size: .85em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: .05em .35em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
::selection { background: var(--primary-soft); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: .87rem; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.error { color: var(--danger); }
.inline { display: inline; }
.sprite { display: none; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; vertical-align: -.25em; }

/* ---------- Logo ---------- */
.logo { width: 2rem; height: 2rem; flex: none; }
.logo-bg { fill: var(--primary); }
.logo-bubble { fill: #fff; }
.logo-wave { fill: var(--primary); }
.logo-dot { fill: var(--accent); stroke: var(--primary); stroke-width: 1.5; }
@media (prefers-color-scheme: dark) {
  .logo-bg, .logo-wave { fill: #0b5c7a; }
  .logo-dot { stroke: #0b5c7a; }
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; color: inherit; }
.brand:hover { text-decoration: none; }

/* ---------- Mise en page applicative ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.25rem; padding: 1.1rem .8rem; background: var(--side-bg); color: var(--side-text); overflow-y: auto; }
.sidebar .brand { color: #fff; padding: .2rem .55rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { position: relative; display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--side-text); font-weight: 500; white-space: nowrap; }
.side-nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.side-nav a.active { background: var(--side-active); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -.8rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav a .icon { opacity: .85; }
.side-section { margin: 1.1rem .7rem .35rem; font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); }
.side-user { display: flex; align-items: center; gap: .4rem; padding-top: .9rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-account { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; padding: .35rem .4rem; border-radius: var(--radius-sm); color: var(--side-text); }
.side-account:hover { background: var(--side-hover); text-decoration: none; }
.side-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-who strong { color: #fff; font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-who small { color: var(--side-muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none; border-radius: 50%; background: var(--accent); color: #3a2a00; font-weight: 700; font-size: .8rem; }
.icon-btn { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: var(--radius-sm); background: none; color: var(--side-muted); cursor: pointer; }
.icon-btn:hover { background: var(--side-hover); color: #fff; }

.content { min-width: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 2rem 2rem 4rem; }
main.wide { max-width: 1560px; }

/* ---------- Pages sans connexion ---------- */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 3rem 16px 2rem; }
.brand-auth { color: var(--text); margin-bottom: 1.75rem; }
.auth-shell main { width: 100%; max-width: 980px; padding: 0; }
.auth-foot { margin-top: auto; padding-top: 2rem; color: var(--muted); font-size: .82rem; }

.layout-bare main { max-width: none; padding: 0; }
.login-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: 2.5rem 3rem; background: var(--side-bg); color: var(--side-text); }
.login-hero::after { content: ""; position: absolute; right: -18%; bottom: -30%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(58, 166, 203, .28), transparent 65%); pointer-events: none; }
.login-hero .brand { color: #fff; }
.login-hero h2 { color: #fff; font-size: 2.1rem; line-height: 1.15; font-weight: 650; max-width: 18ch; margin: 0 0 1rem; }
.login-hero h2 em { font-style: normal; color: var(--accent); }
.login-hero p { max-width: 42ch; }
.benefits { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.benefits li { display: flex; gap: .75rem; align-items: flex-start; max-width: 44ch; }
.benefits .icon { color: var(--accent); margin-top: .1rem; }
.benefits strong { color: #fff; display: block; font-weight: 600; }
.login-hero .fine { position: relative; z-index: 1; font-size: .82rem; color: var(--side-muted); margin: 0; }
.login-hero .fine a { color: inherit; text-decoration: underline; }
.login-panel { display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.login-box .lead { color: var(--muted); margin-bottom: 1.75rem; }
.login-box .btn { width: 100%; justify-content: center; margin-top: .5rem; }

/* ---------- En-têtes, cartes, grilles ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { margin: 0; }
.page-head .sub { margin: .3rem 0 0; color: var(--muted); }
.page-head .actions { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.card-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }

.stat { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.15rem 1.35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: .87rem; font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
.stat-value small { font-size: .95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .icon { position: absolute; top: 1.1rem; right: 1.2rem; color: var(--primary); opacity: .75; }
.stat meter { margin-top: .55rem; }

meter { width: 100%; height: .45rem; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 999px; height: .45rem; }
meter::-webkit-meter-optimum-value { background: var(--primary); border-radius: 999px; }
meter::-webkit-meter-suboptimum-value { background: var(--warn); border-radius: 999px; }
meter::-webkit-meter-even-less-good-value { background: var(--danger); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--primary); border-radius: 999px; }
meter:-moz-meter-sub-optimum::-moz-meter-bar { background: var(--warn); }
meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--danger); }

.quick { display: flex; gap: .6rem; flex-wrap: wrap; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 1.75rem 1rem; color: var(--muted); }
.empty .icon { width: 2rem; height: 2rem; color: var(--line-strong); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; padding: .5rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { text-decoration: none; border-color: var(--primary); }
.btn .icon { width: 1.1rem; height: 1.1rem; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(.93); }
.btn.call { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.call:hover { filter: brightness(.93); }
.btn.small { min-height: 2rem; padding: .3rem .7rem; font-size: .87rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
button.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }

/* ---------- Formulaires ---------- */
.form label, .bench label, .softphone label, .adapter-fields label { display: block; margin-bottom: 1rem; font-size: .9rem; font-weight: 550; color: var(--text-2); }
.form label .muted, .form small { font-weight: 400; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea,
.bench input[type=file], .bench select, .softphone select, .adapter-fields input:not([type=checkbox]), .adapter-fields select, .adapter-fields textarea,
.search input, .search select, .table input:not([type=checkbox]), .table select {
  display: block; width: 100%; margin-top: .35rem; padding: .55rem .75rem; min-height: 2.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 400;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=file] { padding: .45rem .5rem !important; }
input[type=file]::file-selector-button { margin-right: .75rem; padding: .35rem .8rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); margin: 0; flex: none; }
.table input:not([type=checkbox]), .table select { margin: 0; min-height: 2.2rem; padding: .3rem .5rem; }
.form small, .adapter-fields small { display: block; margin-top: .3rem; color: var(--muted); font-size: .82rem; }
label.check { display: flex; align-items: center; gap: .55rem; font-weight: 500; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 1rem; padding: 1rem 1.1rem .25rem; background: var(--surface-2); }
legend { padding: 0 .4rem; font-weight: 650; font-size: .85rem; color: var(--text); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .9rem; }
.row2 > label.check { align-self: start; margin-top: 2.1rem; }
.objection { display: grid; grid-template-columns: 1fr 1.5fr; gap: .6rem; margin-bottom: .6rem; }
.objection input, .objection textarea { margin-top: 0 !important; }
.search { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.search input[type=search] { flex: 1; min-width: 220px; margin: 0; }
.search select { width: auto; margin: 0; }
.brief-form .actions { position: sticky; bottom: 0; z-index: 2; margin: 0 -2rem; padding: .9rem 2rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--line); }
.legal { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* ---------- Tableaux, badges, listes ---------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); font-size: .93rem; }
.table th, .table td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .74rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2); }
.table th:first-child { border-top-left-radius: var(--radius-sm); }
.table th:last-child { border-top-right-radius: var(--radius-sm); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td a:not(.btn) { font-weight: 550; }
.table.small td, .table.small th { padding: .4rem .55rem; font-size: .84rem; }
main > .table, main > .table-scroll { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.25rem; }
main > .table-scroll > .table th { border-radius: 0; }
main > .table th, main > .table-scroll > .table th { border-radius: 0; }
main > .table td:first-child, main > .table th:first-child { padding-left: 1.2rem; }
main > .table td:last-child, main > .table th:last-child { padding-right: 1.2rem; }
.table tr.slow td { color: var(--warn); }
.card > .table, .card > .table-scroll { margin: 0 -1.5rem; width: calc(100% + 3rem); }
.card > .table th:first-child, .card > .table td:first-child, .card > .table-scroll .table th:first-child, .card > .table-scroll .table td:first-child { padding-left: 1.5rem; }
.card > .table th:last-child, .card > .table td:last-child, .card > .table-scroll .table th:last-child, .card > .table-scroll .table td:last-child { padding-right: 1.5rem; }
.card > .table th, .card > .table-scroll .table th { border-radius: 0; border-top: 1px solid var(--line); }
.card > .table:last-child, .card > .table-scroll:last-child { margin-bottom: -1.35rem; }
.card > .table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.card > .table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }

.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.badge.open { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.test { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.dir { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .87rem; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin-top: 1.25rem; }
.history-item { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.history-item:last-of-type { border-bottom: 0; }
.history-item p { margin: .35rem 0 0; color: var(--text-2); }
.card > div > .badge { margin-left: .3rem; }
main > form > .table-scroll { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.25rem; }
main > form > .table-scroll > .table th { border-radius: 0; }

/* ---------- Travail en équipe : appels confiés, droits, campagnes ---------- */
.block { display: block; margin-top: .15rem; font-weight: 400; }
.badge.new { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.badge.prio { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.badge.role-admin { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
.due { white-space: nowrap; color: var(--text-2); }
.due.today { color: var(--warn); font-weight: 650; }
.due.late { color: var(--danger); font-weight: 650; }
.nav-count { margin-left: auto; min-width: 1.35rem; padding: 0 .4rem; border-radius: 999px; background: var(--accent); color: #1d1600; font-size: .75rem; font-weight: 750; line-height: 1.35rem; text-align: center; }
.organize { background: var(--surface-2); }
.organize-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 0 .9rem; align-items: start; }
.organize-grid > label.check { margin-top: 2.1rem; }
.template-pick { margin-bottom: 1rem; }
.template-pick label { display: flex; align-items: center; gap: .6rem; margin: 0; font-weight: 550; white-space: nowrap; }
.template-pick select { min-width: 14rem; }
.save-template { position: relative; }
.save-template > summary { list-style: none; }
.save-template > summary::-webkit-details-marker { display: none; }
.save-template-box { position: absolute; bottom: calc(100% + .6rem); left: 0; z-index: 5; width: min(24rem, 80vw); padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.save-template-box p { margin: 0 0 .8rem; }
.role-choice { display: grid; gap: .6rem; margin-bottom: 1rem; }
.role-choice label.check, .perms label.check { align-items: flex-start; margin: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.role-choice label.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.role-choice input, .perms input[type=checkbox] { margin-top: .2rem; }
.role-choice span, .perms label.check span { display: flex; flex-direction: column; gap: .15rem; }
.role-choice small, .perms small { margin: 0 !important; }
.perms { display: grid; gap: .5rem; }
.perms > label:first-of-type { margin-bottom: .4rem; }
.perms[disabled] { opacity: .55; }
fieldset.plain { border: 0; margin: 0; padding: 0; background: none; min-width: 0; }
.bulk-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; padding: .6rem .9rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .92rem; color: var(--text-2); }
.col-check { width: 2.5rem; }
.follow-up { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.follow-up > summary { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 600; color: var(--primary); }
.follow-up > summary .icon { width: 1.1rem; height: 1.1rem; }
.follow-up[open] > summary { margin-bottom: 1rem; }
.assignees { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.assignees label.check { margin: 0; }
.campaign-list { max-height: 18rem; overflow-y: auto; margin: 0; padding: 0 0 0 1.1rem; font-size: .92rem; }
.campaign-list li { padding: .2rem 0; }

/* ---------- Suivi d'équipe ---------- */
.tabs { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.tabs a { padding: .4rem .85rem; border-radius: 6px; color: var(--text-2); font-weight: 600; font-size: .92rem; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.search.period label { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .9rem; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.search.period input[type=date] { width: auto; margin: 0; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.stat-sub { color: var(--muted); font-size: .85rem; }
.chart { position: relative; padding-top: 1.2rem; }
.chart-max { position: absolute; top: 0; left: 0; color: var(--muted); font-size: .75rem; }
.chart svg.bars { display: block; width: 100%; height: 160px; border-bottom: 1px solid var(--line-strong); }
.chart .bar, .hbars .bar { fill: var(--primary); }
.chart .hit { fill: transparent; }
.chart g:hover .bar { fill: var(--primary-hover); }
.chart g:hover .hit { fill: var(--surface-2); }
.chart-axis { display: flex; justify-content: space-between; margin-top: .35rem; color: var(--muted); font-size: .75rem; }
.hbars { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hbars th { text-align: left; font-weight: 550; color: var(--text-2); padding: .35rem .8rem .35rem 0; white-space: nowrap; width: 1%; }
.hbars td { padding: .35rem 0; }
.hbars td.hbar-cell { width: 100%; min-width: 4rem; }
.hbar-cell svg { display: block; width: 100%; height: .7rem; }
.hbars .num { width: 3.2rem; padding-left: .6rem; text-align: right; white-space: nowrap; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.team-table td.num .due { display: block; font-size: .8rem; }
.nowrap { white-space: nowrap; }
.act { font-weight: 600; color: var(--text); }
.act-call { color: var(--primary); }
.act-contact, .act-contacts { color: var(--them); }
.act-login { color: var(--muted); font-weight: 500; }

/* ---------- Mini CRM : étapes, étiquettes, fil, colonnes ---------- */
.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; }
.stage-pill { display: inline-flex; align-items: center; padding: .12rem .6rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .78rem; font-weight: 650; white-space: nowrap; }
.stage-pill.none { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; margin: .15rem .25rem 0 0; padding: .05rem .5rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .74rem; font-weight: 550; white-space: nowrap; }
a.tag:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.contact-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.contact-meta .tag { margin: 0; }
.upcoming { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; padding: .55rem 0; }
.upcoming .due { min-width: 6.5rem; font-size: .88rem; }
.note-form { display: grid; gap: .5rem; justify-items: start; margin-bottom: 1.25rem; }
.note-form textarea { margin-top: 0 !important; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); }
.tl { position: relative; padding: 0 0 1.1rem .9rem; }
.tl:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: calc(-1.1rem - 6px); top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 3px var(--surface); }
.tl-call .tl-dot { background: var(--primary); }
.tl-note .tl-dot { background: var(--accent); }
.tl-stage .tl-dot, .tl-owner .tl-dot { background: var(--them); }
.tl-head { font-size: .85rem; color: var(--muted); }
.tl-head strong { color: var(--text); font-weight: 650; }
.tl p { margin: .25rem 0 0; color: var(--text-2); }
.tl .inline button { font-size: .8rem; color: var(--muted); }
.avatar.mini { width: 1.5rem; height: 1.5rem; font-size: .62rem; }
.stages-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .6rem; }
.stages-form label { margin-bottom: .5rem !important; }
.stages-form input { margin-top: 0 !important; }
.stages-form .btn { grid-column: 1 / -1; justify-self: start; margin-top: .4rem; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: .9rem; overflow-x: auto; padding-bottom: .75rem; align-items: start; }
.board-col { display: flex; flex-direction: column; min-height: 12rem; max-height: calc(100vh - 15rem); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.board-col.unstaged { background: transparent; border-style: dashed; }
.board-col.over { border-color: var(--primary); background: var(--primary-soft); }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem .9rem .5rem; }
.board-head h2 { margin: 0; font-size: .92rem; }
.board-count { min-width: 1.6rem; padding: 0 .45rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .78rem; font-weight: 650; text-align: center; }
.board-cards { display: flex; flex-direction: column; gap: .5rem; padding: .25rem .6rem .7rem; overflow-y: auto; min-height: 4rem; }
.board-card { padding: .65rem .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); cursor: grab; transition: box-shadow .15s, opacity .15s; }
.board-card:hover { box-shadow: var(--shadow-lg); }
.board-card.dragging { opacity: .45; }
.board-card.moved { border-color: var(--ok); }
.board-name { display: block; font-weight: 600; color: var(--text); line-height: 1.3; }
.board-tags { margin-top: .2rem; }
.board-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .78rem; }
.board-meta .due { display: inline-flex; align-items: center; gap: .25rem; }
.board-meta .due .icon { width: .85rem; height: .85rem; }
.board-meta .avatar { margin-left: auto; }
.board-more { padding: .3rem .2rem; font-size: .82rem; }
.board-status { min-height: 1.2rem; color: var(--muted); font-size: .88rem; }

/* ---------- CRM : entreprises, affaires, tâches, import ---------- */
.deal-status { display: inline-flex; padding: .1rem .55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 650; white-space: nowrap; }
.deal-status.won { background: var(--ok-soft); color: var(--ok); }
.deal-status.lost { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.deal-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.deal-row strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem 0; }
.contact-row .btn { margin-left: auto; }
.board-sum { margin: 0; padding: 0 .9rem .4rem; font-size: .82rem; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.board-amount { margin-top: .15rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.board-col.closed.won { background: color-mix(in srgb, var(--ok-soft) 55%, var(--surface-2)); }
.board-col.closed.lost { background: transparent; border-style: dashed; }
.deal-tiles { margin-top: -.25rem; }
.lost-reason[hidden] { display: none; }
.deal-stages-form { display: grid; gap: .4rem; }
.deal-stage-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem auto; gap: .5rem; align-items: center; }
.deal-stage-row label { margin: 0 !important; }
.deal-stage-row input { margin-top: 0 !important; }
.deal-stages-form .btn { justify-self: start; margin-top: .4rem; }
.task-row { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.task-row:last-of-type { border-bottom: 0; }
.task-row.done .task-body a { text-decoration: line-through; color: var(--muted); }
.task-check { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .1rem; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--surface); cursor: pointer; padding: 0; }
.task-check:hover { border-color: var(--ok); background: var(--ok-soft); }
.task-check.checked { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 2px var(--surface); }
.task-row.late .task-check { border-color: var(--danger); }
.task-body { min-width: 0; }
.task-kind { display: inline-block; margin-right: .35rem; padding: 0 .4rem; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.quick-add { margin-top: .9rem; }
.quick-add > summary, .more-fields > summary { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; color: var(--primary); font-weight: 600; font-size: .92rem; }
.quick-add > summary .icon { width: 1rem; height: 1rem; }
.quick-add[open] > summary, .more-fields[open] > summary { margin-bottom: .8rem; }
.more-fields { margin-bottom: 1rem; }
.tasks-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.bulk-controls { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.bulk-controls select, .bulk-controls input { width: auto; min-height: 2rem; margin: 0; padding: .25rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; }
.bulk-controls [hidden] { display: none; }
.bulk-bar { flex-wrap: wrap; }
.import-type { display: grid; gap: .6rem; background: none; border: 0; padding: 0; }
.import-type legend { padding: 0; margin-bottom: .5rem; font-size: .95rem; }
.import-type label.check { align-items: flex-start; margin: 0; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.import-type label.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.import-type span { display: flex; flex-direction: column; gap: .2rem; }
.import-type input { margin-top: .2rem; }
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .9rem; }
.dup-group .card-head h2 { font-size: 1rem; }

/* ---------- Information des utilisateurs ---------- */
.notice { max-width: 760px; margin: 0 auto; }
.notice h1 { margin: .2rem 0 .8rem; font-size: 1.6rem; }
.notice h2 { margin-top: 1.6rem; font-size: 1.1rem; }
.notice .lead { color: var(--text-2); font-size: 1.02rem; }
.notice-kicker { margin: 0; color: var(--primary); font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.notice-list { padding-left: 1.2rem; color: var(--text-2); line-height: 1.6; }
.notice-list li + li { margin-top: .5rem; }
.notice-extra { padding: .9rem 1rem; border-left: 3px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2); }
.notice-ack { margin-top: 1.5rem; }

/* ---------- Messages ---------- */
.flash { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); font-size: .93rem; }
.flash-success { border-color: var(--ok); background: var(--ok-soft); color: var(--text); }
.flash-error { border-color: var(--danger); background: var(--danger-soft); color: var(--text); }
.flash-warn, .flash-warning { border-color: var(--warn); background: var(--warn-soft); color: var(--text); }
.flash-success, .flash-error, .flash-warn, .flash-warning { border-top-color: transparent; border-right-color: transparent; border-bottom-color: transparent; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-zone h2 { color: var(--danger); }

/* ---------- Diagnostic ---------- */
.check td:first-child { width: 2.5rem; }
.check .dot, .phone-status .dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.check .st-ok .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.check .st-warn .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.check .st-fail .dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.check .st-fail td { color: var(--danger); }
.sse-result { margin: .75rem 0 1rem; }
.sse-result ul { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.code { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); padding: .9rem 1rem; border-radius: var(--radius-sm); overflow-x: auto; }

/* ---------- Console d'appel ---------- */
.console { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.console > .card { margin-bottom: 0; }
.softphone { position: sticky; top: 1.25rem; }
.softphone .number { width: 100%; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; letter-spacing: .04em; text-align: center; padding: .55rem .7rem; margin: .25rem 0 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); }
.phone-status { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: 1.1rem; padding: .45rem .75rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: .84rem; font-weight: 550; color: var(--text-2); }
.phone-status .dot { flex: none; margin-top: .35rem; }
.phone-status .dot[data-state=registered] { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.phone-status .dot[data-state=connecting] { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.phone-status .dot[data-state=failed], .phone-status .dot[data-state=unregistered] { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dialpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-bottom: 1rem; }
.dialpad button { height: 3.1rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 550; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); cursor: pointer; transition: background .1s, transform .05s; }
.dialpad button:hover { background: var(--primary-soft); border-color: transparent; }
.dialpad button:active { transform: scale(.97); }
.call-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.call-buttons .btn { flex: 1 1 45%; justify-content: center; }
.call-buttons #btn-call, .call-buttons #btn-answer, .call-buttons #btn-hangup { flex-basis: 100%; min-height: 3rem; font-size: 1.02rem; }
.call-state { margin-top: .9rem; min-height: 1.5em; font-weight: 600; text-align: center; }
#call-timer { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.incoming { padding: .75rem 1rem; border: 2px solid var(--ok); background: var(--ok-soft); border-radius: var(--radius-sm); margin-bottom: .8rem; font-weight: 600; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { border-color: transparent; } }
.softphone > .muted.small { margin: 1rem 0 0; }

/* ---------- Copilote ---------- */
.copilot-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.copilot-head h2 { display: flex; align-items: center; gap: .5rem; margin: 0; }
.copilot-head h2 .icon { color: var(--accent); }
.voices { display: flex; gap: .4rem; }
.voice { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .2rem .65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface-2); }
.voice::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .5; }
.voice[data-state=live] { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.voice[data-state=live]::before { opacity: 1; animation: blink 1.6s ease-in-out infinite; }
.voice[data-state=connecting], .voice[data-state=reconnecting], .voice[data-state=paused] { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.voice[data-state=error] { color: var(--danger); border-color: transparent; background: var(--danger-soft); }
@keyframes blink { 50% { opacity: .3; } }

.disclosure { border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); background: var(--warn-soft); border-radius: var(--radius-sm); padding: .7rem 1rem; margin: 0 0 1rem; }
.disclosure-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--warn); margin-bottom: .2rem; }
.disclosure p { margin: 0 0 .5rem; font-style: italic; }

.suggestion { position: relative; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.35rem 1.15rem; margin: 0 0 .5rem; min-height: 6rem; transition: opacity .2s; }
.suggestion-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin-bottom: .3rem; }
.suggestion .say { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.38; font-weight: 550; color: var(--text); }
.suggestion.pending .say { opacity: .5; }
.suggestion.pending .suggestion-label::after { content: " · en cours…"; font-weight: 500; text-transform: none; letter-spacing: 0; }
.suggestion .alert { display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; padding: .25rem .7rem; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-weight: 650; font-size: .88rem; }
.suggestion .alert::before { content: "!"; display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--danger); color: #fff; font-size: .72rem; }
.copilot-status { min-height: 1.4em; margin-bottom: .5rem; font-size: .85rem; color: var(--muted); }
.copilot-status[data-level=error] { color: var(--danger); }
.copilot-status[data-level=warn] { color: var(--warn); }
.copilot-cols { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 1.6fr); gap: 1.5rem; }
.copilot-brief h3:first-of-type { margin-top: 1rem; }
.brief-summary { padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; }
.brief-summary > div { margin-bottom: .35rem; }
.brief-summary > :last-child { margin-bottom: 0; }
.brief-summary p { margin: 0; }
.brief-summary .flash { margin: .5rem 0 0; font-size: .85rem; }
.brief-title { font-weight: 650; font-size: 1rem; }
.points { list-style: none; padding: 0; margin: 0; }
.points li { position: relative; padding: .35rem 0 .35rem 1.85rem; }
.points li::before { content: ""; position: absolute; left: .1rem; top: .55rem; width: 1.05rem; height: 1.05rem; border: 2px solid var(--line-strong); border-radius: 50%; }
.points li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.points li.done::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.points li.muted { padding-left: 0; }
.points li.muted::before { display: none; }
.objections-block { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .9rem; }
.objections-block summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.objections-block ul { padding-left: 1.1rem; margin: .5rem 0 0; font-size: .9rem; }
.objections-block li { margin-bottom: .35rem; }
.transcript { display: flex; flex-direction: column; gap: .5rem; height: 52vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem; background: var(--surface-2); scroll-behavior: smooth; }
.transcript:empty::before { content: "La transcription s'affichera ici, voix par voix."; margin: auto; color: var(--muted); font-size: .9rem; }
.transcript.static { height: auto; max-height: 70vh; }
.seg { max-width: 82%; padding: .5rem .8rem .55rem; border-radius: 14px; line-height: 1.45; }
.seg .who { display: block; font-weight: 650; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .1rem; }
.seg.me { align-self: flex-end; background: var(--me-bubble); border-bottom-right-radius: 4px; }
.seg.me .who { color: var(--me); }
.seg.them { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.seg.them .who { color: var(--them); }
.seg.interim .txt { color: var(--muted); }
.seg.interim .txt::after { content: " …"; }
.summary { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: .5rem; }
.summary h3 { color: var(--text); font-size: 1rem; text-transform: none; letter-spacing: -.01em; }
body.on-hold .suggestion { opacity: .45; }

/* ---------- Banc de test ---------- */
.bench .actions { margin: .5rem 0 1rem; }
.log { height: 300px; overflow: auto; margin: 0; background: #0b1118; color: #c7d2de; border-radius: var(--radius-sm); padding: .75rem .9rem; font-size: .74rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.stats { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; font-size: .84rem; }
.stats span { padding: .2rem .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.stats .ok { background: var(--ok-soft); border-color: transparent; }
.stats .warn { background: var(--warn-soft); border-color: transparent; }
.test-result { font-size: .87rem; font-weight: 550; }
.test-result.ok { color: var(--ok); }
.test-result.error { color: var(--danger); }
.test-hint { display: block; max-width: 46rem; margin-top: .25rem; color: var(--text-2); font-weight: 400; font-size: .84rem; }

/* ---------- Téléphonie : choix du fournisseur et guide ---------- */
.step-title { display: flex; align-items: center; gap: .6rem; margin: .25rem 0 1rem; color: var(--text); font-size: 1rem; font-weight: 650; text-transform: none; letter-spacing: -.01em; }
.step-num { display: grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-size: .8rem; font-weight: 700; }
.provider-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: .65rem; margin-bottom: 1.5rem; }
.provider-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mono name" "mono tag" "mono badge"; column-gap: .75rem; row-gap: .15rem; align-content: start;
  padding: .8rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.provider-tile:hover { border-color: var(--primary); }
.provider-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.provider-tile.selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.provider-mono { grid-area: mono; display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-family: var(--font-display); font-size: .82rem; font-weight: 750; letter-spacing: -.02em; }
.provider-tile.selected .provider-mono { background: var(--primary); color: var(--primary-text); }
.provider-name { grid-area: name; font-weight: 650; }
.provider-tag { grid-area: tag; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.provider-tile .badge { grid-area: badge; justify-self: start; margin-top: .35rem; }
.badge.status-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.status-check { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge.status-bridge { background: var(--surface-2); color: var(--text-2); }

.provider-setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 410px); gap: 1.75rem; align-items: start; padding-top: 1.35rem; border-top: 1px solid var(--line); }
.provider-setup.guide-only { grid-template-columns: minmax(0, 46rem); }
.adapter-fields { margin-top: .25rem; }
.webhook-box { display: flex; flex-direction: column; gap: .4rem; margin: 0 0 1.1rem; padding: .8rem 1rem; border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line)); border-radius: var(--radius-sm); background: var(--primary-soft); font-size: .9rem; }
.webhook-row { display: flex; align-items: center; gap: .6rem; }
.webhook-row code { flex: 1; min-width: 0; padding: .35rem .55rem; overflow-wrap: anywhere; background: var(--surface); }
details.advanced { margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .65rem .9rem; }
details.advanced summary { cursor: pointer; color: var(--text-2); font-size: .9rem; font-weight: 600; }
details.advanced[open] summary { margin-bottom: 1rem; }
.provider-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.25rem; }
.provider-actions + .small { margin: .6rem 0 0; }
.delete-form { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

.provider-guide { position: sticky; top: 1.25rem; padding: 1.15rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: .9rem; }
.provider-setup.guide-only .provider-guide { position: static; }
.guide-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem; }
.guide-head strong { display: block; font-size: 1.05rem; }
.guide-head .badge { margin-top: .2rem; }
.provider-guide p { margin: 0 0 .75rem; }
.provider-guide h3 { margin: 1.15rem 0 .55rem; }
.provider-guide .flash { margin: 0 0 .75rem; font-size: .87rem; }
.provider-guide code { font-size: .85em; overflow-wrap: anywhere; }
.guide-list { margin: 0; padding-left: 1.15rem; }
.guide-list li { margin-bottom: .4rem; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.guide-steps li { position: relative; counter-increment: step; padding: 0 0 .8rem 2.1rem; }
.guide-steps li::before { content: counter(step); position: absolute; left: 0; top: .05rem; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--primary); font-size: .74rem; font-weight: 700; }
.guide-steps strong { display: block; margin-bottom: .1rem; }
.guide-steps span { color: var(--text-2); }
.guide-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 1rem; }
.guide-admin { margin-top: 1.1rem; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.guide-admin summary { cursor: pointer; color: var(--text); font-weight: 650; }
.guide-admin[open] summary { margin-bottom: .6rem; }
.guide-admin > p.small { margin-bottom: .6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .console, .copilot-cols { grid-template-columns: minmax(0, 1fr); }
  .softphone { position: static; }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: .5rem; padding: .55rem 16px; overflow: visible; }
  .sidebar .brand span { display: none; }
  .side-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 2px; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { padding: .45rem .6rem; font-size: .9rem; }
  .side-nav a.active::before { left: .6rem; right: .6rem; top: auto; bottom: -.55rem; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .side-section { display: none; }
  .side-user { padding: 0; border: 0; }
  .side-who { display: none; }
  main { padding: 1.5rem 16px 3rem; }
  .brief-form .actions { margin: 0 -16px; padding: .8rem 16px; }
  .login-split { grid-template-columns: minmax(0, 1fr); }
  .login-hero { padding: 1.75rem 16px; }
  .login-hero h2 { font-size: 1.6rem; }
  .login-hero .benefits, .login-hero .fine { display: none; }
  .provider-setup { grid-template-columns: minmax(0, 1fr); }
  .provider-guide { position: static; order: -1; }
}
@media (max-width: 720px) {
  html { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .cols, .row2, .grid3, .objection, .organize-grid { grid-template-columns: minmax(0, 1fr); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .map-grid, .tasks-layout { grid-template-columns: minmax(0, 1fr); }
  .search.period label { flex-wrap: wrap; }
  .row2 > label.check, .organize-grid > label.check { margin-top: 0; }
  .template-pick label { flex-wrap: wrap; white-space: normal; }
  .card { padding: 1.1rem 1rem; }
  .card > .table, .card > .table-scroll { margin: 0 -1rem; width: calc(100% + 2rem); }
  .card > .table th:first-child, .card > .table td:first-child { padding-left: 1rem; }
  .card > .table th:last-child, .card > .table td:last-child { padding-right: 1rem; }
  .card > .table:last-child, .card > .table-scroll:last-child { margin-bottom: -1.1rem; }
  .table { display: block; overflow-x: auto; }
  .suggestion .say { font-size: 1.25rem; }
  .seg { max-width: 92%; }
  .transcript { height: 45vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
