/* ============================================================
   123HYDRA — MEGA-MENU CSS
   PrestaShop 9 · Hummingbird · v4.1
   ============================================================ */

/* --- Variables locales --- */
:root {
  --hm-primary:  #004a99;
  --hm-orange:   #ff6600;
  --hm-navy:     #0a1e3c;
  --hm-bg:       #ffffff;
  --hm-border:   #e5e7eb;
  --hm-col-gap:  2rem;
  --hm-z:        9999;
}

/* ============================================================
   MASQUER les dropdowns natifs Hummingbird sur desktop
   Structure réelle : li > div.menu-container.js-sub-menu
   (pas .dropdown-menu — Hummingbird n'utilise pas cette classe)
   ============================================================ */
@media (min-width: 992px) {
  #top-menu .menu-container,
  #top-menu .js-sub-menu,
  .main-menu__tree .menu-container,
  .main-menu__tree .js-sub-menu {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* ============================================================
   PANNEAU MEGA-MENU
   ============================================================ */
.hydra-mega-panel {
  display: none;
  position: fixed;
  top: 0;        /* positionné par JS via getBoundingClientRect */
  left: 0;
  right: 0;
  z-index: var(--hm-z);
  background: var(--hm-bg);
  border-top: 3px solid var(--hm-orange);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  animation: hydraFadeDown 0.15s ease;
}

.hydra-mega-panel.is-open {
  display: block;
}

@keyframes hydraFadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Conteneur interne */
.hydra-mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px 20px;
  display: flex;
  gap: 0;
}

/* ============================================================
   COLONNES
   ============================================================ */
.hydra-mega-cols {
  flex: 1;
  display: grid;
  gap: 0 var(--hm-col-gap);
}

/* Nombre de colonnes selon le contenu (défini par JS via style) */
.hydra-mega-col {}

/* Titre de colonne */
.hydra-mega-col-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--hm-orange);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 2px solid rgba(255, 102, 0, 0.15);
}

/* Liste d'items */
.hydra-mega-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hydra-mega-col ul li a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  transition: color 0.12s;
  line-height: 1.4;
}

.hydra-mega-col ul li a:hover {
  color: var(--hm-primary);
}

/* Lien "Voir tout →" */
.hydra-mega-col ul li.hydra-see-all a {
  color: var(--hm-orange);
  font-weight: 600;
  margin-top: 4px;
}

.hydra-mega-col ul li.hydra-see-all a:hover {
  color: #e05500;
}

/* ============================================================
   SIDEBAR HIGHLIGHTS
   ============================================================ */
.hydra-mega-sidebar {
  width: 200px;
  margin-left: 28px;
  padding-left: 24px;
  border-left: 1px solid var(--hm-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hydra-mega-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.hydra-highlight-card {
  display: block;
  padding: 12px 14px;
  background: rgba(0, 74, 153, 0.05);
  border: 1px solid rgba(0, 74, 153, 0.12);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.hydra-highlight-card:hover {
  background: rgba(0, 74, 153, 0.1);
}

.hydra-highlight-card .hc-icon {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.hydra-highlight-card .hc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hm-primary);
  display: block;
}

.hydra-highlight-card .hc-desc {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 2px;
  display: block;
}

/* Facettes hint */
.hydra-facet-hint {
  margin-top: auto;
  padding: 10px 12px;
  background: rgba(255, 102, 0, 0.07);
  border: 1px solid rgba(255, 102, 0, 0.2);
  border-radius: 8px;
  font-size: 11.5px;
  color: #6b7280;
}

.hydra-facet-hint strong {
  display: block;
  color: var(--hm-orange);
  font-size: 12px;
  margin-bottom: 2px;
}

/* ============================================================
   BARRE POPULAR SEARCHES
   ============================================================ */
.hydra-mega-footer {
  background: rgba(0, 74, 153, 0.04);
  border-top: 1px solid var(--hm-border);
  padding: 8px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hydra-mega-footer-label {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.hydra-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--hm-primary);
  background: rgba(0, 74, 153, 0.08);
  padding: 3px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}

.hydra-tag:hover {
  background: rgba(0, 74, 153, 0.16);
  color: var(--hm-primary);
}

/* ============================================================
   OVERLAY (fermeture au clic extérieur)
   ============================================================ */
.hydra-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: calc(var(--hm-z) - 1);
  background: transparent;
}

.hydra-overlay.is-active {
  display: block;
}

/* ============================================================
   INDICATEUR ACTIF & HOVER sur le nav-link du dessus
   ============================================================ */
@media (min-width: 992px) {
  /* Force la couleur orange au survol (hover) ET quand le menu est ouvert (active) */
  #top-menu > li:hover > a,
  #top-menu > li.hydra-active > a,
  .main-menu__tree > li:hover > a,
  .main-menu__tree > li.hydra-active > a,
  .js-menu-desktop > li:hover > a,
  .js-menu-desktop > li.hydra-active > a {
    color: var(--hm-orange) !important;
  }

  /* Ajoute la petite ligne en dessous uniquement quand le panneau est ouvert */
  #top-menu > li.hydra-active > a,
  .main-menu__tree > li.hydra-active > a,
  .js-menu-desktop > li.hydra-active > a {
    border-bottom: 3px solid var(--hm-orange);
  }
}

/* ============================================================
   MOBILE — mega-menu désactivé, Hummingbird reprend la main
   ============================================================ */
@media (max-width: 991px) {
  .hydra-mega-panel,
  .hydra-overlay {
    display: none !important;
  }

  #top-menu .menu-container,
  #top-menu .js-sub-menu,
  .main-menu__tree .menu-container,
  .main-menu__tree .js-sub-menu {
    display: block !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }
}