/* 🌈 STYLE GLOBAL */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top left, #ff00c8, #000428 80%);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* TITRES PRINCIPAUX */
h1 {
  text-align: center;
  background: linear-gradient(45deg, #ff00c8, #00e0ff);
  -webkit-background-clip: text;
  color: transparent;
  margin: 30px 0;
  font-weight: 700;
}

/* GRILLE DE CARTES */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 40px;
}

/* CARTES INDIVIDUELLES */
.card {
  background: rgba(10, 10, 30, 0.9);
  border: 1px solid #00e0ff55;
  border-radius: 16px;
  box-shadow: 0 0 25px #00e0ff33;
  padding: 20px;
  text-align: left;
  transition: 0.3s;
  backdrop-filter: blur(6px);
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px #ff00c855;
}
.card h3 {
  margin-top: 0;
  color: #00e0ff;
  font-size: 1.2em;
  font-weight: 600;
}

/* PROGRESS BAR (CPU, RAM, etc.) */
.progress {
  background: #111;
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin: 10px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #00e0ff, #ff00c8);
}

/* TABLES */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  margin-top: 8px;
}
th, td {
  padding: 8px;
  border-bottom: 1px solid #00e0ff33;
  text-align: left;
}
th {
  color: #00e0ff;
  font-weight: 600;
}
td {
  color: #ccc;
}

/* BLOCS DE TEXTE */
pre {
  text-align: left;
  background: rgba(0, 0, 0, .3);
  color: #00e0ff;
  padding: 10px;
  border-radius: 8px;
  overflow: auto;
  max-height: 220px;
  font-size: 0.85em;
}

/* PETIT TEXTE */
small { color: #aaa; }

/* BOUTONS */
button {
  background: #00e0ff;
  border: none;
  color: #000;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
}
button:hover {
  background: #ff00c8;
  color: #fff;
  box-shadow: 0 0 10px #ff00c8;
}

/* EN-TÊTE ET PIED DE PAGE */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 40px;
}
.header .info {
  color: #aaa;
  font-size: 0.9em;
}
footer {
  text-align: center;
  margin: 50px 0;
  font-size: 0.85em;
  color: #888;
}

/* SCROLL ET ANCRAGE */
html, body {
  height: 100%;
}
.card {
  scroll-margin-top: 80px;
}
h3::before {
  content: "";
  display: block;
  height: 40px;
  margin-top: -40px;
  visibility: hidden;
}

/* STATUTS ET CHARGEMENT */
.pending {
  color: #888;
  font-style: italic;
}
.status-ok {
  color: #00ff9d;
  font-weight: bold;
}
.status-warn {
  color: #ffb100;
  font-weight: bold;
}
.status-down {
  color: #ff4b4b;
  font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .dashboard {
    padding: 20px;
    grid-template-columns: 1fr;
  }
  .header {
    flex-direction: column;
    gap: 10px;
  }
}
