/* Agent IA IBIG — tableau de bord. Thème clair et sombre, sans dépendance. */
:root {
  --bg: #f3f5f9;
  --bg-soft: #eef1f6;
  --card: #ffffff;
  --ink: #0f1a2c;
  --ink-2: #3b4658;
  --muted: #6b7689;
  --line: #e3e7ef;
  --line-2: #d3d9e4;
  --brand: #1257c4;
  --brand-2: #0ea5c6;
  --brand-ink: #ffffff;
  --brand-soft: #e8f0fd;
  --ok: #0f8a4b;
  --ok-soft: #e4f6ec;
  --warn: #b85c00;
  --warn-soft: #fff1de;
  --bad: #c62a2a;
  --bad-soft: #fde8e8;
  --violet: #6d4ae0;
  --violet-soft: #efeafe;
  --side: #0b1830;
  --side-2: #10213f;
  --side-ink: #c5d0e4;
  --side-muted: #7f8db0;
  --shadow: 0 1px 2px rgba(15, 26, 44, .05), 0 4px 16px rgba(15, 26, 44, .06);
  --shadow-lg: 0 10px 40px rgba(15, 26, 44, .12);
  --radius: 14px;
  --radius-sm: 9px;
  --grad: linear-gradient(135deg, #1257c4 0%, #0ea5c6 100%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1220;
    --bg-soft: #0f1a2d;
    --card: #111c30;
    --ink: #e8eef9;
    --ink-2: #c3cde0;
    --muted: #8a97b0;
    --line: #1e2b44;
    --line-2: #2a3a58;
    --brand: #4c8dff;
    --brand-2: #22c3e6;
    --brand-soft: #16284a;
    --ok: #34c77b;
    --ok-soft: #0f2e20;
    --warn: #f0a44b;
    --warn-soft: #33240f;
    --bad: #ff6b6b;
    --bad-soft: #3a1618;
    --violet: #a58bff;
    --violet-soft: #231b45;
    --side: #070e1b;
    --side-2: #0d1830;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -.015em; line-height: 1.25; margin: 0; }
h1 { font-size: 26px; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
code { font: 13px ui-monospace, "SF Mono", Menlo, monospace; background: var(--bg-soft);
       padding: 1px 6px; border-radius: 6px; }
pre { white-space: pre-wrap; margin: 0; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, monospace;
      color: var(--ink-2); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none;
        stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ structure */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh;
       background: linear-gradient(90deg, var(--side) 264px, transparent 264px); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: radial-gradient(120% 60% at 0% 0%, #17336a 0%, transparent 60%), var(--side);
  color: var(--side-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; color: #fff; }
.brand:hover { text-decoration: none; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(14, 165, 198, .35);
}
.logo svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.brand b { display: block; font-size: 16px; letter-spacing: -.01em; }
.brand small { display: block; color: var(--side-muted); font-size: 12px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .09em;
             color: var(--side-muted); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 520; font-size: 14.5px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a.on { background: linear-gradient(90deg, rgba(76, 141, 255, .22), rgba(76, 141, 255, .06));
            color: #fff; box-shadow: inset 3px 0 0 #4c8dff; }
.nav a.stop { color: #ffb4b4; }
.nav a.stop:hover { background: rgba(255, 80, 80, .12); }
.nav .count { margin-left: auto; background: #ff5d5d; color: #fff; font-size: 11.5px;
              font-weight: 700; min-width: 22px; height: 20px; border-radius: 10px;
              display: grid; place-items: center; padding: 0 6px; }
.nav .count.soft { background: rgba(255, 255, 255, .14); color: #fff; }
.side-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255, 255, 255, .08);
             display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff;
          display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who { min-width: 0; flex: 1; }
.who b { display: block; color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden;
         text-overflow: ellipsis; }
.who small { color: var(--side-muted); font-size: 12px; }
.icon-btn { background: transparent; border: 0; color: var(--side-muted); padding: 8px;
            border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { min-width: 0; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
       flex-wrap: wrap; padding: 30px 36px 8px; }
.top .eyebrow { color: var(--muted); font-size: 13px; font-weight: 550; margin-bottom: 4px;
                text-transform: capitalize; }
.top p.lead { color: var(--muted); margin: 6px 0 0; max-width: 720px; }
.content { padding: 18px 36px 48px; max-width: 1320px; }

/* Menu mobile */
.burger, .menu-toggle, .scrim { display: none; }
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 280px; transform: translateX(-100%);
          transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  .menu-toggle:checked ~ .app .side { transform: none; }
  .menu-toggle:checked ~ .app .scrim { display: block; }
  .scrim { position: fixed; inset: 0; background: rgba(5, 10, 20, .45); z-index: 20; }
  .burger { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
            background: var(--card); border: 1px solid var(--line); cursor: pointer; color: var(--ink); }
  .mobile-bar { display: flex !important; }
  .top { padding: 18px 16px 4px; }
  .content { padding: 14px 16px 40px; }
  h1 { font-size: 22px; }
}
.mobile-bar { display: none; align-items: center; gap: 12px; padding: 12px 16px;
              background: var(--card); border-bottom: 1px solid var(--line); position: sticky;
              top: 0; z-index: 10; }
.mobile-bar b { font-size: 15px; }

/* ------------------------------------------------------------------ composants */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); padding: 20px 22px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
             margin-bottom: 14px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 13px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.section-title h2 { font-size: 17px; }
.section-title .pill { margin-left: 2px; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
                             .g-main { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .g-4, .g-3, .g-2 { grid-template-columns: 1fr; } }

/* Cartes chiffres */
.kpi { position: relative; overflow: hidden; display: block; color: inherit; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
            margin-bottom: 16px; }
.kpi .ico svg { width: 21px; height: 21px; }
.kpi .val { font-size: 32px; font-weight: 780; letter-spacing: -.03em; line-height: 1; }
.kpi .lbl { color: var(--muted); font-size: 13.5px; margin-top: 8px; font-weight: 520; }
.kpi .foot { margin-top: 14px; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px;
             align-items: center; }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px;
              border-radius: 50%; background: currentColor; opacity: .035; }
.t-blue .ico { background: var(--brand-soft); color: var(--brand); }
.t-amber .ico { background: var(--warn-soft); color: var(--warn); }
.t-green .ico { background: var(--ok-soft); color: var(--ok); }
.t-red .ico { background: var(--bad-soft); color: var(--bad); }
.t-violet .ico { background: var(--violet-soft); color: var(--violet); }
.kpi.hero { background: var(--grad); color: #fff; border: 0; }
.kpi.hero .lbl, .kpi.hero .foot { color: rgba(255, 255, 255, .85); }
.kpi.hero .ico { background: rgba(255, 255, 255, .18); color: #fff; }
.kpi.hero::after { opacity: .12; background: #fff; }

/* Pastilles */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
        font-size: 12px; font-weight: 600; background: var(--bg-soft); color: var(--ink-2);
        white-space: nowrap; line-height: 1.6; }
.pill.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.blue { background: var(--brand-soft); color: var(--brand); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.pill.red { background: var(--bad-soft); color: var(--bad); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12.5px; }
.strong { font-weight: 650; }

/* Messages */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
         margin-bottom: 18px; background: var(--brand-soft); color: var(--brand); font-weight: 560;
         border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
         animation: drop .35s ease; }
.flash.bad { background: var(--bad-soft); color: var(--bad);
             border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.flash.ok { background: var(--ok-soft); color: var(--ok);
            border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px;
         background: var(--bad-soft); color: var(--bad); font-size: 13.5px; font-weight: 520; }
.alert.amber { background: var(--warn-soft); color: var(--warn); }
.alert + .alert { margin-top: 8px; }
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius);
          background: var(--bad-soft); color: var(--bad); margin-bottom: 18px; font-weight: 560;
          border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* Formulaires */
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 14px; }
label.field span { display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { min-height: 170px; line-height: 1.6; resize: vertical; }
label.field input, label.field textarea, label.field select { font-weight: 400; }
select { width: auto; padding-right: 30px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline input[type=text] { flex: 1; min-width: 180px; width: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit;
       font-weight: 620; font-size: 14px; padding: 9px 16px; border-radius: var(--radius-sm);
       border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer;
       transition: transform .08s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent;
               box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.bad { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); background: transparent; }
.btn.lg { padding: 12px 20px; font-size: 15px; width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: -4px -22px -20px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
     color: var(--muted); font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--line);
     background: var(--bg-soft); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Empty states */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .bubble { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px;
                 display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.empty .bubble svg { width: 30px; height: 30px; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Graphique d'activité */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%;
       justify-content: flex-end; min-width: 0; }
.bar .col { width: 100%; max-width: 34px; border-radius: 8px 8px 4px 4px; background: var(--grad);
            min-height: 4px; position: relative; transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; }
.bar .col.zero { background: var(--line); }
.bar .col[data-n]:hover::after { content: attr(data-n); position: absolute; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12px;
  font-weight: 700; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.bar small { font-size: 11px; color: var(--muted); white-space: nowrap; }
@keyframes grow { from { transform: scaleY(0); } }
@media (max-width: 620px) { .bar small { display: none; } .bars { gap: 4px; } }

/* Barres horizontales (répartition) */
.hbar { margin-bottom: 14px; }
.hbar .top-line { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.hbar .track { height: 9px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: var(--grad); animation: slide .8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes slide { from { transform: scaleX(0); } }

/* Jauge circulaire */
.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
        background: conic-gradient(var(--ring, var(--brand)) calc(var(--p) * 1%), var(--bg-soft) 0);
        margin: 4px auto 12px; }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--card);
              display: grid; place-items: center; text-align: center; }
.ring b { font-size: 22px; font-weight: 780; display: block; letter-spacing: -.02em; }
.ring small { color: var(--muted); font-size: 12px; }

/* Fil d'activité */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed .dot svg { width: 16px; height: 16px; }
.feed .txt { min-width: 0; flex: 1; }
.feed .txt b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden;
               text-overflow: ellipsis; white-space: nowrap; }
.feed .txt small { color: var(--muted); font-size: 12px; }
.lv1 { background: var(--ok-soft); color: var(--ok); }
.lv2 { background: var(--warn-soft); color: var(--warn); }
.lv3 { background: var(--bad-soft); color: var(--bad); }

/* Canaux */
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chan { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
        border: 1px solid var(--line); background: var(--bg-soft); font-size: 13.5px; font-weight: 580; }
.chan .led { width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
             box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); flex: none; }
.chan.off { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.chan.off .led { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent);
                 animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Cartes de validation */
.item { border-left: 4px solid var(--line-2); }
.item.l2 { border-left-color: var(--warn); }
.item.l3 { border-left-color: var(--bad); }
.item .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.item .meta .muted { margin-left: 4px; }
.item h3 { font-size: 17px; margin-bottom: 8px; }
.summary { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px;
           color: var(--ink-2); margin: 10px 0; }
.summary b { color: var(--ink); }
details { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: var(--card); }
details > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13.5px;
                    color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; font-size: 18px; line-height: 1; transition: transform .15s;
                            color: var(--muted); }
details[open] > summary::before { transform: rotate(90deg); }
details > .inner { padding: 4px 14px 14px; }
.article { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px;
           font-size: 15px; line-height: 1.7; }
.article h2, .article h3 { margin: 14px 0 8px; }
.source { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 8px 12px;
          border-radius: 8px; background: var(--ok-soft); margin-top: 8px; }
.source svg { color: var(--ok); margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.actions .grow { flex: 1; min-width: 200px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* Score prospect */
.score { display: inline-flex; align-items: center; gap: 8px; }
.score .track { width: 64px; height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.score .fill { display: block; height: 100%; border-radius: 99px; }
.hot { background: linear-gradient(90deg, #ff8a3d, #ff3d5a); }
.warm { background: linear-gradient(90deg, #ffc53d, #ff8a3d); }
.cold { background: linear-gradient(90deg, #7fb4ff, #4c8dff); }

/* Connexion */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .visual { position: relative; overflow: hidden; color: #fff; padding: 48px;
  background: radial-gradient(80% 60% at 20% 10%, #1f5fd6 0%, transparent 60%),
              radial-gradient(70% 60% at 90% 90%, #0ea5c6 0%, transparent 55%), #0a1630;
  display: flex; flex-direction: column; justify-content: space-between; }
.login .visual::before { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent); }
.login .visual > * { position: relative; }
.login .visual h1 { font-size: 40px; line-height: 1.12; max-width: 480px; letter-spacing: -.03em; }
.login .visual p { color: rgba(255, 255, 255, .78); max-width: 440px; font-size: 16px; }
.login .features { display: grid; gap: 14px; margin-top: 28px; }
.login .feat { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .9); font-weight: 520; }
.login .feat span { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12);
                    display: grid; place-items: center; }
.login .form-side { display: grid; place-items: center; padding: 40px 24px; background: var(--card); }
.login form { width: 100%; max-width: 380px; }
.login form h2 { font-size: 26px; margin-bottom: 6px; }
.login .hint { color: var(--muted); margin: 0 0 28px; }
.login .secure { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted);
                 font-size: 12.5px; margin-top: 22px; }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login .visual { padding: 32px 24px; }
  .login .visual h1 { font-size: 28px; } .login .features { display: none; } }

/* Interrupteurs (bouton d'arrêt) */
.switch-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.switch-row:last-child { border-bottom: 0; }
.switch-row .name { display: flex; align-items: center; gap: 12px; min-width: 200px; flex: 1; }
.switch-row .name .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
                         background: var(--bg-soft); color: var(--ink-2); }
.switch-row.off .name .ico { background: var(--bad-soft); color: var(--bad); }
.switch-row form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.switch-row form input[type=text] { width: 220px; }
.big-stop { display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
            background: linear-gradient(135deg, var(--bad-soft), var(--card)); }
.big-stop .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--bad); color: #fff;
                 display: grid; place-items: center; box-shadow: 0 8px 24px color-mix(in srgb, var(--bad) 40%, transparent); }
.big-stop .ico svg { width: 28px; height: 28px; }
.big-stop.running { background: linear-gradient(135deg, var(--ok-soft), var(--card)); }
.big-stop.running .ico { background: var(--ok); box-shadow: 0 8px 24px color-mix(in srgb, var(--ok) 40%, transparent); }

.report-text { max-height: 420px; overflow: auto; background: var(--bg-soft); border-radius: 10px; padding: 16px 18px; }
.fade-in { animation: fade .45s ease both; }
.fade-in:nth-child(2) { animation-delay: .05s; } .fade-in:nth-child(3) { animation-delay: .1s; }
.fade-in:nth-child(4) { animation-delay: .15s; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Mise en route */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: stretch; }
.flow-step { background: var(--bg-soft); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.flow-step b { font-size: 15px; }
.flow-step span:last-child { color: var(--muted); font-size: 13.5px; }
.flow-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; }
.flow-ico.t-blue { background: var(--brand-soft); color: var(--brand); }
.flow-ico.t-violet { background: var(--violet-soft); color: var(--violet); }
.flow-ico.t-green { background: var(--ok-soft); color: var(--ok); }
.flow-arrow { display: grid; place-items: center; color: var(--muted); }
.levels { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.levels .pill { min-width: 150px; justify-content: center; margin-right: 8px; }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } .flow-arrow { transform: rotate(90deg); } }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); position: relative; }
.steps li:last-child { border-bottom: 0; }
.steps .num { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
              font-weight: 750; background: var(--bg-soft); color: var(--muted); border: 2px solid var(--line-2); }
.steps li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.next { background: linear-gradient(90deg, var(--warn-soft), transparent); margin: 0 -22px; padding: 18px 22px;
                 border-radius: 12px; border-bottom-color: transparent; }
.steps li.next .num { background: var(--grad); border: 0; color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.steps li.done h3 { color: var(--muted); }
.steps li.later { opacity: .75; }
.steps .body { flex: 1; min-width: 0; }
.steps .why { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.steps .how { display: flex; gap: 8px; margin-top: 8px; font-size: 14px; background: var(--card); border: 1px solid var(--line);
              border-radius: 10px; padding: 10px 12px; color: var(--ink-2); }
.steps .how svg { color: var(--brand); margin-top: 2px; }
.guide a { display: flex; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink);
           transition: border-color .15s, box-shadow .15s; }
.guide a:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow); }
.guide a svg { color: var(--brand); margin-top: 2px; }
.guide b { display: block; margin-bottom: 2px; }
.guide span { font-size: 13.5px; color: var(--muted); }
.guide em { color: var(--brand); font-style: normal; font-weight: 600; }
.nav .count.amber { background: #f5a524; }

/* Bandeau de mise en route (accueil) */
.setup-banner { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; border: 0; color: #fff;
  background: radial-gradient(90% 120% at 100% 0%, #0ea5c6 0%, transparent 55%), linear-gradient(135deg, #0b2a66, #1257c4); }
.setup-banner h2 { color: #fff; font-size: 20px; }
.setup-banner p { color: rgba(255, 255, 255, .85); margin: 6px 0 0; max-width: 640px; }
.setup-banner .track { background: rgba(255, 255, 255, .2); height: 8px; border-radius: 99px; overflow: hidden; margin-top: 14px; max-width: 420px; }
.setup-banner .track div { height: 100%; background: #fff; border-radius: 99px; }
.setup-banner .btn { background: #fff; color: #0b2a66; border: 0; }

/* Essayer l'agent */
.decision { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 14px;
            background: var(--brand-soft); margin-bottom: 16px; }
.decision .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none;
                 background: var(--brand); color: #fff; }
.decision .ico svg { width: 24px; height: 24px; }
.decision h2 { margin: 2px 0 4px; }
.decision p { margin: 0; color: var(--ink-2); font-size: 14px; }
.decision.green { background: var(--ok-soft); } .decision.green .ico { background: var(--ok); }
.decision.amber { background: var(--warn-soft); } .decision.amber .ico { background: var(--warn); }
.decision.red { background: var(--bad-soft); } .decision.red .ico { background: var(--bad); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 12px; }
.facts div { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; }
.facts span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts b { font-size: 15px; } .facts b.red { color: var(--bad); }
@media (max-width: 620px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Agents IA */
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .agents { grid-template-columns: 1fr; } }
.agents .card + .card { margin-top: 0; }
.agent { display: flex; flex-direction: column; }
.agent-head { display: flex; gap: 14px; align-items: center; }
.agent-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.agent-ico svg { width: 24px; height: 24px; }
.c-blue { background: linear-gradient(135deg, #1257c4, #4c8dff); }
.c-violet { background: linear-gradient(135deg, #6d4ae0, #a58bff); }
.c-amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.c-green { background: linear-gradient(135deg, #0f8a4b, #34c77b); }
.c-red { background: linear-gradient(135deg, #c62a2a, #ff6b6b); }
.agent-mission { font-size: 15px; font-weight: 560; margin: 14px 0 8px; }
.agent-does { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.agent-does li { display: flex; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.agent-does svg { color: var(--ok); width: 16px; height: 16px; margin-top: 2px; }
.agent-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.agent-meta div { background: var(--bg-soft); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.agent-meta span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.agent-meta b { font-size: 13px; font-weight: 600; }
.actions form { margin: 0; }
