/* ============================
   Fichier : header.css
   Auteur : lyunabi
   Description : Styles pour le header
   ============================ */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 3%;
  position: relative;
  z-index: 100;
  max-height: 70px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo img {
    width: 150px;
    height: auto;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0; 
    gap: 2rem; 
}

.nav-list a {
    text-decoration: none;
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 16px;
    color: #1E1E1E;
    transition: color 0.3s ease;
}

.nav-list a:hover {
    color: #FFB8FA;
}

.hamburger {
    display: none; 
    cursor: pointer;
    z-index: 101;
}

/* Structure du burger icon */
.burger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.burger-icon span {
    display: block;
    width: 30px;           
    height: 3px;           
    background-color: black; 
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animation burger → X */
.hamburger.active .burger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active .burger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active .burger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ---------------------------------------------------------------*/
/* Responsive pour petits écrans */
@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%; /* Commence hors écran */
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: linear-gradient(135deg, #1E1E1E 0%, #FF84F7 140%);
    flex-direction: column;
    padding: 100px 30px 30px;
    gap: 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    transition: right 0.3s ease-out; /* Animation glissante */
    overflow-y: auto;
    align-items: flex-start;
  }

  .nav-list.active {
    right: 0; /* Glisse vers la gauche */
  }

  /* Animation des items en cascade */
  .nav-list li {
    opacity: 0;
    transform: translateX(50px);
    animation: slideIn 0.5s ease forwards;
  }

  .nav-list.active li:nth-child(1) {
    animation-delay: 0.1s;
  }

  .nav-list.active li:nth-child(2) {
    animation-delay: 0.2s;
  }

  .nav-list.active li:nth-child(3) {
    animation-delay: 0.3s;
  }

  .nav-list.active li:nth-child(4) {
    animation-delay: 0.4s;
  }

  @keyframes slideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .nav-list a {
    color: white;
    font-size: 18px;
    padding: 10px 0;
    display: block;
    position: relative;
  }

  /* Soulignement animé au survol */
  .nav-list a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF84F7;
    transition: width 0.3s ease;
  }

  .nav-list a:hover::after {
    width: 100%;
  }

  .hamburger {
    display: flex; 
    flex-direction: column;
    align-items: flex-end;
  }

  /* Overlay sombre optionnel */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
  }

  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

