/* L'Agonie Retrouvée — thème rouge sang / noir */
:root {
    --bg: #0b0606;
    --panel: rgba(22, 12, 12, .88);
    --panel2: #1d1111;
    --line: #3a1a1a;
    --text: #e9dede;
    --muted: #a08c8c;
    --red: #c81e1e;
    --red2: #ff3b3b;
    --ok: #3fae5a;
    --warn: #e0a020;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; }
body {
    min-height: 100vh; display: flex; flex-direction: column;
    background: radial-gradient(ellipse at 50% -10%, #5a0d0d 0%, transparent 60%) var(--bg) fixed;
    color: var(--text); font: 15px/1.6 Inter, system-ui, sans-serif;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
a { color: var(--red2); }
h1, h2, h3, .brand, .btn, .tabs a, .nav nav a { font-family: Oswald, Impact, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.35rem; margin-bottom: .8rem; color: #fff; }
h3 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
p + p { margin-top: .6rem; }
.muted, small { color: var(--muted); font-size: .9em; }
main { flex: 1; width: min(1200px, 100% - 32px); margin: 2rem auto; display: grid; gap: 1.5rem; align-content: start; }
footer { text-align: center; padding: 1.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: .6rem 16px; background: rgba(8, 4, 4, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-size: 1.2rem; }
.brand img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.nav nav { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.nav nav a { color: var(--text); text-decoration: none; padding: .35rem .7rem; border-radius: 6px; }
.nav nav a:hover, .nav nav a.on { background: var(--red); color: #fff; }
.burger { display: none; font-size: 1.6rem; cursor: pointer; }
.tag { --c: var(--muted); display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--c); color: var(--c); }

/* Blocs */
.box, .card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.card { background: var(--panel2); }
.narrow { width: min(460px, 100%); margin: 0 auto; }
.center { text-align: center; }
.danger { border-color: #6b1515; }
.grid { display: grid; gap: 1rem; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.scroll { overflow-x: auto; }

/* Accueil */
.hero { text-align: center; }
.hero img { display: block; width: 100%; aspect-ratio: 3 / 2; max-height: 72vh; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 0 60px rgba(200, 30, 30, .35); }
.lead { font: 500 1.2rem Oswald, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #f0c8c8; margin: 1.2rem 0; }
.ip { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; align-items: center; }
.ip code { font: 700 1.2rem/1 ui-monospace, Consolas, monospace; padding: .8rem 1.1rem; background: rgba(0, 0, 0, .7); border: 1px solid var(--red); border-radius: var(--radius); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.chips li { padding: .45rem .9rem; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; }
.chips b { color: var(--red2); margin-right: .45rem; font-weight: 600; }
.feat i { font-style: normal; font-size: 1.8rem; color: var(--red2); }
.feat h3 { margin: .3rem 0 .4rem; }
.feat p { color: var(--muted); }

/* Boutons et formulaires */
.btn { display: inline-block; cursor: pointer; border: 1px solid var(--red); background: var(--red); color: #fff; padding: .65rem 1.2rem; border-radius: 8px; font-size: .95rem; text-decoration: none; transition: .15s; }
.btn:hover { background: var(--red2); border-color: var(--red2); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.red { background: #5a0f0f; border-color: #8a1a1a; }
.btn.sm { padding: .3rem .7rem; font-size: .8rem; }
.form { display: grid; gap: 1rem; }
.form.cols { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form .full { grid-column: 1 / -1; }
label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
input, select, textarea { font: inherit; color: var(--text); background: #120909; border: 1px solid var(--line); border-radius: 6px; padding: .55rem .7rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); border-color: transparent; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--red); }
input[type=color] { padding: 2px; height: 2.2rem; width: 3rem; }
.inline { display: flex; gap: .4rem; }
.alert { padding: .8rem 1rem; border-radius: 8px; background: #1e1a0c; border: 1px solid var(--warn); }
.alert.ok { background: #0e1e12; border-color: var(--ok); }
.alert.err { background: #260b0b; border-color: var(--red2); }

/* Administration */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: .5rem 1rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.on, .tabs a:hover { color: #fff; border-color: var(--red); }
.list { width: 100%; border-collapse: collapse; }
.list th, .list td { padding: .6rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.list td input:not([type=checkbox]):not([type=color]) { min-width: 160px; }
.list tr.wait { background: rgba(224, 160, 32, .07); }
.actions { display: flex; gap: .4rem; }

/* Statistiques */
.head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.head h1 { margin: 0; }
.live { color: var(--muted); font-size: .85rem; }
.live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: .4rem; }
.live.off::before { background: var(--red2); }
.big { font: 700 2.2rem/1 Oswald, sans-serif; margin: .7rem 0; }
.big small { font-size: 1rem; margin-left: .2rem; }
.bar { height: 6px; background: #2a1717; border-radius: 3px; overflow: hidden; margin: .6rem 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .5s; }
.bar i.warn, .pct.warn { background: var(--warn); }
.bar i.crit, .pct.crit { background: var(--red2); }
.pct { font: 600 .75rem Inter, sans-serif; padding: .1rem .5rem; border-radius: 999px; background: var(--ok); color: #0b0606; }
.chart { width: 100%; height: 130px; margin-top: .6rem; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chart line { stroke: var(--line); stroke-dasharray: 4; }
.chart polyline { fill: none; stroke: var(--red2); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart polygon { fill: rgba(200, 30, 30, .22); }
#memChart polyline { stroke: #e07a5f; }
.kv { width: 100%; border-collapse: collapse; margin-top: .6rem; }
.kv th, .kv td { padding: .55rem .2rem; border-bottom: 1px solid var(--line); text-align: left; }
.kv th { color: var(--muted); font-weight: 400; }
.sep { display: flex; align-items: center; gap: 1rem; font-size: 1rem; color: var(--muted); margin: 0; }
.sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Mobile */
@media (max-width: 760px) {
    .burger { display: block; }
    .nav { flex-wrap: wrap; }
    .nav nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-top: .5rem; }
    #burger:checked ~ nav { display: flex; }
    .hero img { aspect-ratio: 1; content: url(img/logo.webp); }
}
