/* Balise Prospection — interface de l'application. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42vw 42vw at 4% 6%, rgba(205, 205, 232, .6), transparent 70%),
    radial-gradient(34vw 28vw at 62% 104%, rgba(218, 224, 196, .55), transparent 70%),
    radial-gradient(28vw 28vw at 104% 26%, rgba(234, 220, 225, .5), transparent 70%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
p { margin: 0; }
::selection { background: var(--rose); }
:focus-visible { outline: 2px solid var(--mauve); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.faint { color: var(--ink-4); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.stack.sm { gap: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------- Structure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  height: 76px; padding: 0 28px; max-width: 1360px; margin: 0 auto;
}
.topbar::before {
  content: ''; position: absolute; inset: 0 -100vw; z-index: -1;
  background: linear-gradient(rgba(243, 242, 239, .92), rgba(243, 242, 239, .72) 70%, rgba(243, 242, 239, 0));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(#000 70%, transparent);
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand .wm { font-size: 27px; line-height: 1; }
.brand .label { font-size: 10.5px; }
.nav {
  position: absolute; left: 50%; translate: -50% 0;
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav a {
  position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-3); transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--ink); background: rgba(34, 33, 33, .05); }
.nav a.active { color: var(--bg); background: var(--ink); }
.nav a .icon { width: 17px; height: 17px; }
.nav .badge { position: absolute; top: 4px; right: 6px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; letter-spacing: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.mauve { background: var(--mauve); }
.main { max-width: 1360px; margin: 0 auto; padding: 8px 28px 120px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 26px; }
.page-head h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.045em; margin-top: 10px; }
.page-head h1 .soft { color: var(--mauve); }
.page-head .sub { color: var(--ink-3); margin-top: 8px; max-width: 62ch; }

/* Barre d'état de la file d'analyse */
.queue-pill {
  display: none; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.queue-pill.on { display: inline-flex; }
.beacon { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--mauve); flex: none; }
.beacon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--mauve); animation: wm-signal 1.8s cubic-bezier(.2, .6, .3, 1) infinite; }
.beacon.idle { background: var(--ink-4); } .beacon.idle::after { display: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font: 500 14px/1 var(--font); transition: background-color .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #000; box-shadow: var(--shadow); }
.btn-mauve { background: var(--mauve); color: #fff; }
.btn-mauve:hover { background: #6A5561; }
.btn-light { background: rgba(255, 255, 255, .75); border-color: var(--line); color: var(--ink); }
.btn-light:hover { background: #fff; border-color: var(--ink-4); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(34, 33, 33, .06); color: var(--ink); }
.btn-danger { background: transparent; color: var(--crit); border-color: rgba(155, 65, 54, .25); }
.btn-danger:hover { background: var(--crit-bg); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn.icon-only { width: 42px; padding: 0; }
.btn.sm.icon-only { width: 34px; }
.btn .icon { width: 16px; height: 16px; }
.btn-pill.sm { height: 42px; font-size: 14px; padding-left: 18px; gap: 10px; }
.btn-pill.sm .arrow { width: 32px; height: 32px; font-size: 14px; }
.btn-pill[disabled] { opacity: .45; pointer-events: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cartes ---------- */
.card {
  background: var(--surface); border: 1px solid rgba(255, 255, 255, .75); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; min-width: 0;
}
.card.flat { box-shadow: none; }
.card.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card.dark .label { color: var(--mauve-soft); }
.card.dark .muted { color: #B8B3AD; }
.card.tint-lav { background: rgba(220, 220, 236, .75); }
.card.tint-sage { background: rgba(226, 230, 212, .8); }
.card.tint-rose { background: rgba(234, 220, 225, .8); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 19px; letter-spacing: -.025em; }
.card-head .label + h2 { margin-top: 6px; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.layout-detail { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.sticky-col { position: sticky; top: 88px; display: grid; gap: 20px; }

/* ---------- Indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; }
.kpi b { display: block; font-size: 38px; line-height: 1; letter-spacing: -.05em; font-weight: 600; margin-top: 12px; }
.kpi small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 12.5px; }
.kpi.accent b { color: var(--mauve); }

/* Score (anneau) */
.score {
  --v: 0; --c: var(--ink-4);
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--line-2) 0);
  font: 600 14px/1 var(--font); letter-spacing: -.02em;
}
.score::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface-solid); }
.score span { position: relative; }
.score.hot { --c: var(--mauve); }
.score.warm { --c: #C79A3B; }
.score.cold { --c: #9EA3BF; }
.score.lg { width: 104px; height: 104px; font-size: 32px; }
.score.lg::before { inset: 7px; }
.score.lg small { position: relative; display: block; font: 500 10px var(--mono); color: var(--ink-3); letter-spacing: .06em; margin-top: 2px; text-align: center; }
.score.lg span { text-align: center; }

/* Pastilles */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  font: 500 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; background: var(--bg-2); color: var(--ink-2);
}
.chip .icon { width: 13px; height: 13px; }
.chip.lav { background: var(--lavender); }
.chip.sage { background: var(--sage); color: #4C5A33; }
.chip.rose { background: var(--rose); color: #6A4A5A; }
.chip.mauve { background: var(--mauve); color: #fff; }
.chip.dark { background: var(--ink); color: var(--bg); }
.chip.crit { background: var(--crit-bg); color: var(--crit); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.outline { background: transparent; border: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; height: 34px; padding: 0 15px; border-radius: 999px; font-size: 14px; background: var(--lavender); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--mauve); color: #fff; font: 600 10.5px/1 var(--font); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); display: inline-block; flex: none; }

/* Statuts */
.st-nouveau { --st: #9EA3BF; } .st-a_contacter { --st: #7A6470; } .st-contacte { --st: #C79A3B; } .st-relance { --st: #B7793A; }
.st-echange { --st: #5F7FA6; } .st-rdv { --st: #6B8B4E; } .st-gagne { --st: #3F6B35; } .st-perdu { --st: #A39F99; } .st-ecarte { --st: #C8C4BE; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--ink-4)); flex: none; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 7px; }
.field > span, .field-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field small { color: var(--ink-4); font-size: 12.5px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: rgba(255, 255, 255, .85); color: var(--ink); font: 400 15px/1.4 var(--font); outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--mauve); box-shadow: 0 0 0 4px rgba(122, 100, 112, .14); background: #fff; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.textarea.tall { min-height: 360px; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6864' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px;
}
.select.sm, .input.sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 12px; }
.select.sm { padding-right: 32px; background-position: right 10px center; }
.select.pill { border-radius: 999px; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-4); }
.search-box .input { padding-left: 42px; border-radius: 999px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--mauve); margin: 0; }
.toggle-group { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line-2); }
.toggle-group button { height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink-3); display: inline-flex; align-items: center; gap: 7px; }
.toggle-group button.on { background: var(--ink); color: var(--bg); }
.toggle-group button .count { font: 500 11px var(--mono); opacity: .7; }

/* Puces de sélection (secteurs) */
.pick { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6); cursor: pointer; font-size: 14px; transition: all .18s var(--ease); user-select: none; }
.pick:hover { border-color: var(--ink-4); background: #fff; }
.pick input { display: none; }
.pick.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick.on::before { content: '✓'; font-size: 12px; }
.family { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.family:first-child { border-top: 0; padding-top: 4px; }
.family-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.family-head h3 { font-size: 16px; }

/* ---------- Listes de prospects ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.filters .search-box { flex: 1 1 260px; max-width: 380px; }
.status-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13.5px; font-weight: 500; }
.status-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.status-tabs button.on { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.status-tabs .count { font: 500 11px var(--mono); color: var(--ink-4); }
.plist { display: grid; gap: 10px; }
.prow {
  display: grid; grid-template-columns: 28px 50px minmax(0, 2.2fr) minmax(0, 2fr) 150px 120px 168px;
  align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid rgba(255, 255, 255, .75); cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background-color .2s;
}
.prow:hover { background: rgba(255, 255, 255, .88); box-shadow: var(--shadow); }
.prow.selected { background: #fff; outline: 2px solid var(--mauve); }
.prow .name { font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; }
.prow .meta { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.prow .headline { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prow .contacts { display: flex; gap: 6px; }
.ci { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--ink-4); }
.ci.on { background: var(--ink); color: var(--bg); }
.ci .icon { width: 14px; height: 14px; }
.list-head { display: grid; grid-template-columns: 28px 50px minmax(0, 2.2fr) minmax(0, 2fr) 150px 120px 168px; gap: 16px; padding: 0 18px 8px; }
.list-head .label { font-size: 10.5px; }
.bulkbar {
  position: fixed; left: 50%; bottom: 28px; translate: -50% 0; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  animation: rise .3s var(--ease);
}
.bulkbar .select { background-color: #333131; color: var(--bg); border-color: #444; min-height: 36px; }
@keyframes rise { from { opacity: 0; translate: -50% 16px; } }
.more { display: flex; justify-content: center; margin-top: 18px; }

/* Petites cartes (accueil, relances) */
.mini { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-radius: 12px; transition: background-color .15s; }
.mini:last-child { border-bottom: 0; }
.mini:hover { background: rgba(255, 255, 255, .6); }
.mini .t { font-weight: 600; font-size: 14.5px; }
.mini .s { color: var(--ink-3); font-size: 12.5px; }
.mini .score { width: 40px; height: 40px; font-size: 13px; }

/* Barre de répartition (pipeline) */
.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line-2); gap: 2px; }
.split i { display: block; background: var(--st); min-width: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { font-weight: 600; }

/* Fil d'activité */
.feed { display: grid; gap: 2px; }
.feed-item { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 10px 0; }
.feed-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--ink-3); }
.feed-ico .icon { width: 14px; height: 14px; }
.feed-ico.mauve { background: var(--rose); color: var(--mauve); }
.feed-ico.ok { background: var(--ok-bg); color: var(--ok); }
.feed-ico.dark { background: var(--ink); color: var(--bg); }
.feed-item .txt { font-size: 13.5px; line-height: 1.45; }
.feed-item .when { font-size: 12px; color: var(--ink-4); margin-top: 2px; }

/* Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x proximity; }
.col { display: flex; flex-direction: column; gap: 10px; min-height: 60vh; padding: 12px; border-radius: var(--radius); background: rgba(255, 255, 255, .32); border: 1px solid rgba(255, 255, 255, .6); scroll-snap-align: start; transition: background-color .2s, outline-color .2s; outline: 2px dashed transparent; }
.col.drop { background: rgba(234, 220, 225, .55); outline-color: var(--mauve-soft); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 6px; }
.col-head h3 { font-size: 14.5px; letter-spacing: -.01em; }
.col-head .count { margin-left: auto; font: 500 12px var(--mono); color: var(--ink-4); }
.kcard { padding: 14px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line-2); cursor: grab; display: grid; gap: 10px; transition: box-shadow .2s, transform .2s; }
.kcard:hover { box-shadow: var(--shadow); }
.kcard.dragging { opacity: .4; }
.kcard .name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.kcard .score { width: 34px; height: 34px; font-size: 12px; }
.kcard .score::before { inset: 3px; }
.col-empty { margin: 8px 6px; font-size: 13px; color: var(--ink-4); text-align: center; padding: 18px 8px; border: 1px dashed var(--line); border-radius: 14px; }

/* Fiche prospect */
.p-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin: 6px 0 24px; }
.p-hero h1 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -.045em; margin: 12px 0 14px; overflow-wrap: anywhere; }
.p-hero .links { display: flex; flex-wrap: wrap; gap: 8px; }
.p-controls { display: grid; gap: 10px; justify-items: end; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 14px; }
.back:hover { color: var(--ink); }
.synth { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.synth h2 { font-size: 24px; letter-spacing: -.035em; line-height: 1.2; }
.synth p { color: var(--ink-2); margin-top: 10px; }
.finding { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.finding:first-child { border-top: 0; padding-top: 4px; }
.finding h4 { font-size: 15.5px; letter-spacing: -.015em; }
.finding p { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.finding .fix { display: flex; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--mauve); }
.finding .chip { justify-self: start; }
.shots { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: start; }
.browser { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line-2); }
.browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser .bar span { margin-left: 8px; font: 400 11px var(--mono); color: var(--ink-3); background: #fff; padding: 2px 10px; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { display: block; width: 100%; max-height: 420px; object-fit: cover; object-position: top; cursor: zoom-in; }
.phone { padding: 6px; background: var(--ink); border-radius: 24px; }
.phone img { display: block; width: 100%; border-radius: 18px; aspect-ratio: 9 / 18.5; object-fit: cover; object-position: top; background: #fff; cursor: zoom-in; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 14px 6px; border-radius: 16px; background: rgba(255, 255, 255, .55); }
.metric .score { width: 58px; height: 58px; font-size: 17px; }
.metric .score::before { inset: 5px; }
.metric span { font-size: 12px; color: var(--ink-3); line-height: 1.25; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.fact { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.fact span:first-child { color: var(--ink-3); }
.fact span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.yes { color: var(--ok); } .no { color: var(--crit); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { height: 40px; padding: 0 4px; margin-right: 14px; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.contact-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; min-width: 0; }
.contact-line:last-child { border-bottom: 0; }
.contact-line .icon { color: var(--ink-4); }
.contact-line a:hover { color: var(--mauve); }
.source-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); }
.timeline { display: grid; gap: 0; }
.ai-box { padding: 16px 18px; border-radius: 16px; background: rgba(234, 220, 225, .55); display: grid; gap: 6px; }
.ai-box .label { color: var(--mauve); }
.ul-clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ul-clean li { position: relative; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.ul-clean li::before { content: '✳'; position: absolute; left: 0; color: var(--mauve); font-size: 12px; top: 1px; }
.ul-clean.ok li::before { content: '✓'; color: var(--ok); font-weight: 600; }

/* Radar (chargement / attente) */
.radar { position: relative; width: 120px; height: 120px; margin: 0 auto; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--mauve-soft); opacity: 0; animation: radar 3s cubic-bezier(.2, .6, .3, 1) infinite; }
.radar i:nth-child(2) { animation-delay: 1s; } .radar i:nth-child(3) { animation-delay: 2s; }
.radar b { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--mauve); }
@keyframes radar { 0% { transform: scale(.15); opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 48px 20px; }
.empty h3 { font-size: 22px; margin-top: 8px; }
.empty p { color: var(--ink-3); max-width: 46ch; }
.skeleton { border-radius: 18px; height: 78px; background: linear-gradient(90deg, rgba(255,255,255,.4), rgba(255,255,255,.8), rgba(255,255,255,.4)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Étapes de configuration */
.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.setup-step { display: grid; gap: 8px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: var(--bg); }
.setup-step b { font-size: 15px; }
.setup-step span { font-size: 13px; color: #B8B3AD; }
.setup-step.done { opacity: .55; }
.setup-step .num { font: 500 11px var(--mono); color: var(--mauve-soft); letter-spacing: .08em; }

/* Fenêtres modales */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(34, 33, 33, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface-solid); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 28px; animation: pop .28s var(--ease); }
.modal.wide { width: min(820px, 100%); }
.modal h2 { font-size: 24px; letter-spacing: -.035em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(20, 19, 19, .88); overflow: auto; padding: 40px 20px; cursor: zoom-out; animation: fade .2s; }
.lightbox img { display: block; margin: 0 auto; max-width: min(1100px, 100%); border-radius: 12px; }
.menu { position: absolute; z-index: 90; min-width: 220px; padding: 8px; border-radius: 18px; background: var(--surface-solid); box-shadow: var(--shadow-lg); border: 1px solid var(--line-2); animation: pop .2s var(--ease); }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 12px; cursor: pointer; font-size: 14px; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-2); }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; }
.menu .who b { display: block; }
.menu .who span { font-size: 12.5px; color: var(--ink-3); }

/* Notifications */
.toasts { position: fixed; z-index: 200; right: 24px; bottom: 24px; display: grid; gap: 10px; justify-items: end; }
.toast { display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 13px 18px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 14px; animation: pop .25s var(--ease); }
.toast.error { background: var(--crit); }
.toast .icon { flex: none; }

/* Connexion */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; overflow: hidden; }
.auth-art .rings { position: absolute; left: 30%; top: 46%; width: 0; height: 0; }
.auth-art .rings i { position: absolute; border-radius: 50%; border: 1px solid rgba(122, 100, 112, .18); translate: -50% -50%; }
.auth-art .big { font-size: clamp(90px, 13vw, 190px); line-height: .9; position: relative; }
.auth-art h2 { font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.04em; line-height: 1.05; position: relative; }
.auth-art h2 .soft { color: var(--mauve); }
.auth-art .tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; position: relative; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); padding: 36px; }
.auth-card h1 { font-size: 30px; letter-spacing: -.04em; margin: 12px 0 8px; }
.auth-card form { display: grid; gap: 16px; margin-top: 26px; }
.form-error { padding: 12px 14px; border-radius: 12px; background: var(--crit-bg); color: var(--crit); font-size: 14px; }

/* Réglages */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.side-tabs { position: sticky; top: 92px; display: grid; gap: 4px; }
.side-tabs button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 14px; border: 0; background: transparent; cursor: pointer; font-size: 14.5px; font-weight: 500; color: var(--ink-3); text-align: left; }
.side-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .5); }
.side-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.side-tabs .ok-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.side-tabs .todo-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--mauve); }
.conn { display: grid; gap: 18px; }
.conn-head { display: flex; gap: 16px; align-items: flex-start; }
.conn-ico { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 16px; background: var(--lavender); }
.conn-ico.sage { background: var(--sage); } .conn-ico.rose { background: var(--rose); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.steps a { color: var(--mauve); text-decoration: underline; text-underline-offset: 3px; }
.token-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); font: 400 13px var(--mono); overflow-wrap: anywhere; }
.code { padding: 14px 16px; border-radius: 14px; background: var(--bg-2); font: 400 12.5px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.cat-row { display: grid; grid-template-columns: 26px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line-2); }

/* Navigation mobile */
.tabbar { display: none; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout-detail { grid-template-columns: minmax(0, 1fr) 360px; }
  .prow, .list-head { grid-template-columns: 28px 50px minmax(0, 2fr) minmax(0, 1.6fr) 120px 150px; }
  .prow > :nth-child(6), .list-head > :nth-child(6) { display: none; }
  .nav a span { display: none; }
  .nav a { padding: 0 13px; }
}
@media (max-width: 900px) {
  .layout-detail { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .side-tabs { position: static; display: flex; overflow-x: auto; scrollbar-width: none; }
  .side-tabs button { flex: none; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 32px 24px 8px; min-height: auto; }
  .auth-art .big { font-size: 84px; }
  .auth-art h2, .auth-art .tags, .auth-art .foot-label { display: none; }
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { height: 64px; padding: 0 16px; }
  .brand .wm { font-size: 25px; }
  .brand .label { display: none; }
  .nav { display: none; }
  .main { padding: 4px 16px 130px; }
  .page-head { margin: 10px 0 20px; }
  .page-head .actions { width: 100%; }
  .card { padding: 18px; border-radius: 20px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px 16px; }
  .kpi b { font-size: 30px; }
  .list-head { display: none; }
  .prow { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .prow > .cb, .prow > .c-headline, .prow > .c-contacts, .prow > .c-status { display: none; }
  .prow .c-presence { grid-column: 2 / 4; display: flex; flex-wrap: wrap; gap: 6px; }
  .prow .m-status { display: flex !important; }
  .p-hero { grid-template-columns: 1fr; }
  .p-controls { justify-items: stretch; }
  .synth { grid-template-columns: 1fr; justify-items: start; }
  .finding { grid-template-columns: 1fr; gap: 8px; }
  .shots { grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 26px minmax(0, 1fr) 36px; }
  .cat-row .c-query, .cat-row .c-family { display: none; }
  .board { grid-auto-columns: 84%; }
  .toasts { left: 16px; right: 16px; bottom: 100px; justify-items: stretch; }
  .bulkbar { bottom: 96px; width: calc(100% - 24px); justify-content: space-between; padding-left: 16px; }
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .setup-step { padding: 12px; gap: 4px; }
  .setup-step span:not(.num) { display: none; }
  .mini { flex-wrap: wrap; }
  .mini .grow { flex: 1 1 55%; }
  .mini [data-actions] { width: 100%; justify-content: flex-end; }
  .modal { padding: 22px; border-radius: 24px; align-self: end; }
  .overlay { padding: 10px; place-items: end center; }
  .tabbar {
    position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px; border-radius: 26px;
    background: rgba(34, 33, 33, .94); box-shadow: var(--shadow-lg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 6px; border-radius: 20px; color: #A9A49E; font-size: 10.5px; font-weight: 500; }
  .tabbar a.active { color: var(--ink); background: var(--bg); }
  .tabbar .icon { width: 20px; height: 20px; }
  .tabbar .badge { position: absolute; top: 3px; right: calc(50% - 22px); }
}
.m-status { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
