:root{--bg:#080b12;--surface:#101521;--line:#222a39;--text:#eef2ff;--muted:#8f98aa;--accent:#8b5cf6;--ok:#34d67c;--bad:#ef476f;--warn:#f5a623}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.5}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid #a78bfa;outline-offset:2px}
h1{font-size:32px;margin:0 0 6px;letter-spacing:-.01em}
h2{margin:0;font-size:17px}
code{background:#0b0f18;padding:1px 6px;border-radius:5px}
.muted{color:var(--muted)}
.pad{padding:24px}

/* Connexion */
.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 50% 0,#271451 0,#0d0a16 38%,var(--bg) 70%)}
.login-card{width:min(420px,calc(100% - 32px));padding:38px;background:rgba(16,20,31,.92);border:1px solid #252b3a;border-radius:22px;box-shadow:0 25px 80px #0008}
.login-card h1{margin:25px 0 7px}
.alert{background:#3a1620;border:1px solid #733044;color:#ffb9c8;padding:12px;border-radius:10px;margin:20px 0}
label{display:block;margin:18px 0 7px;color:#b9c0cf;font-size:14px}
input{width:100%;padding:13px 14px;background:#0b0f18;border:1px solid #303747;color:#fff;border-radius:8px;outline:none}
input:focus{border-color:var(--accent)}
.login-card button{width:100%;margin-top:22px;padding:13px;border:0;border-radius:8px;background:#7c3aed;color:#fff;font-weight:700;cursor:pointer}
.login-card button:hover{background:#6d28d9}

/* Barre du haut */
.brand{font-weight:800;letter-spacing:.12em}
.brand small{font-size:10px;color:#8d96aa;margin-left:8px}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#a855f7;box-shadow:0 0 18px #a855f7;margin-right:9px}
.topbar{height:64px;border-bottom:1px solid #202634;background:#0b0f18cc;backdrop-filter:blur(14px);display:flex;align-items:center;justify-content:space-between;padding:0 32px;position:sticky;top:0;z-index:2}
.top-actions{display:flex;gap:22px;align-items:center;font-size:13px}
.top-actions form{margin:0}
.link{background:none;border:0;color:#c7b5ff;font:inherit;cursor:pointer;padding:0}
.link:hover{text-decoration:underline}
.live{display:flex;align-items:center;gap:8px;color:#737d91}
.live i{width:8px;height:8px;border-radius:50%;background:var(--ok);box-shadow:0 0 9px var(--ok);animation:pulse 2s infinite}
.live.off i{background:var(--bad);box-shadow:0 0 9px var(--bad);animation:none}
@keyframes pulse{50%{opacity:.35}}

/* Mise en page */
.container{max-width:1180px;margin:0 auto;padding:40px 24px}
.hero{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:26px}
.hero h1{margin:0 0 6px;font-size:34px}
.hero p{margin:0}
.pill{padding:9px 14px;border-radius:999px;font-size:13px;font-weight:700;white-space:nowrap}
.pill.ok{background:#10271c;color:#7cf0ae;border:1px solid #1e5a38}
.pill.warn{background:#302313;color:#ffd38b;border:1px solid #705020}
.grid{display:grid;gap:16px}
.services,.gauges{grid-template-columns:repeat(2,1fr)}
.stats{grid-template-columns:repeat(4,1fr);margin-top:16px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px}
.section-title{margin:38px 0 14px;font-size:20px}
section#mc:not(:empty){margin-top:16px}

/* Services */
.service-head{display:flex;justify-content:space-between;gap:15px}
.service p{margin:4px 0 0;color:#778195;font-size:13px}
.status{font-size:12px;display:flex;gap:6px;align-items:center;white-space:nowrap;height:fit-content}
.status i,.events i{width:7px;height:7px;border-radius:50%;display:inline-block}
.online{color:#6ee7a0}.online i{background:var(--ok);box-shadow:0 0 9px var(--ok)}
.offline{color:#ff8b9b}.offline i{background:var(--bad)}
.metric{display:flex;justify-content:space-between;margin-top:20px;padding-top:14px;border-top:1px solid var(--line);color:#7e8798;font-size:12px}
.metric strong{color:#dbe2f0}

/* Minecraft */
.mc{display:grid;grid-template-columns:1fr auto;gap:12px 32px;align-items:center;border-left:3px solid #a855f7}
.motd{margin:6px 0 0;color:#c8cfdd;font-size:14px;max-width:60ch}
.mc-stats{display:flex;gap:28px}
.mc-stats div{display:flex;flex-direction:column}
.mc-stats strong{font-size:22px}.mc-stats small{font-size:14px;color:var(--muted)}
.mc-stats span{font-size:12px;color:#707a8e}
.names{grid-column:1/-1;margin:0;display:flex;flex-wrap:wrap;gap:8px}
.names span{background:#1a2030;border:1px solid #2b3347;border-radius:8px;padding:3px 10px;font-size:13px}

/* Graphique : l'élément principal de la page */
.chart-card{margin-top:16px;padding:20px 20px 14px}
.chart-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.chart-head h2 .muted{font-weight:400;font-size:13px;margin-left:6px}
.tabs{display:flex;background:#0b0f18;border:1px solid #262d3d;border-radius:10px;padding:3px}
.tabs button{background:none;border:0;color:#8f98aa;padding:6px 14px;border-radius:7px;font:inherit;font-size:13px;cursor:pointer}
.tabs button.on{background:#2a1f4d;color:#e4d9ff}
#chart svg{width:100%;height:190px;display:block}
.line{fill:none;stroke:#a78bfa;stroke-width:2;vector-effect:non-scaling-stroke}
.area{fill:rgba(139,92,246,.16);stroke:none}
.mid{stroke:var(--line);stroke-dasharray:4 5;vector-effect:non-scaling-stroke}
.axis{display:flex;justify-content:space-between;color:#667084;font-size:12px;margin-top:8px}

/* Jauges et stats */
.gauge-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:12px;color:#b9c0cf;font-size:14px}
.gauge-top strong{font-size:24px;color:var(--text)}
.bar{height:6px;background:#222938;border-radius:99px;overflow:hidden;margin-bottom:9px}
.bar i{display:block;height:100%;background:var(--accent);border-radius:99px;transition:width .6s}
.bar.warn i{background:var(--warn)}.bar.bad i{background:var(--bad)}
.gauge small,.stat small{color:#667084;font-size:12px}
.stat span{color:#8b94a8;font-size:13px}
.stat strong{display:block;font-size:24px;margin:8px 0 4px}

/* Tableaux et listes */
table{width:100%;border-collapse:collapse;font-size:14px}
th{text-align:left;color:#707a8e;font-weight:500;font-size:12px;padding-bottom:8px}
td{padding:8px 0;border-top:1px solid var(--line)}
th:not(:first-child),td:not(:first-child){text-align:right}
.events{list-style:none;margin:0;padding:0}
.events li{display:flex;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line);font-size:14px}
.events li:first-child{border-top:0;padding-top:0}
.events span{flex:1}
.events time{color:#707a8e;font-size:12px}
.events i{box-shadow:none!important}
.info{display:grid;grid-template-columns:repeat(4,1fr);padding:0}
.info div{padding:18px 20px;border-right:1px solid var(--line)}
.info div:last-child{border:0}
.info span{display:block;color:#707a8e;font-size:12px;margin-bottom:6px}
.info strong{font-size:14px;word-break:break-word}
footer{text-align:center;color:#4f5869;font-size:12px;margin:45px 0 10px}

@media(max-width:800px){
  .services,.gauges,.stats,.info,.two{grid-template-columns:1fr}
  .hero{align-items:flex-start;flex-direction:column}
  .info div{border-right:0;border-bottom:1px solid var(--line)}
  .topbar{padding:0 18px}
  .mc{grid-template-columns:1fr}
  h1,.hero h1{font-size:26px}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
