/* ============================================================
   SECTEUR 47 - Charte graphique
   Fonds sombres, couleurs néon, typographie Inter
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --bg: #070b14;
  --bg-2: #0c1220;
  --bg-3: #111a2e;
  --card: #0e1626;
  --card-hover: #131e33;
  --border: #1c2a45;
  --border-neon: #00ff9d;

  --neon-green: #00ff9d;
  --neon-cyan: #00d4ff;
  --neon-purple: #a855f7;
  --neon-pink: #ff2d95;
  --neon-orange: #ff9f1c;
  --neon-red: #ff4d5e;
  --neon-gold: #ffd166;

  --text: #e8eefc;
  --text-dim: #8b9cc0;
  --text-faint: #5a6b8f;

  --danger: #ff4d5e;
  --success: #00ff9d;
  --warning: #ff9f1c;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --glow-green: 0 0 18px rgba(0, 255, 157, 0.35);
  --glow-cyan: 0 0 18px rgba(0, 212, 255, 0.3);
  --glow-red: 0 0 18px rgba(255, 77, 94, 0.35);

  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 212, 255, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(168, 85, 247, 0.06), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

.hidden { display: none !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

a { color: var(--neon-cyan); text-decoration: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-green), #00c97e);
  color: #04120c;
  border: none;
  font-weight: 800;
  box-shadow: var(--glow-green);
}
.btn-primary:hover { color: #04120c; filter: brightness(1.1); }

.btn-cyan {
  background: linear-gradient(135deg, var(--neon-cyan), #0096d4);
  color: #041016;
  border: none;
  font-weight: 800;
  box-shadow: var(--glow-cyan);
}
.btn-cyan:hover { color: #041016; filter: brightness(1.1); }

.btn-danger {
  background: transparent;
  border-color: rgba(255, 77, 94, 0.5);
  color: var(--danger);
}
.btn-danger:hover { border-color: var(--danger); color: #fff; background: rgba(255, 77, 94, 0.15); }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--neon-cyan); border-color: var(--neon-cyan); }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 6px 9px; }

/* ---------- Écran de connexion ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 500px at 20% 20%, rgba(0, 255, 157, 0.08), transparent 60%),
    radial-gradient(700px 500px at 80% 80%, rgba(0, 212, 255, 0.08), transparent 60%),
    var(--bg);
  z-index: 50;
}

.login-box {
  width: min(400px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 34px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan), var(--neon-purple));
}

.login-logo { position: relative; width: 84px; height: 84px; margin: 0 auto 16px; }
.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--neon-green);
  animation: spin 14s linear infinite;
  box-shadow: var(--glow-green);
}
.logo-ring.small { inset: 0; animation-duration: 8s; }
.logo-s47 {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--neon-green);
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.7);
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-title { font-size: 32px; font-weight: 900; letter-spacing: 2px; }
.login-title span { color: var(--neon-green); text-shadow: 0 0 20px rgba(0, 255, 157, 0.6); }
.login-subtitle {
  font-size: 11px; letter-spacing: 3px; color: var(--text-faint);
  margin: 8px 0 26px; font-weight: 600;
}

.login-box form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.login-box label { font-size: 12px; color: var(--text-dim); font-weight: 600; margin-top: 6px; }
.login-box input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s;
}
.login-box input:focus { border-color: var(--neon-green); box-shadow: var(--glow-green); }
.login-box .btn { margin-top: 18px; padding: 13px; }

.login-error { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 12px; }
.login-loader span {
  display: inline-flex;
  animation: spin 1s linear infinite;
}
.login-loader span svg {
  width: 30px; height: 30px;
  color: var(--neon-green);
  filter: drop-shadow(0 0 8px rgba(0, 255, 157, 0.7));
}

/* ---------- Cinématique empreinte (darkweb) ---------- */
.fp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(circle at 50% 40%, rgba(0, 20, 15, 0.95), rgba(0, 0, 0, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
}
.fp-inner { text-align: center; }
.fp-scanner {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto;
  color: var(--neon-green);
}
.fp-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.35));
}
.fp-svg .r {
  stroke-width: 2.6;
  stroke-linecap: round;
}
.r1 { stroke-dasharray: 300 30; }
.r2 { stroke-dasharray: 220 40; }
.r3 { stroke-dasharray: 160 36; }
.r4 { stroke-dasharray: 120 32; }
.r5 { stroke-dasharray: 90 28; }
.r6 { stroke-dasharray: 60 22; }
.r7 { stroke-dasharray: 40 16; }
.fp-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--neon-green);
  box-shadow: 0 0 16px 5px rgba(0, 255, 157, 0.7);
  animation: fpScan 1.8s linear infinite;
}
@keyframes fpScan {
  0%   { top: 2%; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 97%; opacity: 0; }
}
.fp-ring {
  position: absolute;
  inset: -14px;
  border: 2px solid rgba(0, 255, 157, 0.4);
  border-radius: 50%;
  animation: fpRing 1.8s ease-out infinite;
}
@keyframes fpRing {
  0%   { transform: scale(0.85); opacity: 0.9; }
  100% { transform: scale(1.3); opacity: 0; }
}
.fp-status {
  margin-top: 26px;
  color: var(--neon-green);
  letter-spacing: 3px;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.6);
  animation: fpBlink 1.1s steps(2) infinite;
  position: relative;
}
@keyframes fpBlink { 50% { opacity: 0.45; } }
.fp-status.ok  { color: #7dffb0; animation: none; }
.fp-status.err { color: var(--danger); text-shadow: 0 0 10px rgba(255, 77, 94, 0.7); animation: none; }

/* Effet glitch sur le texte */
.fp-status.glitch::before,
.fp-status.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  width: 100%;
  overflow: hidden;
}
.fp-status.glitch::before {
  color: rgba(255, 0, 255, 0.8);
  transform: translate(-2px, -1px);
  clip-path: inset(0 0 60% 0);
  animation: fpGlitchA 0.3s steps(2) infinite;
}
.fp-status.glitch::after {
  color: rgba(0, 212, 255, 0.8);
  transform: translate(2px, 1px);
  clip-path: inset(60% 0 0 0);
  animation: fpGlitchB 0.4s steps(2) infinite;
}
@keyframes fpGlitchA {
  0%   { clip-path: inset(0 0 55% 0); }
  25%  { clip-path: inset(20% 0 40% 0); transform: translate(-3px, 1px); }
  50%  { clip-path: inset(50% 0 10% 0); }
  75%  { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
  100% { clip-path: inset(30% 0 30% 0); }
}
@keyframes fpGlitchB {
  0%   { clip-path: inset(70% 0 0 0); }
  25%  { clip-path: inset(40% 0 20% 0); transform: translate(3px, -1px); }
  50%  { clip-path: inset(10% 0 50% 0); }
  75%  { clip-path: inset(55% 0 5% 0); transform: translate(-2px, 1px); }
  100% { clip-path: inset(25% 0 40% 0); }
}
.fp-sub {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(0, 255, 157, 0.5);
}
.fp-dot { animation: fpDot 0.6s steps(1) infinite; }
@keyframes fpDot { 50% { opacity: 0; } }

/* ---------- Application ---------- */
#app { min-height: 100vh; display: flex; flex-direction: column; }

/* Alerte du boss (spam affiché à tous) */
.boss-alert {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, rgba(255, 77, 94, 0.95), rgba(255, 159, 28, 0.95));
  color: #fff;
  font-weight: 800;
  text-align: center;
  padding: 10px 14px;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(255, 77, 94, 0.35);
  animation: bossPulse 1.2s ease-in-out infinite;
}
@keyframes bossPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: rgba(10, 16, 30, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo .logo-ring { position: relative; width: 38px; height: 38px; }
.logo .logo-s47 { font-size: 13px; }
.logo-text { font-size: 19px; font-weight: 900; letter-spacing: 1px; }
.logo-text b { color: var(--neon-green); text-shadow: 0 0 12px rgba(0, 255, 157, 0.5); }

.btn-chat {
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--neon-cyan);
  font-weight: 700;
}
.btn-chat:hover { background: rgba(0, 212, 255, 0.1); border-color: var(--neon-cyan); }

.header-right { position: relative; }
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 8px 6px 6px;
  cursor: pointer;
  transition: border-color 0.18s;
}
.user-badge:hover { border-color: var(--neon-cyan); }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
  color: #04120c;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.15; }
.user-name { font-weight: 700; font-size: 13px; }
.user-role { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; }
.user-menu-btn { background: none; border: none; color: var(--text-dim); font-size: 13px; cursor: pointer; padding: 4px 6px; }

.dropdown {
  position: absolute;
  right: 0; top: calc(100% + 10px);
  min-width: 230px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 40;
  animation: fadeDown 0.18s ease;
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dropdown-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  display: flex; flex-direction: column;
}
.dropdown-header b { font-size: 14px; }
.dropdown-header span { font-size: 11px; color: var(--neon-cyan); text-transform: uppercase; letter-spacing: 1px; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--card-hover); color: var(--neon-cyan); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 8px; }

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 22px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  position: sticky;
  top: 63px;
  z-index: 25;
}
.tab {
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: 50px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.15), rgba(0, 212, 255, 0.12));
  color: var(--neon-green);
  border-color: rgba(0, 255, 157, 0.35);
  text-shadow: 0 0 10px rgba(0, 255, 157, 0.4);
}

/* Main */
.main { flex: 1; padding: 22px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
  font-family: var(--mono);
}
.footer .footer-user { color: var(--text-dim); }

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(0, 212, 255, 0.3); }
.card.compact { padding: 12px 16px; }
.card.compact .card-title { margin-bottom: 8px; font-size: 13px; }
.card-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .spacer { flex: 1; }
.th-sub {
  display: block;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.5px;
  text-transform: none;
  color: var(--text-faint);
  margin-top: 2px;
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Stat cards */
.stat-card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.15), transparent 70%);
}
.stat-card .stat-label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.stat-card .stat-value { font-size: 30px; font-weight: 900; margin-top: 6px; font-family: var(--mono); }
.stat-card .stat-sub { font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.stat-card.green .stat-value { color: var(--neon-green); text-shadow: 0 0 18px rgba(0,255,157,.4); }
.stat-card.cyan .stat-value { color: var(--neon-cyan); text-shadow: 0 0 18px rgba(0,212,255,.4); }
.stat-card.purple .stat-value { color: var(--neon-purple); text-shadow: 0 0 18px rgba(168,85,247,.4); }
.stat-card.orange .stat-value { color: var(--neon-orange); text-shadow: 0 0 18px rgba(255,159,28,.4); }
.stat-card.gold .stat-value { color: var(--neon-gold); text-shadow: 0 0 18px rgba(255,209,102,.4); }
.stat-card.red .stat-value { color: var(--danger); text-shadow: 0 0 18px rgba(255,77,94,.4); }

/* ---------- Tableaux ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
}
.table-wrap.scroll {
  overflow-y: auto;
  max-height: 400px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
thead th {
  background: var(--bg-2);
  color: var(--neon-cyan);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 11px 12px;
  text-align: left;
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(28, 42, 69, 0.5);
  white-space: nowrap;
}
tbody tr:hover { background: var(--card-hover); }
tbody tr:last-child td { border-bottom: none; }
tfoot td {
  background: var(--bg-2);
  font-weight: 800;
  padding: 11px 12px;
  border-top: 1px solid var(--border);
  color: var(--neon-gold);
}
tr.total-row td { background: rgba(0, 255, 157, 0.06); font-weight: 800; color: var(--neon-green); }
.num { text-align: right; font-family: var(--mono); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}
.badge-gold { background: rgba(255, 209, 102, 0.12); color: var(--neon-gold); border-color: rgba(255, 209, 102, 0.4); }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: var(--neon-purple); border-color: rgba(168, 85, 247, 0.4); }
.badge-orange { background: rgba(255, 159, 28, 0.12); color: var(--neon-orange); border-color: rgba(255, 159, 28, 0.4); }
.badge-blue { background: rgba(0, 212, 255, 0.12); color: var(--neon-cyan); border-color: rgba(0, 212, 255, 0.4); }
.badge-green { background: rgba(0, 255, 157, 0.12); color: var(--neon-green); border-color: rgba(0, 255, 157, 0.4); }
.badge-red { background: rgba(255, 77, 94, 0.12); color: var(--danger); border-color: rgba(255, 77, 94, 0.4); }
.badge-gray { background: rgba(139, 156, 192, 0.1); color: var(--text-dim); border-color: rgba(139, 156, 192, 0.3); }

.grade-Boss { color: var(--neon-gold); font-weight: 800; text-shadow: 0 0 12px rgba(255,209,102,.5); }
.grade-Bras\ droit { color: var(--neon-purple); font-weight: 700; text-shadow: 0 0 12px rgba(168,85,247,.5); }
.grade-Haut\ Grade { color: var(--neon-orange); font-weight: 700; text-shadow: 0 0 12px rgba(255,159,28,.5); }
.grade-Soldat { color: var(--neon-cyan); font-weight: 600; text-shadow: 0 0 10px rgba(0,212,255,.4); }
.grade-Apprenti { color: var(--text-dim); font-weight: 600; text-shadow: 0 0 10px rgba(139,156,192,.3); }

/* ---------- Alertes ---------- */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.alert-warning { background: rgba(255, 159, 28, 0.08); border-color: rgba(255, 159, 28, 0.4); color: var(--neon-orange); }
.alert-danger { background: rgba(255, 77, 94, 0.08); border-color: rgba(255, 77, 94, 0.4); color: var(--danger); }
.alert-info { background: rgba(0, 212, 255, 0.08); border-color: rgba(0, 212, 255, 0.35); color: var(--neon-cyan); }
.alert-success { background: rgba(0, 255, 157, 0.08); border-color: rgba(0, 255, 157, 0.4); color: var(--neon-green); }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.form-field input, .form-field select, .form-field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--neon-cyan); }
.form-field textarea { resize: vertical; min-height: 60px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 18px;
  animation: fadeIn 0.16s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: popIn 0.2s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-3);
}
.modal-header h3 { font-size: 15px; font-weight: 800; letter-spacing: 0.5px; color: var(--neon-green); }
.modal-close { background: none; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 20px; }

/* ---------- Chat ---------- */
.chat-window {
  position: fixed;
  right: 18px; bottom: 70px;
  width: min(380px, 94vw);
  height: min(520px, 70vh);
  background: var(--bg-3);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow), var(--glow-cyan);
  z-index: 55;
  overflow: hidden;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 16px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), rgba(0, 255, 157, 0.1));
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  font-size: 13px;
  color: var(--neon-cyan);
}
.chat-header button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 15px; }
.chat-header button:hover { color: var(--danger); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}
.chat-msg .meta { display: flex; gap: 8px; font-size: 10px; margin-bottom: 3px; }
.chat-msg .meta .name { font-weight: 800; color: var(--neon-cyan); }
.chat-msg .meta .time { color: var(--text-faint); font-family: var(--mono); }
.chat-msg.own { align-self: flex-end; background: rgba(0, 255, 157, 0.12); border: 1px solid rgba(0, 255, 157, 0.3); }
.chat-msg.other { align-self: flex-start; background: var(--card); border: 1px solid var(--border); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
}
.chat-input input:focus { border-color: var(--neon-cyan); }

/* ---------- Toasts ---------- */
#toast-container {
  position: fixed;
  top: 80px; right: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid;
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease;
  max-width: 340px;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.toast.success { background: rgba(0, 255, 157, 0.1); border-color: var(--neon-green); color: var(--neon-green); }
.toast.error { background: rgba(255, 77, 94, 0.1); border-color: var(--danger); color: var(--danger); }
.toast.info { background: rgba(0, 212, 255, 0.1); border-color: var(--neon-cyan); color: var(--neon-cyan); }

/* ---------- Graphique en barres ---------- */
.bar-chart { display: flex; align-items: flex-end; gap: 18px; height: 160px; padding: 10px 6px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; max-width: 60px; height: 100%; background: var(--bg-2); border-radius: 6px 6px 0 0; display: flex; align-items: flex-end; overflow: hidden; position: relative; }
.bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--neon-cyan), rgba(0, 212, 255, 0.2));
  transition: height 0.4s ease;
}
.bar-col:nth-child(2) .bar-fill { background: linear-gradient(180deg, var(--neon-green), rgba(0, 255, 157, 0.2)); }
.bar-col:nth-child(3) .bar-fill { background: linear-gradient(180deg, var(--neon-purple), rgba(168, 85, 247, 0.2)); }
.bar-col:nth-child(4) .bar-fill { background: linear-gradient(180deg, var(--neon-orange), rgba(255, 159, 28, 0.2)); }
.bar-val { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--text); }
.bar-label { font-size: 11px; color: var(--text-faint); font-weight: 700; }

/* ---------- Carte des opérations ---------- */
.op-map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(300px 200px at 30% 40%, rgba(0, 255, 157, 0.06), transparent),
    radial-gradient(300px 200px at 70% 60%, rgba(0, 212, 255, 0.06), transparent),
    repeating-linear-gradient(45deg, var(--bg-2) 0 24px, var(--bg-3) 24px 48px);
  min-height: 260px;
}
.op-map .map-grid-line {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
}
.op-map .map-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 90px; opacity: 0.06; filter: grayscale(1); }
.map-point {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--neon-green);
  border: 2px solid #04120c;
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.8);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.15s;
  z-index: 2;
}
.map-point:hover { transform: translate(-50%, -50%) scale(1.5); box-shadow: 0 0 18px rgba(0, 212, 255, 0.9); }
.map-point .map-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--neon-green);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  width: max-content;
  max-width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 5;
  box-shadow: var(--shadow);
}
.map-point:hover .map-tooltip { opacity: 1; }
.map-point .map-tooltip b { color: var(--neon-green); display: block; }
.map-point .map-tooltip span { color: var(--text-dim); font-size: 11px; }

/* ---------- LOC ---------- */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.loc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.18s;
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font);
}
.loc-btn .loc-ico { font-size: 30px; filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.5)); }
.loc-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.loc-btn.active { border-color: var(--neon-green); color: var(--neon-green); box-shadow: var(--glow-green); }
.loc-display {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--card);
}
.loc-display img, .loc-display svg { width: 100%; border-radius: var(--radius-sm); }

/* ---------- Hiérarchie ---------- */
.history-text {
  border-left: 3px solid var(--neon-green);
  padding: 6px 18px;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 14px;
}
.grade-card { text-align: center; }
.grade-card .grade-ico { font-size: 34px; margin-bottom: 8px; }
.grade-card .grade-name { font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; }
.grade-card .grade-count { font-family: var(--mono); font-size: 30px; font-weight: 900; }

/* ---------- Contact cards ---------- */
.contact-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.18s;
}
.contact-card:hover { border-color: rgba(0, 212, 255, 0.4); }
.contact-card .contact-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.contact-card .contact-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.contact-card .contact-line svg { width: 14px; }
.contact-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- Section header / toolbar ---------- */
.section-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-title { font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.section-title span { color: var(--neon-green); }
.section-sub { color: var(--text-faint); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

/* ---------- Divers ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-chip {
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.filter-chip:hover { color: var(--text); border-color: var(--text-dim); }
.filter-chip.active { background: var(--neon-green); border-color: var(--neon-green); color: #04120c; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); font-size: 13px; }

.top5-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(28,42,69,.5); }
.top5-item:last-child { border-bottom: none; }
.top5-rank { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-family: var(--mono); background: var(--bg-2); color: var(--neon-cyan); }
.top5-rank.gold { background: rgba(255,209,102,.15); color: var(--neon-gold); }
.top5-rank.silver { background: rgba(200,210,230,.12); color: #c8d2e6; }
.top5-rank.bronze { background: rgba(255,159,28,.15); color: var(--neon-orange); }
.top5-info { flex: 1; }
.top5-name { font-weight: 700; font-size: 13px; }
.top5-sub { font-size: 11px; color: var(--text-faint); }
.top5-val { font-family: var(--mono); font-weight: 800; color: var(--neon-green); font-size: 14px; }

.progress-bar { height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan)); transition: width 0.4s ease; }

.quote { font-family: var(--mono); font-size: 12px; color: var(--text-dim); line-height: 1.8; }
.toggle-link { color: var(--neon-cyan); font-size: 12px; cursor: pointer; font-weight: 700; text-decoration: underline dotted; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .header { padding: 10px 14px; }
  .btn-chat { font-size: 12px; padding: 8px 12px; }
  .tabs { padding: 8px 14px; top: 58px; }
  .tab { padding: 8px 13px; font-size: 12px; }
  .main { padding: 14px; }
  .section-title { font-size: 18px; }
  .stat-card .stat-value { font-size: 24px; }
  .chat-window { right: 10px; bottom: 60px; }
  .login-box { padding: 30px 22px; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .logo-text { font-size: 15px; }
  .user-info { display: none; }
  .footer { flex-direction: column; gap: 4px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ============================================================
   DASHBOARD — design professionnel
   ============================================================ */
.dsh-clock {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-cyan);
  border: 1px solid var(--border);
  background: var(--bg-3);
  border-radius: 10px;
  padding: 8px 14px;
  letter-spacing: 1px;
}

/* --- Valeurs & lignes --- */
.dsh-big { font-family: var(--mono); font-size: 26px; font-weight: 900; }
.dsh-big.gold { color: var(--neon-gold); text-shadow: 0 0 16px rgba(255, 209, 102, 0.25); }
.dsh-big.green { color: var(--neon-green); text-shadow: 0 0 16px rgba(0, 255, 157, 0.25); }
.dsh-green { color: var(--neon-green); }
.dsh-cyan { color: var(--neon-cyan); }
.dsh-red { color: var(--danger); }
.dsh-dim { color: var(--text-dim); }
.dsh-op-name { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.dsh-empty { color: var(--text-faint); font-size: 12px; padding: 6px 0; }

.dsh-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.dsh-row:last-child { border-bottom: none; }
.dsh-item { font-weight: 600; color: var(--text); }
.dsh-fill { flex: 1; height: 1px; border-bottom: 1px dotted rgba(139, 156, 192, 0.3); }
.dsh-rank { width: 30px; text-align: center; font-size: 13px; }
.dsh-rank-med { color: var(--neon-gold); }

/* --- Actions --- */
.dsh-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dsh-del {
  background: none; border: none;
  color: var(--danger); cursor: pointer;
  font-size: 13px; opacity: 0.7;
  padding: 2px 6px;
}
.dsh-del:hover { opacity: 1; }

/* --- Calculateur --- */
.dsh-grid { align-items: stretch; }
.dsh-grid .card { height: 100%; }
.card-sm { padding: 12px 14px; }
.card-sm .card-title { margin-bottom: 10px; font-size: 13px; }
.dsh-calc-list { display: flex; flex-direction: column; gap: 8px; }
.dsh-calc {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  padding: 6px 10px;
}
.dsh-calc-label {
  width: 44px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.dsh-calc-label.plus { color: var(--neon-green); }
.dsh-calc-label.minus { color: var(--danger); }
.dsh-calc .dsh-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  font-size: 12px;
}
.dsh-input {
  flex: 1; min-width: 120px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dsh-input:focus { border-color: var(--neon-cyan); box-shadow: var(--glow-cyan); }
.dsh-calc-result {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  min-width: 92px;
  text-align: right;
}
.dsh-calc-result.plus { color: var(--neon-green); }
.dsh-calc-result.minus { color: var(--danger); }

/* --- Carte : image + points GPS --- */
.map-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; display: block; }
.map-image .map-point {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--neon-red);
  border-radius: 50%;
  border: 2px solid var(--neon-green);
  box-shadow: 0 0 18px rgba(255, 77, 94, 0.5);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: 0.2s;
  z-index: 5;
}
.map-image .map-point:hover { transform: translate(-50%, -50%) scale(1.5); }
.map-image .map-point .tooltip {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--neon-green);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow);
}
.map-image .map-point:hover .tooltip { display: block; }

/* --- Citation --- */
.dsh-quote {
  text-align: center;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--neon-cyan);
  margin-top: 18px;
  text-transform: uppercase;
  opacity: 0.85;
}
.dsh-quote span { color: var(--text-dim); }

/* --- Chiffre d'affaires --- */
.ca-current-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card-hover), var(--card));
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ca-current-value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 900;
  color: var(--neon-green);
  text-shadow: 0 0 14px rgba(0, 255, 157, 0.3);
}
.ca-chart { margin-top: 6px; max-width: 220px; }
.ca-chart svg { width: 100%; height: auto; display: block; }
.ca-txt { font-family: var(--mono); font-size: 8px; fill: var(--text-faint); }
.ca-dot { fill: var(--neon-green); stroke: #041016; stroke-width: 1.2; cursor: pointer; }
.ca-dot:hover { filter: brightness(1.25); }
.ca-dot-now { fill: var(--neon-gold); stroke: var(--neon-cyan); stroke-width: 1.5; cursor: pointer; }
.ca-legend {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 9px;
  color: var(--text-faint);
}
.ca-legend .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.ca-legend .dot.now { background: var(--neon-gold); box-shadow: 0 0 6px rgba(255, 209, 102, 0.6); }
.ca-legend .dot.ok { background: var(--neon-green); }

/* ============================================================
   HIÉRARCHIE — design professionnel
   ============================================================ */

/* --- Vue d'ensemble --- */
.org-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.org-ov-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.org-ov-stack .org-ov { flex: 1; }
.org-ov {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card-hover), var(--card));
  padding: 16px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.org-ov::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), transparent);
  opacity: 0.7;
}
.org-ov:hover { transform: translateY(-2px); border-color: rgba(0, 212, 255, 0.4); }
.org-ov-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}
.org-ov-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin-top: 4px;
}

/* --- Notre histoire --- */
.org-story {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card-hover), var(--card));
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.org-story::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--neon-gold), var(--neon-green));
}
.org-story-ico {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.org-story-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--neon-gold);
  margin-bottom: 8px;
}
.org-story-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text);
  opacity: 0.92;
  margin: 0;
}
.org-story-text b { color: var(--neon-green); font-weight: 800; }

/* --- Cartes de grades --- */
.org-grade {
  --g: #00d4ff;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(170deg, var(--card-hover), var(--card));
  padding: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.org-grade::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--g) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.org-grade:hover {
  transform: translateY(-3px);
  border-color: var(--g);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.org-grade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.org-grade-ico { font-size: 26px; }
.org-grade-count {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 900;
  color: var(--g);
  text-shadow: 0 0 18px color-mix(in srgb, var(--g) 50%, transparent);
}
.org-grade-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.org-grade-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--bg-3);
  overflow: hidden;
}
.org-grade-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--g), color-mix(in srgb, var(--g) 55%, #ffffff));
  box-shadow: 0 0 10px color-mix(in srgb, var(--g) 60%, transparent);
  transition: width 0.5s ease;
}
.org-grade-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
}

/* --- Cartes membres --- */
.org-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.org-member {
  --g: #00d4ff;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  padding: 12px 14px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.org-member:hover {
  transform: translateY(-2px);
  border-color: var(--g);
  background: var(--card-hover);
}
.org-avatar {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 900;
  font-size: 15px;
  color: #041016;
  background: linear-gradient(135deg, var(--g), color-mix(in srgb, var(--g) 45%, #ffffff));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--g) 40%, transparent),
              0 0 16px color-mix(in srgb, var(--g) 35%, transparent);
}
.org-member-body { flex: 1; min-width: 0; }
.org-member-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.org-dot { font-size: 16px; align-self: flex-start; }
.org-dot.on { color: var(--success); text-shadow: 0 0 10px rgba(0, 255, 157, 0.5); }
.org-dot.off { color: var(--text-faint); }

/* --- Responsive --- */
@media (max-width: 820px) {
  .org-overview { grid-template-columns: repeat(2, 1fr); }
  .org-members { grid-template-columns: 1fr; }
}