/* ====================================
   STYLES DU LOADER DE PAGE (PRELOADER)
   ==================================== */

   #preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f8f8; 
    z-index: 99999; 
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Style pour le logo qui tourne */
.logo-spinner {
    width: 160px; /* Taille du logo, ajustez si nécessaire */
    height: 160px;
    animation: simpleSpin 1.5s linear infinite; /* Rotation constante */
}

/* Keyframe pour la rotation simple */
@keyframes simpleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Header Golya */
#header-golya {
    font-family: 'Poppins', sans-serif;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: transparent;
    z-index: 9999;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 16px 32px;
}

#header-golya.scrolled {
    /* Fond noir au scroll */
    background: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#header-golya .header-col-left {
    justify-self: start;
}

#header-golya .header-col-center {
    justify-self: center;
}

/* Modification pour le Panier */
#header-golya .header-col-right {
    justify-self: end;
    position: relative; /* IMPORTANT pour le positionnement du dropdown */
    display: flex;
    align-items: center;
}

/* Logo */
#header-golya .logo img {
    height: 70px;
    transition: all 0.3s ease;
}

#header-golya.scrolled .logo img {
    height: 60px;
}

/* Menu Burger Button */
.burger-menu-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 30px;
}

.burger-menu-btn .burger-icon {
    display: block;
    width: 100%;
    height: 4px;
    background-color: white; /* Couleur par défaut */
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* On change la couleur de l'icône au scroll */
#header-golya.scrolled .burger-menu-btn .burger-icon {
    background-color: #ffffff;
}

/* Styles pour l'état actif du bouton (quand le menu est ouvert) */
.burger-menu-btn.is-active .burger-icon:nth-child(1) {
    transform: translateY(13px) rotate(45deg);
    background-color: white !important;
}

.burger-menu-btn.is-active .burger-icon:nth-child(2) {
    opacity: 0;
}

.burger-menu-btn.is-active .burger-icon:nth-child(3) {
    transform: translateY(-13px) rotate(-45deg);
    background-color: white !important;
}

/* Surimpression (Overlay) du menu */
.burger-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.burger-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.burger-menu-nav {
    text-align: center;
}

.burger-menu-list {
    list-style: none; /* Correction: Suppression des points de la liste principale */
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Correction: Supprime les puces sur tous les <li> et sous-listes */
.burger-menu-list li {
    list-style-type: none !important; 
}
.burger-menu-list .sub-menu {
    list-style: none;
}


.burger-menu-list li a {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

/* NOUVELLE CORRECTION : Masquer l'outline au clic/focus pour supprimer le rectangle blanc */
.burger-menu-list li a:focus,
.burger-menu-list li a:active {
    outline: 0 !important;
    box-shadow: none;
}

.burger-menu-list li a:hover {
    color: #aaa;
}

/* ------------------------------------------- */
/* --- Styles pour les Sous-menus (Dropdown) --- */
/* ------------------------------------------- */

/* Cache tous les sous-menus par défaut (Classe native WP: .sub-menu) */
.burger-menu-list .sub-menu {
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.3s ease-in-out; 
    padding-left: 15px;
}

.burger-menu-list .sub-menu li a {
    font-size: 22px; /* Réduit la taille des liens de sous-menu */
    font-weight: 500;
    text-transform: none; /* Enlève l'uppercase */
    letter-spacing: 1px;
}


/* Affiche le sous-menu lorsqu'il est actif (Classe native WP: .menu-item-has-children) */
.burger-menu-list .menu-item-has-children.active > .sub-menu {
    max-height: 500px;
}

/* Style de l'indicateur de sous-menu (le chevron) */
/* Utilise la classe native de WP: .menu-item-has-children */
.burger-menu-list .menu-item-has-children > a {
    position: relative;
    padding-right: 45px; /* Correction: Augmenté l'espacement à 45px */
}

.burger-menu-list .menu-item-has-children > a::after {
    content: "▼"; /* Symbole de flèche vers le bas */
    position: absolute;
    top: 50%;
    right: 20px; /* Correction: Déplacé à 20px du bord */
    transform: translateY(-50%);
    font-size: 0.8em;
    transition: transform 0.3s;
}

/* Rotation du chevron lorsque le sous-menu est ouvert */
.burger-menu-list .menu-item-has-children.active > a::after {
    transform: translateY(-50%) rotate(180deg); 
}


/* -------------------- */
/* --- Panier Cart (Icône et Bulle) --- */
/* -------------------- */

.cart-wrapper {
    position: relative; 
    cursor: pointer;
}

#cart-icon {
    background: none;
    border: none;
    padding: 0; 
    cursor: pointer;
    position: relative; 
    display: flex;
    align-items: center;
    height: 40px; 
    width: 40px; 
    justify-content: center;
}

/* Style de l'icône SVG du panier */
.cart-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon-svg svg {
    height: 24px; 
    width: 24px;
    fill: white; 
    transition: fill 0.3s ease;
}

#header-golya.scrolled .cart-icon-svg svg {
    /* Reste blanc sur fond noir */
    fill: white;
}

/* Style de la bulle de notification */
.cart-count-bubble {
    position: absolute;
    top: -5px; 
    right: -5px; 
    background-color: #ff4d4d; /* Rouge vif pour la notification */
    color: white;
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%; 
    min-width: 18px; 
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    box-sizing: border-box; 
    opacity: 0; 
    transform: scale(0.5); 
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none; 
}

/* Affiche la bulle si le nombre est > 0 */
.cart-count-bubble.has-items {
    opacity: 1;
    transform: scale(1);
}


/* --- Dropdown (Contenu du Panier) --- */

.cart-dropdown-content {
    display: none; /* CACHÉ PAR DÉFAUT */
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000; 
    min-width: 300px;
    max-width: 350px;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
    text-align: left;
}

/* Classe ajoutée par JavaScript pour afficher le panier */
.cart-dropdown-content.is-active {
    display: block;
}

.cart-title {
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
    color: #222;
}

.cart-items-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 15px 0;
    max-height: 250px; 
    overflow-y: auto;
}

/* Style de base pour un article du panier (MODIFIÉ) */
.cart-items-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.cart-items-list li:last-child {
    border-bottom: none;
}

.cart-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1; 
}

/* Style de la miniature produit */
.cart-item-thumb {
    width: 50px; 
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 3px;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-item-name {
    font-weight: 600;
    color: #222;
    line-height: 1.2;
    margin-bottom: 3px;
    display: block;
}

.cart-item-price-qty {
    font-size: 0.8em;
    color: #777;
    display: block;
}

/* Style du bouton de suppression (x) */
.remove-item-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5em; 
    line-height: 1;
    color: #aaa;
    margin-left: 10px;
    transition: color 0.2s ease;
    padding: 0 5px;
    flex-shrink: 0;
}

.remove-item-btn:hover {
    color: #ff4d4d; /* Rouge vif au survol */
}

.cart-empty-message {
    text-align: center;
    font-style: italic;
    color: #777;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: 10px;
}

.cart-summary p {
    font-weight: 600;
    margin: 0;
    color: #222;
}

.btn-checkout {
    display: block;
    padding: 10px 15px;
    background-color: #000;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-checkout:hover {
    background-color: #555;
}