/**
 * Styles du Header Belesa
 */

/* Bannière */
.belesa-banner {
    background: white;
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.belesa-banner.hidden {
    display: none;
}

.belesa-banner-content {
    color: #0c3436;
    font-weight: 300;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.belesa-banner-cta {
    color: #0c3436;
    font-weight: 200;
    text-decoration: underline;
    transition: opacity 0.3s;
    font-family: 'Poppins', sans-serif;
}

.belesa-banner-cta:hover {
    opacity: 0.7;
}

/* Header - Desktop: pas de sticky, Tablet/Mobile: sticky */
.belesa-header {
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    padding: 25px 30px;
    z-index: 1000;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    position: absolute;
}

.woocommerce-page .belesa-header {
    position: initial;
}

@media (max-width: 1100px) {
    .belesa-header {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
        backdrop-filter: blur(5px);
    }
}

.belesa-header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Menus */
.belesa-menu-left,
.belesa-menu-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.belesa-menu-left {
    justify-content: flex-start;
}

.belesa-menu-right {
    justify-content: flex-end;
}

.belesa-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 500;
    color: white;
    margin: 0;
    padding: 0;
}

.belesa-menu li {
    position: relative;
}

.belesa-menu a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    padding: 8px 0;
    transition: opacity 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.belesa-menu a:hover {
    opacity: 0.8;
    color: white;
}

/* Flèche uniquement pour les items avec sous-menu */
.belesa-menu li.menu-item-has-children > a::after {
    content: '';
    width: 12px;
    height: 12px;
    margin-left: 5px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12,15c-.916,0-1.776-.356-2.424-1.004l-4.418-4.131c-.201-.188-.212-.505-.023-.707.188-.201.505-.212.707-.023l4.43,4.143c.941.939,2.527.928,3.445.012l4.441-4.154c.202-.188.519-.178.707.023.188.202.178.519-.023.707l-4.43,4.143c-.636.636-1.496.992-2.412.992Z' fill='white'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s;
}

.belesa-menu li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Panier */
.belesa-cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.belesa-cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

.belesa-cart-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.belesa-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #0c3436;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
}

.belesa-cart-text {
    display: none;
}

.belesa-mobile-cart {
    display: none;
}

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

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

.belesa-menu .sub-menu li {
    padding: 0;
}

.belesa-menu .sub-menu a {
    color: #0c3436;
    text-decoration: none;
    font-weight: 300;
    display: block;
    padding: 10px 20px;
    transition: background 0.3s;
    font-size: 14px;
}

.belesa-menu .sub-menu a:hover {
    background: #f5f5f5;
}

/* Logo */
.belesa-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.belesa-logo a {
    display: block;
    line-height: 0;
}

.belesa-logo img {
    max-height: 50px;
    width: auto;
    height: auto;
    display: block;
}

/* Mobile Menu Toggle */
.belesa-mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 0;
    cursor: pointer;
    font-weight: 600;
    border-radius: 5px;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.belesa-mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.belesa-mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.belesa-mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.belesa-mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.belesa-mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Menu mobile plein écran */
.belesa-mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    overflow: hidden;
}

.belesa-mobile-menu-overlay.active {
    display: block;
}

.belesa-mobile-menu-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.belesa-mobile-menu-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.belesa-mobile-menu-title {
    color: white;
    font-weight: 600;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
}

.belesa-mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.belesa-mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}

.belesa-mobile-menu-level {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    background: rgba(0,0,0,0.95);
    min-height: 100%;
}

.belesa-mobile-menu-level.active {
    transform: translateX(0);
}

.belesa-mobile-menu-level.prev {
    transform: translateX(-100%);
}

.belesa-mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.belesa-mobile-menu-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.belesa-mobile-menu-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
}

.belesa-mobile-menu-link.has-submenu::after {
    content: '';
    width: 12px;
    height: 12px;
    margin-left: 10px;
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12,15c-.916,0-1.776-.356-2.424-1.004l-4.418-4.131c-.201-.188-.212-.505-.023-.707.188-.201.505-.212.707-.023l4.43,4.143c.941.939,2.527.928,3.445.012l4.441-4.154c.202-.188.519-.178.707.023.188.202.178.519-.023.707l-4.43,4.143c-.636.636-1.496.992-2.412.992Z' fill='white'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-90deg);
}

.belesa-mobile-menu-submenu {
    list-style: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 0;
}

.belesa-mobile-menu-submenu-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.belesa-mobile-menu-submenu-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 300;
    font-size: 14px;
    padding: 12px 0;
    display: block;
    font-family: 'Poppins', sans-serif;
}

/* Responsive */
@media (max-width: 1024px) {
    .belesa-menu {
        gap: 20px;
    }

    .belesa-menu a {
        font-size: 14px;
    }
}

@media (max-width: 1100px) {
    .belesa-banner {
        padding: 10px 15px;
        font-size: 12px;
    }

    .belesa-header {
        padding: 12px 20px;
    }

    .belesa-header-wrapper {
        flex-wrap: wrap;
    }

    .belesa-mobile-menu-toggle {
        display: flex;
        order: 1;
    }
    
    .belesa-mobile-cart {
        display: flex;
        order: 3;
    }

    .belesa-menu-left,
    .belesa-menu-right {
        display: none;
    }

    .belesa-logo {
        order: 2;
        flex: 1;
        justify-content: center;
    }

    .belesa-mobile-cart .belesa-cart-item {
        padding: 0;
    }
    
    .belesa-mobile-cart .belesa-cart-icon-wrapper {
        position: relative;
        display: inline-block;
    }
    
    .belesa-mobile-cart .belesa-cart-badge {
        position: absolute;
        top: -8px;
        right: -8px;
    }
}
