/* =====================================================
   MEGA-MENU – PRESTASHOP 8.1 – THEME CLASSIC
   Fond coloré (3 couleurs) + texte alterné 1→2→1→2
===================================================== */

/* Fix position menu */
#_desktop_top_menu.position-static {
  position: relative !important;
}

#_desktop_top_menu .top-menu {
  position: relative;
}

#_desktop_top_menu .top-menu > li {
  position: static;
}

/* Fenêtre sous-menu */
#_desktop_top_menu .top-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  width: max-content;
  max-width: 420px;
  min-width: 220px;

  max-height: 360px;
  overflow-y: auto;

  padding: 12px 14px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  z-index: 9999;
}

/* Scrollbar */
#_desktop_top_menu .top-menu .sub-menu::-webkit-scrollbar {
  width: 6px;
}
#_desktop_top_menu .top-menu .sub-menu::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
}

/* Liste 1 colonne */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  margin: 0;
}

/* Li */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li {
  list-style: none;
}

/* Lien */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li > a {
  display: block;
  padding: 8px 14px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  transition: all 0.25s ease;
}

/* Fond 3 couleurs */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+1) > a {
  background: rgba(239,68,68,0.08);
}
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+2) > a {
  background: rgba(34,197,94,0.08);
}
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+3) > a {
  background: rgba(59,130,246,0.08);
}

/* Texte alterné 1→2→1→2 (noir/orange) */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(2n+1) > a {
  color: #000 !important;
}
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(2n) > a {
  color: #f97316 !important;
}

/* Hover : fond plus intense + texte blanc */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+1) > a:hover {
  background: rgba(239,68,68,0.25);
  color: #fff !important;
}
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+2) > a:hover {
  background: rgba(34,197,94,0.25);
  color: #fff !important;
}
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li:nth-child(3n+3) > a:hover {
  background: rgba(59,130,246,0.25);
  color: #fff !important;
}

/* Hover animé (Energy) */
#_desktop_top_menu
.top-menu
.sub-menu
ul[data-depth="1"] > li > a:hover {
  transform: translateX(6px) scale(1.03);
  filter: brightness(1.15);
}

/* ===========================
   MOBILE (même style que desktop)
=========================== */
@media (max-width: 992px) {

  /* Menu mobile */
  #mobile_menu,
  .mobile-menu,
  .menu-mobile {
    display: block !important;
    width: 100% !important;
  }

  /* Menu mobile sous-menu */
  #mobile_menu .sub-menu,
  .mobile-menu .sub-menu,
  .menu-mobile .sub-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  /* Liste 1 colonne */
  #mobile_menu .sub-menu ul[data-depth="1"],
  .mobile-menu .sub-menu ul[data-depth="1"],
  .menu-mobile .sub-menu ul[data-depth="1"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  /* Li */
  #mobile_menu .sub-menu ul[data-depth="1"] > li,
  .mobile-menu .sub-menu ul[data-depth="1"] > li,
  .menu-mobile .sub-menu ul[data-depth="1"] > li {
    list-style: none;
  }

  /* Lien mobile */
  #mobile_menu .sub-menu ul[data-depth="1"] > li > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li > a {
    display: block;
    padding: 12px 16px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.25s ease;
  }

  /* Fond 3 couleurs mobile */
  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+1) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+2) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(3n+3) > a {
    background: transparent;
  }

  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+1) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+1) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(3n+1) > a {
    background: rgba(239,68,68,0.08);
  }
  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+2) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+2) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(3n+2) > a {
    background: rgba(34,197,94,0.08);
  }
  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+3) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(3n+3) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(3n+3) > a {
    background: rgba(59,130,246,0.08);
  }

  /* Texte alterné mobile */
  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(2n+1) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(2n+1) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(2n+1) > a {
    color: #000 !important;
  }
  #mobile_menu .sub-menu ul[data-depth="1"] > li:nth-child(2n) > a,
  .mobile-menu .sub-menu ul[data-depth="1"] > li:nth-child(2n) > a,
  .menu-mobile .sub-menu ul[data-depth="1"] > li:nth-child(2n) > a {
    color: #f97316 !important;
  }

  /* Hover mobile */
  #mobile_menu .sub-menu ul[data-depth="1"] > li > a:hover,
  .mobile-menu .sub-menu ul[data-depth="1"] > li > a:hover,
  .menu-mobile .sub-menu ul[data-depth="1"] > li > a:hover {
    transform: translateX(6px) scale(1.03);
    filter: brightness(1.15);
  }

}

/* ===========================
   MESSAGE LOGIN (PRIX)
=========================== */
.login-to-see-price {
  display: block;
  margin-top: 8px;
  margin-bottom: 12px;
  animation: blink-smooth 1s infinite;
  font-weight: 700;
  color: #ff0000;
  font-size: 18px;
}
.login-to-see-price::after { content: " "; }
.login-price-link {
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
}
@keyframes blink-smooth {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===========================
   fix mobile pb (hamburger)
=========================== */
.menu-toggle,
.js-mobile-menu-toggle,
.mobile-menu-toggle,
.hamburger,
.navbar-toggler {
    z-index: 9999 !important;
    position: relative !important;
    pointer-events: auto !important;
}
.mobile-menu,
#mobile_menu,
.menu-mobile,
.mobile-nav {
    z-index: 9998 !important;
}
.mobile-menu {
    display: none;
}
.mobile-menu.active {
    display: block;
}
/* ===========================
   AFFICHER BARRE DE RECHERCHE SUR MOBILE
=========================== */

@media (max-width: 992px) {

  #search_widget,
  .search-widget,
  .search-widgets {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  #search_widget form {
    display: flex !important;
    width: 100% !important;
    align-items: center;
    justify-content: center;
  }

  #search_widget input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    border: 1px solid #ddd !important;
    font-size: 14px !important;
  }

  #search_widget i.search {
    display: block !important;
    margin-right: 8px !important;
    font-size: 20px !important;
  }

}
@media (max-width: 992px) {
  #search_widget {
    position: relative !important;
    z-index: 9999 !important;
  }
}
@media (max-width: 992px) {
  #search_widget {
    display: block !important;
  }

  .header .search-widgets {
    display: block !important;
  }
}
