/* ── Thème partagé — pages Jarvis (hub / agents / skills) ── */
:root {
    --bg: #06070c;
    --surface: rgba(255,255,255,0.03);
    --surface-hover: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --text: #e8eaf2;
    --text-dim: #8b93a7;
    --text-faint: #5a6275;
    --green: #34d399;
    --amber: #fbbf24;
    --red: #f87171;
    --indigo: #818cf8;
    --blue: #38bdf8;
    --violet: #a78bfa;
    --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 36px 20px 60px;
    -webkit-font-smoothing: antialiased;
}
.bg-gradient {
    position: fixed; inset: 0; z-index: -1;
    background:
        radial-gradient(600px 400px at 15% 30%, rgba(99,102,241,0.10) 0%, transparent 60%),
        radial-gradient(600px 400px at 85% 15%, rgba(14,165,233,0.08) 0%, transparent 60%),
        radial-gradient(700px 500px at 60% 90%, rgba(139,92,246,0.07) 0%, transparent 60%),
        linear-gradient(180deg, #06070c 0%, #090b14 100%);
}
.bg-grid {
    position: fixed; inset: 0; z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 75%);
}
.container { max-width: 1280px; margin: 0 auto; }

h1 { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
h1 span { color: var(--green); }
.subtitle { text-align: center; color: var(--text-dim); margin-bottom: 14px; font-size: 14px; }
.last { text-align: center; color: var(--green); font-size: 12px; font-weight: 700; margin-bottom: 22px; font-family: 'JetBrains Mono', monospace; }

/* ── Nav ── */
.nav { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.nav a {
    color: var(--text); text-decoration: none;
    background: var(--surface); padding: 8px 18px; border-radius: 10px;
    font-size: 13px; font-weight: 600; border: 1px solid var(--border);
    transition: all 0.2s;
}
.nav a:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.nav a.on { background: rgba(52,211,153,0.15); color: var(--green); border-color: rgba(52,211,153,0.35); }

/* ── Légende ── */
.legend { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 30px; font-size: 13px; color: var(--text-dim); }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* ── Jarvis central ── */
.jarvis { text-align: center; margin-bottom: 30px; }
.jarvis .card {
    display: inline-block;
    background: linear-gradient(135deg, rgba(52,211,153,0.2), rgba(56,189,248,0.15));
    border: 1px solid rgba(52,211,153,0.35);
    color: #ecfdf5; border-radius: 16px; padding: 20px 40px;
    font-weight: 800; font-size: 20px;
    box-shadow: 0 8px 40px rgba(16,185,129,0.15);
}
.jarvis .role { color: var(--text-dim); font-size: 13px; margin-top: 8px; }
.jarvis .role strong { color: var(--green); }

/* ── Pôles / catégories ── */
.poles { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.pole {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    position: relative;
}
.pole::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129,140,248,0.4), transparent);
}
.pole h2 { font-size: 14px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.pole .count { margin-left: auto; font-size: 12px; color: var(--text-faint); font-weight: 600; }

/* ── Agents ── */
.agent {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 10px;
    transition: border-color 0.2s;
}
.agent:last-child { margin-bottom: 0; }
.agent:hover { border-color: var(--border-hover); }
.agent .top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.agent .name { font-weight: 700; font-size: 14px; }
.agent .alias { color: var(--text-faint); font-size: 11px; background: rgba(255,255,255,0.05); padding: 2px 8px; border-radius: 6px; font-family: 'JetBrains Mono', monospace; }
.agent .role { color: var(--text-dim); font-size: 12px; margin-bottom: 6px; }
.agent .meta { font-size: 11px; color: var(--text-faint); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.agent .meta b { color: var(--text-dim); font-weight: 600; }
.agent.chef { background: rgba(109,40,217,0.08); border-color: rgba(139,92,246,0.35); }

/* ── Badges ── */
.badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px; margin-left: auto; white-space: nowrap; }
.badge.actif { background: rgba(52,211,153,0.12); color: var(--green); border: 1px solid rgba(52,211,153,0.3); }
.badge.veille { background: rgba(251,191,36,0.10); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.badge.pause { background: rgba(248,113,113,0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
.badge.demande { background: rgba(139,147,167,0.10); color: var(--text-dim); border: 1px solid rgba(139,147,167,0.3); }
.badge.chef { background: rgba(139,92,246,0.15); color: var(--violet); border: 1px solid rgba(139,92,246,0.4); }

/* ── Skills ── */
.skill {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 11px 13px; margin-bottom: 9px;
    transition: border-color 0.2s;
}
.skill:last-child { margin-bottom: 0; }
.skill:hover { border-color: var(--border-hover); }
.skill .top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.skill .name { font-weight: 700; font-size: 13px; }
.skill .desc { color: var(--text-dim); font-size: 12px; line-height: 1.45; }
.skill .id { color: var(--text-faint); font-size: 10px; margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.src { font-size: 10px; padding: 2px 8px; border-radius: 20px; border: 1px solid; white-space: nowrap; margin-left: auto; }

/* ── Sous-niveaux ── */
.subtree { margin-left: 18px; padding-left: 14px; border-left: 2px dashed rgba(51,65,85,0.6); margin-top: 2px; }
.subtree .agent { background: rgba(11,18,32,0.6); }
.report { font-size: 10px; color: var(--text-faint); background: rgba(255,255,255,0.04); padding: 1px 7px; border-radius: 6px; display: inline-block; }

/* ── Hub cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; text-align: center; text-decoration: none; color: var(--text);
    display: block; position: relative; overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), border-color 0.22s, box-shadow 0.25s;
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); opacity: 0; transition: opacity 0.25s; }
.card:hover { transform: translateY(-3px); border-color: var(--border-hover); box-shadow: 0 14px 40px rgba(0,0,0,0.45); }
.card:hover::before { opacity: 1; }
.card .icon { font-size: 38px; margin-bottom: 14px; display: block; }
.card h2 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.card .stats { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.card .go { font-size: 12px; color: var(--green); font-weight: 700; }
.card.agents { --accent: var(--violet); border-top: 3px solid var(--violet); }
.card.skills { --accent: var(--blue); border-top: 3px solid var(--blue); }
.status-row { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; font-size: 12px; color: var(--text-dim); }
.status-row .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

.footer { text-align: center; color: var(--text-faint); font-size: 11px; margin-top: 36px; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.45} }
@media (max-width: 640px) {
    .poles { grid-template-columns: 1fr; }
    .grid { grid-template-columns: 1fr; }
    h1 { font-size: 24px; }
}
