/* Vigie — feuille de style unique. Pas de style en ligne (CSP stricte). */

/* Thème clair : tons doux (lin, crème), pas de blanc pur. */
:root {
  color-scheme: light;
  --bg: #e9e6df;
  --surface: #f5f3ee;
  --surface-2: #efece6;
  --surface-3: #e4e0d8;
  --border: #dbd6cc;
  --border-strong: #c8c2b6;
  --text: #23262b;
  --text-2: #474c54;
  --muted: #6f7279;
  --accent: #4a55c8;
  --accent-hover: #3b45ad;
  --accent-soft: #e3e3f1;
  --accent-text: #3a44a8;
  --focus: rgba(74, 85, 200, .25);

  --side-bg: #222834;
  --side-text: #b3b9c4;
  --side-active: #ffffff;
  --side-hover: rgba(255, 255, 255, .06);
  --side-active-bg: rgba(255, 255, 255, .10);

  /* Statut : couleurs réservées, toujours accompagnées d'un libellé. */
  --critical: #d03b3b;
  --serious: #ec835a;
  --warning: #fab219;
  --low: #9a9c9f;
  --good: #0ca30c;
  --good-text: #1f6b1f;
  --critical-bg: #f5e1dd;
  --serious-bg: #f6e6dc;
  --warning-bg: #f5ecd6;
  --low-bg: #e8e5de;
  --good-bg: #e0eedc;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 1px 3px rgba(60, 50, 30, .06);
  --shadow-lg: 0 10px 30px rgba(60, 50, 30, .12);
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
}

/* Thème sombre : choisi explicitement, ou en mode automatique selon le système. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #151a23;
  --surface-2: #1a202b;
  --surface-3: #212835;
  --border: #262d3a;
  --border-strong: #353d4d;
  --text: #e8ebf0;
  --text-2: #c2c8d2;
  --muted: #8b94a4;
  --accent: #7d8bff;
  --accent-hover: #95a0ff;
  --accent-soft: rgba(125, 139, 255, .14);
  --accent-text: #a9b2ff;
  --focus: rgba(125, 139, 255, .35);
  --side-bg: #0a0e15;
  --low: #7d8696;
  --good-text: #3fcb3f;
  --critical-bg: rgba(208, 59, 59, .16);
  --serious-bg: rgba(236, 131, 90, .15);
  --warning-bg: rgba(250, 178, 25, .13);
  --low-bg: rgba(152, 161, 176, .14);
  --good-bg: rgba(12, 163, 12, .15);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 34px rgba(0, 0, 0, .5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #151a23;
    --surface-2: #1a202b;
    --surface-3: #212835;
    --border: #262d3a;
    --border-strong: #353d4d;
    --text: #e8ebf0;
    --text-2: #c2c8d2;
    --muted: #8b94a4;
    --accent: #7d8bff;
    --accent-hover: #95a0ff;
    --accent-soft: rgba(125, 139, 255, .14);
    --accent-text: #a9b2ff;
    --focus: rgba(125, 139, 255, .35);
    --side-bg: #0a0e15;
    --low: #7d8696;
    --good-text: #3fcb3f;
    --critical-bg: rgba(208, 59, 59, .16);
    --serious-bg: rgba(236, 131, 90, .15);
    --warning-bg: rgba(250, 178, 25, .13);
    --low-bg: rgba(152, 161, 176, .14);
    --good-bg: rgba(12, 163, 12, .15);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 34px rgba(0, 0, 0, .5);
  }
  :root:not([data-theme="light"]) .when-light { display: none; }
  :root:not([data-theme="light"]) .when-dark { display: inline-flex; }
}

/* Bouton de thème : propose l'autre thème que celui affiché. */
.when-light, .when-dark { display: inline-flex; align-items: center; gap: 6px; }
.when-dark { display: none; }
:root[data-theme="dark"] .when-light { display: none; }
:root[data-theme="dark"] .when-dark { display: inline-flex; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 620; }
h3 { font-size: 14px; font-weight: 620; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
      stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic.sm { width: 15px; height: 15px; vertical-align: -2px; }
.ic.lg { width: 22px; height: 22px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 4px; }

/* --- Mise en page ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; font-weight: 700;
         font-size: 17px; letter-spacing: .01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
              background: linear-gradient(135deg, #5b6cf0, #3140b0); }
.brand-mark .ic { stroke: #fff; width: 17px; height: 17px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6c7688;
             padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px;
         color: var(--side-text); font-weight: 500; }
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a.on { background: var(--side-active-bg); color: var(--side-active); }
.nav .pill { margin-left: auto; background: #e24a4a; color: #fff; font-size: 11px; font-weight: 650;
             min-width: 20px; padding: 1px 6px; border-radius: 10px; text-align: center; }
.nav .beta { margin-left: auto; font-size: 10px; font-weight: 650; letter-spacing: .05em; color: #c7cdfa;
             border: 1px solid rgba(199, 205, 250, .35); padding: 0 6px; border-radius: 10px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.me .who { line-height: 1.25; min-width: 0; }
.me .who strong { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.me .who span { font-size: 12px; }
.side-links { display: flex; gap: 4px; padding: 6px 4px 0; }
.side-links a, .side-links button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px; border-radius: 8px;
  color: var(--side-text); background: none; border: 0; font: inherit; font-size: 12.5px; cursor: pointer;
}
.side-links a:hover, .side-links button:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.side-links form { flex: 1; display: flex; margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: var(--surface);
          border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar .crumbs { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-width: 0; }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs .cur { color: var(--text); font-weight: 550; }
.topbar .spacer { flex: 1; }
.bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
        color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.bell:hover { background: var(--surface-2); text-decoration: none; }
.bell .dot { position: absolute; top: -4px; right: -4px; background: var(--critical); color: #fff;
             font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
             display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--surface); }
.menu-toggle { display: none; }
.content { padding: 28px 32px 48px; width: 100%; max-width: 1360px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --- Composants -------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
             padding: 14px 20px; border-bottom: 1px solid var(--border); }
.section { margin-top: 26px; }
.section > h2 { margin-bottom: 12px; }
.stack { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }

.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 560; padding: 8px 14px;
       border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent); color: #fff;
       cursor: pointer; white-space: nowrap; line-height: 1.3; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soft { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.btn.soft:hover { filter: brightness(.97); }
.btn.danger { background: var(--surface); color: var(--critical); border-color: rgba(208, 59, 59, .4); }
.btn.danger:hover { background: var(--critical-bg); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-text); cursor: pointer; }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm);
         margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--good-bg); border-color: rgba(12, 163, 12, .3); color: var(--good-text); }
.flash.error { background: var(--critical-bg); border-color: rgba(208, 59, 59, .3); color: var(--critical); }
.flash.secret { background: var(--warning-bg); border-color: rgba(250, 178, 25, .45); color: var(--text); }
.flash.secret code { font-family: var(--mono); font-weight: 650; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warning-bg);
          border: 1px solid rgba(250, 178, 25, .45); color: var(--text); margin-bottom: 16px; }
.notice.info { background: var(--accent-soft); border-color: transparent; }
.notice ul.plain { list-style: none; margin: 6px 0 0; padding: 0; }
.notice ul.plain li { margin-top: 3px; }

/* Bandeau d'état de la collecte : la veille tourne-t-elle, et depuis quand ? */
.feedbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 18px;
           padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
           background: var(--surface); color: var(--text-2); font-size: 12.5px; }
.feedbar.warn { border-color: rgba(250, 178, 25, .45); background: var(--warning-bg); }
.feedbar.error, .feedbar.never { border-color: rgba(208, 59, 59, .30); background: var(--critical-bg); }
/* Pas de flex ici : le texte serait découpé en éléments séparés, espacés avant les virgules. */
.feedbar .fact .ic { color: var(--muted); margin-right: 6px; }
.feedbar .fact.bad, .feedbar .fact.bad .ic { color: var(--critical); }
.feedbar .mono { font-size: 12px; }
.feedbar .more { margin-left: auto; white-space: nowrap; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { padding: 16px 18px; }
.kpi .label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 550; }
.kpi .value { font-size: 28px; font-weight: 680; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.kpi .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi .hint.bad { color: var(--critical); }
.kpi .hint.good { color: var(--good-text); }

/* Sévérité : pastille + libellé, jamais la couleur seule */
.sev { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 8px; border-radius: 20px;
       font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text); background: var(--low-bg); }
.sev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--low); flex: none; }
.sev.critical { background: var(--critical-bg); }
.sev.critical::before { background: var(--critical); }
.sev.high { background: var(--serious-bg); }
.sev.high::before { background: var(--serious); }
.sev.medium { background: var(--warning-bg); }
.sev.medium::before { background: var(--warning); }
.sev.good { background: var(--good-bg); color: var(--good-text); }
.sev.good::before { background: var(--good); }
.sev.cond { background: var(--surface-3); color: var(--text-2); }
.sev.cond::before { background: transparent; border: 1.5px dashed var(--muted); width: 6px; height: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 12px;
       font-weight: 560; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }
.tag.kev { background: var(--critical-bg); color: var(--critical); }
.tag.kev .ic { width: 13px; height: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Barre de répartition des sévérités (SVG, largeurs en attributs) */
.sevbar { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.sevbar rect.critical { fill: var(--critical); }
.sevbar rect.high { fill: var(--serious); }
.sevbar rect.medium { fill: var(--warning); }
.sevbar rect.low { fill: var(--low); }
.sevbar rect.none { fill: var(--good); }

/* Avatars */
.avatar { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none;
          font-weight: 700; font-size: 14px; color: #fff; letter-spacing: .02em; }
.avatar.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.avatar.lg { width: 52px; height: 52px; border-radius: 13px; font-size: 19px; }
.avatar.round { border-radius: 50%; }
.av-0 { background: #4353d8; } .av-1 { background: #0f8f86; } .av-2 { background: #b4531f; }
.av-3 { background: #7a4bc9; } .av-4 { background: #2f7bbf; } .av-5 { background: #a13a6a; }
.av-6 { background: #4d7c2a; } .av-7 { background: #5b6272; }
.avatar.user { background: #2a3445; color: #dfe4ec; }

/* Barre d'outils et filtres */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1; min-width: 240px; }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input[type=search], .searchbox input[type=text] { padding-left: 36px; width: 100%; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 550; font-size: 13px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg .count { color: var(--muted); font-weight: 500; margin-left: 4px; }
.seg-option { position: relative; padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 550; font-size: 13px;
              cursor: pointer; }
.seg-option input { position: absolute; opacity: 0; pointer-events: none; }
.seg-option:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-option:has(input:focus-visible) { outline: 3px solid var(--focus); }

input[type=text], input[type=search], input[type=password], input[type=email], input[type=url],
input[type=number], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 11px; min-height: 38px;
}
textarea { width: 100%; min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
select { padding-right: 30px; }
input[disabled], select[disabled] { background: var(--surface-2); color: var(--muted); }
.form { display: grid; gap: 16px; max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .field .label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field.full { grid-column: 1 / -1; }
.check { display: flex; gap: 9px; align-items: flex-start; }
.check input { margin-top: 3px; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 4px; }
.error-text { color: var(--critical); font-weight: 550; }

/* Sélecteur de version avec recherche */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px;
              overflow: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface);
              border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.combo-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: 13px; }
.combo-list li:hover, .combo-list li.sel { background: var(--accent-soft); color: var(--accent-text); }
.combo-list li.empty { font-family: inherit; color: var(--muted); cursor: default; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
            color: var(--muted); padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .strong { font-weight: 600; }
.table .sub { color: var(--muted); font-size: 12.5px; }
.table td.actions-cell { text-align: right; white-space: nowrap; }
.rowlink { color: inherit; font-weight: 600; }
.rowlink:hover { color: var(--accent-text); }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ic { width: 34px; height: 34px; color: var(--border-strong); margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 15px; }
.empty .btn { margin-top: 14px; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 16px;
         border-top: 1px solid var(--border); }

/* Cartes clients */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.client { display: flex; flex-direction: column; gap: 14px; padding: 18px; color: inherit; transition: box-shadow .15s,
          border-color .15s, transform .15s; }
a.client:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lg);
                 transform: translateY(-1px); }
.client-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.client-top .name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-top .meta { color: var(--muted); font-size: 12.5px; }
.client-cats { display: flex; gap: 14px; color: var(--text-2); font-size: 13px; }
.client-cats span { display: inline-flex; align-items: center; gap: 5px; }
.client-cats .ic { color: var(--muted); width: 16px; height: 16px; }
.client-sev { display: grid; gap: 7px; }
.client-sev .legend { display: flex; flex-wrap: wrap; gap: 6px; }
.client.locked { background: var(--surface-2); box-shadow: none; }
.client.locked .client-top .name { color: var(--muted); }
.client.locked .avatar { filter: grayscale(1); opacity: .45; }
.client.locked .lockline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.client.locked details summary { list-style: none; }
.client.locked details summary::-webkit-details-marker { display: none; }
.client.locked details[open] summary { display: none; }
.request-form { display: grid; gap: 8px; }
.request-form textarea { min-height: 64px; }
.client.create { border: 1.5px dashed var(--border-strong); box-shadow: none; background: transparent;
                 align-items: center; justify-content: center; text-align: center; color: var(--muted); min-height: 170px; }
.client.create:hover { border-color: var(--accent); color: var(--accent-text); }
.client.create .ic { width: 26px; height: 26px; }

/* En-tête client */
.hero { display: flex; gap: 16px; align-items: center; }
.hero .title { display: flex; flex-direction: column; gap: 4px; }
.members { display: flex; }
.members .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.members .avatar:first-child { margin-left: 0; }

/* Détail équipement */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts.reco { gap: 12px 24px; font-size: 14px; }
.facts.reco dt { padding-top: 2px; }
.target { display: inline-block; font-size: 16px; font-weight: 700; padding: 3px 10px; border-radius: 7px;
          background: var(--accent-soft); color: var(--accent-text); margin-right: 4px; }
tr[data-href] { cursor: pointer; }
.cve-desc summary { cursor: pointer; color: var(--text-2); list-style: none; }
.cve-desc summary::-webkit-details-marker { display: none; }
.cve-desc[open] summary { color: var(--muted); }
.cve-desc p { margin-top: 6px; color: var(--text-2); max-width: 720px; }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; }
.linkrow a { display: inline-flex; align-items: center; gap: 4px; }

/* Notifications */
.notif { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
a.notif { color: inherit; }
a.notif:hover { text-decoration: none; background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
              background: var(--surface-3); color: var(--text-2); }
.notif .ico.cve { background: var(--critical-bg); color: var(--critical); }
.notif .body { flex: 1; min-width: 0; }
.notif .title { font-weight: 600; }
.notif .when { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Connexion */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: radial-gradient(circle at 20% 20%, #2a3aa8 0, #121a33 55%, #0b1020 100%); color: #cfd6e6;
             padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { padding: 0; }
.auth-side h2 { color: #fff; font-size: 30px; font-weight: 680; letter-spacing: -.02em; max-width: 440px; line-height: 1.2; }
.auth-side p { max-width: 440px; color: #aab4c8; font-size: 15px; margin-top: 14px; }
.auth-points { display: grid; gap: 14px; margin-top: 26px; max-width: 480px; }
.auth-points > div { display: flex; gap: 11px; align-items: flex-start; color: #aab4c8; font-size: 13.5px;
                     line-height: 1.45; }
.auth-points span { display: grid; gap: 1px; }
.auth-points strong { color: #eef1f8; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.auth-points .ic { color: #8f9cff; flex: none; margin-top: 2px; }
.auth-points .tag { background: rgba(143, 156, 255, .16); color: #b9c2ff; font-weight: 500; }
.auth-points .soon { opacity: .72; }
.auth-side { overflow: auto; }
.auth-side h2 { font-size: 27px; }
.auth-main { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.auth-card { width: 100%; max-width: 360px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 26px; }

/* Adaptation mobile */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 260px; transform: translateX(-100%);
             transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
                 border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

.scope-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.scope-list li { background: var(--surface-3); border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.signature { margin-top: auto; padding: 14px 32px 20px; color: var(--muted); font-size: 12.5px; text-align: center; }
.signature .heart { color: var(--critical); }
.signature .tagline { color: var(--accent-text); font-weight: 550; margin-left: 4px; }
.auth-main { grid-template-rows: 1fr auto; }
.auth-main .auth-card { align-self: center; }
.auth-main .signature { padding: 18px 0 0; }

.bug-link { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 9px;
            color: var(--text-2); border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.bug-link:hover, .bug-link.on { background: var(--surface-2); text-decoration: none; }
.bug-link .count { background: var(--surface-3); color: var(--text-2); border-radius: 9px; padding: 0 7px;
                   font-size: 11.5px; font-weight: 650; }
.notif .ico.bug { background: var(--surface-3); color: var(--text-2); }

.table tr.dismissed td { color: var(--muted); }
.table tr.dismissed .sev, .table tr.dismissed .rowlink { opacity: .6; }
.table td.analysis { width: 240px; min-width: 200px; }
details.decide { margin-top: 6px; }
details.decide summary { cursor: pointer; color: var(--accent-text); font-size: 12.5px; list-style: none; }
details.decide summary::-webkit-details-marker { display: none; }
details.decide .form { margin-top: 8px; gap: 8px; max-width: 240px; }
details.decide select, details.decide textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 12.5px; }
details.decide .btn { justify-self: start; }
details.decide textarea { min-height: 60px; font-size: 12.5px; }
.check-cell { width: 36px; }

.timeline { padding: 4px 20px 12px; }
.tl-item { position: relative; padding: 12px 0 12px 20px; border-left: 2px solid var(--border); display: grid; gap: 6px; }
.tl-item::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%;
                   background: var(--surface); border: 2px solid var(--accent); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tl-head .sub { width: 100%; }
.table.compact td { padding: 6px 10px; }

.bug-new > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.bug-new > summary::-webkit-details-marker { display: none; }
.thread { display: grid; gap: 12px; max-width: 860px; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-head .sub { margin-left: auto; }
.msg-body { white-space: pre-wrap; margin-top: 10px; }

@media (max-width: 720px) {
  .bug-link span:not(.count) { display: none; }
}

.signature .ver { font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.steps li { position: relative; display: grid; justify-items: center; gap: 4px; text-align: center; font-size: 12.5px;
            color: var(--muted); }
.steps li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li.done::before, .steps li.on::before { background: var(--accent); }
.steps .dot { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface);
              border: 2px solid var(--border-strong); }
.steps li.done .dot { background: var(--accent); border-color: var(--accent); }
.steps li.on .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps li.on .lbl, .steps li.done .lbl { color: var(--text); font-weight: 600; }
.steps .ver { font-size: 11.5px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.bug-progress { max-width: 860px; }

.code-input { font-family: var(--mono, ui-monospace, Consolas, monospace); font-size: 22px; letter-spacing: .3em;
              text-align: center; width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--accent-text); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.mfa-choice.chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mfa-title { display: flex; align-items: center; gap: 10px; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; font-size: 13.5px; }
.qr { margin: 10px 0 6px; }
.qr img { display: block; border-radius: 8px; border: 1px solid var(--border); background: #fff; }

dialog.modal { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px;
               background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(20, 16, 8, .28); overflow: visible; }
dialog.modal::backdrop { background: rgba(24, 26, 32, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px;
              border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; }
.modal-head .sub { margin-top: 3px; }
.modal-body { padding: 18px 22px; display: grid; gap: 14px; max-height: calc(100vh - 220px); overflow-y: auto; }
.overflow-ok .modal-body { overflow: visible; max-height: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--border);
              background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal-desc { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0; background: none;
            color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.choices legend { margin-bottom: 8px; font-weight: 600; font-size: 13px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong);
          border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice > span { display: grid; gap: 2px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; }
.tag.review { background: var(--warning-bg); color: var(--text); }
.tag.review .ic { width: 13px; height: 13px; }
.table tr.flash-row td { animation: row-flash 2.4s ease-out; }
@keyframes row-flash { from { background: var(--accent-soft); } to { background: transparent; } }

.pager { flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; }
.pager-per, .pager-goto { display: flex; align-items: center; gap: 6px; margin: 0; }
.pager-per select { min-height: 32px; padding: 4px 26px 4px 8px; font-size: 13px; }
.pager-goto input { width: 64px; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.pages { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pager-goto { margin-left: 0; }
.pg { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px;
      font-size: 13px; color: var(--text-2); border: 1px solid transparent; font-variant-numeric: tabular-nums; }
a.pg:hover { background: var(--surface-2); border-color: var(--border); text-decoration: none; }
.pg.on { background: var(--accent); color: #fff; font-weight: 650; }
.pg.off { color: var(--border-strong); }
.pg.gap { min-width: 18px; color: var(--muted); }
th.sortable a { color: inherit; display: inline-flex; align-items: center; gap: 5px; }
th.sortable a:hover { color: var(--text); text-decoration: none; }
.sort-ind { font-size: 10px; color: var(--border-strong); }
th.sorted .sort-ind { color: var(--accent-text); }
.filters-note { font-size: 12.5px; color: var(--muted); }
.toolbar .reset { font-size: 13px; }
@media (max-width: 720px) {
  .pages { margin-left: 0; }
}

.tag.feature { background: var(--accent-soft); color: var(--accent-text); }
.bug-new .choices { margin-bottom: 4px; }

.test-mail { display: flex; gap: 6px; margin-top: 8px; }
.test-mail input { flex: 1; min-width: 0; min-height: 32px; padding: 4px 8px; font-size: 13px; }
