:root {
  /* Surfaces mates haute lisibilité (zéro backdrop-filter pour soulager le GPU ARM à 0% au repos) */
  --bg-panel: rgba(11, 16, 27, 0.95);
  --bg-card: rgba(20, 28, 44, 0.94);
  --bg-card-hover: rgba(29, 41, 64, 0.98);
  --border-subtle: rgba(255, 255, 255, 0.13);
  --cyan: #00e5ff;
  --online: #10b981;
  --gold: #f59e0b;
  --danger: #ef4444;
  --offline: #64748b;
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0b101b;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* TOPBAR — Grille 3 colonnes (1fr auto 1fr) pour un centrage horizontal absolu des compteurs KPI */
.hub-topbar {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  height: 68px;
  z-index: 900;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  justify-self: start;
}

.hub-logo-orb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(16, 185, 129, 0.18));
  border: 1px solid rgba(0, 229, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.hub-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hub-badge-version {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  letter-spacing: 0.06em;
}

.hub-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 1px;
}

/* KPI PILLS */
.hub-kpis {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
}

.kpi-pill {
  --kpi-glow-rgb: 0, 229, 255;
  --kpi-glow-hex: #00e5ff;
  position: relative;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 6px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.kpi-val-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.kpi-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.kpi-day-delta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  padding: 1.5px 5.5px;
  border-radius: 6px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.kpi-day-delta.is-zero {
  color: rgba(148, 163, 184, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.kpi-day-delta.is-pos {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.48);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.22);
}

.kpi-gold .kpi-day-delta.is-pos {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.24);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.24);
}

.kpi-day-delta.is-neg {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.48);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.22);
}

.kpi-lbl {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.kpi-online {
  --kpi-glow-rgb: 16, 185, 129;
  --kpi-glow-hex: #34d399;
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.10);
  cursor: pointer;
}
.kpi-online .kpi-val { color: var(--online); }
.kpi-online .kpi-day-delta.is-pos {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.24);
  border: 1px solid rgba(52, 211, 153, 0.58);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.26);
}

.kpi-solo {
  --kpi-glow-rgb: 56, 189, 248;
  --kpi-glow-hex: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.42);
  background: rgba(56, 189, 248, 0.10);
  cursor: pointer;
}
.kpi-solo .kpi-val { color: #7dd3fc; }
.kpi-solo .kpi-day-delta.is-pos {
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.24);
  border: 1px solid rgba(125, 211, 252, 0.58);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.24);
}

.kpi-gold {
  --kpi-glow-rgb: 245, 158, 11;
  --kpi-glow-hex: #fbbf24;
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(245, 158, 11, 0.10);
}
.kpi-gold .kpi-val { color: var(--gold); }

.kpi-cyan {
  --kpi-glow-rgb: 0, 229, 255;
  --kpi-glow-hex: #00e5ff;
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.08);
}
.kpi-cyan .kpi-val { color: var(--cyan); }

.kpi-web {
  --kpi-glow-rgb: 168, 85, 247;
  --kpi-glow-hex: #c084fc;
  border-color: rgba(168, 85, 247, 0.42);
  background: rgba(168, 85, 247, 0.10);
  cursor: pointer;
}
.kpi-web .kpi-val { color: #d8b4fe; }
.kpi-web .kpi-day-delta.is-pos {
  color: #f3e8ff;
  background: rgba(168, 85, 247, 0.25);
  border: 1px solid rgba(192, 132, 252, 0.58);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.24);
}

/* EFFET LUMINEUX SUR ÉVOLUTION POSITIVE DES BADGES KPI (Attaque instantanée t=0ms synchro audio + 0% GPU au repos) */
@keyframes kpiPositiveHalo {
  0% {
    border-color: #ffffff;
    background-color: rgba(var(--kpi-glow-rgb), 0.44);
    box-shadow:
      0 0 0 2px rgba(var(--kpi-glow-rgb), 1),
      0 0 26px rgba(var(--kpi-glow-rgb), 0.92),
      0 0 50px rgba(var(--kpi-glow-rgb), 0.52),
      inset 0 0 20px rgba(var(--kpi-glow-rgb), 0.50);
    transform: translateY(-1px) scale(1.055);
  }
  26% {
    border-color: var(--kpi-glow-hex);
    background-color: rgba(var(--kpi-glow-rgb), 0.28);
    box-shadow:
      0 0 0 1.5px rgba(var(--kpi-glow-rgb), 0.9),
      0 0 28px rgba(var(--kpi-glow-rgb), 0.78),
      0 0 52px rgba(var(--kpi-glow-rgb), 0.38),
      inset 0 0 14px rgba(var(--kpi-glow-rgb), 0.32);
    transform: translateY(-1px) scale(1.025);
  }
  70% {
    border-color: rgba(var(--kpi-glow-rgb), 0.75);
    background-color: rgba(var(--kpi-glow-rgb), 0.16);
    box-shadow:
      0 0 0 1px rgba(var(--kpi-glow-rgb), 0.55),
      0 0 16px rgba(var(--kpi-glow-rgb), 0.42),
      inset 0 0 8px rgba(var(--kpi-glow-rgb), 0.18);
    transform: translateY(0) scale(1);
  }
  100% {
    box-shadow: none;
    transform: translateY(0) scale(1);
  }
}

@keyframes kpiValPop {
  0% {
    transform: scale(1.25);
    color: #ffffff;
    text-shadow: 0 0 18px rgba(var(--kpi-glow-rgb), 1), 0 0 30px rgba(var(--kpi-glow-rgb), 0.88);
  }
  42% {
    transform: scale(1.06);
    color: var(--kpi-glow-hex);
    text-shadow: 0 0 12px rgba(var(--kpi-glow-rgb), 0.85);
  }
  100% {
    transform: scale(1);
    text-shadow: none;
  }
}

@keyframes kpiDeltaFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1.12);
  }
  20% {
    opacity: 1;
    transform: translateY(-1px) scale(1.02);
  }
  78% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px) scale(0.9);
  }
}

.kpi-pill.kpi-glow-up {
  transition: none !important;
  animation: kpiPositiveHalo 2.5s cubic-bezier(0.22, 1, 0.36, 1) 1;
  z-index: 5;
}

.kpi-pill.kpi-glow-up .kpi-val {
  animation: kpiValPop 2.1s cubic-bezier(0.22, 1, 0.36, 1) 1;
}

.kpi-delta-spark {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  color: #06101a;
  background: var(--kpi-glow-hex);
  box-shadow: 0 0 12px rgba(var(--kpi-glow-rgb), 0.95);
  pointer-events: none;
  animation: kpiDeltaFloat 2.5s ease-out forwards;
}

/* STATUS & CLOCK (Zéro animation infinie 60 FPS) */
.hub-status-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 12px;
}

.sync-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #34d399;
}

.sync-pill.offline {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
}

.sync-pill.offline .sync-dot {
  background: var(--gold);
}

.clock-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

/* SIDEBAR */
.hub-sidebar {
  position: fixed;
  top: 96px;
  left: 16px;
  bottom: 16px;
  width: 375px;
  z-index: 850;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.hub-sidebar.collapsed {
  transform: translateX(-400px);
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.sidebar-title-row h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.32);
}

.sidebar-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-sidebar {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-close-sidebar:hover,
.btn-close-sidebar:active {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.18);
  color: var(--cyan);
}

/* SEARCH BAR */
.search-wrap {
  position: relative;
  margin-bottom: 9px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 7px 30px 7px 11px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  user-select: text;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
}

.search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 5px;
}

.search-clear:hover {
  color: var(--text-main);
}

.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.filter-chip:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-chip.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
}

.sort-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 6px;
}

.sort-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
}

.sort-btns {
  display: flex;
  gap: 5px;
}

.sort-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.sort-btn:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.sort-btn.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* SALON ACCORDION GROUP */
.salon-group {
  background: rgba(15, 22, 36, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
}

.salon-group.has-online {
  border-color: rgba(16, 185, 129, 0.36);
}

.salon-group.has-selected {
  border-color: rgba(0, 229, 255, 0.55);
}

.salon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  gap: 8px;
}

.salon-header:hover {
  background: rgba(0, 229, 255, 0.08);
}

.salon-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.salon-arrow {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.salon-group.expanded .salon-arrow {
  transform: rotate(90deg);
}

.salon-title-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.salon-code-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salon-sub-line {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.salon-count-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
}

.salon-count-pill.online {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.42);
}

.salon-members {
  display: none;
  padding: 8px 9px 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-direction: column;
  gap: 7px;
}

.salon-group.expanded .salon-members {
  display: flex;
}

.leader-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.license-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.license-list::-webkit-scrollbar { width: 5px; }
.license-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-dim);
  font-size: 13px;
}

.sidebar-more-banner {
  text-align: center;
  padding: 9px 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-subtle);
  border-radius: 10px;
}

/* LICENSE CARD */
.lic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 11px 13px;
  cursor: pointer;
}

.lic-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 229, 255, 0.42);
}

.lic-card.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.45);
}

.lic-card.is-tracked {
  border-color: var(--online);
  background: rgba(16, 40, 38, 0.92);
  box-shadow: 0 0 0 1.5px rgba(16, 185, 129, 0.65);
}

.lic-card.is-online {
  border-left: 3px solid var(--online);
}

.lic-card.is-offline {
  border-left: 3px solid var(--offline);
  opacity: 0.88;
}

.lic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lic-name-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online { background: var(--online); }
.status-dot.standby { background: var(--gold); }
.status-dot.offline { background: var(--offline); }

.lic-pseudo {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lic-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-track-eye {
  width: 28px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.btn-track-eye:hover:not(:disabled) {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.14);
}

.btn-track-eye.active {
  background: var(--online);
  border-color: #34d399;
  color: #04130d;
}

.btn-track-eye:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.tier-chip {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.tier-club {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.tier-squad {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.4);
}

.tier-duo {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.lic-key-row {
  margin-top: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lic-meta-row {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #cbd5e1;
  gap: 8px;
}

.salon-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
}

/* MAP CONTROLS (RIGHT) */
.mobile-controls-handle {
  display: none;
}

.map-controls {
  position: fixed;
  top: 96px;
  right: 16px;
  z-index: 850;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

.layer-switcher {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 5px;
  display: flex;
  gap: 4px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.layer-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 10px;
  cursor: pointer;
}

.layer-btn.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: rgba(0, 229, 255, 0.45);
  color: var(--cyan);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctrl-btn {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  text-align: right;
}

.ctrl-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.ctrl-btn.active {
  background: rgba(16, 185, 129, 0.20);
  border-color: var(--online);
  color: #34d399;
}

/* CUSTOM TACTICAL MAP MARKER */
.orixa-marker-wrap {
  position: relative;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}

.orixa-callout {
  background: rgba(11, 16, 27, 0.95);
  border: 1.5px solid rgba(0, 229, 255, 0.6);
  border-radius: 999px;
  padding: 4px 10px 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin-bottom: 5px;
}

body.is-replay-playing .orixa-callout {
  box-shadow: none !important;
}

.orixa-callout.selected {
  border-color: #ffffff;
  background: rgba(16, 26, 46, 0.98);
}

.orixa-callout.tracked {
  border-color: #34d399;
  border-width: 2px;
  background: rgba(8, 36, 30, 0.98);
}

.orixa-callout.salon-peer {
  border-color: #fbbf24;
  border-width: 1.8px;
}

.orixa-callout.paid {
  border-color: rgba(245, 158, 11, 0.88);
}

.orixa-callout.offline {
  border-color: rgba(100, 116, 139, 0.68);
  opacity: 0.88;
}

.orixa-callout-name {
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.orixa-callout-speed {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
}

.orixa-callout-rgpd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  color: #7dd3fc;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.rgpd-sector-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

.orixa-pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--online);
  border: 3px solid #fff;
}

.orixa-pin-dot.paid {
  background: var(--gold);
}

.orixa-pin-dot.offline {
  background: var(--offline);
}

/* HIGH-DENSITY CLUSTER BADGE (ZOOM < 14 OU FORTE DENSITÉ) */
.orixa-cluster-wrap {
  position: relative;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.orixa-cluster-pill {
  background: rgba(11, 16, 27, 0.96);
  border: 2px solid var(--offline);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.orixa-cluster-pill.has-online {
  border-color: var(--online);
}

.orixa-cluster-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.32);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orixa-cluster-pill.has-online .orixa-cluster-badge {
  background: var(--online);
  color: #04130d;
}

.orixa-cluster-meta {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}

.orixa-cluster-pill.has-online .orixa-cluster-meta {
  color: #34d399;
}

.orixa-cluster-pill.owner-cluster {
  border-color: var(--gold);
  background: rgba(18, 20, 32, 0.98);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.28);
}

.orixa-cluster-pill.owner-cluster .orixa-cluster-badge {
  background: var(--gold);
  color: #140d00;
}

.orixa-cluster-pill.owner-cluster .orixa-cluster-meta {
  color: #fde68a;
}

/* LEAFLET POPUP DARK OVERRIDE */
.leaflet-popup-content-wrapper {
  background: rgba(13, 19, 33, 0.97) !important;
  color: var(--text-main) !important;
  border: 1.5px solid rgba(0, 229, 255, 0.5) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65) !important;
}

.leaflet-popup-tip {
  background: rgba(13, 19, 33, 0.97) !important;
}

.leaflet-popup-close-button {
  color: #cbd5e1 !important;
  font-size: 20px !important;
  width: 28px !important;
  height: 28px !important;
  line-height: 26px !important;
  top: 6px !important;
  right: 6px !important;
}

.leaflet-popup-close-button:hover {
  color: #ffffff !important;
}

.popup-grid {
  font-family: 'Outfit', sans-serif;
  font-size: 12.5px;
  line-height: 1.58;
  min-width: 245px;
  padding-right: 12px;
}

.popup-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.popup-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #e2e8f0;
}

.popup-hw {
  font-size: 10.5px;
  color: #93c5fd;
  user-select: text;
  word-break: break-all;
}

.leaflet-control-zoom {
  margin-bottom: 22px !important;
  margin-right: 16px !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-panel) !important;
  color: var(--text-main) !important;
  border-bottom-color: var(--border-subtle) !important;
}

.logout-form {
  display: inline-flex;
}

.btn-logout {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-logout:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.16);
}

.btn-mute-top {
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.btn-mute-top:hover {
  border-color: var(--online);
  background: rgba(16, 185, 129, 0.22);
  color: #ffffff;
}

.btn-mute-top.is-muted {
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.btn-mute-top.is-muted:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.26);
  color: #ffffff;
}

.btn-mute-ico {
  font-size: 14px;
  line-height: 1;
}

.btn-pwd-top {
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.38);
  background: rgba(0, 229, 255, 0.10);
  color: var(--text-main);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-pwd-top:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.20);
  color: var(--cyan);
}

/* MODALE MOT DE PASSE */
.pwd-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 9, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pwd-modal-backdrop[hidden] {
  display: none !important;
}

.pwd-modal {
  width: 100%;
  max-width: 460px;
  background: rgba(14, 21, 36, 0.98);
  border: 1.5px solid rgba(0, 229, 255, 0.45);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72);
}

.pwd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.pwd-modal-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--cyan);
}

.pwd-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 6px;
}

.pwd-modal-close:hover {
  color: #ffffff;
}

.pwd-modal-info {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.pwd-field-group {
  margin-bottom: 12px;
}

.pwd-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.pwd-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  outline: none;
  user-select: text;
}

.pwd-field:focus {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
}

.pwd-status-box {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.pwd-status-box.is-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.pwd-status-box.is-ok {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.pwd-result-box {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #080d17;
  border: 1.5px solid var(--online);
}

.pwd-result-lbl {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.pwd-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pwd-result-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #34d399;
  user-select: text;
  word-break: break-all;
}

.btn-copy-pwd {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.pwd-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 6px;
}

.btn-pwd-cancel {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-pwd-confirm {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.55);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.22), rgba(16, 185, 129, 0.25));
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-pwd-confirm:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* LECTEUR REPLAY TEMPOREL (BOÎTE NOIRE) */
.sync-pill.replay-mode {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.65);
  color: #fbbf24;
}

.sync-pill.replay-mode .sync-dot {
  background: var(--gold);
}

.replay-panel {
  position: fixed;
  left: 407px;
  right: 72px;
  bottom: 16px;
  z-index: 880;
  background: rgba(11, 16, 27, 0.96);
  border: 1.5px solid rgba(0, 229, 255, 0.48);
  border-radius: 16px;
  padding: 11px 15px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
  gap: 9px;
  contain: layout style;
}

.replay-panel[hidden] {
  display: none !important;
}

.replay-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.replay-period-group,
.replay-meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.replay-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.20);
  border: 1px solid rgba(245, 158, 11, 0.55);
  color: #fbbf24;
  letter-spacing: 0.04em;
}

.replay-date-input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color-scheme: dark;
  outline: none;
}

.replay-range-chips {
  display: flex;
  gap: 4px;
}

.replay-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.replay-chip.active {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--cyan);
  color: var(--cyan);
}

.replay-stats {
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.replay-disk-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

.btn-replay-gpx {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-replay-gpx:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.btn-replay-live {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.20);
  color: #34d399;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.replay-scrubber-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.btn-replay-play {
  width: 34px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.15);
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-replay-speed {
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.replay-bound-lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.replay-slider-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  height: 28px;
  min-width: 80px;
}

.replay-timeline-track {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.replay-timeline-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.replay-slider {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.replay-slider::-webkit-slider-runnable-track {
  height: 9px;
  background: transparent;
  border: none;
}

.replay-slider::-moz-range-track {
  height: 9px;
  background: transparent;
  border: none;
}

.replay-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #00e5ff;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.85), 0 2px 5px rgba(0, 0, 0, 0.68);
  cursor: pointer;
}

.replay-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #00e5ff;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.85), 0 2px 5px rgba(0, 0, 0, 0.68);
  cursor: pointer;
}

.replay-hover-tooltip.is-moving {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.62), 0 0 12px rgba(239, 68, 68, 0.35);
}

.replay-hover-tooltip.is-moving::after {
  border-color: rgba(239, 68, 68, 0.9) transparent transparent transparent;
}

/* ÉPINGLE TACTIQUE D'INSPECTION D'HEURE DE PASSAGE SUR LE TRACÉ REPLAY */
.replay-passage-pin-wrap {
  position: relative;
  width: 0;
  height: 0;
  pointer-events: none;
}

.replay-passage-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid #fbbf24;
  background: rgba(245, 158, 11, 0.20);
  box-shadow: 0 0 0 2px rgba(11, 16, 27, 0.88), 0 0 14px rgba(245, 158, 11, 0.85);
  pointer-events: none;
}

.replay-passage-card {
  position: absolute;
  left: 0;
  top: 17px;
  transform: translateX(-50%);
  background: rgba(9, 14, 25, 0.97);
  border: 1.5px solid #fbbf24;
  border-radius: 11px;
  padding: 6px 9px 6px 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.72), 0 0 14px rgba(245, 158, 11, 0.25);
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
  cursor: default;
}

.replay-passage-card.flip-above {
  top: auto;
  bottom: 46px;
}

.replay-passage-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.replay-passage-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.02em;
}

.replay-passage-meta {
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
}

.replay-passage-close {
  margin-left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.replay-passage-close:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.22);
  color: #ffffff;
}

.replay-passage-passes {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.replay-pass-chip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: pointer;
}

.replay-pass-chip:hover {
  border-color: #fbbf24;
  color: #ffffff;
}

.replay-pass-chip.active {
  background: rgba(245, 158, 11, 0.26);
  border-color: #fbbf24;
  color: #fde68a;
}

.replay-hover-tooltip {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 0;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(7, 12, 22, 0.96);
  border: 1px solid rgba(0, 229, 255, 0.72);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.58), 0 0 10px rgba(0, 229, 255, 0.22);
  pointer-events: none;
  z-index: 930;
}

.replay-hover-tooltip[hidden] {
  display: none !important;
}

.replay-hover-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: rgba(0, 229, 255, 0.72) transparent transparent transparent;
}

.replay-cur-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: #fbbf24;
  min-width: 72px;
  text-align: right;
  flex-shrink: 0;
}

/* ADAPTATION ÉCRANS PORTABLES / DESKTOP COMPACTS (1025px -> 1960px, ex: Kiosk 1920x1080 avec 8 pastilles KPI ou Windows 125% / 150%) */
@media (min-width: 1025px) and (max-width: 1960px) {
  .hub-topbar {
    padding: 0 14px;
    gap: 10px;
  }
  .hub-subtitle,
  .hub-badge-version,
  .btn-pwd-lbl,
  .btn-mute-lbl {
    display: none;
  }
  .hub-kpis {
    gap: 6px;
  }
  .kpi-pill {
    min-width: 80px;
    padding: 5px 9px;
  }
  .kpi-val {
    font-size: 16.5px;
  }
  .kpi-lbl {
    font-size: 9.5px;
    white-space: nowrap;
  }
  .hub-status-box {
    gap: 9px;
  }
}
@media (min-width: 1025px) and (max-width: 1520px) {
  .clock-display {
    display: none;
  }
}

/* ADAPTATION RESPONSIVE MOBILE / TABLETTE (<= 1024px — zéro impact sur l'écran Kiosk 1920x1080) */
@media (max-width: 1024px) {
  .hub-topbar {
    display: flex;
    justify-content: space-between;
    top: 8px;
    left: 8px;
    right: 8px;
    height: auto;
    padding: 8px 10px;
    border-radius: 14px;
    flex-wrap: wrap;
    gap: 7px;
  }

  .hub-brand {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .hub-logo-orb {
    width: 32px;
    height: 32px;
    font-size: 16px;
    border-radius: 9px;
    flex-shrink: 0;
  }

  .hub-title {
    font-size: 14px;
    gap: 6px;
  }

  .hub-badge-version {
    display: none;
  }

  .hub-subtitle {
    display: none;
  }

  .hub-status-box {
    gap: 6px;
    flex-shrink: 0;
  }

  .sync-pill {
    padding: 5px 9px;
    font-size: 10.5px;
  }

  .clock-display {
    display: none;
  }

  .btn-mute-lbl,
  .btn-pwd-lbl {
    display: none;
  }

  .btn-mute-top,
  .btn-pwd-top {
    padding: 0 9px;
    height: 32px;
  }

  .btn-logout {
    width: 32px;
    height: 32px;
  }

  .hub-kpis {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 6px;
    padding-top: 8px;
    margin-top: -6px;
    padding-bottom: 2px;
  }

  .hub-kpis::-webkit-scrollbar {
    height: 0;
  }

  .kpi-pill {
    min-width: 78px;
    padding: 4px 8px;
    flex-shrink: 0;
  }

  .kpi-val {
    font-size: 14.5px;
  }

  .kpi-val-row {
    gap: 4px;
  }

  .kpi-day-delta {
    font-size: 9.5px;
    padding: 1px 4px;
  }

  .kpi-lbl {
    font-size: 9px;
  }

  .btn-close-sidebar {
    display: inline-flex;
  }

  .hub-sidebar {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    z-index: 960;
    background: rgba(11, 16, 27, 0.985);
  }

  .hub-sidebar.collapsed {
    transform: translateX(-110%);
  }

  .mobile-controls-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: var(--mobile-controls-top, 112px);
    right: 0;
    width: 28px;
    height: 48px;
    z-index: 865;
    background: rgba(11, 16, 27, 0.92);
    border: 1px solid rgba(0, 229, 255, 0.42);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.45);
    transition: background-color 0.18s ease, right 0.22s ease;
  }

  .mobile-controls-handle.is-open {
    background: rgba(0, 229, 255, 0.18);
    color: #ffffff;
  }

  .map-controls {
    top: var(--mobile-controls-top, 112px);
    right: 32px;
    gap: 7px;
  }

  .map-controls.mobile-collapsed {
    transform: translateX(calc(100% + 44px));
    opacity: 0;
    pointer-events: none;
  }

  .layer-btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  .ctrl-btn {
    padding: 7px 11px;
    font-size: 11.5px;
  }

  .popup-grid {
    min-width: 210px;
    font-size: 12px;
  }

  .replay-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 9px 10px;
    gap: 7px;
  }

  .replay-disk-pill,
  .replay-bound-lbl {
    display: none;
  }

  .replay-stats {
    font-size: 11.5px;
  }

  .leaflet-control-zoom {
    display: none !important;
  }
}
