/* ============================================
   HEADER DESKTOP - STYLE 2 "PILULE"
   Design : Pilule blanche fixe sur fond transparent
   ============================================ */

/* Header fixe (pas de background, juste la pilule) */
.header-2 {
  position: fixed;
  top: 20px;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: none; /* Permet de cliquer à travers l'espace vide */
}

/* Container pour centrer la pilule */
.header-2-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  pointer-events: none;
}

/* Pilule blanche */
.header-2-pill {
  background: #ffffff;
  border-radius: 50px;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  pointer-events: auto; /* Réactive les événements sur la pilule */
}

/* Effet au survol */
.header-2-pill:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* ============================================
   LOGO
   ============================================ */

.header-2-logo {
  flex-shrink: 0;
}

.header-2-logo a {
  display: inline-block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--bs-gray-darker);
  text-decoration: none;
  transition: color 0.3s ease;
}

.header-2-logo a:hover {
  color: var(--bs-primary);
}

.header-2-logo .custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.header-2-logo .custom-logo {
  max-height: 40px;
  width: auto;
  height: auto;
}

/* ============================================
   MENU WORDPRESS (Navigation normale)
   ============================================ */

.header-2-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-2-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-2-menu-list > li {
  position: relative;
}

.header-2-menu-list > li > a {
  color: var(--bs-gray-darker);
  font-weight: 500;
  font-size: var(--text-base);
  text-decoration: none;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
  display: block;
}

.header-2-menu-list > li > a:hover {
  color: var(--bs-primary);
}

/* Soulignement au survol */
.header-2-menu-list > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--bs-primary);
  transition: width 0.3s ease;
}

.header-2-menu-list > li > a:hover::after {
  width: 100%;
}

/* Item actif */
.header-2-menu-list .current-menu-item > a,
.header-2-menu-list .current_page_item > a {
  color: var(--bs-primary);
}

.header-2-menu-list .current-menu-item > a::after,
.header-2-menu-list .current_page_item > a::after {
  width: 100%;
}

/* Sous-menus (dropdown) */
.header-2-menu-list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.header-2-menu-list > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-2-menu-list .sub-menu li {
  padding: 0;
}

.header-2-menu-list .sub-menu a {
  padding: 0.75rem 1.5rem;
  display: block;
  color: var(--bs-gray-darker);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.header-2-menu-list .sub-menu a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--bs-primary);
}

/* ============================================
   ACTIONS (Boutons & Icônes)
   ============================================ */

.header-2-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Boutons (Contact, CTA custom) */
.header-2-actions .btn {
  font-weight: 600;
  font-size: var(--text-sm);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  border: none;
}

.header-2-actions .btn-primary {
  background-color: var(--bs-primary);
  color: white;
}

.header-2-actions .btn-primary:hover {
  background-color: var(--bs-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
}

/* Icônes (Panier, Mon compte, Recherche) */
.header-2-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--bs-gray-darker);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.header-2-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--bs-primary);
}

/* Badge pour le compteur du panier */
.header-2-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--bs-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.5em;
  border-radius: 50px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================
   BOUTON BURGER (Mobile)
   ============================================ */

.header-2-burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--bs-gray-darker);
  transition: color 0.3s ease;
}

.header-2-burger:hover {
  color: var(--bs-primary);
}

.header-2-burger .line {
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform-origin: center;
}

.header-2-burger.active .line.top {
  transform: rotate(45deg) translate(5px, 5px);
}

.header-2-burger.active .line.middle {
  opacity: 0;
}

.header-2-burger.active .line.bottom {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Focus states */
.header-2-burger:focus:not(:focus-visible) {
  outline: 0 !important;
  box-shadow: none !important;
}

.header-2-burger:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablette */
@media (max-width: 1200px) {
  .header-2-pill {
    gap: 2rem;
    padding: 0.75rem 1.5rem;
  }

  .header-2-menu-list {
    gap: 1.5rem;
  }

  .header-2-menu-list > li > a {
    font-size: var(--text-sm);
  }
}

/* Mobile */
@media (max-width: 991px) {
  .header-2 {
    top: 10px;
  }

  .header-2-container {
    padding: 0 1rem;
  }

  .header-2-pill {
    gap: 1rem;
    padding: 0.5rem 1rem;
    justify-content: space-between;
  }

  .header-2-logo .custom-logo {
    max-height: 32px;
  }
}

/* Très petit mobile */
@media (max-width: 480px) {
  .header-2-pill {
    padding: 0.5rem 0.75rem;
  }
}

/* ============================================
   SPACING POUR LE CONTENU (fixed header)
   ============================================ */

/* Ajouter du padding-top au body pour compenser le header fixe */
body.has-header-2 {
  padding-top: 100px;
}

@media (max-width: 991px) {
  body.has-header-2 {
    padding-top: 80px;
  }
}

/* ============================================
   VARIANTE : Pilule avec backdrop-filter (effet glassmorphism)
   Décommenter pour un effet de transparence moderne
   ============================================ */

/*
.header-2-pill {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
*/

/* ============================================
   ANIMATION AU SCROLL (Optionnel)
   Pilule plus compacte au scroll
   ============================================ */

.header-2.scrolled .header-2-pill {
  padding: 0.5rem 1.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.header-2.scrolled .header-2-logo .custom-logo {
  max-height: 32px;
}
