/* QG Hermes : thème sombre inspiré du tableau de bord de Melvynx, sans police ni script externe. */
:root {
  --bg: #0b0b0f; --panel: #131318; --panel-2: #191920; --line: #24242d;
  --text: #ececf1; --muted: #8b8b98; --accent: #6d6af7; --accent-soft: #6d6af722;
  --ok: #22c55e; --bad: #ef4444; --warn: #f59e0b; --radius: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -0.02em; }
h3 { font-size: 16px; margin: 0; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.center { text-align: center; justify-content: center; }

/* Barre latérale */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--bg); border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; padding: 4px 10px 18px; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-weight: 800; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #cfcfd8; }
.nav-item:hover { background: var(--panel); }
.nav-item.active { background: var(--panel-2); color: var(--text); }
.nav-item.soon { color: var(--muted); }
.pill { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.logout { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); }
.logout button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.menu-toggle, .menu-button { display: none; }

/* Icônes en CSS pur (pas de dépendance) */
.icon { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); display: inline-grid; place-items: center; flex: none; font-size: 15px; }
.nav-item .icon { width: 24px; height: 24px; border-radius: 6px; font-size: 13px; }
.icon-home::before { content: "⌂"; } .icon-calendar::before { content: "▦"; } .icon-flame::before { content: "✦"; }
.icon-film::before { content: "▶"; } .icon-chart::before { content: "▲"; } .icon-news::before { content: "≡"; }
.icon-inbox::before { content: "✉"; } .icon-shield::before { content: "◈"; } .icon-server::before { content: "▤"; }
.icon-clock::before { content: "◷"; } .icon-users::before { content: "◎"; }

/* Contenu */
.content { margin-left: 250px; padding: 34px 40px 60px; max-width: 1400px; }
.page-head { margin-bottom: 26px; }
.page-head .muted { max-width: 760px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; display: block; }
.grid > .card { margin-bottom: 0; min-width: 0; overflow: hidden; }
.card-head > div { min-width: 0; }
.card.link:hover { border-color: #34343f; }
.card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.card-head .muted { font-size: 13px; }
.arrow { margin-left: auto; color: var(--muted); }
.empty { color: var(--muted); margin: 0; font-size: 14px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); } .warn { color: var(--warn); }
.error { color: #fca5a5; font-size: 14px; margin: 0; }

.meters { display: grid; gap: 12px; }
.meter { display: grid; grid-template-columns: 80px minmax(40px, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.meter b { white-space: nowrap; }
.meter span { color: var(--muted); }
progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--panel-2); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div, .stat { display: flex; flex-direction: column; gap: 2px; }
.stats b, .stat b { font-size: 26px; letter-spacing: -0.02em; }
.stats span { color: var(--muted); font-size: 12px; }

.list { margin: 0; padding-left: 18px; color: #cfcfd8; }
.rows { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.rows li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #22c55e1f; color: #4ade80; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.tile:hover { border-color: #3a3a46; }
.tile-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.tile-title { margin: 0; font-weight: 600; }
.hook { margin: 0; font-size: 14px; color: #d8d8e0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td a { color: #a5a3ff; white-space: nowrap; }
td.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfcfd8; }

.prose pre { white-space: pre-wrap; word-wrap: break-word; font-family: inherit; margin: 0; font-size: 14px; line-height: 1.6; }

/* Connexion */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 16px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.login-card input { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--text); font: inherit; font-size: 16px; }
.login-card input:focus { outline: 2px solid var(--accent); border-color: transparent; }
button.primary { background: var(--accent); color: white; border: 0; border-radius: 10px; padding: 12px; font: inherit; font-weight: 600; cursor: pointer; }

/* Téléphone */
@media (max-width: 900px) {
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .content { margin-left: 0; padding: 64px 16px 40px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .menu-toggle:checked ~ .sidebar { transform: none; }
  .menu-button { display: grid; place-items: center; position: fixed; top: 12px; left: 12px; z-index: 20; width: 40px; height: 40px;
    border-radius: 10px; background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-size: 18px; }
  h1 { font-size: 24px; }
}
