/* Sentinelle · prototype · peau iOS (Human Interface Guidelines)
   Typographie système, matières en verre dépoli, listes groupées, couleurs système,
   rayons continus 10 / 12 / 16 / 20, séparateurs 0,5 px, ressorts 200-350 ms. */

:root {
  color-scheme: light;
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F2F2F7;
  --elev: #FFFFFF;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --label: #000000;
  --label-2: rgba(60, 60, 67, .6);
  --label-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29);
  --tint: #0A6CDB;
  --on-tint: #FFFFFF;
  --grain: .025;
  --green: #34C759;
  --green-text: #248A3D;
  --orange: #FF9500;
  --orange-text: #C93400;
  --red: #FF3B30;
  --glass: rgba(249, 249, 251, .72);
  --glass-strong: rgba(255, 255, 255, .82);
  --avatar: #A2A2A7;
  --shadow-1: 0 0.5px 0 rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-2: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 12px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .05);
  --shadow-3: 0 2px 6px rgba(0, 0, 0, .06), 0 16px 48px rgba(0, 0, 0, .14);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --spring: cubic-bezier(.32, .72, 0, 1);
  --bounce: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);
  --fast: 200ms;
  --med: 280ms;
  --slow: 340ms;
  --side-w: 260px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070A; --card: #0B0E13; --card-2: #11151C; --elev: #151A23;
  --fill: rgba(255, 255, 255, .06); --fill-2: rgba(255, 255, 255, .11);
  --label: #EEF1F5; --label-2: rgba(238, 241, 245, .62); --label-3: rgba(238, 241, 245, .36);
  --sep: rgba(255, 255, 255, .08);
  --tint: #8BD3FF; --on-tint: #04121D; --green: #34D399; --green-text: #4BE3A6; --orange: #FFB547; --orange-text: #FFB547; --red: #FF5A52;
  --glass: rgba(8, 10, 14, .72); --glass-strong: rgba(16, 20, 27, .86); --avatar: #232A35;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .05);
  --shadow-2: 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-3: 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 64px rgba(0, 0, 0, .65);
  --grain: .05;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #05070A; --card: #0B0E13; --card-2: #11151C; --elev: #151A23;
    --fill: rgba(255, 255, 255, .06); --fill-2: rgba(255, 255, 255, .11);
    --label: #EEF1F5; --label-2: rgba(238, 241, 245, .62); --label-3: rgba(238, 241, 245, .36);
    --sep: rgba(255, 255, 255, .08);
    --tint: #8BD3FF; --on-tint: #04121D; --green: #34D399; --green-text: #4BE3A6; --orange: #FFB547; --orange-text: #FFB547; --red: #FF5A52;
    --glass: rgba(8, 10, 14, .72); --glass-strong: rgba(16, 20, 27, .86); --avatar: #232A35;
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .05);
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-3: 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 64px rgba(0, 0, 0, .65);
    --grain: .05;
  }
}

/* ———————— Base ———————— */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--label); font: 400 15px/1.4 var(--font); letter-spacing: -0.006em; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); }
p { margin: 0; }
ul[role="list"], ol { list-style: none; margin: 0; padding: 0; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px; background: var(--fill); color: var(--label-2); font: 500 11px/1 var(--font); }
code { font: 12px var(--mono); background: var(--fill); padding: 1px 5px; border-radius: 5px; }
.mono { font-family: var(--mono); }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.accent { color: var(--tint); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: 8px; top: -48px; background: var(--card); padding: 8px 12px; z-index: 100; border-radius: 10px; }
.skip-link:focus { top: 8px; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.noscript { padding: 24px; }

/* Raccourci visible au survol */
[data-kbd] { position: relative; }
[data-kbd]::after { content: attr(data-kbd); position: absolute; top: -10px; right: -4px; padding: 2px 6px; border-radius: 6px; background: var(--elev); color: var(--label-2); box-shadow: var(--shadow-2); font: 600 10.5px/1.3 var(--font); opacity: 0; transform: translateY(3px) scale(.96); transition: opacity var(--fast) var(--spring), transform var(--fast) var(--spring); pointer-events: none; z-index: 3; }
[data-kbd]:hover::after, [data-kbd]:focus-visible::after { opacity: 1; transform: none; }

/* ———————— Shell ———————— */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px; background: var(--glass); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); border-right: 0.5px solid var(--sep); z-index: 5; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 16px; color: inherit; }
.brand:hover { text-decoration: none; }
.app-icon { width: 40px; height: 40px; flex: none; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .12); }
.app-icon svg, .app-icon img { display: block; width: 100%; height: 100%; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt strong { font: 700 19px/1.15 var(--font-display); letter-spacing: -0.01em; }
.brand-txt span { font-size: 12px; line-height: 1.3; color: var(--label-2); margin-top: 2px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--label); font-size: 15px; font-weight: 500; transition: background var(--fast) var(--spring); }
.side-nav a:hover { background: var(--fill); text-decoration: none; }
.side-nav a .ico { width: 20px; height: 20px; color: var(--tint); }
.side-nav a[aria-current="page"] { background: var(--tint); color: var(--on-tint); }
.side-nav a[aria-current="page"] .ico { color: var(--on-tint); }
.cmdk { display: flex; align-items: center; gap: 8px; height: 36px; margin: 10px 0 0; padding: 0 8px 0 10px; border-radius: 10px; border: 0; background: var(--fill); color: var(--label-2); cursor: pointer; font-size: 15px; text-align: left; transition: background var(--fast); }
.cmdk:hover { background: var(--fill-2); }
.cmdk .cmdk-txt { flex: 1; }
.cmdk .ico { width: 16px; height: 16px; }
.cmdk kbd { background: var(--card); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.segment-pill { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-1); font-size: 12.5px; color: var(--label-2); line-height: 1.35; }
.segment-pill .ico { width: 14px; height: 14px; margin-top: 2px; color: var(--label-2); }
.segment-pill strong { color: var(--label); font-weight: 600; }
.account { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--avatar); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.account-txt { display: flex; flex-direction: column; min-width: 0; }
.account-txt b { font-size: 14px; font-weight: 600; }
.proto { font-size: 11.5px; color: var(--orange-text); }
.tabbar { display: none; }
main#view { min-width: 0; min-height: 0; overflow: hidden; position: relative; }
main#view:focus { outline: none; }
main#view.route-in > * { animation: route-in var(--med) var(--spring); }

/* ———————— Boutons ———————— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; border: 0; background: var(--fill); color: var(--label); font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform var(--fast) var(--spring), background var(--fast), opacity var(--fast); user-select: none; }
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.btn .ico { width: 17px; height: 17px; }
.btn-filled { background: var(--tint); color: var(--on-tint); font-weight: 600; }
.btn-filled:hover { background: color-mix(in srgb, var(--tint) 90%, #000); }
.btn-tinted { background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); font-weight: 600; }
.btn-tinted:hover { background: color-mix(in srgb, var(--tint) 20%, transparent); }
.btn-plain { background: transparent; color: var(--tint); padding: 0 8px; }
.btn-plain:hover { background: var(--fill); }
.btn-plain.strong { font-weight: 600; }
.btn-destructive { background: var(--red); color: #fff; font-weight: 600; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 16px; border-radius: 12px; }
.btn-xl { height: 52px; padding: 0 26px; font-size: 17px; font-weight: 600; border-radius: 26px; gap: 10px; }
.btn-xl .ico { width: 20px; height: 20px; }
.btn-block { width: 100%; height: 50px; border-radius: 14px; font-size: 17px; }
.capsule { border-radius: 999px; }
.icon-btn { width: 36px; padding: 0; }
.btn-sm.icon-btn { width: 30px; }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--tint); color: var(--on-tint); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }

/* ———————— Contrôles ———————— */
.segmented { display: inline-flex; position: relative; padding: 2px; border-radius: 9px; background: var(--fill); }
.segmented label { position: relative; flex: 1; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: block; padding: 6px 14px; border-radius: 7px; font-size: 13.5px; font-weight: 500; text-align: center; white-space: nowrap; transition: background var(--med) var(--spring), box-shadow var(--med) var(--spring), color var(--fast); }
.segmented input:checked + span { background: var(--elev); box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 3px 1px rgba(0, 0, 0, .04); font-weight: 600; }
:root[data-theme="dark"] .segmented input:checked + span { background: #2A313D; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented input:checked + span { background: #2A313D; } }
.segmented input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); }
.segmented.small span { padding: 4px 12px; font-size: 13px; }
.row .segmented { width: 100%; }

.ios-switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; cursor: pointer; flex: none; margin: 0; transition: background var(--med) var(--spring); }
.ios-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 3px 1px rgba(0, 0, 0, .06); transition: transform var(--med) var(--spring); }
.ios-switch:checked { background: var(--green); }
.ios-switch:checked::after { transform: translateX(20px); }

input[type="text"], input[type="search"], input[type="number"], input[type="datetime-local"], select, textarea { border: 0; background: transparent; outline: none; width: 100%; font-size: 15px; }
.inset-input { height: 28px; font-size: 17px; }
.inset-input.big { font-size: 20px; font-weight: 600; height: 32px; }
.inset-search { height: 36px; padding: 0 12px; border-radius: 10px; background: var(--fill); }
.inset-area { display: block; padding: 12px 16px; min-height: 260px; font: 14px/1.55 var(--mono); resize: vertical; }
.inset-date, .inset-num { width: auto; text-align: right; color: var(--tint); font-size: 15px; }
.row select { height: 30px; color: var(--tint); }
input[type="range"] { -webkit-appearance: none; appearance: none; flex: 1; height: 28px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--fill-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; margin-top: -12px; box-shadow: 0 0.5px 4px rgba(0, 0, 0, .12), 0 6px 13px rgba(0, 0, 0, .12); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--fill-2); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 6px 13px rgba(0, 0, 0, .12); }
.slider-row output { min-width: 64px; text-align: right; color: var(--label-2); font-size: 15px; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper b { min-width: 32px; text-align: center; font-weight: 600; }
.tooltip { position: fixed; z-index: 1000; max-width: 280px; padding: 8px 11px; border-radius: 10px; background: var(--glass-strong); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); color: var(--label); font-size: 12.5px; line-height: 1.4; box-shadow: var(--shadow-3); pointer-events: none; animation: pop var(--fast) var(--spring); }

/* ———————— Listes groupées ———————— */
.group { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.group + .group { margin-top: 16px; }
.group-title { padding: 22px 16px 7px; font-size: 13px; font-weight: 600; color: var(--label-2); display: flex; align-items: center; justify-content: space-between; }
.group-title:first-child { padding-top: 4px; }
.group-foot { padding: 7px 16px 0; font-size: 13px; color: var(--label-2); line-height: 1.4; }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; background: transparent; text-align: left; color: inherit; font-size: 15px; }
.group > .row:not(:last-child)::after, .group > div > .row:not(:last-child)::after, .list > li:not(:last-child) > .row::after { content: ''; position: absolute; left: 16px; right: 0; bottom: 0; height: 0.5px; background: var(--sep); }
button.row { cursor: pointer; transition: background var(--fast); }
button.row:hover { background: color-mix(in srgb, var(--fill) 50%, transparent); }
button.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-main small { font-size: 13px; color: var(--label-2); }
.row-title { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: 13.5px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-caption { padding: 12px 16px 2px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.kv-row { justify-content: space-between; }
.row-label { color: var(--label); flex: none; max-width: 45%; }
.row-value { color: var(--label-2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.row-count { color: var(--label-2); font-size: 14px; }
.check { width: 22px; display: inline-flex; justify-content: center; color: var(--tint); }
.check .ico { width: 18px; height: 18px; }
.check-row[aria-pressed="false"] .check { opacity: 0; }
.check-input { position: absolute; opacity: 0; pointer-events: none; }
label.check-row { cursor: pointer; }
label.check-row .check { opacity: 0; transition: opacity var(--fast); }
label.check-row:has(.check-input:checked) .check { opacity: 1; }
label.check-row:has(.check-input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: -3px; }
.switch-row { cursor: pointer; }
.btn-row { justify-content: center; color: var(--tint); cursor: pointer; font-weight: 500; }
.btn-row.destructive { color: var(--red); }
.disclosure .ico { color: var(--label-3); width: 16px; height: 16px; transition: transform var(--med) var(--spring); }
.disclosure[aria-expanded="true"] .ico { transform: rotate(90deg); }

/* Sections repliables (feuille de création de segment) */
details.gsec { margin-top: 18px; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 12px; }
.chip-cloud .chip { height: 32px; padding: 0 12px; font-size: 14px; box-shadow: inset 0 0 0 0.5px var(--sep); background: var(--card-2); }
.chip-cloud .chip[aria-pressed="true"] { background: var(--tint); color: var(--on-tint); box-shadow: none; }
details.gsec > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 6px 16px 8px; cursor: pointer; font: 600 17px var(--font-display); color: var(--label); }
details.gsec > summary::-webkit-details-marker { display: none; }
details.gsec > summary .ico { width: 16px; height: 16px; color: var(--label-3); margin-left: auto; transition: transform var(--med) var(--spring); }
details.gsec[open] > summary .ico { transform: rotate(90deg); }
.sec-n:not(:empty) { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); font-size: 12.5px; font-weight: 600; display: inline-grid; place-items: center; }
details.gsec[open] > .group { animation: unfold var(--med) var(--spring); }

/* ———————— Badges ———————— */
.lead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lead.center { justify-content: center; }
.q, .pt { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.q-P { background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); }
.q-Q { background: var(--fill); color: var(--label-2); }
.q-I { background: transparent; color: var(--label-3); box-shadow: inset 0 0 0 1px var(--fill-2); }
.pt-mobile { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green-text); }
.pt-fixe { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange-text); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--fill); color: var(--label-2); white-space: nowrap; }
.tag-sans_site { background: color-mix(in srgb, var(--tint) 10%, transparent); color: var(--tint); }
.tag-fermee { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; color: var(--label-2); }
.statut::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); flex: none; }
.st-meeting::before, .st-interested::before { background: var(--green); }
.st-callback::before { background: var(--orange); }
.st-not_interested::before, .st-do_not_call::before, .st-wrong_number::before { background: var(--red); }
.st-no_answer::before, .st-voicemail::before { background: var(--tint); }
.note-g { white-space: nowrap; }
.star { color: var(--orange); }
.avatar-c { width: 40px; height: 40px; border-radius: 50%; background: var(--avatar); color: #fff; display: grid; place-items: center; font: 600 15px var(--font-display); letter-spacing: .02em; flex: none; }
.avatar-c.sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar-c.lg { width: 88px; height: 88px; font-size: 34px; }

/* ———————— Pages ———————— */
.page { height: 100%; overflow-y: auto; padding: 28px 40px 40px; scroll-padding-bottom: 96px; }
.page > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.large-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; }
.large-title h1 { font: 700 34px/1.12 var(--font-display); letter-spacing: 0.005em; }
.summary { margin-top: 6px; font-size: 15px; color: var(--label-2); }
.summary b { color: var(--label); font-weight: 600; }

/* Explorer */
.search-row { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.searchfield { position: relative; flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 40px; padding: 4px 10px; border-radius: 12px; background: var(--fill); cursor: text; }
.searchfield > .ico { width: 17px; height: 17px; color: var(--label-2); }
.tokens { display: contents; }
.token { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px 0 10px; border-radius: 14px; background: var(--tint); color: var(--on-tint); font-size: 13.5px; font-weight: 500; animation: pop var(--fast) var(--bounce); }
.token button { width: 22px; height: 22px; border: 0; border-radius: 11px; background: transparent; color: var(--on-tint); display: grid; place-items: center; cursor: pointer; padding: 0; opacity: .85; }
.token button:hover { background: rgba(255, 255, 255, .2); }
.token .ico { width: 13px; height: 13px; }
#q { flex: 1; min-width: 180px; height: 32px; font-size: 16px; }
#q::-webkit-search-cancel-button { -webkit-appearance: none; }
#q::placeholder { color: var(--label-2); }
.suggest { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-3); animation: pop var(--fast) var(--spring); }
.suggest li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; font-size: 15px; }
.suggest li .ico { width: 16px; height: 16px; color: var(--label-2); }
.suggest li span:first-of-type { flex: 1; }
.suggest li[aria-selected="true"] { background: var(--tint); color: var(--on-tint); }
.suggest li[aria-selected="true"] .ico, .suggest li[aria-selected="true"] .n { color: var(--on-tint); }
.suggest .n { color: var(--label-2); font-size: 13px; }
.chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 0; background: var(--card); color: var(--label); box-shadow: var(--shadow-1), inset 0 0 0 0.5px var(--sep); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background var(--fast), color var(--fast), transform var(--fast) var(--spring); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--tint); color: var(--on-tint); box-shadow: none; }
.results { margin-top: 18px; }
.list { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.list > li { position: relative; }
.list-row { min-height: 64px; padding: 10px 14px 10px 16px; }
.list > li:not(:last-child) > .row::after { left: 68px; }
.list-row .lead { flex: none; }
.chev { color: var(--label-3); display: inline-flex; }
.chev .ico { width: 16px; height: 16px; }
.more { display: flex; justify-content: center; padding: 14px; }
.empty { display: grid; place-items: center; text-align: center; padding: 40px 16px; color: var(--label-2); }
.empty.tall { min-height: 60vh; }
.empty h2 { font: 700 22px var(--font-display); color: var(--label); margin: 16px 0 6px; }
.empty p { max-width: 420px; margin: 0 auto 18px; font-size: 15px; }
.empty-art { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint); }
.empty-art .ico { width: 32px; height: 32px; }
.row-center { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.cta-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 18px; padding: 12px 0 4px; z-index: 4; pointer-events: none; }
.cta-bar > * { pointer-events: auto; }
.cta-sel:not(:empty) { padding: 6px 12px; border-radius: 16px; background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-2); }
.cta-sel { font-size: 14px; color: var(--label-2); margin-right: auto; }
.cta-bar .btn-xl { box-shadow: 0 6px 16px color-mix(in srgb, var(--tint) 28%, transparent); }
.skel { display: block; height: 11px; border-radius: 6px; background: var(--fill); animation: breathe 1.2s ease-in-out infinite; }
.skel-c { background: var(--fill); }
.table-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
.table-wrap { overflow: auto; max-height: calc(100dvh - 330px); }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.grid th { position: sticky; top: 0; z-index: 1; background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); text-align: left; font-size: 12.5px; font-weight: 600; color: var(--label-2); padding: 0; white-space: nowrap; border-bottom: 0.5px solid var(--sep); }
.grid th > .th, .grid th button.sort { display: flex; align-items: center; gap: 4px; padding: 10px 12px; }
.grid th button.sort { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 4px; padding: 10px 12px; cursor: pointer; width: 100%; }
.grid th button.sort:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: -3px; }
.grid th .ico { width: 12px; height: 12px; }
.grid td { padding: 10px 12px; border-bottom: 0.5px solid var(--sep); vertical-align: middle; }
.grid tbody tr:hover td { background: color-mix(in srgb, var(--fill) 50%, transparent); }
.grid tbody tr.selected td { background: color-mix(in srgb, var(--tint) 8%, transparent); }
.grid .c-check { width: 44px; padding-left: 16px; }
.grid .lead { flex-direction: column; align-items: flex-start; gap: 4px; }
.grid .lead .q, .grid .lead .pt { height: 22px; font-size: 12px; }
.grid .name-btn { all: unset; cursor: pointer; font-weight: 600; display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid .name-btn:hover { color: var(--tint); }
.grid .name-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); }
.grid .sub { display: block; font-size: 12.5px; color: var(--label-2); }
.pager { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13.5px; border-top: 0.5px solid var(--sep); }
input[type="checkbox"]:not(.ios-switch):not(.check-input) { accent-color: var(--tint); width: 18px; height: 18px; margin: 0; }

/* Segments : cartes façon widgets */
.seg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.seg-card { position: relative; display: flex; flex-direction: column; gap: 8px; height: 252px; padding: 18px 18px 16px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-2); border: 0; text-align: left; color: inherit; cursor: pointer; transition: transform var(--med) var(--spring), box-shadow var(--med) var(--spring); }
.seg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); }
.seg-card:active, .seg-card.pressed { transform: scale(.97); }
.seg-card header { display: flex; align-items: flex-start; gap: 8px; }
.seg-card h2 { flex: 1; font: 600 17px/1.25 var(--font-display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seg-card header .btn { margin: -6px -8px 0 0; color: var(--label-2); }
.seg-count { display: flex; align-items: baseline; gap: 6px; }
.seg-count b { font: 700 40px/1 var(--font-display); letter-spacing: -0.01em; }
.seg-count span { color: var(--label-2); font-size: 15px; }
.seg-params { font-size: 13px; color: var(--label-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.seg-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fill); gap: 2px; }
.seg-bar i { display: block; height: 100%; }
.b-P { background: var(--tint); }
.b-Q { background: color-mix(in srgb, var(--label) 28%, transparent); }
.b-I { background: var(--fill-2); }
.seg-legend { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; }
.seg-legend span { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-left: 4px; }
.seg-legend span:first-child { margin-left: 0; }
.d-P { background: var(--tint); }
.d-Q { background: color-mix(in srgb, var(--label) 28%, transparent); }
.d-direct { background: var(--green); }
.seg-card footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.seg-add { align-items: center; justify-content: center; gap: 14px; }
.seg-add .plus { width: 64px; height: 64px; border-radius: 32px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); transition: transform var(--med) var(--bounce); }
.seg-add .plus .ico { width: 30px; height: 30px; }
.seg-add:hover .plus { transform: scale(1.06); }
.add-label { font: 600 17px var(--font-display); color: var(--tint); }
.spring-in { animation: spring-in 520ms var(--bounce) both; }
.skel-card { animation: breathe 1.2s ease-in-out infinite; box-shadow: none; background: var(--card); }

/* Historique */
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tile-stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-1); min-width: 0; }
.tile-stat b { font: 700 26px/1.1 var(--font-display); margin-top: 8px; }
.tile-stat b small { font-size: 15px; font-weight: 600; color: var(--label-2); }
.tile-stat > span:last-child { font-size: 13px; color: var(--label-2); }
.stat-ico { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint); }
.stat-ico .ico { width: 22px; height: 22px; }
.mini-ring { display: block; height: 44px; }
.day-row { gap: 16px; }
.day-fig { font-size: 13.5px; color: var(--label-2); white-space: nowrap; }
.day-fig b { color: var(--label); font-weight: 600; font-size: 15px; }
.day-fig.rdv b { color: var(--green-text); }

/* ———————— Fiche, site ———————— */
.contact { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 8px 0 4px; }
.contact-name { font: 700 30px/1.15 var(--font-display); letter-spacing: 0.003em; margin-top: 8px; text-wrap: balance; }
.contact-name:focus { outline: none; }
.contact-meta { font-size: 15px; color: var(--label-2); margin-bottom: 4px; }
.fiche { display: flex; flex-direction: column; }
.fiche .group + .group { margin-top: 16px; }
.site-card { display: flex; flex-direction: column; min-height: 0; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: var(--shadow-2); }
.site-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--glass-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 0.5px solid var(--sep); }
.site-bar .dots { display: flex; gap: 5px; padding-left: 2px; }
.site-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill-2); }
.site-bar .url { flex: 1; min-width: 0; height: 28px; line-height: 28px; text-align: center; font-size: 13px; color: var(--label-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 8px; background: var(--fill); padding: 0 10px; }
.site-body { flex: 1; min-height: 0; position: relative; background: var(--card-2); }
.site-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.site-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-2); font-size: 13px; }
.site-fallback { position: absolute; inset: 0; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.capture { border-radius: 12px; overflow: hidden; background: #fff; aspect-ratio: 16 / 9; width: 100%; max-height: 300px; box-shadow: var(--shadow-2); }
.capture svg { width: 100%; height: 100%; display: block; }
.site-fallback h3 { font: 600 17px var(--font-display); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--card); font-size: 13.5px; color: var(--label-2); line-height: 1.4; }
.notice .ico { width: 17px; height: 17px; color: var(--tint); margin-top: 1px; }
.no-site { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.big-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); font-weight: 600; font-size: 16px; margin-bottom: 14px; }
.no-site p { font-size: 14px; color: var(--label-2); max-width: 340px; margin: 0 auto; }
.sheet-site { margin-top: 16px; }
.sheet-site .site-card { height: 380px; }

/* ———————— Mode Appels ———————— */
.cockpit { display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 0; position: relative; }
.navbar { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 20px; background: var(--glass); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); border-bottom: 0.5px solid var(--sep); z-index: 6; min-width: 0; }
.goal { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; margin-left: -4px; border: 0; border-radius: 14px; background: transparent; color: inherit; cursor: pointer; text-align: left; transition: background var(--fast), transform var(--fast) var(--spring); }
.goal:hover { background: var(--fill); }
.goal:active { transform: scale(.97); }
.goal-txt { display: flex; flex-direction: column; }
.goal-txt b { font: 600 17px var(--font-display); }
.goal-txt span { font-size: 12px; color: var(--label-2); }
.ring { display: block; }
.ring-track { stroke: color-mix(in srgb, var(--tint) 20%, transparent); }
.ring-bar { stroke: var(--tint); transition: stroke-dashoffset var(--slow) var(--spring); }
.ring-bar.done { stroke: var(--green); }
.goal.celebrate .ring { animation: ring-pop 420ms var(--bounce); }
.nav-center { display: flex; flex-direction: column; min-width: 0; max-width: 280px; padding-left: 16px; border-left: 0.5px solid var(--sep); }
.nav-title { font: 600 15px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub { font-size: 12.5px; color: var(--label-2); }
.hud-stats { display: flex; gap: 2px; margin: 0 auto 0 0; }
.hud-item { display: flex; flex-direction: column-reverse; padding: 0 12px; }
.hud-item dt { font-size: 12px; color: var(--label-2); }
.hud-item dd { margin: 0; font: 600 18px var(--font-display); display: inline-block; transform-origin: left center; }
#hud-rdv dd { color: var(--green-text); }
#hud-rdv.celebrate dd { animation: pulse-num 420ms var(--bounce); }
.hud-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 15px; background: var(--fill); font-size: 13.5px; color: var(--label-2); white-space: nowrap; }
.hud-chip b { color: var(--label); font-weight: 600; }
.hud-chip .ico { width: 15px; height: 15px; color: var(--orange); }
.mobile-switch { display: none; }
.cockpit-body { display: grid; grid-template-columns: minmax(480px, 1fr) minmax(420px, 46%); min-height: 0; }
.desk { overflow-y: auto; padding: 28px 32px 32px; min-height: 0; }
.desk:focus { outline: none; }
.contact-card { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.contact-card .lead { margin-top: 4px; }
.number { display: flex; align-items: center; justify-content: center; gap: 14px; }
.number .mono { font: 600 28px var(--font-display); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.timer { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.timer i { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); }
.timer.live { color: var(--red); }
.timer.live i { background: var(--red); animation: breathe 1.2s infinite; }
.already { font-size: 13.5px; color: var(--label-2); text-align: center; }
.call-actions { display: grid; grid-template-columns: 1fr 168px; gap: 10px; }
.btn-call-capsule { display: flex; align-items: center; justify-content: center; gap: 10px; height: 58px; border-radius: 29px; border: 0; background: var(--green); color: #fff; font: 600 19px var(--font-display); cursor: pointer; text-decoration: none; transition: transform var(--fast) var(--spring), background var(--fast); }
.btn-call-capsule:hover { text-decoration: none; background: color-mix(in srgb, var(--green) 92%, #000); }
.btn-call-capsule:active { transform: scale(.97); }
.btn-call-capsule .ico { width: 22px; height: 22px; }
.btn-call-capsule.live { animation: live-ring 1.6s ease-out infinite; }
.btn-wa { height: 58px; border-radius: 29px; background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green-text); font-size: 16px; font-weight: 600; gap: 8px; }
.btn-wa:hover { background: color-mix(in srgb, var(--green) 21%, transparent); }
.btn-wa[aria-disabled="true"] { background: var(--fill); color: var(--label-3); opacity: 1; }
.btn-wa .ico { width: 20px; height: 20px; }
.facts .row { min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; height: 86px; padding: 12px 12px 11px; border-radius: 16px; border: 0; background: var(--card); box-shadow: var(--shadow-1); cursor: pointer; text-align: left; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--label); transition: transform var(--fast) var(--spring), background var(--fast); }
.tile:hover { background: color-mix(in srgb, var(--card) 92%, var(--label)); }
.tile:active, .tile.pressed { transform: scale(.96); }
.tile .ico { width: 24px; height: 24px; }
.tile kbd { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity var(--fast); }
.tiles:hover kbd, .tile:focus-visible kbd { opacity: 1; }
.t-no_answer .ico, .t-voicemail .ico { color: var(--tint); }
.t-callback .ico { color: var(--orange); }
.t-interested .ico, .t-meeting .ico { color: var(--green); }
.t-not_interested .ico, .t-wrong_number .ico, .t-do_not_call .ico { color: var(--red); }
.note textarea { min-height: 46px; resize: vertical; padding: 0; line-height: 1.45; }
.note textarea::placeholder { color: var(--label-3); }
.script-panel { padding: 4px 16px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.script-body { display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--label); }
.script-body h4 { font: 600 13px var(--font); color: var(--label-2); margin-top: 10px; }
.script-body h4:first-child { margin-top: 4px; }
.script-body p { line-height: 1.55; }
.script-body mark { background: color-mix(in srgb, var(--tint) 13%, transparent); color: var(--tint); border-radius: 5px; padding: 0 3px; }
.card-foot { display: flex; justify-content: space-between; }
.side { display: flex; flex-direction: column; min-height: 0; padding: 16px 20px 20px 4px; gap: 12px; }
.side-switch .segmented { width: 100%; }
.side-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.side-panel .site-card { flex: 1; }
#side-fiche { padding-bottom: 8px; }
.queue { position: absolute; top: 72px; bottom: 12px; left: 12px; width: min(380px, calc(100% - 24px)); z-index: 30; display: flex; flex-direction: column; border-radius: 20px; background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-3); overflow: hidden; animation: slide-left var(--slow) var(--spring); }
.queue-head { display: flex; align-items: center; gap: 10px; padding: 14px 10px 12px 18px; }
.queue-head h2 { font: 700 20px var(--font-display); flex: 1; }
.progress { height: 3px; margin: 0 18px 6px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--tint); transition: width var(--slow) var(--spring); }
.queue ol { overflow-y: auto; flex: 1; padding: 4px 8px 8px; }
.queue li .row { border-radius: 12px; min-height: 52px; padding: 8px 10px; gap: 10px; }
.queue li .row::after { display: none; }
.queue li.current .row { background: color-mix(in srgb, var(--tint) 13%, transparent); }
.queue .pos { width: 24px; text-align: right; font-size: 12.5px; color: var(--label-2); }
.queue li.done .row-title { color: var(--label-2); }
.queue .res { font-weight: 600; }

/* Récapitulatif */
.recap { padding: 22px; border-radius: 20px; background: #1C1C1E; color: #fff; display: flex; flex-direction: column; gap: 22px; }
:root[data-theme="dark"] .recap { background: #000; }
.recap-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: rgba(235, 235, 245, .6); }
.recap-brand { font: 700 17px var(--font-display); color: #fff; }
.recap-main { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.recap-ring { position: relative; width: 128px; height: 128px; }
.recap-ring .ring-track { stroke: rgba(10, 132, 255, .22); }
.recap-ring .ring-bar { stroke: #0A84FF; }
.recap-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.recap-ring-txt b { font: 700 34px var(--font-display); }
.recap-ring-txt span { font-size: 12px; color: rgba(235, 235, 245, .6); }
.recap-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.recap-figs div { display: flex; flex-direction: column; }
.recap-figs b { font: 700 32px/1.1 var(--font-display); }
.recap-figs span { font-size: 13px; color: rgba(235, 235, 245, .6); }
.recap-figs .hl b { color: #30D158; }
.recap-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 14px; border-top: 0.5px solid rgba(84, 84, 88, .65); font-size: 13.5px; color: rgba(235, 235, 245, .85); }
.recap-foot span { display: inline-flex; align-items: center; gap: 6px; }
.recap-foot .ico { width: 16px; height: 16px; color: #FF9F0A; }
.recap-records { display: flex; flex-direction: column; gap: 6px; }
.recap-records span { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 14px; background: rgba(48, 209, 88, .16); color: #30D158; font-size: 13.5px; font-weight: 600; }
.recap-records .ico { width: 15px; height: 15px; }

/* ———————— Feuilles ———————— */
dialog.sheet { border: 0; padding: 0; margin: auto; width: min(580px, calc(100vw - 32px)); max-height: min(780px, calc(100dvh - 48px)); border-radius: 20px; background: var(--bg); color: var(--label); box-shadow: var(--shadow-3); overflow: hidden; }
:root[data-theme="dark"] dialog.sheet { --card: #11151C; background: #0A0D12; box-shadow: var(--shadow-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) dialog.sheet { --card: #11151C; background: #0A0D12; } }
dialog.sheet.tall { height: min(780px, calc(100dvh - 48px)); }
dialog.sheet.medium { width: min(620px, calc(100vw - 32px)); }
dialog.sheet.small { width: min(440px, calc(100vw - 32px)); }
dialog.sheet[open] { animation: sheet-in var(--slow) var(--spring); }
dialog.sheet.closing { animation: sheet-out var(--fast) ease-in forwards; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .32); animation: fade var(--med) ease; }
dialog.sheet.closing::backdrop { animation: fade-out var(--fast) ease forwards; }
.grabber { display: none; }
.sheet-inner { display: flex; flex-direction: column; height: 100%; max-height: inherit; }
dialog.sheet:not(.tall) .sheet-inner { max-height: min(780px, calc(100dvh - 48px)); }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; height: 56px; padding: 0 10px; flex: none; }
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :last-child { justify-self: end; }
.sheet-title { font: 600 17px var(--font-display); text-align: center; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 20px; }
.sheet-body.center { text-align: center; padding-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.sheet-body > .call-btn-wrap, .sheet-body > .btn-call-capsule { width: 100%; margin: 14px 0 18px; }
.sheet-foot { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.sheet-foot.sticky { background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border-top: 0.5px solid var(--sep); }
.sheet-foot.stack { flex-direction: column; gap: 8px; }
.sheet-foot .live { flex: 1; display: flex; flex-direction: column; }
.sheet-foot .live b { font: 700 22px var(--font-display); }
.sheet-foot .live span { font-size: 12.5px; color: var(--label-2); }
.sheet-foot .btn-filled { height: 50px; padding: 0 22px; border-radius: 14px; font-size: 17px; }
.group-title.with-tools span:last-child { display: flex; gap: 2px; }
.cols-grid { display: grid; grid-template-columns: 1fr 1fr; }
.cols-grid .row::after { display: none; }
.cols-grid .row { border-bottom: 0.5px solid var(--sep); }
.quota { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--label-2); min-width: 0; }
.quota .qrow { display: flex; justify-content: space-between; }
.quota .qrow b { color: var(--label); }
.quota .bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.quota .bar i { display: block; height: 100%; background: var(--tint); }
.err { color: var(--red); font-size: 13px; padding: 8px 16px 0; }
.err:empty { display: none; }

/* Menu contextuel */
.ctxmenu { position: fixed; z-index: 1500; min-width: 240px; padding: 6px 0; border-radius: 14px; background: var(--glass-strong); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); box-shadow: var(--shadow-3), 0 0 0 0.5px var(--sep); animation: menu-in var(--med) var(--spring); transform-origin: top right; }
.ctxmenu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: 40px; padding: 0 16px; border: 0; background: transparent; color: var(--label); font-size: 15px; text-align: left; cursor: pointer; }
.ctxmenu button .ico { width: 18px; height: 18px; color: var(--label); }
.ctxmenu button:hover, .ctxmenu button:focus-visible { background: var(--fill); outline: none; }
.ctxmenu button.destructive, .ctxmenu button.destructive .ico { color: var(--red); }
.ctx-sep { height: 6px; background: var(--fill); margin: 4px 0; }

/* Palette ⌘K */
.palette-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .25); animation: fade var(--med); }
.palette { position: fixed; z-index: 61; top: 14vh; left: 50%; width: min(620px, calc(100vw - 24px)); transform: translateX(-50%); border-radius: 18px; background: var(--glass-strong); backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%); box-shadow: var(--shadow-3), 0 0 0 0.5px var(--sep); overflow: hidden; animation: palette-in var(--med) var(--spring); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 0.5px solid var(--sep); }
.palette-input .ico { width: 20px; height: 20px; color: var(--label-2); }
.palette-input input { height: 56px; font-size: 19px; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 380px; overflow-y: auto; }
.palette li[role="option"] { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.palette li[role="option"] .ico { width: 18px; height: 18px; color: var(--tint); }
.palette li[role="option"] span { flex: 1; }
.palette li[aria-selected="true"] { background: var(--tint); color: var(--on-tint); }
.palette li[aria-selected="true"] .ico { color: var(--on-tint); }
.palette li[aria-selected="true"] kbd { background: rgba(255, 255, 255, .2); color: #fff; }
.pal-group { padding: 10px 12px 4px; font-size: 12.5px; font-weight: 600; color: var(--label-2); }
.pal-empty { padding: 20px; text-align: center; color: var(--label-2); }

/* Toasts */
.toasts { position: fixed; bottom: 24px; left: var(--side-w); right: 0; z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 22px; background: rgba(30, 30, 32, .86); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-3); animation: toast-in var(--slow) var(--bounce); }
.toast.out { animation: toast-out var(--fast) ease-in forwards; }
.toast:nth-last-child(n+3) { display: none; }
.toast button { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 14px; padding: 5px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }

/* ———————— Mouvement ———————— */
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }
@keyframes route-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(48px) scale(.98); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(32px) scale(.98); } }
@keyframes menu-in { from { opacity: 0; transform: scale(.88); } }
@keyframes palette-in { from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes slide-left { from { opacity: 0; transform: translateX(-24px) scale(.98); } }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
@keyframes spring-in { from { opacity: 0; transform: scale(.7); } }
@keyframes ring-pop { 50% { transform: scale(1.14); } }
@keyframes pulse-num { 50% { transform: scale(1.3); } }
@keyframes breathe { 50% { opacity: .45; } }
@keyframes live-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 45%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
::view-transition-group(studio-name) { animation-duration: var(--slow); animation-timing-function: var(--spring); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--med); }

/* ———————— Responsive ———————— */
@media (max-width: 1280px) {
  .hud-chip#hud-left { display: none; }
  .cockpit-body { grid-template-columns: minmax(440px, 1fr) minmax(360px, 42%); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --side-w: 76px; }
  .brand { justify-content: center; padding: 4px 0 14px; }
  .brand-txt, .side-nav a span:last-child, .cmdk-txt, .cmdk kbd, .side-foot { display: none; }
  .side-nav a { justify-content: center; padding: 0; height: 44px; }
  .cmdk { justify-content: center; padding: 0; }
  .page { padding: 24px 28px 32px; }
  .nav-center, .hud-item:nth-child(4), #hud-streak { display: none; }
  .cockpit-body { grid-template-columns: 1fr minmax(320px, 40%); }
  .desk { padding: 22px 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; height: 60px; }
  .call-actions { grid-template-columns: 1fr 140px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main#view { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(52px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--glass); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%); border-top: 0.5px solid var(--sep); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--label-2); font-size: 10.5px; font-weight: 500; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a .ico { width: 25px; height: 25px; }
  .tabbar a[aria-current="page"] { color: var(--tint); }
  .page { padding: 12px 16px 24px; }
  .large-title { padding-top: 34px; }
  .large-title h1 { font-size: 34px; }
  .search-row { margin-top: 14px; }
  .search-row .btn-tinted .lbl { display: none; }
  .search-row .btn-tinted { width: 40px; padding: 0; position: relative; }
  .search-row .btn-tinted .badge-n { position: absolute; top: -6px; right: -6px; }
  #q { min-width: 120px; }
  .list-row { padding-left: 14px; gap: 10px; }
  .list-row .lead { flex-direction: column; align-items: flex-end; gap: 4px; }
  .list-row .lead .q, .list-row .lead .pt { height: 20px; font-size: 11.5px; padding: 0 8px; }
  .list-row .row-title { font-size: 15.5px; }
  .chev { display: none; }
  .cta-bar { justify-content: stretch; padding-bottom: 4px; }
  .cta-bar .btn-xl { width: 100%; }
  .seg-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .seg-card { height: 212px; padding: 14px; border-radius: 18px; gap: 6px; }
  .seg-card h2 { font-size: 15px; }
  .seg-count b { font-size: 30px; }
  .seg-params { -webkit-line-clamp: 2; font-size: 12px; min-height: 0; }
  .seg-legend { display: none; }
  .seg-card footer .muted { display: none; }
  .seg-card footer { justify-content: flex-end; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .navbar { height: auto; padding: 8px 12px; gap: 6px 10px; flex-wrap: wrap; }
  .hud-stats { order: 5; width: 100%; justify-content: space-between; margin: 0; }
  .hud-item { padding: 0 4px; }
  .hud-item:nth-child(4) { display: flex; }
  .navbar [data-queue-toggle] .lbl, .goal-txt span { display: none; }
  .navbar .btn-plain:first-of-type { margin-left: auto; }
  .mobile-switch { display: flex; gap: 8px; padding: 8px 12px; align-items: center; }
  .mobile-switch .segmented { flex: 1; }
  .cockpit { grid-template-rows: auto auto 1fr; }
  .cockpit-body { grid-template-columns: 1fr; }
  .cockpit[data-tab="appel"] .side, .cockpit[data-tab="site"] .desk { display: none; }
  .side { padding: 0 12px 12px; }
  .side-switch, #side-fiche { display: none; }
  .desk { padding: 6px 16px 24px; }
  .contact-card { gap: 14px; }
  .contact .avatar-c.lg { width: 64px; height: 64px; font-size: 26px; }
  .contact-name { font-size: 26px; }
  .number .mono { font-size: 24px; }
  .call-actions { grid-template-columns: 1fr 120px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile { height: 54px; font-size: 14.5px; }
  .tile kbd, [data-kbd]::after { display: none; }
  .queue { top: 8px; bottom: 8px; left: 8px; width: calc(100% - 16px); }
  dialog.sheet, dialog.sheet.medium, dialog.sheet.small { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: calc(100dvh - 44px); }
  dialog.sheet.tall { height: calc(100dvh - 44px); }
  dialog.sheet[open] { animation: sheet-up var(--slow) var(--spring); }
  dialog.sheet.closing { animation: sheet-down var(--fast) ease-in forwards; }
  dialog.sheet:not(.tall) .sheet-inner { max-height: calc(100dvh - 44px); }
  .grabber { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); margin: 6px auto 0; touch-action: none; }
  .sheet-head { touch-action: none; height: 50px; }
  .cols-grid { grid-template-columns: 1fr; }
  .recap-main { grid-template-columns: 1fr; justify-items: center; }
  .toasts { left: 16px; right: 16px; transform: none; bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ════════ Couche « élite » : grain, lumière 1 px, centre de commande ════════ */
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 3000; opacity: var(--grain); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.mono, .ref { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.ref { font-size: 12px; color: var(--label-3); }
.new-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; font: 600 10.5px var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent); vertical-align: 2px; }
.member { display: flex; align-items: center; gap: 6px; }
.badge-member { height: 17px; padding: 0 7px; border-radius: 5px; font: 600 10.5px/17px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 45%, transparent); }
.member .proto { color: var(--label-3); }
.summary #counter .mono { font-weight: 600; color: var(--label); }

/* Ligne de balayage « Sentinelle » */
.results, .seg-card { position: relative; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 5; pointer-events: none; background: linear-gradient(90deg, transparent, var(--tint), transparent); box-shadow: 0 0 18px var(--tint); animation: scan 620ms var(--spring) forwards; }
@keyframes scan { from { top: 0; opacity: 1; } to { top: 100%; opacity: 0; } }

/* Entrée cinématique */
.intro { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; background: #030406; color: #EEF1F5; animation: fade 200ms ease; }
.intro.out { animation: fade-out 300ms ease forwards; }
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.intro-icon { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; animation: intro-icon 700ms var(--bounce) both; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 0 60px rgba(139, 211, 255, .18); }
.intro-icon svg { width: 100%; height: 100%; display: block; }
.intro-title { font: 700 30px var(--font-display); letter-spacing: -.01em; animation: intro-up 500ms 250ms var(--spring) both; }
.intro-sub { display: flex; gap: 8px; font: 500 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(238, 241, 245, .6); animation: intro-up 500ms 450ms var(--spring) both; }
.intro-sub .dot { color: #8BD3FF; }
.intro-line { width: 220px; height: 1px; background: linear-gradient(90deg, transparent, #8BD3FF, transparent); transform-origin: left; animation: intro-line 900ms 350ms var(--spring) both; }
.intro-skip { position: absolute; bottom: 28px; right: 28px; border: 0; background: transparent; color: rgba(238, 241, 245, .5); font: 500 13px var(--font); cursor: pointer; }
@keyframes intro-icon { from { opacity: 0; transform: scale(.6); } }
@keyframes intro-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes intro-line { from { transform: scaleX(0); opacity: 0; } }

/* Centre de commande */
.command { display: grid; grid-template-columns: 1fr 360px; height: 100%; min-height: 0; }
.map-wrap { position: relative; min-width: 0; min-height: 0; background: radial-gradient(120% 90% at 50% 45%, color-mix(in srgb, var(--card) 70%, var(--bg)) 0%, var(--bg) 70%); overflow: hidden; }
.map { position: absolute; inset: 56px 0 0 0; width: 100%; height: calc(100% - 56px); display: block; --u: 1; }
.map-top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 20px; border-bottom: 0.5px solid var(--sep); background: var(--glass); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.map-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.map-zone { font-size: 12px; letter-spacing: .12em; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map .grid line { stroke: var(--label); stroke-opacity: .05; stroke-width: calc(var(--u) * 1px); }
.map .grid text, .map-deco text { fill: var(--label-3); font: 500 calc(var(--u) * 9.5px) var(--mono); letter-spacing: .08em; }
.map .regions path { fill: color-mix(in srgb, var(--tint) calc(var(--dens) * 13%), transparent); stroke: var(--label); stroke-opacity: .22; stroke-width: calc(var(--u) * 0.8px); stroke-linejoin: round; cursor: pointer; transition: fill var(--fast), stroke-opacity var(--fast); outline: none; }
.map .regions path:hover, .map .regions path:focus-visible { stroke-opacity: .5; fill: color-mix(in srgb, var(--tint) calc(var(--dens) * 13% + 5%), transparent); }
.map .regions path.on { stroke: var(--tint); stroke-opacity: .7; }
.map-deco line, .map-deco circle, .map-deco path { stroke: var(--label-3); stroke-width: calc(var(--u) * 1px); fill: none; }
.map-deco .compass path { fill: var(--tint); stroke: none; }
.sweep { opacity: 0; transform-box: view-box; transform-origin: 500px 480px; pointer-events: none; }
.sweep line { stroke: var(--tint); stroke-opacity: .5; stroke-width: calc(var(--u) * 1px); }
.sweep.run { animation: sweep 2.2s cubic-bezier(.3, .1, .3, 1) both; }
@keyframes sweep { 0% { transform: rotate(-90deg); opacity: 0; } 12% { opacity: 1; } 85% { opacity: .8; } 100% { transform: rotate(270deg); opacity: 0; } }
.pt, .cluster { cursor: pointer; }
.points.cascade .pt, .points.cascade .cluster { animation: blip-in 420ms var(--spring) both; }
@keyframes blip-in { from { opacity: 0; } }
.p-hit { fill: transparent; }
.p-core { fill: var(--label); fill-opacity: .55; }
.p-halo { fill: var(--label); fill-opacity: .05; }
.pt.dim .p-core { fill-opacity: .25; }
.pt.hot .p-core { fill: var(--tint); fill-opacity: 1; }
.pt.hot .p-halo { fill: var(--tint); fill-opacity: .14; }
.pt.new .p-core { fill: #FFFFFF; fill-opacity: 1; }
.p-pulse { fill: none; stroke: var(--tint); stroke-width: calc(var(--u) * 1px); transform-box: fill-box; transform-origin: center; animation: pulse 3.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .8; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.pt:hover .p-core { fill-opacity: 1; }
.cluster .c-core { fill: color-mix(in srgb, var(--label) 10%, var(--bg)); stroke: var(--label); stroke-opacity: .35; stroke-width: calc(var(--u) * 1px); }
.cluster .c-halo { fill: var(--label); fill-opacity: .04; }
.cluster.hot .c-core { stroke: var(--tint); stroke-opacity: .9; }
.cluster.hot .c-halo { fill: var(--tint); fill-opacity: .08; }
.cluster text { fill: var(--label); font-family: var(--mono); font-weight: 600; text-anchor: middle; }
.cluster:hover .c-core { fill: color-mix(in srgb, var(--tint) 18%, var(--bg)); }
.reticle line, .reticle circle { stroke: var(--tint); stroke-width: calc(var(--u) * 1px); fill: none; }
.reticle line { stroke-dasharray: calc(var(--u) * 3px) calc(var(--u) * 3px); }
.map-label { position: absolute; z-index: 4; padding: 6px 10px; border-radius: 8px; background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow-2); font-size: 11.5px; letter-spacing: .06em; color: var(--label); white-space: nowrap; pointer-events: none; animation: pop 120ms var(--spring); }
.map-legend { position: absolute; left: 20px; bottom: 16px; display: flex; gap: 16px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--label-3); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 7px; height: 7px; border-radius: 50%; }
.lg-p { background: var(--tint); box-shadow: 0 0 8px var(--tint); }
.lg-o { background: var(--label-2); }
.lg-n { background: #fff; }
.briefing { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 22px 20px 20px; background: var(--glass); backdrop-filter: blur(28px) saturate(160%); -webkit-backdrop-filter: blur(28px) saturate(160%); border-left: 0.5px solid var(--sep); }
.brief-grabber { display: none; }
.status { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--label-2); }
.status b { color: var(--label); font-weight: 600; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: breathe 2.4s ease-in-out infinite; }
.brief-title { font: 700 28px/1.15 var(--font-display); margin: 14px 0 16px; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1); }
.kpi b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.kpi:first-child b { color: var(--tint); }
.kpi span { font-size: 12px; color: var(--label-2); line-height: 1.3; }
.zones { display: flex; flex-direction: column; gap: 2px; padding: 0; margin: 0; list-style: none; }
.zone { display: grid; grid-template-columns: 1fr 80px 28px; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--label); font-size: 13.5px; text-align: left; cursor: pointer; transition: background var(--fast); }
.zone:hover, .zone.on { background: var(--fill); }
.z-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.z-bar { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.z-bar i { display: block; height: 100%; background: var(--tint); border-radius: 2px; transition: width var(--slow) var(--spring); }
.z-n { text-align: right; color: var(--label-2); font-size: 12.5px; }
.brief-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 4px; }

/* États vides illustrés */
.empty-radar { width: 96px; height: 96px; display: block; margin: 0 auto 12px; }
.empty-radar circle, .empty-radar path { fill: none; stroke: var(--label-3); stroke-width: 1; }
.empty-radar .arm { stroke: var(--tint); stroke-width: 1.5; transform-origin: 60px 60px; animation: spin 4s linear infinite; }
.empty-radar .blip { fill: var(--tint); stroke: none; animation: breathe 2s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Palette avec aperçus */
.palette { width: min(780px, calc(100vw - 24px)); }
.palette-body { display: grid; grid-template-columns: 1fr 280px; min-height: 0; }
.palette ul { border-right: 0.5px solid var(--sep); }
.palette-preview { padding: 18px; min-height: 280px; }
.pv-cmd, .pv-studio { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; animation: fade 120ms; }
.pv-cmd .ico { width: 28px; height: 28px; color: var(--tint); }
.pv-cmd b, .pv-studio b { font: 600 16px var(--font-display); }
.pv-cmd p { font-size: 13.5px; color: var(--label-2); line-height: 1.45; }
.pv-studio { align-items: center; text-align: center; }
.pv-studio .avatar-c.lg { width: 64px; height: 64px; font-size: 24px; }
.pv-studio dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0 0; font-size: 13px; text-align: left; width: 100%; }
.pv-studio dt { color: var(--label-2); }
.pv-studio dd { margin: 0; text-align: right; }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 0.5px solid var(--sep); font-size: 11.5px; color: var(--label-3); }
.palette-foot kbd { margin-right: 3px; }

/* Cockpit : focus total, pouls du bouton Appeler, confirmation de RDV */
body.mode-call .sidebar { opacity: .32; transition: opacity var(--med) var(--spring); }
body.mode-call .sidebar:hover, body.mode-call .sidebar:focus-within { opacity: 1; }
.btn-call-capsule:not(.live) { animation: call-breath 2.8s ease-in-out infinite; }
@keyframes call-breath { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 16%, transparent), 0 0 28px color-mix(in srgb, var(--green) 22%, transparent); } }
:root[data-theme="dark"] .btn-call-capsule { color: #03140C; }
.rdv-confirm { position: fixed; z-index: 2500; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 240px; padding: 26px 28px 22px; border-radius: 22px; background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); box-shadow: var(--shadow-3); animation: confirm-in 360ms var(--bounce); pointer-events: none; }
.rdv-confirm.out { animation: fade-out 300ms ease forwards; }
.rdv-confirm svg { width: 56px; height: 56px; }
.rdv-confirm circle { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 520ms 60ms var(--spring) forwards; }
.rdv-confirm path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw 360ms 380ms var(--spring) forwards; }
.rdv-confirm b { font: 700 19px var(--font-display); margin-top: 6px; }
.rdv-confirm span { font-size: 13.5px; color: var(--label-2); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes confirm-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.92); } }

/* Récapitulatif : carte de membre noire */
.recap { background: #000 !important; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .12), 0 24px 60px rgba(0, 0, 0, .5); background-image: radial-gradient(120% 80% at 0% 0%, rgba(139, 211, 255, .10), transparent 55%) !important; }
.recap-member { font-size: 11px; letter-spacing: .14em; color: #8BD3FF; }
.recap-date { font-size: 13px; color: rgba(235, 235, 245, .6); margin-top: -14px; }
.recap-ring .ring-track { stroke: rgba(139, 211, 255, .2); }
.recap-ring .ring-bar { stroke: #8BD3FF; }
.recap-figs b, .recap-ring-txt b { font-family: var(--mono); font-weight: 600; letter-spacing: -.02em; }

@media (max-width: 1100px) {
  .command { grid-template-columns: 1fr 300px; }
  .map-legend { display: none; }
}
@media (max-width: 760px) {
  .command { display: block; position: relative; height: 100%; }
  .map-wrap { position: absolute; inset: 0; }
  .map-top { padding: 0 12px; }
  .map-top .segmented span { padding: 4px 9px; font-size: 12.5px; }
  .map-zone { font-size: 11px; }
  .briefing { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 182px; padding: 6px 16px 16px; border-left: 0; border-radius: 18px 18px 0 0; box-shadow: var(--shadow-3); overflow: hidden; transition: max-height var(--slow) var(--spring); }
  .briefing.open { max-height: 78%; overflow-y: auto; }
  .brief-grabber { display: flex; justify-content: center; width: 100%; height: 22px; border: 0; background: transparent; padding: 6px 0 0; cursor: pointer; }
  .brief-grabber span { width: 36px; height: 5px; border-radius: 3px; background: var(--label-3); }
  .brief-title { display: none; }
  .briefing .kpis { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
  .kpi { padding: 8px; border-radius: 12px; }
  .kpi b { font-size: 18px; }
  .kpi span { font-size: 10.5px; }
  .briefing:not(.open) .group-title, .briefing:not(.open) .zones, .briefing:not(.open) .brief-foot .btn-plain { display: none; }
  .briefing .brief-foot { padding-top: 10px; }
  .briefing:not(.open) .brief-foot { position: absolute; left: 16px; right: 16px; bottom: 14px; }
  .briefing:not(.open) { max-height: 236px; }
  .briefing:not(.open) .kpis { margin-bottom: 66px; }
  .palette-body { grid-template-columns: 1fr; }
  .palette-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sweep, .p-pulse, .scanline { display: none; }
  .btn-call-capsule { animation: none !important; }
}
.p-halo, .p-pulse, .p-core, .c-halo { pointer-events: none; }
