/* COCKPIT TRIPTYQUE - Interface de controle Biofibers */

.cockpit-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse 150% 100% at 50% 0%,
    rgba(15, 25, 40, 0.3) 0%,
    rgba(10, 12, 18, 0.95) 60%,
    #07090c 100%);
  overflow: hidden;
  z-index: 5;
}

.cockpit-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cockpit-viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.6;
  pointer-events: none;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.cockpit-viewport-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.cockpit-title {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.cockpit-subtitle {
  font-size: 1rem;
  color: rgba(110, 231, 255, 0.6);
  letter-spacing: 0.1em;
}

.cockpit-controls {
  position: relative;
  display: flex;
  width: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(10, 15, 25, 0.98) 30%,
    rgba(5, 8, 12, 1) 100%);
  border-top: 1px solid rgba(110, 231, 255, 0.15);
}

.cockpit-controls::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(110, 231, 255, 0.5) 30%,
    rgba(139, 92, 246, 0.5) 50%,
    rgba(253, 164, 175, 0.5) 70%,
    transparent);
}

.cockpit-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  cursor: pointer;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  animation: panelSlideIn 0.6s ease forwards;
}

.cockpit-panel:nth-child(1) { animation-delay: 0.1s; }
.cockpit-panel:nth-child(2) { animation-delay: 0.2s; }
.cockpit-panel:nth-child(3) { animation-delay: 0.3s; }

@keyframes panelSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cockpit-panel:last-child {
  border-right: none;
}

.cockpit-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cockpit-panel.descartes::before {
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.15) 0%, transparent 60%);
}

.cockpit-panel.flux::before {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
}

.cockpit-panel.nexus::before {
  background: linear-gradient(180deg, rgba(253, 164, 175, 0.15) 0%, transparent 60%);
}

.cockpit-panel:hover::before,
.cockpit-panel.active::before {
  opacity: 1;
}

.cockpit-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  transition: transform 0.3s ease;
}

.cockpit-panel.descartes::after {
  background: linear-gradient(90deg, transparent, #00d9ff, transparent);
}

.cockpit-panel.flux::after {
  background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
}

.cockpit-panel.nexus::after {
  background: linear-gradient(90deg, transparent, #fda4af, transparent);
}

.cockpit-panel:hover::after,
.cockpit-panel.active::after {
  transform: translateX(-50%) scaleX(1);
}

.panel-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.cockpit-panel.descartes .panel-icon {
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  color: #00d9ff;
}

.cockpit-panel.flux .panel-icon {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #8b5cf6;
}

.cockpit-panel.nexus .panel-icon {
  background: rgba(253, 164, 175, 0.1);
  border: 1px solid rgba(253, 164, 175, 0.3);
  color: #fda4af;
}

.cockpit-panel:hover .panel-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px currentColor;
}

.panel-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.cockpit-panel.descartes .panel-title {
  text-align: center; color: #00d9ff; }
.cockpit-panel.flux .panel-title {
  text-align: center; color: #8b5cf6; }
.cockpit-panel.nexus .panel-title {
  text-align: center; color: #fda4af; }

.panel-subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.cockpit-panel:hover .panel-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .cockpit-container {
    bottom: 80px;
  }
  
  .cockpit-controls {
    flex-direction: column;
  }
  
  .cockpit-panel {
    padding: 1.5rem 1rem;
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .cockpit-panel:last-child {
    border-bottom: none;
  }
  
  .panel-icon {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .panel-title {
  text-align: center;
    font-size: 1rem;
  }
  
  .panel-subtitle {
  text-align: center;
    font-size: 0.75rem;
  }
  
  .cockpit-title {
    font-size: 1.3rem;
  }
}
/* --- MODE CINÉMA (Activé par le JS) --- */

/* 1. On rend le "Mur" transparent pour voir le fond derrière */
body.orb-view-active .cockpit-container {
  background: transparent; /* Magie : le fond noir disparaît */
  transition: background 0.5s ease;
  pointer-events: none; /* Permet de cliquer à travers le vide si besoin */
}

/* 2. On fait disparaître le Titre pour alléger la vue */
body.orb-view-active .cockpit-viewport {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. CRITIQUE : On force le Menu à rester visible et cliquable */
body.orb-view-active .cockpit-controls {
  opacity: 1; /* On s'assure qu'il est visible */
  pointer-events: auto; /* On réactive les clics sur les boutons */
  /* Votre menu a déjà son propre fond gradient dans le CSS de base,
     donc il restera lisible sur l'image */
}
