/* ==================== VARIABLES ==================== */
:root {
  --primary-color: #1a73e8;
  --dark: #1a1a1a;
  --light: #ffffff;
  --nav-height: 80px;
}

/* ==================== NAVIGATION ==================== */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Effet scroll - navigation compacte */
.main-nav.scrolled {
  height: 65px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-logo img {
  height: 50px;
  transition: height 0.3s ease, transform 0.25s ease;
}

.main-nav.scrolled .nav-logo img {
  height: 40px;
}

.nav-logo:hover img {
  transform: scale(1.05);
}

/* Menu principal */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 35px;
  align-items: center;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-menu > li > a:hover {
  color: var(--primary-color);
  background: rgba(26, 115, 232, 0.08);
}

/* Icône dropdown */
.dropdown-icon {
  transition: transform 0.3s ease;
  margin-top: 2px;
}

.has-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Menu déroulant */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 260px;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 12px 20px;
  color: var(--dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
  background: rgba(26, 115, 232, 0.08);
  border-left-color: var(--primary-color);
  padding-left: 25px;
}

/* Partie droite de la navigation */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Sélecteur de langue */
.lang-switcher {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(26, 115, 232, 0.1);
  padding: 6px 15px;
  border-radius: 50px;
  border: 1px solid rgba(26, 115, 232, 0.2);
}

.lang-switcher a {
  text-decoration: none;
  color: var(--dark);
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lang-switcher a:hover {
  opacity: 0.9;
}

.lang-switcher a.active {
  color: var(--primary-color);
  opacity: 1;
}

.lang-switcher span {
  color: rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
}

/* Bouton menu mobile */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--dark);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* ==================== HERO SECTION ==================== */
.hero, .hero-petit {
  position: relative;
  height: 100vh;
  background: url("image/camionnette.webp") center center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding-bottom: 60px;
  justify-content: center;
  text-align: center;
  margin-top: var(--nav-height);
}

.hero-petit {
  height: 70vh;
}

.hero::before, .hero-petit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--light);
  text-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-content p {
  margin-top: 15px;
  font-size: 1.2rem;
  color: var(--light);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.45);
}

/* ANIMATION HERO ENTRÉE */
.nav-logo, .nav-menu, .nav-right, .hero-content {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.nav-logo { animation-delay: 0.1s; }
.nav-menu { animation-delay: 0.2s; }
.nav-right { animation-delay: 0.3s; }
.hero-content { animation-delay: 0.5s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .main-nav {
    padding: 0 25px;
  }
  
  .nav-menu {
    gap: 25px;
  }
  
  .nav-menu > li > a {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 0;
    gap: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: none;
    transition: all 0.4s ease;
  }
  
  .nav-menu.active {
    display: flex;
    padding: 20px;
    animation: slideDown 0.4s ease forwards;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  .nav-menu > li > a {
    width: 100%;
    padding: 15px 10px;
    justify-content: space-between;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(26, 115, 232, 0.05);
    margin-top: 10px;
    border-radius: 6px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: none;
  }
  
  .has-dropdown.active .dropdown-menu {
    max-height: 300px;
    opacity: 1;
    padding: 8px 0;
  }
  
  .has-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
  }
  
  .dropdown-menu li a {
    padding: 10px 20px;
  }
  
  .lang-switcher {
    order: -1;
  }
  
  .hero, .hero-petit {
    padding-bottom: 50px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-nav {
    padding: 0 15px;
    height: 65px;
  }
  
  :root {
    --nav-height: 65px;
  }
  
  .nav-logo img {
    height: 40px;
  }
  
  .hero, .hero-petit {
    padding-bottom: 30px;
  }
  
  .hero-content h1 {
    font-size: 1.5rem;
  }
  
  .hero-content p {
    font-size: 0.9rem;
  }
}
