/* Fond d'écran noir */
body {
  background-color: #000;
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: Arial, sans-serif;
}

/* Barre de statut + header */
.status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  background: #0b0b0b;
  border-bottom: 1px solid #1f1f1f;
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 1001;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  height: 28px;
  width: auto;
  display: block;
}

.company {
  color: #fff;
  font-weight: 700;
  letter-spacing: .4px;
}

.time {
  color: #cfd3d8;
  font-variant-numeric: tabular-nums;
  margin-left: 10px;
}

/* Navigation principale */
.status-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-btn {
  padding: 10px 20px;
  border: 1px solid #333;
  background: #121212;
  color: #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: #1a1a1a;
  border-color: #444;
}

.nav-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

/* Barre des logos - FIXE */
.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f0f0f;
  border-bottom: 1px solid #1f1f1f;
  padding: 8px 14px;
  position: sticky;
  top: 50px;
  z-index: 1000;
}

.brand-duo {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #121212;
  border: 1px solid #1f1f1f;
  padding: 8px 16px;
  border-radius: 12px;
}

.brand-duo img {
  height: 24px;
  width: auto;
  display: block;
}

.wifi-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.internet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #444;
  display: inline-block;
}

.internet-dot.connected {
  background: #22c55e;
}

.wifi-bars {
  display: flex;
  gap: 2px;
  align-items: flex-end;
}

.wifi-bar {
  width: 3px;
  background: #666;
  border-radius: 2px;
}

.wifi-bar:nth-child(1) { height: 6px; }
.wifi-bar:nth-child(2) { height: 9px; }
.wifi-bar:nth-child(3) { height: 12px; }
.wifi-bar:nth-child(4) { height: 15px; }

/* Ajustement du contenu principal pour compenser les barres fixes */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
  margin-top: 1px;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 14px;
}

.screen-header1 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screen-title {
  margin: 0;
  color: #fff;
  flex: 1;
}

.selected-ref {
  color: #cfd3d8;
  font-size: 12px;
  opacity: .9;
}

.back-btn {
  border: 1px solid #333;
  background: #151515;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: #1a1a1a;
  border-color: #444;
}

.grid {
  display: grid;
  grid-template-columns: 320px 1fr 280px;
  gap: 16px;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seismic-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card, .seismic-card, .alert-card {
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 14px;
}

.system-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.ref-box {
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.4;
}

.ref-box b {
  color: #fff;
}

.main {
  min-width: 0;
}

/* Barre de séisme */
/* Barre de séisme - CORRIGÉE */
.seismic-scale {
  position: relative;
  height: 300px;
  margin: 20px 0;
  background: #111;
  border-radius: 8px;
  padding: 10px;
}

.scale-labels {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
}

.scale-label {
  font-size: 12px;
  color: #cfd3d8;
  text-align: center;
}

.scale-bar {
  position: absolute;
  left: 40px;
  top: 10px;
  bottom: 10px;
  width: 40px;
  background: #1a1a1a;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse; /* Inverser l'ordre des zones */
}

.scale-zone {
  flex: 1;
  transition: all 0.3s ease;
}

.scale-zone.green {
  background: linear-gradient(to bottom, #16a34a, #22c55e);
}

.scale-zone.orange {
  background: linear-gradient(to bottom, #f59e0b, #fbbf24);
}

.scale-zone.red {
  background: linear-gradient(to bottom, #dc2626, #ef4444);
}

.scale-zone.critical {
  background: linear-gradient(to bottom, #7c2d12, #dc2626);
}

.current-indicator {
  position: absolute;
  left: 90px;
  top: 0;
  bottom: 0;
  width: 60px;
  display: flex;
  align-items: flex-start; /* Commencer du bas */
}


/* Conteneur des boutons pleine largeur */
.full-width-buttons-container {
  display: flex;
  width: 100%;
  margin-top: 20px;
  gap: 1px;
  background: #333;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #333;
}

/* Style des boutons pleine largeur */
.full-width-btn {
  flex: 1;
  padding: 16px 24px;
  border: none;
  background: #0b0b0b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-width: 0;
}

.full-width-btn:hover {
  background: #1a1a1a;
}

.full-width-btn:active {
  background: #151515;
}

/* Bouton État Porteur */
.carrier-btn {
  border-right: 1px solid #333;
}

/* Bouton Paramètre Réseau */
.network-btn {
  border-left: 1px solid #333;
}
/* Footer */
.footer{opacity:.7; text-align:center; padding:20px 0}

/* Responsive */
@media (max-width: 768px) {
  .full-width-buttons-container {
    flex-direction: column;
  }
  
  .carrier-btn {
    border-right: none;
    border-bottom: 1px solid #333;
  }
  
  .network-btn {
    border-left: none;
  }
}

.indicator-line {
  width: 2px;
  height: 100%;
  background: #fff;
  position: relative;
}

.indicator-value {
  position: absolute;
  left: 10px;
  top: 0;
  background: #000;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  border: 1px solid #333;
  transform: translateY(-50%);
}

.seismic-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #111;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Alertes */
.alert-list {
  max-height: 200px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  border-left: 4px solid;
}

.alert-item.info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: #3b82f6;
}

.alert-item.warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: #f59e0b;
}

.alert-item.danger {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: #ef4444;
  animation: alertBlink 1s infinite;
}

@keyframes alertBlink {
  0% { background: rgba(239, 68, 68, 0.1); }
  50% { background: rgba(239, 68, 68, 0.3); }
  100% { background: rgba(239, 68, 68, 0.1); }
}

.alert-item.critical {
  background: rgba(124, 45, 18, 0.1);
  border-left-color: #dc2626;
  animation: criticalBlink 0.5s infinite;
}

@keyframes criticalBlink {
  0% { background: rgba(124, 45, 18, 0.1); }
  50% { background: rgba(124, 45, 18, 0.5); }
  100% { background: rgba(124, 45, 18, 0.1); }
}

.alert-icon {
  font-size: 16px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: 600;
  font-size: 13px;
}

.alert-time {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

.alert-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 4px;
}

.stat-value {
  font-weight: bold;
  font-size: 18px;
}

/* Contrôles principaux */
.subsystem-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.control-btn {
  padding: 12px 20px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-width: 80px;
}

.control-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.control-btn.liberer {
  background: #16a34a;
  color: #fff;
}

.control-btn.liberer:hover {
  background: #15803d;
}

.control-btn.blocker {
  background: #dc2626;
  color: #fff;
}

.control-btn.blocker:hover {
  background: #b91c1c;
}

.control-btn.auto {
  background: #2563eb;
  color: #fff;
}

.control-btn.auto:hover {
  background: #1d4ed8;
}

/* Style pour les boutons d'arrêt activés */
.txrx-btn.stop-active {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.txrx-btn.start-active {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

/* Bouton AUTO/MANU avec état visuel */
.control-btn.auto[data-mode="auto"] {
  background: #2563eb;
}

.control-btn.auto[data-mode="manual"] {
  background: #f59e0b;
}

.control-btn.auto[data-mode="manual"]:hover {
  background: #d97706;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.kpi {
  background: #111;
  color: #fff;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #333;
  transition: all 0.2s ease;
}

.kpi:hover {
  border-color: #444;
  transform: translateY(-1px);
}

.kpi span {
  opacity: .7;
  font-size: 12px;
  display: block;
}

.kpi strong {
  display: block;
  font-size: 18px;
  margin-top: 6px;
}

.panel {
  background: #0b0b0b;
  color: #fff;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0 0 12px;
  color: #fff;
}

.panel small {
  opacity: .7;
  font-size: 11px;
}

.form-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.security-btn {
  padding: 8px 12px;
  border: 1px solid #444;
  background: #202020;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.security-btn:hover {
  background: #2a2a2a;
  border-color: #555;
}

input[type=number],
input[type=text] {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  font-size: 14px;
}

input[type=number]:focus,
input[type=text]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.chart-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.range-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid #333;
  background: #121212;
  color: #ddd;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  background: #1a1a1a;
}

.tab.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.map {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  opacity: .9;
  margin-top: 8px;
}

.maint-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.sensor {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0e0e0e;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 10px;
  transition: all 0.2s ease;
}

.sensor:hover {
  border-color: #333;
}

.badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.ok {
  background: #16a34a;
  color: #fff;
}

.warn {
  background: #f59e0b;
  color: #111;
}

.err {
  background: #ef4444;
  color: #fff;
}

.toggle {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #202020;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
}

.toggle:hover {
  background: #2a2a2a;
  border-color: #555;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .seismic-sidebar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .main-nav {
    gap: 4px;
  }
  
  .nav-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .row-2col {
    grid-template-columns: 1fr;
  }
  
  .seismic-sidebar {
    grid-template-columns: 1fr;
  }
  
  .status-bar {
    flex-wrap: wrap;
  }
  
  .main-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  
  .brand-bar {
    flex-direction: column;
    gap: 10px;
  }
  
  .screen-header1 {
    margin: 0;
  }
}

/* États désactivés */
input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}