/* header.css - Styles spécifiques au header */

/* Header */
header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: var(--logo-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

nav {
  display: flex;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  height: calc(var(--header-height) - 15px);
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  color: #F5F5F5;
  margin: 15px 0;
}

.nav-links li {
  margin-left: 16px;
  position: relative;
}

.nav-links a {
  font-weight: 500;
  font-size: 16px;
  transition: color 0.3s;
  color: inherit;
  letter-spacing: -0.4px;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--dark-white);
}

/* Menu déroulant */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--light);
  width: 220px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
  list-style: none;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
}

.dropdown-menu li {
  margin: 0;
  padding: 8px 20px;
}

.dropdown-menu a {
  display: block;
  font-size: 14px;
  color: var(--dark);
  transition: all 0.3s;
}

.dropdown-menu a:hover {
  color: var(--primary);
  padding-left: 25px;
}

/* Menu mobile */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--light);
  cursor: pointer;
  margin-left: 10px;
}

@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: var(--header-height);
    width: auto;
  }
  
  .logo a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0;
  }
  
  .logo img {
    margin-left: 0;
    height: calc(var(--header-height) - 15px);
    width: auto;
  }
  
  nav {
    justify-content: space-between;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    bottom: 0; /* prend toute la hauteur restante pour le scroll */
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    margin: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    display: flex;
    z-index: 999;
    overflow-y: auto; /* permet le scroll vertical */
    -webkit-overflow-scrolling: touch; /* scroll fluide sur iOS */
    opacity: 0.9;
    background: var(--logo-color);
  }
  
  .nav-links.show {
    transform: translateX(0);
    width: 80%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-links li {
    margin: 15px 0;
    width: 80%;
    text-align: center;
  }
  
  /* Dropdown mobile */
  .dropdown-menu {
    position: static;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    width: 100%;
    box-shadow: none;
    padding: 0 20px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .dropdown.active .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding: 10px 20px;
    margin-top: 10px;
  }
  
  .dropdown-menu a {
    color: var(--light);
  }
  
  .dropdown-menu a:hover {
    color: var(--dark-white);
    padding-left: 15px;
  }
  
  /* Indicateur du dropdown */
  .dropdown > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 8px;
    font-size: 12px;
    transition: transform 0.3s;
  }
  
  .dropdown.active > a::after {
    transform: rotate(180deg);
  }
}
