/* ================================================================
   HEADER.CSS - ESOTICA THÈME ENFANT (VERSION NETTOYÉE)
   Contient : Bannière, Logo, Icônes modernes, Recherche overlay
   ================================================================ */

/* ================================================================
   1. BANNIÈRE PHENIX PLEINE LARGEUR
   ================================================================ */
#header .banner {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: none;
  text-align: center;
  overflow: hidden;
  max-height: 100%;
}
#header .banner .row {
  margin: 0;
}
#header .banner a img {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
  object-fit: cover;
  object-position: center;
}
.banner .container {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
}

/* ================================================================
   2. STRUCTURE GÉNÉRALE DU HEADER / LOGO
   ================================================================ */
header {
  z-index: 1;
  position: relative;
  background: #fff;
  padding-bottom: 15px;
}
header .nav {
  background: #333;
}
header .nav .row {
  margin: 0;
}
header .nav nav {
  width: 100%;
}
header .row {
  position: relative;
}
header .row > .container {
  position: relative;
}
header .row #header_logo {
  padding-top: 15px;
}
@media (max-width: 992px) {
  header .row #header_logo {
    padding-top: 40px;
  }
}
@media (max-width: 767px) {
  header .row #header_logo {
    padding-top: 15px;
  }
  header .row #header_logo img {
    margin: 0 auto;
  }
}
.ie8 #header #header_logo {
  width: 350px;
}

/* ================================================================
   3. ICÔNES MODERNES (loupe / compte / panier)
   ================================================================ */

/* Masquer ancienne recherche Presta */
#search_block_top {
  display: none !important;
}

/* Masquer liens contact/connexion anciens dans la barre de nav */
.nav > li > a[href*="contact"],
.nav > li > a[href*="authentication"] {
  display: none !important;
}

.header-top-right {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 2rem !important;
  padding: 1rem 2rem !important;
  position: relative !important;
  pointer-events: none !important; /* ne couvre pas le menu principal */
}

.modern-nav-icons {
  display: flex !important;
  align-items: center !important;
  gap: 1.5rem !important;
  position: absolute;
  top: 35px;
  right: 0;
  z-index: 10;
  pointer-events: auto !important; /* icônes cliquables */
}

.modern-nav-icon {
  width: 24px !important;
  height: 24px !important;
  cursor: pointer !important;
  transition: opacity .2s ease !important;
  stroke: #333 !important;
  fill: none !important;
}
.modern-nav-icon:hover {
  opacity: .7 !important;
}

/* ================================================================
   4. BARRE DE RECHERCHE OVERLAY
   ================================================================ */
.modern-search-overlay {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 9999;
}
.modern-search-overlay.active {
  display: block;
}
.modern-search-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
}
.modern-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.modern-search-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  fill: #666;
}
.modern-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 2rem;
  font-family: 'Cardo', serif;
  padding: 0;
  margin: 0;
  width: 100%;
  color: #333;
}
.modern-search-input::placeholder {
  color: #ccc;
}
.modern-search-close {
  position: absolute !important;
  right: 1.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 3rem !important;
  color: #666 !important;
  line-height: 1 !important;
}
.modern-search-close:hover {
  color: #333 !important;
}

/* Correction widget recherche natif */
#search_widget,
#search_widget form {
  background: transparent !important;
  box-shadow: none !important;
}

/* ================================================================
   5. RESPONSIVE MOBILE (header + icônes + recherche)
   ================================================================ */
@media (max-width: 768px) {
  .header-top-right {
    padding: 1rem !important;
  }
  .modern-nav-icons {
    gap: 1rem !important;
    top: 20px;
  }

  /* Logo centré en mobile */
  .logo {
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 20 !important;
  }

  .modern-search-input {
    font-size: 1.5rem !important;
  }
  .modern-search-close {
    font-size: 2rem !important;
  }

  /* 🔧 Correction Firefox mobile – éviter le débordement horizontal de la bannière */
  #header .banner {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ================================================================
   6. MICRO-ADAPTATIONS PETITS TÉLÉPHONES
   ================================================================ */
@media (max-width: 479px) {
  .modern-nav-icons {
    gap: .8rem !important;
  }
  .modern-nav-icon {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ================================================================
   ESOTICA – Comportement des 3e niveaux du mega-menu BOUTIQUE
   ================================================================ */

/* On masque tous les 3e niveaux par défaut */
#block_top_menu .sf-menu > li > ul.submenu-container > li > ul {
  display: none !important;
}

/* On n'affiche le 3e niveau que quand on survole le 2e niveau */
#block_top_menu .sf-menu > li > ul.submenu-container > li:hover > ul {
  display: block !important;
}

/* On s'assure que le 3e niveau reste bien dans la colonne du 2e niveau */
#block_top_menu .sf-menu > li > ul.submenu-container > li > ul {
  position: relative !important;
  left: 0 !important;
  top: auto !important;
  margin-top: 8px !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Chaque lien de 3e niveau occupe bien une ligne */
#block_top_menu .sf-menu > li > ul.submenu-container > li > ul > li > a {
  display: block;
  white-space: normal;
}

/* Raccourci "☰ Menu" pour mobile */
.mobile-menu-shortcut {
    text-align: center;
    margin: 10px 0 0;
}

/* On masque ce bouton sur desktop */
@media (min-width: 768px) {
    .mobile-menu-shortcut {
        display: none;
    }
}

/* Style du lien menu sur mobile */
@media (max-width: 767px) {
    .mobile-menu-link {
        display: inline-block;
        padding: 8px 14px;
        border-radius: 20px;
        border: 1px solid #ccc;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }
}




/* ================================================================
   FIN DU FICHIER HEADER.CSS
   ================================================================ */
