/* ═══════════════════════════════════════════════════════════════
   DESIGN SYSTEM — NEMESIS V70
   Aesthetic: Precision Terminal · Obsidian + Acid Green accents
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg0:      #08080d;   /* fond absolu */
    --bg1:      #0c0c14;   /* fond principal */
    --bg2:      #101019;   /* surface carte */
    --bg3:      #14141f;   /* surface surélevée */
    --bg4:      #1b1b29;   /* hover */

    --acid:     #a78bfa;   /* vert acide — accent principal */
    --acid-dim: rgba(139,92,246,.12);
    --acid-bd:  rgba(139,92,246,.25);
    --blue:     #38BDF8;   /* bleu pour infos */
    --blue-dim: rgba(56,189,248,.1);
    --violet:   #A78BFA;   /* violet pour SEO */

    --border:   rgba(255,255,255,.06);
    --border2:  rgba(255,255,255,.10);
    --border3:  rgba(255,255,255,.16);

    --txt:      #F1F5F9;
    --txt2:     #94A3B8;
    --txt3:     #475569;

    --ok:   #4ADE80;
    --warn: #FCD34D;
    --crit: #F87171;

    --ok-bg:   rgba(74,222,128,.08);
    --warn-bg: rgba(252,211,77,.07);
    --crit-bg: rgba(248,113,133,.08);
    --ok-bd:   rgba(74,222,128,.2);
    --warn-bd: rgba(252,211,77,.2);
    --crit-bd: rgba(248,113,133,.2);

    --font:  'Inter', sans-serif;
    --mono:  'JetBrains Mono', monospace;

    --nav-w: 240px;
    --top-h: 60px;
    --r:     10px;
    --r2:    16px;
}

html { scroll-behavior: smooth; }
body {
    background: var(--bg0);
    color: var(--txt);
    font-family: var(--font);
    font-size: 14px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    height: var(--top-h);
    background: rgba(5,7,13,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 0;
}

.topbar-brand {
    width: var(--nav-w);
    flex-shrink: 0;
    display: flex; align-items: center; gap: 10px;
    padding: 0 20px;
    border-right: 1px solid var(--border);
    height: 100%;
}
.brand-icon {
    width: 28px; height: 28px;
    background: var(--acid);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-icon svg { color: #000; }
.brand-name {
    font-family: var(--mono);
    font-size: 13px; font-weight: 500;
    color: var(--txt);
    letter-spacing: .04em;
}
.brand-ver {
    font-family: var(--mono);
    font-size: 10px; color: var(--acid);
    background: var(--acid-dim);
    border: 1px solid var(--acid-bd);
    padding: 2px 6px; border-radius: 4px;
    margin-left: auto;
}

.topbar-search {
    flex: 1; display: flex; align-items: center;
    gap: 0; padding: 0 24px; height: 100%;
}
.search-wrap {
    display: flex; align-items: center;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: 8px;
    padding: 0 4px 0 14px;
    width: min(500px, 100%);
    transition: border-color .2s, box-shadow .2s;
}
.search-wrap:focus-within {
    border-color: var(--acid);
    box-shadow: 0 0 0 3px rgba(139,92,246,.08);
}
.search-wrap input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--txt); font-family: var(--mono); font-size: 12px;
    padding: 9px 0;
}
.search-wrap input::placeholder { color: var(--txt3); }
.search-btn {
    background: var(--acid); color: #000;
    border: none; border-radius: 6px;
    padding: 7px 16px;
    font-family: var(--font); font-weight: 600; font-size: 12px;
    cursor: pointer; white-space: nowrap;
    transition: opacity .15s, transform .1s;
}
.search-btn:hover { opacity: .9; }
.search-btn:active { transform: scale(.97); }
.search-btn:disabled { opacity: .4; cursor: default; }

.topbar-meta {
    padding: 0 24px; display: flex; align-items: center; gap: 16px;
    border-left: 1px solid var(--border);
    height: 100%;
}
.meta-pill {
    font-family: var(--mono); font-size: 10px;
    color: var(--txt3); letter-spacing: .08em;
}
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--txt3);
}
.status-dot.active {
    background: var(--acid);
    box-shadow: 0 0 6px var(--acid);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: var(--top-h); left: 0; bottom: 0;
    width: var(--nav-w); z-index: 100;
    background: var(--bg1);
    border-right: 1px solid var(--border);
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
    padding-bottom: 20px;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border2); }

.nav-section {
    padding: 20px 12px 8px;
}
.nav-section-label {
    font-family: var(--mono); font-size: 9px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .16em;
    color: var(--txt3); padding: 0 8px; margin-bottom: 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px;
    cursor: pointer; user-select: none;
    transition: background .15s, color .15s;
    color: var(--txt2); font-size: 13px; font-weight: 400;
    position: relative;
}
.nav-item:hover { background: var(--bg4); color: var(--txt); }
.nav-item.active {
    background: var(--acid-dim);
    color: var(--acid);
    border: 1px solid var(--acid-bd);
}
.nav-item.active .nav-icon { color: var(--acid); }
.nav-icon {
    width: 16px; height: 16px; flex-shrink: 0;
    color: var(--txt3); transition: color .15s;
}
.nav-item:hover .nav-icon { color: var(--txt2); }
.nav-badge {
    margin-left: auto;
    font-family: var(--mono); font-size: 9px;
    background: var(--bg4); color: var(--txt3);
    padding: 1px 6px; border-radius: 999px;
    border: 1px solid var(--border);
}
.nav-item.active .nav-badge {
    background: var(--acid-dim); color: var(--acid);
    border-color: var(--acid-bd);
}
.nav-badge.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-bd); }
.nav-badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.nav-badge.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok-bd); }

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.main {
    margin-left: var(--nav-w);
    padding-top: var(--top-h);
    min-height: 100vh;
}
.page {
    display: none;
    padding: 32px 36px 80px;
    animation: pageIn .2s ease;
}
.page.active { display: block; }
@keyframes pageIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ── PAGE HEADER ─────────────────────────────────────────────── */
.page-header {
    display: flex; align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.page-title {
    font-size: 22px; font-weight: 600; color: var(--txt);
    letter-spacing: -.4px; line-height: 1.2;
}
.page-sub {
    font-family: var(--mono); font-size: 11px;
    color: var(--txt3); margin-top: 4px; letter-spacing: .04em;
}
.page-score-pill {
    font-family: var(--mono); font-size: 28px; font-weight: 500;
    line-height: 1;
}

/* ── PROGRESS CARD ───────────────────────────────────────────── */
.prog-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--r2);
    padding: 24px 28px;
    margin-bottom: 28px;
}
.prog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.prog-domain { font-size: 15px; font-weight: 600; color: var(--txt); }
.prog-info { font-family: var(--mono); font-size: 11px; color: var(--txt3); margin-top: 3px; }
.prog-pct { font-family: var(--mono); font-size: 30px; font-weight: 500; color: var(--acid); line-height: 1; }
.prog-track { height: 4px; background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.prog-fill { height: 100%; background: var(--acid); border-radius: 999px; width: 0%; transition: width .4s cubic-bezier(.4,0,.2,1); }
.prog-current { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prog-spinner {
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid rgba(139,92,246,.2); border-top-color: var(--acid);
    animation: spin .6s linear infinite; flex-shrink: 0;
}
.prog-spinner.done { animation: none; border-color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }
.prog-label { font-size: 12px; color: var(--txt2); flex: 1; }
.prog-status-badge {
    font-family: var(--mono); font-size: 9px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .1em;
    padding: 2px 8px; border-radius: 999px;
}
.ps-run  { background: var(--acid-dim); color: var(--acid); border: 1px solid var(--acid-bd); }
.ps-ok   { background: var(--ok-bg);   color: var(--ok);   border: 1px solid var(--ok-bd); }
.ps-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-bd); }
.ps-crit { background: var(--crit-bg); color: var(--crit); border: 1px solid var(--crit-bd); }
.prog-log { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.prog-log::-webkit-scrollbar { width: 2px; }
.prog-log::-webkit-scrollbar-thumb { background: var(--border2); }
.plog-row {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 8px; border-radius: 6px;
    font-size: 11px;
    background: rgba(255,255,255,.02);
    animation: fadeUp .15s ease;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(-3px); } to { opacity:1; transform:translateY(0); } }
.plog-n { font-family: var(--mono); color: var(--txt3); min-width: 20px; font-size: 10px; }
.plog-name { flex: 1; color: var(--txt2); }
.prog-eta { font-family: var(--mono); font-size: 10px; color: var(--txt3); text-align: right; margin-top: 8px; }

/* ── KPI GRID ────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.kpi {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r); padding: 16px 18px;
    position: relative; overflow: hidden;
}
.kpi::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: var(--kpi-color, var(--border));
}
.kpi-l { font-family: var(--mono); font-size: 10px; text-transform: uppercase;
         letter-spacing: .14em; color: var(--txt3); margin-bottom: 8px; }
.kpi-v { font-family: var(--mono); font-size: 26px; font-weight: 500; line-height: 1;
         color: var(--kpi-color, var(--txt)); }
.kpi-sub { font-size: 11px; color: var(--txt3); margin-top: 4px; }

/* ── GAUGE SVG (dashboard) ───────────────────────────────────── */
.dash-hero {
    display: grid; grid-template-columns: 280px 1fr;
    gap: 16px; margin-bottom: 24px; align-items: start;
}
.gauge-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r2); padding: 28px 20px 24px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.gauge-domain {
    font-family: var(--mono); font-size: 11px; color: var(--txt2);
    background: var(--bg3); border: 1px solid var(--border2);
    padding: 4px 12px; border-radius: 999px;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gauge-label { font-family: var(--mono); font-size: 9px; color: var(--txt3);
               letter-spacing: .18em; text-transform: uppercase; }
.malus-tag {
    font-family: var(--mono); font-size: 10px; color: var(--crit);
    background: var(--crit-bg); border: 1px solid var(--crit-bd);
    padding: 3px 10px; border-radius: 999px;
}

/* Radar */
.radar-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-radius: var(--r2); padding: 24px 28px;
}
.radar-card h3 {
    font-family: var(--mono); font-size: 10px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .18em;
    color: var(--txt3); margin-bottom: 18px;
}
.radar-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.radar-legend { display: flex; flex-direction: column; gap: 7px; }
.rli { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rld { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.rln { flex: 1; color: var(--txt2); }
.rls { font-family: var(--mono); font-weight: 500; font-size: 11px; }

/* ── MODULE GRID ─────────────────────────────────────────────── */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mod-card {
    background: var(--bg2); border: 1px solid var(--border);
    border-left: 3px solid var(--mc-color, var(--border));
    border-radius: var(--r); padding: 16px 18px;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .15s;
}
.mod-card:hover {
    background: var(--bg4);
    border-left-color: var(--mc-color, var(--acid));
    transform: translateX(2px);
}
.mod-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.mod-title-row { display: flex; align-items: center; gap: 8px; }
.mod-icon-wrap {
    width: 26px; height: 26px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.mod-title { font-size: 13px; font-weight: 500; color: var(--txt); }
.mod-score-tag {
    font-family: var(--mono); font-size: 10px;
    padding: 2px 8px; border-radius: 999px;
    background: var(--bg3); border: 1px solid var(--border);
    color: var(--mc-color, var(--txt3));
    white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; flex-direction: column; gap: 1px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: 6px; padding: 6px 9px;
    flex: 1; min-width: 65px;
}
.chip-l { font-family: var(--mono); font-size: 9px; text-transform: uppercase;
          letter-spacing: .14em; color: var(--txt3); }
.chip-v { font-size: 12px; font-weight: 500; }
.s-ok   { color: var(--ok); }
.s-warn { color: var(--warn); }
.s-crit { color: var(--crit); }

/* ── SECTION TITLE ───────────────────────────────────────────── */
.section-title {
    font-family: var(--mono); font-size: 9px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .2em; color: var(--txt3);
    display: flex; align-items: center; gap: 12px;
    margin: 28px 0 14px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.section-num { color: var(--acid); font-size: 11px; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 9000;
    background: rgba(2,4,10,.93); backdrop-filter: blur(14px);
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.on { display: flex; }
.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-top: 2px solid var(--acid);
    border-radius: var(--r2); max-width: 900px; width: 100%;
    padding: 36px; max-height: 85vh; overflow-y: auto;
    position: relative; animation: modalIn .2s ease;
}
@keyframes modalIn { from{opacity:0;transform:scale(.97)} to{opacity:1;transform:scale(1)} }
.modal-close {
    position: absolute; top: 16px; right: 18px;
    width: 28px; height: 28px;
    background: var(--bg3); border: 1px solid var(--border2);
    border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--txt3); font-size: 14px;
    transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--bg4); color: var(--txt); }
.modal-title {
    font-size: 16px; font-weight: 600; color: var(--txt);
    margin-bottom: 6px; padding-right: 40px;
}
.modal-key { font-family: var(--mono); font-size: 11px; color: var(--txt3); margin-bottom: 20px; }
.modal-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.modal-detail { font-size: 13px; line-height: 1.75; color: var(--txt2); }
.modal-detail h4 {
    font-family: var(--mono); font-size: 10px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .15em; color: var(--txt3);
    margin: 16px 0 8px;
}
.modal-detail pre {
    background: var(--bg0); padding: 14px 16px; border-radius: 8px;
    color: #7DD3FC; font-family: var(--mono); font-size: 11px;
    border: 1px solid var(--border); overflow-x: auto;
    white-space: pre-wrap; line-height: 1.6; margin: 8px 0;
}
.modal-detail ul { padding-left: 16px; }
.modal-detail li { margin-bottom: 5px; }
.modal-detail .status-ok   { color: var(--ok); }
.modal-detail .status-warn { color: var(--warn); }
.modal-detail .status-crit { color: var(--crit); }
.modal-detail code {
    background: var(--bg3); border: 1px solid var(--border2);
    padding: 1px 5px; border-radius: 4px;
    color: var(--blue); font-size: .9em;
}

/* ── REMEDIATION ─────────────────────────────────────────────── */
.rem-list { display: flex; flex-direction: column; gap: 8px; }
.rem-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px; border-radius: 8px; border: 1px solid;
}
.rem-item.crit { background: var(--crit-bg); border-color: var(--crit-bd); }
.rem-item.warn { background: var(--warn-bg); border-color: var(--warn-bd); }
.rem-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }
.crit .rem-dot { background: var(--crit); }
.warn .rem-dot { background: var(--warn); }
.rem-module { font-family: var(--mono); font-size: 10px; color: var(--txt3);
              text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.rem-msg { font-size: 12px; color: var(--txt2); line-height: 1.55; }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 80px 40px; text-align: center;
    color: var(--txt3);
}
.empty-icon { font-size: 40px; margin-bottom: 16px; opacity: .4; }
.empty-title { font-size: 15px; font-weight: 500; color: var(--txt2); margin-bottom: 8px; }
.empty-sub { font-size: 12px; max-width: 320px; line-height: 1.6; }

/* ── ARCHIVE BADGE ───────────────────────────────────────────── */
.arc-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--ok-bg); border: 1px solid var(--ok-bd);
    color: var(--ok); font-family: var(--mono); font-size: 10px;
    letter-spacing: .1em; text-transform: uppercase;
    padding: 5px 12px; border-radius: 999px;
}

/* ── SUMMARY TABLE (subdomains, etc.) ────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
    text-align: left; padding: 8px 12px;
    font-family: var(--mono); font-size: 9px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .14em; color: var(--txt3);
    border-bottom: 1px solid var(--border2);
}
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); color: var(--txt2); }
.data-table tr:hover td { background: var(--bg3); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    :root { --nav-w: 200px; }
    .kpi-grid { grid-template-columns: repeat(3,1fr); }
    .dash-hero { grid-template-columns: 1fr; }
    .radar-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    :root { --nav-w: 0px; }
    .sidebar { transform: translateX(-100%); transition: transform .3s; width: 220px; }
    .sidebar.open { transform: translateX(0); --nav-w: 220px; }
    .kpi-grid { grid-template-columns: repeat(2,1fr); }
    .mod-grid { grid-template-columns: 1fr; }
    .page { padding: 20px 16px 60px; }
}
/* ═══════════════════════════════════════════════════════════════
   REMÉDIATION v2 — Cards expandables classées par risque
   ═══════════════════════════════════════════════════════════════ */

/* Stats bar */
.rem-stats {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.rem-stat-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px; border: 1px solid;
    font-family: var(--mono); font-size: 11px; font-weight: 500;
    cursor: pointer; transition: opacity .15s;
}
.rem-stat-pill:hover { opacity: .8; }
.rem-stat-pill .rs-n { font-size: 18px; font-weight: 700; line-height: 1; }
.risk-critical { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-bd); }
.risk-high     { background: rgba(249,115,22,.08); color: #F97316; border-color: rgba(249,115,22,.2); }
.risk-medium   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.risk-low      { background: var(--blue-dim); color: var(--blue); border-color: rgba(56,189,248,.2); }

/* Filter tabs */
.rem-filters {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px;
    padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.rem-filter-btn {
    padding: 6px 14px; border-radius: 6px;
    font-family: var(--mono); font-size: 11px;
    background: var(--bg3); border: 1px solid var(--border2);
    color: var(--txt2); cursor: pointer;
    transition: all .15s;
}
.rem-filter-btn:hover { background: var(--bg4); color: var(--txt); }
.rem-filter-btn.active { background: var(--acid-dim); color: var(--acid); border-color: var(--acid-bd); }

/* Cards container */
.rem-cards { display: flex; flex-direction: column; gap: 8px; }

/* Individual card */
.rem-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.rem-card:hover { border-color: var(--border3); }
.rem-card.open { border-color: var(--border3); box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.rem-card.open .rem-card-body { display: block; }
.rem-card.open .rem-chevron { transform: rotate(180deg); }

/* Card header (clickable) */
.rem-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer; gap: 16px;
    transition: background .15s;
}
.rem-card-header:hover { background: rgba(255,255,255,.02); }

.rem-card-left {
    display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}
.rem-risk-badge {
    font-family: var(--mono); font-size: 9px; font-weight: 700;
    letter-spacing: .12em; padding: 3px 8px; border-radius: 4px;
    border: 1px solid; white-space: nowrap; flex-shrink: 0;
    text-transform: uppercase;
}
.rem-card-titles { min-width: 0; flex: 1; }
.rem-card-label {
    font-size: 13px; font-weight: 600; color: var(--txt);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rem-card-msg { font-size: 12px; color: var(--txt2); margin-top: 2px; line-height: 1.4; }

.rem-card-right {
    display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.rem-meta-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--mono); font-size: 10px;
    background: var(--bg3); border: 1px solid var(--border);
    padding: 2px 8px; border-radius: 4px; white-space: nowrap;
    color: var(--txt3);
}
.effort-low    { color: var(--ok)   !important; border-color: var(--ok-bd)   !important; background: var(--ok-bg)   !important; }
.effort-medium { color: var(--warn) !important; border-color: var(--warn-bd) !important; background: var(--warn-bg) !important; }
.effort-high   { color: var(--crit) !important; border-color: var(--crit-bd) !important; background: var(--crit-bg) !important; }

.rem-module-tag {
    font-family: var(--mono); font-size: 9px; color: var(--txt3);
    background: var(--bg0); border: 1px solid var(--border);
    padding: 2px 7px; border-radius: 4px;
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rem-chevron { color: var(--txt3); flex-shrink: 0; transition: transform .2s ease; }

/* Card body (expandable) */
.rem-card-body {
    display: none;
    padding: 0 20px 24px;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,.15);
}

.rem-impact {
    padding: 16px 0 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.rem-section-label {
    font-family: var(--mono); font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .18em; color: var(--txt3);
    margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.rem-section-label::after { content:''; flex:1; height:1px; background: var(--border); }
.rem-impact p { font-size: 13px; color: var(--txt2); line-height: 1.7; }

/* Numbered steps */
.rem-fix-wrap { margin-bottom: 16px; }
.rem-steps {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.rem-step {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: var(--txt2); line-height: 1.55;
}
.rem-step-n {
    flex-shrink: 0;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--acid-dim); border: 1px solid var(--acid-bd);
    color: var(--acid);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 10px; font-weight: 700;
    margin-top: 1px;
}

/* Code block */
.rem-code-wrap { margin-top: 4px; }
.rem-code {
    background: var(--bg0); border: 1px solid var(--border2);
    border-radius: 8px; padding: 14px 16px; margin: 8px 0 0;
    font-family: var(--mono); font-size: 11px; color: #7DD3FC;
    overflow-x: auto; white-space: pre; line-height: 1.65;
}

/* Responsive */
@media (max-width: 768px) {
    .rem-card-right { display: none; }
    .rem-stats { gap: 6px; }
}

/* ── charte gaetanmorvan.fr (2026-10) : palette alignée sur le site ── */
:root{--bg0:#08080d;--bg1:#0c0c14;--bg2:#101019;--bg3:#14141f;--bg4:#1b1b29;--acid:#a78bfa;--acid-dim:rgba(139,92,246,.14);--acid-bd:rgba(139,92,246,.32);--blue:#22d3ee;--blue-dim:rgba(34,211,238,.1);--violet:#f472b6;--txt:#f3f2ee;--txt2:#a5a3b3;--txt3:#6f6d80;--font:'Inter',system-ui,sans-serif}
.topbar{background:rgba(8,8,13,.92)}
