/* ==========================================================================
   Radar — feuille de style
   Palette de données validée (contraste + daltonisme) : voir --series-*.
   Un seul fichier, aucune dépendance, aucun chargement externe.
   ========================================================================== */

:root {
  /* Surfaces */
  --plane:        #0d0d0d;
  --surface:      #1a1a19;
  --surface-2:    #211f1f;
  --line:         rgba(255,255,255,.09);
  --line-strong:  rgba(255,255,255,.16);

  /* Encre */
  --ink:          #ffffff;
  --ink-2:        #c3c2b7;
  --ink-3:        #898781;

  /* Séries de données (palette validée, mode sombre) */
  --series-1: #3987e5;  /* bleu    */
  --series-2: #d95926;  /* orange  */
  --series-3: #199e70;  /* aqua    */
  --series-4: #c98500;  /* jaune   */
  --series-5: #d55181;  /* magenta */
  --series-6: #008300;  /* vert    */
  --series-7: #9085e9;  /* violet  */
  --series-8: #e66767;  /* rouge   */

  /* Statuts (jamais réutilisés pour une série) */
  --good:     #0ca30c;
  --warning:  #fab219;
  --serious:  #ec835a;
  --critical: #d03b3b;

  --accent:   var(--series-1);
  --accent-2: var(--series-3);

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 18px 50px rgba(0,0,0,.55);
  --shadow-sm: 0 6px 20px rgba(0,0,0,.35);

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { letter-spacing: -.022em; margin: 0; font-weight: 640; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }

/* ════════════════════════════════════════════════ fond animé ══════════ */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .30;
  will-change: transform;
}
.blob-1 {
  width: 52vw; height: 52vw; left: -12vw; top: -18vw;
  background: radial-gradient(circle at 30% 30%, #3987e5, transparent 68%);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.blob-2 {
  width: 46vw; height: 46vw; right: -14vw; top: 4vh;
  background: radial-gradient(circle at 60% 40%, #199e70, transparent 66%);
  animation: drift-b 32s var(--ease) infinite alternate;
}
.blob-3 {
  width: 40vw; height: 40vw; left: 28vw; bottom: -20vw;
  background: radial-gradient(circle at 50% 50%, #9085e9, transparent 70%);
  animation: drift-c 38s var(--ease) infinite alternate;
  opacity: .20;
}
@keyframes drift-a { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@keyframes drift-b { to { transform: translate3d(-7vw, 10vh, 0) scale(1.1); } }
@keyframes drift-c { to { transform: translate3d(5vw, -8vh, 0) scale(1.2); } }

/* Grain : casse les dégradés et donne de la matière. */
.grain {
  position: absolute; inset: -100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: overlay;
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════════ verre ════════════ */

.glass {
  background: linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(1px)) {
  .glass { background: var(--surface); }
}

/* ═════════════════════════════════════════════════ en-tête ════════════ */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 11px 22px;
  margin: 0; border-radius: 0;
  border-left: 0; border-right: 0; border-top: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.05), 0 10px 40px rgba(0,0,0,.45);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 680; font-size: 16.5px; }
.brand em {
  font-style: normal; font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}

.tabs { display: flex; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 0; color: var(--ink-2);
  font: inherit; font-size: 14px; font-weight: 520;
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.tab:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.tab.is-active { color: var(--ink); background: rgba(255,255,255,.08); }
.tab-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-3); transition: all .25s var(--ease);
}
.tab.is-active .tab-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(57,135,229,.22);
}
.tab-count {
  font-size: 11.5px; font-weight: 640; color: var(--ink-3);
  background: rgba(255,255,255,.07); border-radius: 999px; padding: 1px 7px;
}
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ════════════════════════════════════════════════ structure ═══════════ */

.shell {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto; padding: 34px 22px 90px;
}
.view { display: none; animation: rise .45s var(--ease) both; }
.view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.hero { margin-bottom: 30px; max-width: 660px; }
.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; margin-bottom: 12px;
  background: linear-gradient(120deg, #fff 20%, #9fc4f4 65%, #7fd8b6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero.small h1 { font-size: clamp(24px, 3vw, 32px); }
.hero p { color: var(--ink-2); font-size: 15.5px; margin: 0; }

.section-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-3); font-weight: 640; margin: 34px 0 14px;
}

/* ══════════════════════════════════════════════════ la chaîne ═════════ */

.chain {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; list-style: none; padding: 0; margin: 0 0 8px;
  counter-reset: step;
}
.chain-step {
  position: relative;
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.022);
  transition: all .3s var(--ease);
}
.chain-step::after {
  content: ""; position: absolute; right: -10px; top: 50%;
  width: 10px; height: 1px; background: var(--line-strong);
}
.chain-step:last-child::after { display: none; }
.chain-step.is-current {
  border-color: rgba(57,135,229,.5);
  background: rgba(57,135,229,.10);
  box-shadow: 0 0 0 1px rgba(57,135,229,.16), 0 8px 30px rgba(57,135,229,.12);
}
.chain-step.is-done { border-color: rgba(25,158,112,.45); background: rgba(25,158,112,.08); }
.chain-num {
  font-size: 11px; font-weight: 700; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.chain-step.is-current .chain-num { color: var(--accent); }
.chain-step.is-done .chain-num { color: var(--accent-2); }
.chain-label { font-weight: 620; font-size: 14.5px; }
.chain-hint { font-size: 12px; color: var(--ink-3); }

/* ═════════════════════════════════════════════════ segments ═══════════ */

.segments {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.segment {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 7px;
  padding: 18px; text-align: left; cursor: pointer;
  color: var(--ink); font: inherit;
  transform-style: preserve-3d;
  transition: transform .35s var(--ease), border-color .3s var(--ease);
}
.segment:hover { border-color: var(--line-strong); }
.segment.is-active {
  border-color: rgba(57,135,229,.55);
  box-shadow: 0 0 0 1px rgba(57,135,229,.25), 0 16px 44px rgba(57,135,229,.16);
}
.segment-glow {
  position: absolute; inset: -40% -40% auto -40%; height: 160%;
  background: radial-gradient(circle at var(--mx,50%) var(--my,0%),
              rgba(57,135,229,.28), transparent 58%);
  opacity: 0; transition: opacity .35s var(--ease); pointer-events: none;
}
.segment:hover .segment-glow, .segment.is-active .segment-glow { opacity: 1; }
.segment-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, rgba(57,135,229,.30), rgba(25,158,112,.22));
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: #cfe4ff;
  transform: translateZ(24px);
  transition: color .3s var(--ease), background .3s var(--ease);
}
.segment:hover .segment-icon, .segment.is-active .segment-icon { color: #fff; }
.segment-label { font-weight: 640; font-size: 15.5px; transform: translateZ(16px); }
.segment-resume { font-size: 12.8px; color: var(--ink-2); line-height: 1.5; }
.segment-kw {
  font-size: 11.5px; color: var(--ink-3); margin-top: 3px;
  border-top: 1px solid var(--line); padding-top: 8px;
}

/* ══════════════════════════════════════════════════ panneaux ══════════ */

.panel { padding: 22px; margin: 22px 0; }
.panel h2 { font-size: 16px; margin-bottom: 6px; }
.panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-sub { font-size: 13px; color: var(--ink-3); }
.panel-actions { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }

.field-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }
.field.grow { flex: 1 1 280px; }
label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3); font-weight: 600;
}
label em { font-style: normal; text-transform: none; letter-spacing: 0; }
input, select, textarea {
  width: 100%; padding: 11px 13px;
  background: rgba(0,0,0,.28); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
input::placeholder { color: #6f6d68; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(57,135,229,.6);
  box-shadow: 0 0 0 3px rgba(57,135,229,.16);
}
select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23898781' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* sources */
.sources { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.source-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 14px; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-size: 13.5px;
  color: var(--ink-2); background: rgba(255,255,255,.02);
  transition: all .22s var(--ease);
}
.source-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
.source-toggle.is-on {
  border-color: rgba(25,158,112,.5); background: rgba(25,158,112,.12); color: var(--ink);
}
.source-toggle.is-off { opacity: .45; }
.source-toggle input { display: none; }
.source-toggle .box {
  width: 15px; height: 15px; border-radius: 4px;
  border: 1.5px solid var(--ink-3); display: grid; place-items: center;
  transition: all .2s var(--ease);
}
.source-toggle.is-on .box { background: var(--accent-2); border-color: var(--accent-2); }
.source-toggle.is-on .box::after {
  content: ""; width: 8px; height: 5px; border-left: 2px solid #06120d;
  border-bottom: 2px solid #06120d; transform: rotate(-45deg) translate(1px,-1px);
}
.source-cost { font-size: 11px; color: var(--ink-3); }

/* ═══════════════════════════════════════════════════ boutons ══════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .22s var(--ease), border-color .22s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-primary {
  background: linear-gradient(135deg, #3987e5, #2a6fc4);
  color: #fff; box-shadow: 0 8px 26px rgba(57,135,229,.32);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 12px 34px rgba(57,135,229,.45); transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255,255,255,.05); color: var(--ink-2); border-color: var(--line);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--line-strong);
  background: rgba(255,255,255,.09); }
.btn-danger { background: rgba(208,59,59,.16); color: #ff9d9d;
  border-color: rgba(208,59,59,.4); }
.btn-danger:hover { background: rgba(208,59,59,.26); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-2); font: inherit; font-size: 13px;
  transition: all .2s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.is-active { background: rgba(255,255,255,.10); color: var(--ink);
  border-color: var(--line-strong); }

.hint { font-size: 12.5px; color: var(--ink-3); }
.muted { color: var(--ink-2); font-size: 13.8px; }

/* ══════════════════════════════════════════════════════ KPI ═══════════ */

.kpis {
  display: grid; gap: 12px; margin: 22px 0 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.kpi {
  padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.028);
}
.kpi-value { font-size: 30px; font-weight: 660; line-height: 1.1; }
.kpi-label {
  font-size: 11.5px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .09em; margin-top: 5px; font-weight: 600;
}
.kpi-note { font-size: 12px; color: var(--ink-2); margin-top: 6px; }

.stat-tiles { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
.stat-tile { padding: 13px 15px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.025); }
.stat-tile b { display: block; font-size: 22px; font-weight: 640; }
.stat-tile span { font-size: 11.5px; color: var(--ink-3); }

/* ═══════════════════════════════════════════ cartes de projet ═════════ */

.results-head { display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 30px 0 14px; flex-wrap: wrap; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.filters-produits { margin: 0 0 16px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.022); }
.filters-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3); font-weight: 600; margin-right: 4px; }

/* badge « porte d'entrée produit » */
.badge-produit { color: #9de3c4; border-color: rgba(25,158,112,.45);
  background: rgba(25,158,112,.13); }
.badge-produit.is-moyen { color: #bcd8fb; border-color: rgba(57,135,229,.4);
  background: rgba(57,135,229,.11); }
.badge-produit.is-a_creuser { color: var(--ink-3); }

.product-block { border: 1px solid rgba(25,158,112,.35);
  background: rgba(25,158,112,.07); border-radius: var(--radius-sm);
  padding: 14px 15px; margin-top: 11px; }
.product-block h5 { margin: 0 0 4px; font-size: 14.5px; font-weight: 640; }
.product-block .fam { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 9px; }
.product-block p { margin: 0 0 8px; font-size: 13.3px; color: var(--ink-2); line-height: 1.55; }

.catalogue { display: grid; gap: 10px; margin-top: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.cat-item { border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; background: rgba(255,255,255,.022); }
.cat-item b { font-size: 13.5px; display: block; }
.cat-item .fam { font-size: 11px; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .07em; margin: 3px 0 7px; }
.cat-item p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

.cards { display: grid; gap: 12px; }
.card {
  position: relative; padding: 18px 20px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255,255,255,.05), rgba(255,255,255,.016));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
  animation: rise .4s var(--ease) both;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 46px rgba(0,0,0,.45);
}
.card::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--ink-3);
}
.card[data-prio="P1"]::before { background: var(--critical); }
.card[data-prio="P2"]::before { background: var(--warning); }
.card[data-prio="P3"]::before { background: var(--series-1); opacity: .5; }

.card-top { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; flex-wrap: wrap; }
.card h3 { font-size: 16px; line-height: 1.35; margin: 2px 0 8px; font-weight: 620; }
.card-org { font-size: 13.5px; color: var(--ink-2); font-weight: 560; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.card-reasons { margin: 11px 0 0; padding-left: 17px; color: var(--ink-2); font-size: 12.8px; }
.card-reasons li { margin-bottom: 3px; }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: var(--ink-2);
  white-space: nowrap;
}
.badge-p1 { color: #ff9c9c; border-color: rgba(208,59,59,.45); background: rgba(208,59,59,.14); }
.badge-p2 { color: #ffd68a; border-color: rgba(250,178,25,.42); background: rgba(250,178,25,.12); }
.badge-p3 { color: #9fc4f4; border-color: rgba(57,135,229,.35); background: rgba(57,135,229,.10); }
.badge-ok { color: #7ce07c; border-color: rgba(12,163,12,.45); background: rgba(12,163,12,.13); }
.badge-source { font-variant: small-caps; letter-spacing: .04em; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-p1 { background: var(--critical); }
.dot-p2 { background: var(--warning); }
.dot-p3 { background: var(--series-1); }

/* jauge de score */
.gauge { width: 46px; height: 46px; flex: 0 0 auto; position: relative; }
.gauge svg { transform: rotate(-90deg); }
.gauge-track { stroke: rgba(255,255,255,.09); }
.gauge-value {
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease);
}
.gauge b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 660; font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════ kanban ═══════════ */

.kanban {
  display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(7, minmax(190px, 1fr));
  overflow-x: auto; padding-bottom: 14px;
}
.column { padding: 14px; min-height: 180px; }
.column-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.column-head h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-2); font-weight: 640; }
.column-count { font-size: 11.5px; color: var(--ink-3); background: rgba(255,255,255,.07);
  border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.column-body { display: grid; gap: 9px; min-height: 90px; border-radius: var(--radius-sm);
  transition: background .2s var(--ease), box-shadow .2s var(--ease); padding: 3px; }
.column-body.is-over { background: rgba(57,135,229,.10);
  box-shadow: inset 0 0 0 1px rgba(57,135,229,.35); }
.mini {
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04); cursor: grab; font-size: 13px; line-height: 1.4;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.mini:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.mini.is-dragging { opacity: .4; cursor: grabbing; }
.mini-org { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }

/* ═══════════════════════════════════════════════════ tableau ══════════ */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-3); font-weight: 640; padding: 9px 11px;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.table td { padding: 11px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255,255,255,.025); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

.deflist { margin: 0; display: grid; gap: 10px; }
.deflist div { display: flex; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.deflist dt { color: var(--ink-3); font-size: 13px; }
.deflist dd { margin: 0; font-size: 13.5px; font-weight: 560; text-align: right; }

/* répartition (barres horizontales) */
.breakdown { display: grid; gap: 9px; margin-top: 12px; }
.bd-row { display: grid; grid-template-columns: 190px 1fr 44px; gap: 12px; align-items: center; }
.bd-label { font-size: 13px; color: var(--ink-2); }
.bd-bar { height: 9px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; }
.bd-bar i { display: block; height: 100%; border-radius: 999px;
  transition: width .9s var(--ease); }
.bd-value { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums;
  color: var(--ink-2); }

/* ═════════════════════════════════════════════════ panneau latéral ════ */

.drawer { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.drawer[aria-hidden="false"] { pointer-events: auto; }
.drawer-scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.62);
  opacity: 0; transition: opacity .35s var(--ease);
  backdrop-filter: blur(3px);
}
.drawer[aria-hidden="false"] .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(560px, 100%); overflow-y: auto;
  border-radius: 0; border-top: 0; border-bottom: 0; border-right: 0;
  padding: 26px 28px 60px;
  transform: translateX(100%); transition: transform .42s var(--ease);
}
.drawer[aria-hidden="false"] .drawer-panel { transform: none; }
.drawer-close {
  position: absolute; right: 18px; top: 18px;
  width: 34px; height: 34px; display: grid; place-items: center;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 9px; color: var(--ink-2); cursor: pointer;
  transition: all .2s var(--ease);
}
.drawer-close:hover { color: var(--ink); background: rgba(255,255,255,.12); }

.step-block {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; margin-top: 14px; background: rgba(255,255,255,.022);
}
.step-block h4 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-3); margin: 0 0 11px; font-weight: 640;
  display: flex; align-items: center; gap: 8px;
}
.step-block h4 i {
  width: 19px; height: 19px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(57,135,229,.2); color: #9fc4f4; font-style: normal;
  font-size: 10.5px; font-weight: 700;
}

.person {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: 0; }
.person-av {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 640;
  background: linear-gradient(140deg, rgba(57,135,229,.35), rgba(25,158,112,.28));
  border: 1px solid var(--line);
}
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 600; font-size: 14px; }
.person-role { font-size: 12.3px; color: var(--ink-2); }
.person-src { font-size: 11.3px; color: var(--ink-3); margin-top: 2px; }

.email-result {
  margin-top: 11px; padding: 14px; border-radius: var(--radius-sm);
  border: 1px solid rgba(25,158,112,.35); background: rgba(25,158,112,.08);
}
.email-address { font-size: 17px; font-weight: 640; word-break: break-all; }

/* ══════════════════════════════════════════════ divers & états ════════ */

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px;
  border: 1px solid var(--line); margin: 12px 0; line-height: 1.5; }
.alert-bad { border-color: rgba(208,59,59,.42); background: rgba(208,59,59,.12); color: #ffb3b3; }
.alert-warn { border-color: rgba(250,178,25,.4); background: rgba(250,178,25,.10); color: #ffdf9e; }
.alert-info { border-color: rgba(57,135,229,.4); background: rgba(57,135,229,.10); color: #bcd8fb; }

.empty { padding: 44px 24px; text-align: center; color: var(--ink-3); font-size: 14px; }

.skeleton {
  height: 92px; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(255,255,255,.03) 30%,
              rgba(255,255,255,.09) 50%, rgba(255,255,255,.03) 70%);
  background-size: 240% 100%; animation: shimmer 1.5s infinite linear;
  margin-bottom: 12px;
}
@keyframes shimmer { to { background-position: -240% 0; } }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.28); border-top-color: #fff;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mentions {
  margin: 12px 0; padding: 14px 16px; border-left: 3px solid var(--accent);
  background: rgba(255,255,255,.03); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13.4px; color: var(--ink-2); line-height: 1.6;
}

/* toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200;
  display: grid; gap: 9px; }
.toast {
  padding: 12px 17px; border-radius: var(--radius-sm); font-size: 13.7px;
  background: rgba(26,26,25,.96); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); animation: toast-in .35s var(--ease) both;
  max-width: 350px;
}
.toast.is-bad { border-color: rgba(208,59,59,.5); }
.toast.is-good { border-color: rgba(12,163,12,.5); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* ══════════════════════════════════════════════════ connexion ═════════ */

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-shell { position: relative; z-index: 1; width: min(400px, 100%); }
.login-card { padding: 38px 34px; text-align: center; transform-style: preserve-3d; }
.login-mark { display: grid; place-items: center; margin-bottom: 16px; }
.login-card h1 { font-size: 27px; margin-bottom: 5px; }
.login-sub { color: var(--ink-3); font-size: 13.3px; margin: 0 0 26px; }
.login-form { display: grid; gap: 6px; text-align: left; }
.login-form label { margin-top: 12px; }
.login-form .btn { margin-top: 22px; }
.login-foot { text-align: center; color: var(--ink-3); font-size: 11.8px;
  margin-top: 20px; line-height: 1.6; }

/* Pot de miel : invisible pour un humain, rempli par les robots.
   On le sort du flux SANS display:none — certains robots ignorent les
   champs masqués de cette façon, mais remplissent ceux-ci. */
.hp { position: absolute; left: -9999px; top: -9999px;
  width: 1px; height: 1px; overflow: hidden; opacity: 0; }

/* ══════════════════════════════════════════════ diagnostic sécurité ════ */

.audit { display: grid; gap: 9px; margin-top: 14px; }
.audit-item { display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: rgba(255,255,255,.022); }
.audit-item.is-critique { border-color: rgba(208,59,59,.45);
  background: rgba(208,59,59,.09); }
.audit-item.is-attention { border-color: rgba(250,178,25,.4);
  background: rgba(250,178,25,.07); }
.audit-icon { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  margin-top: 1px; }
.is-ok .audit-icon { background: rgba(12,163,12,.2); color: #7ce07c; }
.is-attention .audit-icon { background: rgba(250,178,25,.22); color: #ffd68a; }
.is-critique .audit-icon { background: rgba(208,59,59,.25); color: #ff9c9c; }
.audit-body b { display: block; font-size: 13.8px; font-weight: 600; }
.audit-body span { font-size: 12.8px; color: var(--ink-2); line-height: 1.5; }

/* ═════════════════════════════════════════════════════ adaptatif ══════ */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .chain { grid-template-columns: repeat(2, 1fr); }
  .chain-step::after { display: none; }
  .kanban { grid-template-columns: repeat(7, 210px); }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .tabs { order: 3; width: 100%; }
  .topbar-right { order: 2; }
  .shell { padding: 24px 14px 70px; }
  .segments { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: 1fr; }
  .bd-row { grid-template-columns: 120px 1fr 40px; }
  .drawer-panel { padding: 22px 18px 50px; }
}
