/* =============================================================================
   noxium-theme.css — identité visuelle Noxium, commune au panel et au futur site
   -----------------------------------------------------------------------------
   Pour réutiliser le style ailleurs (site noxium.cc, futur bot…) :
     <link rel="stylesheet" href="noxium-theme.css">
   Pour changer l'apparence partout : modifie seulement les variables de :root.
   Contient : couleurs, polices, texte, boutons, cartes, grilles, formulaires,
   badges, messages, tableaux et petites classes utilitaires.
   Le panel ajoute sa mise en page dans panel.css (barre latérale, onglets…).
   ============================================================================= */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
  /* Fonds et surfaces */
  --bg: #0a0d12;
  --bg-deep: #080b10;
  --panel: #11161e;
  --panel-2: #161c26;
  --field: #0b1017;
  --line: #222b38;
  --line-soft: #1a212c;
  --line-strong: #3a4657;

  /* Texte */
  --text: #e4e9f0;
  --muted: #8592a3;
  --faint: #5b6676;

  /* Couleur principale et états */
  --accent: #5ee0b0;
  --accent-ink: #062418;
  --accent-soft: rgba(94, 224, 176, .1);
  --accent-ring: rgba(94, 224, 176, .35);
  --warn: #f2b84b;
  --warn-soft: rgba(242, 184, 75, .1);
  --bad: #ff6b6b;
  --bad-soft: rgba(255, 107, 107, .1);
  --bad-line: rgba(255, 107, 107, .35);
  --info: #7aa7ff;
  --discord: #5865f2;

  /* Formes et polices */
  --radius: 10px;
  --radius-sm: 8px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* --- Base --- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 13px; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
small, .muted { color: var(--muted); }
summary { cursor: pointer; }

/* --- Logo « noxium /panel » --- */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--text); }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.brand.lg { font-size: 18px; justify-content: center; }

/* --- Cartes et grilles --- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid > .card + .card { margin-top: 0; }
.card.danger-zone { border-color: var(--bad-line); }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* --- Jauges --- */
.bar { height: 6px; background: #1d2531; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }

/* --- Badges (états) --- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-family: var(--mono); background: #1b2330; color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online, .pill.ok { color: var(--accent); background: var(--accent-soft); }
.pill.stopped, .pill.absent, .pill.errored, .pill.bad { color: var(--bad); background: var(--bad-soft); }
.pill.launching, .pill.warn, .pill.running { color: var(--warn); background: var(--warn-soft); }
.pill.plain::before { display: none; }

/* --- Tableaux --- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--mono); font-size: 13px; }
td.actions { text-align: right; }
.table-wrap { overflow-x: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 13px; word-break: break-all; }

/* --- Formulaires --- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%; background: var(--field); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; font: inherit; font-size: 14px;
}
textarea { font-family: var(--mono); font-size: 13px; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-ring); border-color: var(--accent); }
input[type=file] { color: var(--muted); font-size: 14px; max-width: 100%; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; margin: 6px 0; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.input-auto { width: auto; }
.input-grow { width: auto; flex: 1; min-width: 170px; }
.row.nowrap { flex-wrap: nowrap; }
.row.bottom { align-items: end; }

/* --- Boutons --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--line-strong); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.discord { background: var(--discord); border-color: var(--discord); color: #fff; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.lg { padding: 11px 16px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* --- Messages --- */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 1px solid; text-align: left; }
.flash.ok { background: rgba(94, 224, 176, .08); border-color: rgba(94, 224, 176, .3); color: #b8f5dc; }
.flash.err { background: rgba(255, 107, 107, .08); border-color: var(--bad-line); color: #ffc9c9; }
.flash.warn { background: rgba(242, 184, 75, .08); border-color: rgba(242, 184, 75, .35); color: #ffe2a8; }

/* --- Utilitaires (espacements, tailles) --- */
.mt-0 { margin-top: 0; }
.mt-s { margin-top: 10px; }
.mt-m { margin-top: 14px; }
.mt-l { margin-top: 20px; }
.mt-xl { margin-top: 28px; }
.mb-s { margin-bottom: 6px; }
.mb-m { margin-bottom: 12px; }
.m-0 { margin: 0; }
.text-s { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-right { text-align: right; }
.mt-neg { margin-top: -6px; }
.align-end { align-items: end; }
[hidden] { display: none !important; }
.list-steps { padding-left: 18px; margin: 0; font-size: 14px; line-height: 1.7; }
.line-item { font-size: 14px; padding: 3px 0; }
.line-item.small { font-size: 13px; }

@media (max-width: 1000px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none; }
}
