/**
 * Styles pour le module TopBanner - Compatible avec le thème ecco_bella
 */

/* Masquer la navigation par défaut du thème pour éviter les duplications */
nav.header-nav.tablet-h {
    display: none !important;
}

/* Conteneur principal du header */
.flex-header-container {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    padding: 15px 15px; /* Augmentation du padding vertical de 10px à 15px */
    margin: 0 auto;
    max-width: 1440px;
    background-color: transparent !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    gap: 15px; /* Espacement entre les colonnes */
    min-height: 80px; /* Ajout d'une hauteur minimale */
}

/* === BLOC IMMUABLE : Logo === */
.flex-header-col.flex-header-logo {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  height: 90px !important;
  overflow: visible;
}

.flex-header-logo > div,
.flex-header-logo a,
.flex-header-logo img.logo {
    margin-left: 0 !important;
}

.flex-header-logo img.logo {
    max-width: 100% !important;
    max-height: 88px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    display: block;
    margin: 0 auto;
    padding: 0;
}
/* === FIN BLOC IMMUABLE LOGO === */

.flex-header-logo img.logo {
    max-width: 100%;
    max-height: 64px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 0;
}

/* Style pour la colonne logo */
.flex-header-col.flex-header-logo {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

/* Styles uniformes pour toutes les colonnes sauf la searchbar */
.flex-header-col.flex-header-col2 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  order: 1;
}

.flex-header-col.flex-header-col4 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  order: 2;
}

.flex-header-col.flex-header-col5 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  order: 4;
}

.flex-header-col.flex-header-col6 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
  order: 5;
}

.flex-header-col.flex-header-col7 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

.flex-header-col.flex-header-col8 {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}

/* Styles spécifiques supplémentaires pour la colonne 7 */
.flex-header-col.flex-header-col7 {
    order: 6;
    justify-content: flex-end !important;
}

/* Styles spécifiques supplémentaires pour la colonne 8 */
.flex-header-col.flex-header-col8 {
    order: 7;
    justify-content: flex-end !important;
}

/* Styles pour le bloc userinfo avec avatar et dropdown */
.topbanner-userinfo-column {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.flex-header-userinfo {
    display: flex;
    align-items: center;
}

/* Styles pour le wrapper de l'avatar */
.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

/* Style du bouton avatar */
.user-avatar-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style de l'icône avatar */
.user-avatar-icon {
    font-size: 28px;
    color: #333;
    transition: color 0.3s ease;
    display: block;
}

.user-avatar-button:hover .user-avatar-icon,
.user-avatar-wrapper:hover .user-avatar-icon {
    color: #2fb5d2;
}

/* Styles du dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    border: 1px solid #eee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.user-dropdown-inner {
    padding: 5px 0;
}

/* Titre du dropdown */
.dropdown-title {
    display: block;
    padding: 10px 15px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    color: #333;
}

/* Éléments du dropdown */
.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background-color: transparent !important;
    color: #2fb5d2;
}

/* Afficher le dropdown au survol ou quand actif */
.user-avatar-wrapper:hover .user-dropdown,
.flex-header-col8 .user-avatar-wrapper:hover .user-dropdown,
.flex-header-userinfo .user-avatar-wrapper:hover .user-dropdown,
.topbanner-userinfo-column .user-avatar-wrapper:hover .user-dropdown,
.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Flèche du dropdown */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: white;
    transform: rotate(45deg);
    border-left: 1px solid #ddd;
    border-top: 1px solid #ddd;
}

/* Styles pour le bloc userinfo avec avatar et dropdown */
.topbanner-userinfo-column {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

.flex-header-userinfo {
    display: flex;
    align-items: center;
}

/* Styles pour le wrapper de l'avatar */
.user-avatar-wrapper {
    position: relative;
    display: inline-block;
}

/* Style du bouton avatar */
.user-avatar-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style de l'icône avatar */
.user-avatar-icon {
    font-size: 28px;
    color: #333;
    transition: color 0.3s ease;
    display: block;
}

.user-avatar-button:hover .user-avatar-icon,
.user-avatar-wrapper:hover .user-avatar-icon {
    color: #2fb5d2;
}

/* === BLOC IMMUABLE : Searchbar centrale === */
.flex-header-col-center {
    flex: 0 0 600px !important;
    min-width: 0 !important;
    max-width: 600px !important;
    width: 600px !important;
    justify-content: center;
    align-items: center;
    padding: 0;
    display: flex;
    height: 90px !important;
    min-height: 70px !important;
    position: relative;
    margin-left: auto !important;
    margin-right: auto !important;
    z-index: 5;
    order: 3;
}

/* === Styles pour le bloc userinfo natif === */
.topbanner-userinfo-column .user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.topbanner-userinfo-column .user-info a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #BB0A5F;
    transition: color 0.3s ease;
    margin-left: 15px;
}

.topbanner-userinfo-column .user-info a:hover {
    color: #BB0A5F;
}

.topbanner-userinfo-column .user-info .material-icons {
    font-size: 28px;
    margin-right: 5px;
}

.topbanner-userinfo-column .user-info .login .material-icons {
    font-size: 28px;
    margin-right: 5px;
}

/* Style spécifique pour l'icône de connexion */
.topbanner-userinfo-column .user-info .login {
    font-weight: bold;
}

/* Styles pour l'infobulle personnalisée */
.tooltip-container {
    position: relative;
}

.tooltip-container::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: pre-line;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 1000;
    font-weight: normal;
    margin-top: 10px;
    max-width: 120px;
    line-height: 1.2;
}

.tooltip-container::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent rgba(51, 51, 51, 0.9) transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
    z-index: 1000;
    margin-top: 5px;
}

.tooltip-container:hover::after,
.tooltip-container:hover::before {
    opacity: 1;
    visibility: visible;
}

.flex-header-col-center > .search-center-container,
.flex-header-col-center > .search-center-giant {
    min-height: 70px !important;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}



    min-height: 70px !important;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}


    font-size: 1.35em !important;
    padding: 18px 56px 18px 22px !important;
    min-height: 54px !important;
    height: 54px !important;
    border-radius: 32px !important;
}

.flex-header-col-center > .search-center-container,
.flex-header-col-center > .search-center-giant {
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}



    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}
/* === FIN BLOC IMMUABLE SEARCHBAR === */

.flex-header-col3,
.flex-header-col-search {
    flex: 10 1 0 !important;
    min-width: 0;
    max-width: none;
    justify-content: center;
    align-items: center;
    padding: 0 1vw;
}

.search-center-container,
.search-center-large {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-center-container form,
.search-center-large form {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    gap: 0;
}

.search-center-container input[type="text"],
.search-center-large input[type="text"] {
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 1.15em;
    padding: 10px 16px;
    border-radius: 28px;
    border: 1px solid #c1c1c1;
    background: #fff;
}

.search-center-container button,
.search-center-large button {
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: none !important;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    cursor: pointer;
}

@media (max-width: 900px) {
    .flex-header-col3,
    .flex-header-col-search {
        min-width: 80px;
        max-width: 99vw;
        padding: 0 1vw;
    }
    .search-center-container,
    .search-center-large {
        max-width: 99vw;
    }
}

.search-center-container,
.search-center-large {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-header-container {
    gap: 0.5vw;
}

@media (max-width: 900px) {
    .flex-header-col3,
    .flex-header-col-search {
        min-width: 120px;
        max-width: 98vw;
        padding: 0 2vw;
    }
    .search-center-container,
    .search-center-large {
        max-width: 98vw;
    }
}

.flex-header-center {
    flex: 2 1 0;
    min-width: 160px;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 0 15px;
}

@media (max-width: 900px) {
    .flex-header-container {
        flex-wrap: wrap;
        padding: 6px 4px;
    }
    .flex-header-logo {
        max-width: 140px;
    }
    .flex-header-center {
        min-width: 80px;
        max-width: 100vw;
    }
    .flex-header-col2,
    .flex-header-col4,
    .flex-header-col5,
    .flex-header-col6,
    .flex-header-col7 {
        min-width: 45px;
        max-width: 90px;
        padding: 0 2px;
    }
}

/* Nouvelle structure à colonnes flexibles */
.flex-header-col {
    display: flex;
    align-items: center;
    min-width: 0;
    justify-content: center;
    gap: 8px;
}

/* Colonnes dynamiques du header */
.flex-header-col2,
.flex-header-col4,
.flex-header-col5,
.flex-header-col6,
.flex-header-col7 {
    flex: 1 1 0;
    min-width: 70px;
    max-width: 180px;
    justify-content: center;
    padding: 0 8px;
}

/* Espacement horizontal entre toutes les colonnes dynamiques */
.flex-header-col2:not(:last-child),
.flex-header-col4:not(:last-child),
.flex-header-col5:not(:last-child),
.flex-header-col6:not(:last-child),
.flex-header-col7:not(:last-child) {
    margin-right: 8px;
}

/* Responsive pour les colonnes dynamiques */
@media (max-width: 900px) {
    .flex-header-col2,
    .flex-header-col4,
    .flex-header-col5,
    .flex-header-col6,
    .flex-header-col7 {
        min-width: 45px;
        max-width: 90px;
        padding: 0 2px;
    }
}

.flex-header-logo {
    flex: 0 0 auto;
    max-width: 220px;
    margin-right: 12px;
}
.flex-header-center {
    flex: 1 1 0;
    justify-content: center;
    min-width: 160px;
    max-width: 600px;
    position: relative;
    z-index: 1;
}
.flex-header-before-center,
.flex-header-after-center,
.flex-header-user,
.flex-header-cart {
    flex: 0 1 auto;
    justify-content: center;
    min-width: 50px;
}

/* Responsive exemple */
@media (max-width: 900px) {
  .flex-header-container {
    flex-wrap: wrap;
    padding: 6px 4px;
  }
  .flex-header-logo {
    max-width: 140px;
  }
  .flex-header-center {
    min-width: 80px;
    max-width: 100vw;
  }
}

/* Zone du logo */
.flex-header-left {
    flex: 0 0 auto;
    width: auto;
    max-width: 200px;
    margin-right: 15px;
}

/* Zone sous le logo */
.flex-header-logo-elements {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 5px;
}

/* Zone centrale (barre de recherche) */
.flex-header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    padding: 0 15px;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

/* Zone à droite (panier et compte utilisateur) */
.flex-header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-left: 15px;
    min-width: 120px;
}

/* Styles spécifiques pour la barre de recherche du thème ecco_bella */
/* Ancienne searchbar supprimée */

.flex-header-center .search-wrapper {
    width: 100%;
    max-width: 100%;
}

    display: flex;
    position: relative;
}


    width: 100%;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 10px 40px 10px 15px;
    height: 42px;
}


    position: absolute;
    right: 0;
    top: 0;
    border: none;
    background: transparent;
    padding: 10px 15px;
    height: 42px;
}

/* Colonnes flexibles */
.flex-header-col1,
.flex-header-col2,
.flex-header-col3,
.flex-header-col4 {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin: 0 10px;
    min-height: 40px;
    justify-content: center;
}

/* Styles pour le service client */
.clientservice-container {
    margin: 5px 0;
}

.mobile_item_wrapper {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.mobile_item_wrapper span {
    margin-right: 5px;
}

/* Styles pour le téléphone */
#header-phone-container {
    margin: 5px 0;
}

.header-phone-link {
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

/* Styles pour le bouton ordonnance */
#header-ordonnance-container {
    margin: 5px 0;
}

.desktop-ordonnance-btn-header {
    display: inline-block;
    padding: 8px 15px;
    background-color: #627866;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

/* Styles pour la wishlist */
.an_wishlist-nav-link {
    margin: 5px 0;
}

.wishlist-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
}

/* Styles pour le panier */
.blockcart {
    margin: 5px 0;
}

.cart-link {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
}

.cart-products-count {
    margin-left: 5px;
    background-color: #2fb5d2;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Styles pour la bannière supérieure */
.top-header {
    padding: 10px 0;
    text-align: center;
    background-color: #E7EDE9 !important;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* === Dropdown Connexion userinfo === */
.flex-header-userinfo .user-dropdown-wrapper {
  position: relative;
  display: inline-block;
}
.flex-header-userinfo .user-link.not-logged {
  pointer-events: auto;
  cursor: pointer;
}

.flex-header-userinfo .user-dropdown {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  min-width: 120px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  padding: 0.5em 0.75em;
  z-index: 9999;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  visibility: hidden;
}
.flex-header-userinfo .user-dropdown-wrapper:hover .user-dropdown,
.flex-header-userinfo .user-dropdown-wrapper:focus-within .user-dropdown,
.flex-header-userinfo .user-dropdown-wrapper .user-dropdown:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(4px);
  visibility: visible;
}
.flex-header-userinfo .user-login-dropdown {
  color: #006400;
  text-decoration: none;
  font-weight: 500;
  font-family: 'Montserrat', Arial, sans-serif;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  display: inline-block;
  transition: background 0.15s, color 0.15s;
}
.flex-header-userinfo .user-login-dropdown:hover,
.flex-header-userinfo .user-login-dropdown:focus {
  background: #f2f7ea;
  color: #8BAF1A;
}

.banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    display: flex;
    justify-content: center;
}

.banner-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.banner-link:hover {
    text-decoration: underline;
}

.banner-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.top-header img {
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
}

.top-header h3, .top-header p {
    margin: 0;
    display: inline-block;
}

/* Styles pour le popup au survol */
.banner-popup {
    position: fixed;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    display: none;
    pointer-events: none;
    transition: opacity 0.2s;
    left: 50%;
    top: 60px;
    transform: translateX(-50%);
    max-width: 96vw;
    max-height: 90vh;
    overflow-y: auto;
}

.banner-popup.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.banner-popup-content {
    box-sizing: border-box;
    padding: 32px 24px 24px 24px;
    margin: 0 auto;
    width: 100%;
    max-width: 650px;
    background: #f8f9fa;
    border-radius: 18px;
    font-family: 'Segoe UI',Arial,sans-serif;
    color: #222;
    overflow: hidden;
}

/* Styles pour préserver le formatage du contenu */
.banner-popup h1, .banner-popup h2, .banner-popup h3, 
.banner-popup h4, .banner-popup h5, .banner-popup h6 {
    margin-bottom: 10px;
}

.banner-popup p {
    margin-bottom: 10px;
}

.banner-popup ul, .banner-popup ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.banner-popup table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.banner-popup table td, .banner-popup table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.banner-popup img {
    max-width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 991px) {
    .flex-header-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .flex-header-left {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .flex-header-center {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .flex-header-logo-elements {
        align-items: center;
    }
    
    .flex-header-col1,
    .flex-header-col2,
    .flex-header-col3,
    .flex-header-col4 {
        flex: 1 1 auto;
        justify-content: center;
        margin: 5px;
    }
}

@media (max-width: 767px) {
    .flex-header-col1,
    .flex-header-col2,
    .flex-header-col3,
    .flex-header-col4 {
        flex: 0 0 auto;
        width: calc(50% - 20px);
    }
}
