
:root {
  color-scheme: dark;
  --plane:      #0d0d0d;
  --surface:    #15151a;
  --surface-2:  #1c1c22;
  --ink:        #f0efec;
  --ink-2:      #c3c2b7;
  --muted:      #898781;
  --grid:       #2c2c2a;
  --axis:       #383835;
  --accent:     #c98500;
  --good:       #0ca30c;
  --warning:    #fab219;
  --serious:    #ec835a;
  --critical:   #d03b3b;
  --ring:       rgba(255,255,255,0.10);
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Ossature --- */
.bandeau {
  border-bottom: 1px solid var(--ring); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.bandeau-corps {
  max-width: 1100px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.marque {
  font-family: var(--mono); font-size: 13px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  white-space: nowrap;
}
nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav a {
  padding: 6px 11px; border-radius: 6px; color: var(--ink-2);
  font-size: 14px; white-space: nowrap;
}
nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
nav a.actif { background: var(--surface-2); color: var(--accent); font-weight: 600; }
.moi { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.moi img { width: 26px; height: 26px; border-radius: 50%; }

main { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }
h1 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 30px 0 12px; letter-spacing: -.01em; }
.sous-titre { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* --- Classification --- */
.classification {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 4px;
  display: inline-block; border: 1px solid var(--ring); color: var(--ink-2);
}
.cl-3, .cl-4, .cl-5 { color: var(--warning); border-color: rgba(250,178,25,.35); }
.cl-5 { color: var(--critical); border-color: rgba(208,59,59,.4); }

/* --- Tuiles de statistiques --- */
.tuiles {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.tuile {
  background: var(--surface); border: 1px solid var(--ring);
  border-radius: 10px; padding: 14px 16px;
}
.tuile .etiquette {
  font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; margin-bottom: 4px;
}
.tuile .valeur { font-size: 30px; font-weight: 600; line-height: 1.1; }
.tuile .note { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* --- Cartes et tableaux --- */
.carte {
  background: var(--surface); border: 1px solid var(--ring);
  border-radius: 10px; padding: 18px; margin-bottom: 14px;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 12px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); font-weight: 600;
  padding: 0 10px 8px; border-bottom: 1px solid var(--axis);
}
td { padding: 9px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.mono { font-family: var(--mono); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* --- Étiquettes d'état --- */
.etat {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ring);
  color: var(--ink-2); white-space: nowrap;
}
.etat::before { content: "●"; font-size: 9px; }
.etat.bon::before { color: var(--good); }
.etat.attention::before { color: var(--warning); }
.etat.grave::before { color: var(--serious); }
.etat.critique::before { color: var(--critical); }

/* --- Alerte de site --- */
.alerte {
  border: 1px solid rgba(208,59,59,.45); background: rgba(208,59,59,.08);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 18px;
}
.alerte .titre { color: var(--critical); font-weight: 600; }

/* --- Graphique --- */
.graphique { width: 100%; height: auto; display: block; }
.barre { fill: var(--accent); transition: opacity .12s; }
.barre:hover { opacity: .75; }
.axe { stroke: var(--axis); stroke-width: 1; }
.tick { fill: var(--muted); font-size: 10px; font-family: var(--sans); }

details { margin-top: 12px; }
summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
summary:hover { color: var(--ink); }

/* --- Recherche --- */
.recherche { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.recherche input, .recherche select {
  background: var(--surface); border: 1px solid var(--ring); color: var(--ink);
  border-radius: 7px; padding: 8px 11px; font-size: 14px; font-family: var(--sans);
}
.recherche input { flex: 1; min-width: 180px; }
.recherche button {
  background: var(--accent); color: #11110c; border: 0; border-radius: 7px;
  padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer;
  font-family: var(--sans);
}
.recherche button:hover { filter: brightness(1.1); }

.vide { color: var(--muted); text-align: center; padding: 34px 10px; font-size: 14px; }
.expurge {
  font-family: var(--mono); color: var(--muted);
  background: var(--surface-2); padding: 1px 5px; border-radius: 3px;
}
.corps-doc { white-space: pre-wrap; word-wrap: break-word; }
.champ { margin-bottom: 16px; }
.champ .nom {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 3px;
}
.pied {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--grid);
  color: var(--muted); font-size: 12px; text-align: center;
}

/* --- Connexion --- */
.connexion {
  min-height: 82vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
}
.connexion .ecran {
  font-family: var(--mono); color: var(--accent); font-size: 12px;
  line-height: 1.75; margin-bottom: 26px; white-space: pre;
  overflow-x: auto; max-width: 100%;
}
.bouton {
  display: inline-block; background: var(--accent); color: #11110c;
  padding: 11px 24px; border-radius: 8px; font-weight: 600;
}
.bouton:hover { text-decoration: none; filter: brightness(1.1); }

@media (max-width: 620px) {
  .bandeau-corps { padding: 9px 12px; gap: 9px; }
  main { padding: 16px 12px 48px; }
  .tuile .valeur { font-size: 25px; }
  nav a { padding: 5px 9px; font-size: 13px; }
  .cacher-mobile { display: none; }
}
