/* 
 * Styles pour le header du site SEA
 * Contient les styles pour la navigation desktop et mobile
 */

/* Style pour la navigation desktop */
.main-navigation {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  z-index: 1000;
}

.nav-link {
  font-family: 'Victor Mono', monospace;
  font-size: 16px;
  color: #000;
  text-decoration: none;
  margin-bottom: 6px;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #666;
}

/* Conteneur qui s'étend sur toute la largeur de l'écran */
.header-full-width {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 100px;
  z-index: 1000;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.logo-link {
  display: block;
}

.logo {
  width: 73vw;
}

/* Container pour le menu burger */
.burger-container {
  position: fixed;
  top: 4%;
  right: 35px;
  z-index: 2500;
  width: 30px;
  height: 20px;
  display: none;
}

/* Styles pour le menu burger */
.burger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #000;
  transition: all 0.3s ease;
}

/* Styles pour le menu mobile */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(252, 252, 252, 1);
  z-index: 1500; /* Z-index élevé mais inférieur au burger menu */
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.mobile-nav-link {
  font-family: 'Victor Mono', monospace;
  font-size: 24px;
  color: #000;
  text-decoration: none;
  margin: 15px 0;
  padding: 5px;
  transition: color 0.3s ease;
}

.mobile-nav-link:hover {
  color: #666;
}

/* Animation pour le menu burger quand il est actif */
.burger-menu.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: #000; /* Assure que la croix reste visible */
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: #000; /* Assure que la croix reste visible */
}

/* Assurer que la croix reste visible quand le menu est ouvert */
.burger-container.active {
  z-index: 3000; /* Au-dessus de tout, même l'overlay */
}

/* Style pour le menu mobile */
.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Aligne les éléments à droite */
  justify-content: flex-start; /* Aligne les éléments en haut */
  padding-top: 100px; /* Espace en haut */
  padding-right: 40px; /* Espace à droite */
  box-sizing: border-box;
  pointer-events: auto; /* Assure que les liens sont cliquables */
}

/* Styles pour le body quand le menu est ouvert */
body.menu-open {
  overflow: hidden; /* Empêche le défilement */
  position: fixed; /* Fixe la position */
  width: 100%; /* Assure que la largeur reste à 100% */
  height: 100%; /* Assure que la hauteur reste à 100% */
}

/* Afficher le menu mobile quand il est actif */
.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* Media queries pour la version mobile */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .burger-container {
    display: block; /* Visible en mobile */
  }
  
  .logo {
    width: 82vw; /* Logo sur mobile */
  }
  
  .header {
    padding: 0; /* Padding réduit sur mobile */
    margin: 0;
  }
  
  .header-full-width {
    position: fixed;
    top: 0;
    background-color: var(--color-background);
    margin-bottom: 0;
    z-index: 1000; /* Z-index inférieur à l'overlay et au burger */
  }
  
  .main {
    padding-top: 80px; /* Espace pour le header fixe */
  }
}

/* Style pour cacher temporairement le contenu pendant le chargement des polices */
.font-loading body {
  visibility: hidden;
}

/* Affiche le contenu une fois les polices chargées */
.font-loaded body {
  visibility: visible;
}
