/* =========================================================
   Helios Application — thème "HUD sci-fi sobre"
   Aucune police ni ressource externe (100 % local, compatible CSP 'self')
   ========================================================= */
:root {
  --bg: #05080d;
  --bg-2: #0a1119;
  --panel: rgba(12, 22, 32, 0.78);
  --line: rgba(94, 230, 255, 0.22);
  --line-strong: rgba(94, 230, 255, 0.55);
  --text: #d6e7f2;
  --muted: #7d93a6;
  --accent: #5ee6ff;
  --accent-2: #9d8cff;
  --ok: #4ff2a4;
  --warn: #ffc857;
  --off: #ff5d73;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(94, 230, 255, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(157, 140, 255, 0.07), transparent 60%),
    linear-gradient(rgba(94, 230, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 230, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Barre supérieure ---------- */
.hud-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  background: rgba(5, 8, 13, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.hud-top::after {           /* ligne de balayage discrète */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: sweep 6s linear infinite;
  opacity: 0.7;
}
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font: 600 15px/1 var(--mono);
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.brand .dim { color: var(--muted); margin: 0 0.35em; }
.brand-mark {
  width: 22px; height: 22px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 12px rgba(94, 230, 255, 0.35);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a {
  position: relative;
  padding: 8px 14px;
  color: var(--muted);
  text-decoration: none;
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.tabs a:hover { color: var(--text); border-color: var(--line); }
.tabs a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--line-strong);
  background: rgba(94, 230, 255, 0.06);
}
.tabs a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -1px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.sys {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px/1 var(--mono);
  color: var(--muted);
  letter-spacing: 0.1em;
}

/* ---------- Structure ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) var(--gutter) 64px;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
}
/* coins "viseur" */
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--accent);
  pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.kicker {
  margin: 0 0 12px;
  font: 12px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.4vw, 44px);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.lead { margin: 0; color: var(--muted); max-width: 62ch; font-size: 17px; }

.hero { margin-bottom: 48px; overflow: hidden; }
.hero .orbit {                   /* orbite décorative (Helios) */
  position: absolute;
  right: -80px; top: 50%;
  width: 320px; height: 320px;
  transform: translateY(-50%);
  border: 1px dashed rgba(94, 230, 255, 0.18);
  border-radius: 50%;
  pointer-events: none;
}
.hero .orbit::before {
  content: "";
  position: absolute;
  inset: 60px;
  border: 1px solid rgba(157, 140, 255, 0.18);
  border-radius: 50%;
}
.hero .orbit::after {
  content: "";
  position: absolute;
  top: -4px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform-origin: 0 164px;
  animation: orbit 18s linear infinite;
}
@keyframes orbit { to { transform: rotate(360deg); } }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  margin: 0;
  font: 600 14px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-head .meta { margin-left: auto; font: 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.08em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ---------- Cartes ---------- */
.card { display: flex; flex-direction: column; gap: 12px; min-height: 200px; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 620; }
.card .platform {
  font: 12px/1.4 var(--mono);
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  font: 12px/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: 0.06em;
}
.card .foot span { white-space: nowrap; }

.badge {
  flex: none;
  padding: 4px 8px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  white-space: nowrap;
}
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.dev { color: var(--accent-2); }
.badge.off { color: var(--off); }
.badge.unknown { color: var(--muted); }

.led {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.led.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2.4s ease-in-out infinite; }
.led.off { background: var(--off); box-shadow: 0 0 6px var(--off); }
.led.warn { background: var(--warn); box-shadow: 0 0 6px var(--warn); }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ---------- Serveurs de jeux ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(94, 230, 255, 0.03);
}
.stat .label { display: block; font: 11px/1 var(--mono); color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.stat .value { display: block; margin-top: 6px; font: 600 20px/1.1 var(--mono); color: var(--text); }
.bar { height: 3px; margin-top: 8px; background: rgba(94, 230, 255, 0.1); }
.bar > span { display: block; height: 100%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }

.address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  font: 14px/1.2 var(--mono);
  color: var(--text);
  overflow: hidden;
}
.address code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn {
  flex: none;
  padding: 6px 10px;
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: rgba(94, 230, 255, 0.1); }

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 200, 87, 0.45);
  background: rgba(255, 200, 87, 0.06);
  color: var(--warn);
  font: 13px/1.5 var(--mono);
}
.notice[hidden] { display: none; }
.empty { color: var(--muted); font: 14px/1.6 var(--mono); }

/* ---------- Pied de page ---------- */
.hud-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding: 18px var(--gutter);
  border-top: 1px solid var(--line);
  font: 12px/1.4 var(--mono);
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ---------- Adaptations ---------- */
@media (max-width: 720px) {
  .hud-top { flex-wrap: wrap; gap: 12px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .tabs a { flex: 1; text-align: center; padding: 10px 6px; font-size: 12px; }
  .sys { margin-left: auto; }
  .hero .orbit { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}

/* ---------- Formulaires (inscription, admin) ---------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font: 12px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  font: 15px/1.4 var(--sans); color: var(--text);
  background: rgba(5, 8, 13, 0.6); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(94, 230, 255, 0.15); }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.btn.big { padding: 12px 18px; font-size: 12px; justify-self: start; }
.btn.ok { color: var(--ok); border-color: rgba(79, 242, 164, 0.6); }
.btn.off { color: var(--off); border-color: rgba(255, 93, 115, 0.6); }
.msg-ok { color: var(--ok); font: 14px/1.5 var(--mono); }
.msg-err { color: var(--off); font: 14px/1.5 var(--mono); }
.note-small { color: var(--muted); font-size: 13px; margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font: 11px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table td .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.checks { display: grid; gap: 6px; font: 13px/1.5 var(--mono); }
.stack { display: grid; gap: 28px; }

/* ---------- Connexion ---------- */
.auth-wrap { display: grid; place-items: center; min-height: calc(100vh - 140px); }
.auth { width: 100%; max-width: 460px; }
.auth h1 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 18px; }
.auth .form { max-width: none; }
.auth-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.auth-tabs[hidden] { display: none; }
.auth-tabs button {
  flex: 1; padding: 10px 8px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--muted); font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
}
.auth-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.form[hidden] { display: none; }
.lien { background: none; border: 0; padding: 0; color: var(--accent); font: 13px/1.4 var(--sans); cursor: pointer; justify-self: start; text-decoration: underline; }

/* ---------- Admin : sondages et logiciels ---------- */
details.creer > summary { list-style: none; display: inline-block; margin-bottom: 14px; }
details.creer > summary::-webkit-details-marker { display: none; }
.q-edit { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; padding: 10px; border: 1px dashed var(--line); margin-bottom: 8px; }
.q-edit input, .q-edit select { font: 14px/1.4 var(--sans); color: var(--text); background: rgba(5,8,13,.6); border: 1px solid var(--line); padding: 8px; }
.q-edit .q-opts { grid-column: 1 / -1; }
.q-edit .q-opts[hidden] { display: none; }
.q-obl { font: 12px var(--mono); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.sondage { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.sondage h3 { font-size: 16px; margin: 0 0 8px; }
.res { margin: 10px 0; }
.barre { display: grid; grid-template-columns: 160px 1fr 90px; gap: 10px; align-items: center; font: 13px var(--mono); margin: 4px 0; }
.jauge { height: 8px; background: rgba(94,230,255,.1); }
.jauge > span { display: block; height: 100%; background: var(--accent); }
.rapport { white-space: pre-wrap; font: 12.5px/1.6 var(--mono); color: var(--text); background: rgba(5,8,13,.5); border: 1px solid var(--line); padding: 14px; max-height: 420px; overflow: auto; }

/* Logo du groupe 3CCB à la place du nom (en-têtes) */
.brand-logo { background: #fff; border-radius: 8px; padding: 4px 10px; line-height: 0; }
.brand-logo img { height: 40px; width: auto; display: block; }
