/* ═══════════════════════════════════════════════════════════════
   SYSTEMS COCKPIT - Layout AR Immersif Viewport-Fit
   Desktop: 3 colonnes | Mobile: Triangle inversé
   ═══════════════════════════════════════════════════════════════ */

/* === COCKPIT CONTAINER === */
.systems-cockpit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 15vh;
  background: radial-gradient(ellipse 120% 80% at 50% 30%,
    rgba(20, 30, 50, 0.4) 0%,
    rgba(10, 12, 18, 0.95) 70%,
    #07090c 100%);
  overflow: hidden;
}

/* Grille effet néon subtil en fond */
.systems-cockpit::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.5;
  pointer-events: none;
}

/* === GRILLE DES 3 SYSTÈMES === */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  max-width: 1000px;
  width: 90%;
  padding: 2rem;
  position: relative;
  z-index: 1;
  justify-items: center;
}

/* === RESPONSIVE: TRIANGLE INVERSÉ === */
@media (max-width: 900px) {
  .systems-cockpit {
    padding-bottom: 10vh;
  }
  
  .systems-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2.5rem;
    max-width: 450px;
  }

  /* Premier orbe centré en haut */
  .systems-grid .hud-orb:first-child {
    grid-column: 1 / -1;
    justify-self: center;
  }

  /* Les deux autres en bas */
  .systems-grid .hud-orb:nth-child(2),
  .systems-grid .hud-orb:nth-child(3) {
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .systems-cockpit {
    padding-bottom: 8vh;
  }
  
  .systems-grid {
    gap: 2rem;
    max-width: 320px;
    padding: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PAGE DESCARTES - COCKPIT TABLEAU DE BORD
   ═══════════════════════════════════════════════════════════════ */

/* Page Descartes container */
.descartes-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

.descartes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 1rem;
}

.descartes-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.descartes-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(110, 231, 255, 0.15);
  border-color: var(--accent);
}

/* Grille de cartes */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Carte de problème */
.problem-card {
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.4), rgba(10, 15, 25, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(110, 231, 255, 0.2);
}

.problem-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.problem-theme {
  padding: 4px 12px;
  background: rgba(110, 231, 255, 0.15);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
}

.problem-severity {
  display: flex;
  gap: 4px;
}

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

.severity-dot.active {
  background: #ff6b6b;
  box-shadow: 0 0 8px #ff6b6b;
}

.problem-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.problem-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.problem-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.problem-location {
  display: flex;
  align-items: center;
  gap: 6px;
}

.problem-stats {
  display: flex;
  gap: 16px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), #4ab8d4);
  border-radius: 50%;
  border: none;
  box-shadow: 0 8px 24px rgba(110, 231, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #0a0c10;
  transition: all 0.3s ease;
  z-index: 100;
}

.fab:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 12px 32px rgba(110, 231, 255, 0.6);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--text);
}

/* Forms */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4ab8d4);
  color: #0a0c10;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(110, 231, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
