/*
 Theme Name:   Ecosoap Child
 Theme URI:    https://wordpress.com
 Description:  This is a child theme for Ecosoap
 Author:       Goalthemes
 Author URI:   #
 Template:     ecosoap
 Version:      1.0.0
 Text Domain:  ecosoap-child
*/

/* ==================================================
   1. BANDEAU HAUT DE PAGE (BREADCRUMB)
   ================================================== */
body section#goal-breadscrumb {
    min-height: 280px !important;
    height: auto !important; 
    padding-top: 130px !important; 
    padding-bottom: 40px !important; 
    display: flex !important;
    align-items: center !important; 
}

body #goal-breadscrumb .wrapper-breads,
body #goal-breadscrumb .wrapper-breads-inner {
    padding: 0 !important;
    margin: 0 !important;
    width: 100%; 
}

body #goal-breadscrumb .bread-title {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important; 
}

body section#goal-breadscrumb:not([style*="url"]) {
    background-color: #2F503D !important;
    background-image: none !important; 
}

body section#goal-breadscrumb:not([style*="url"])::before,
body section#goal-breadscrumb:not([style*="url"])::after {
    display: none !important;
}

body #goal-breadscrumb h1.bread-title,
body #goal-breadscrumb .bread-title,
body #goal-breadscrumb ol.breadcrumb li,
body #goal-breadscrumb ol.breadcrumb li a {
    color: #ffffff !important;
}

body #goal-breadscrumb ol.breadcrumb li span.active,
body #goal-breadscrumb .breadcrumb-inner span.active {
    color: #E8BE55 !important;
    font-weight: 700 !important; 
}

body #goal-breadscrumb ol.breadcrumb li a:hover {
    color: #E8BE55 !important; 
    opacity: 1 !important;
}


/* ==================================================
   2. COULEURS PRINCIPALES (BOUTONS VERTS)
   ================================================== */
.woocommerce-message .button,
.woocommerce-message .btn-theme,
a.btn-theme,
button.btn-theme,
.add-cart a.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce ul.products li.product .button,
.woocommerce a.add_to_cart_button,
.woocommerce-page a.add_to_cart_button {
    background-color: #2ba84a !important;
    border-color: #2ba84a !important;
    color: #ffffff !important;
}

.woocommerce-message .button:hover,
.woocommerce-message .btn-theme:hover,
a.btn-theme:hover,
button.btn-theme:hover,
.add-cart a.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce ul.products li.product .button:hover,
.woocommerce a.add_to_cart_button:hover,
.woocommerce-page a.add_to_cart_button:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
    color: #ffffff !important;
}

/* ==================================================
   3. TYPOGRAPHIE (MAJUSCULES FORCÉES)
   ================================================== */
h1, h2, h3, h4, h5, h6,
h1 *, h2 *, h3 *, h4 *, h5 *, h6 *,
a, p, span, li, label, th, td, button,
.breadcrumb, .breadcrumb *,
.woocommerce-breadcrumb, .woocommerce-breadcrumb *,
.woocommerce-MyAccount-navigation a,
.woocommerce-MyAccount-content *,
.elementor-heading-title, 
.entry-title, .post-title,
.product_title, .product-title, .name, .title, .widget-title {
    text-transform: none !important;
}

/* Exceptions */
a.date,
.date,
.list-categories a.categories-name,
.list-categories,
.my-account {
    text-transform: uppercase !important;
}

.my-account {
    font-weight: 600;
    letter-spacing: 1px;
}

/* ==================================================
   4. NETTOYAGE UI & TRADUCTIONS VISUELLES
   ================================================== */
.widget-banner .inner .link-bottom i, 
.widget-banner .btn-theme i,
.widget-banner .btn i,
.widget-banner .inner .link-bottom .btn::after,
.widget-banner .inner .link-bottom a::after,
.widget-banner .btn-theme::after {
    display: none !important;
}

.widget-banner .btn-theme, 
.widget-banner .btn {
    padding-right: 25px !important;
    padding-left: 25px !important;
}

.entry-meta .author, 
.entry-meta .byline, 
.vcard.author, 
.post-author {
    display: none !important;
}

.widget_goal_recent_post .entry-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3em; 
    height: 2.6em; 
    margin-bottom: 0 !important;
}

.widget_goal_recent_post .entry-title a {
    display: block;
    line-height: 1.3em;
}

.goal-search-form-inner button.btn-theme {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.goal-search-form-inner button.btn-theme i {
    color: #027C2D !important;
    font-size: 18px;
}

.goal-search-form-inner button.btn-theme:hover,
.goal-search-form-inner button.btn-theme:focus {
    color: #025a20 !important;
}

button.buy_now_button {
    font-size: 0 !important; 
}

button.buy_now_button::after {
    content: "Acheter maintenant"; 
    font-size: 16px !important; 
    font-weight: 600; 
    text-transform: uppercase !important; 
}

tr.woocommerce-shipping-totals th {
    visibility: hidden;
}

tr.woocommerce-shipping-totals th::before {
    content: "Livraison";
    visibility: visible;
    float: left;
}

.titre-seo-cache,
.elementor-widget-heading .titre-seo-cache {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.woocommerce .widget_price_filter .price_slider .ui-slider-handle,
.woocommerce .widget_price_filter .price_slider .ui-slider-range,
.woocommerce .widget_price_filter .price_slider_wrapper * {
    transition: none !important;
    animation: none !important;
    transform: translateZ(0);
}

.citation-citerne {
    border-left: 4px solid #027C2D;
    padding: 15px 25px;
    margin: 20px 0;
    font-style: italic;
    font-size: 1.1em;
    color: #444;
}

/* ==================================================
   5. WOOCOMMERCE : MON COMPTE & AVIS
   ================================================== */
.woocommerce-MyAccount-content .button[href*="add-payment-method"],
.woocommerce-MyAccount-navigation-link--compare,
.woocommerce-MyAccount-navigation-link--wishlist {
    display: none !important;
}

.woocommerce-table--order-downloads thead th {
    background-color: transparent !important;
    color: #027C2D !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    padding: 15px 10px !important;
    border-bottom: 2px solid #eeeeee !important;
}

.woocommerce-table--order-downloads tbody td {
    padding: 20px 10px !important;
    line-height: 1.4 !important;
    vertical-align: middle !important;
    font-size: 14px !important;
    color: #444444 !important;
}

.woocommerce-table--order-downloads th.download-expires,
.woocommerce-table--order-downloads th.download-file {
    min-width: 150px !important;
}

.woocommerce-table--order-downloads th.download-remaining {
    white-space: nowrap !important;
    min-width: 200px !important;
}

.woocommerce-table--order-downloads .woocommerce-Button {
    background-color: #5BA35B !important;
    border-radius: 50px !important;
    padding: 12px 25px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.woocommerce-table--order-downloads .woocommerce-Button:hover {
    background-color: #467f46 !important;
    transform: scale(1.02);
}

.woocommerce p.stars a::before,
.woocommerce p.stars a:hover ~ a::before,
.woocommerce p.stars.selected a.active ~ a::before {
    color: #e0e0e0 !important;
    content: "\e011" !important;
}

.woocommerce p.stars:hover a::before,
.woocommerce p.stars.selected a.active::before {
    color: #ffba00 !important;
    content: "\e011" !important;
}

.elementor-star-rating i {
    font-size: 0 !important;
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 2px;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    vertical-align: middle;
}
.elementor-star-rating .elementor-star-full {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f0ad4e'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") !important;
}
.elementor-star-rating .elementor-star-empty {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0ad4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'%3E%3C/polygon%3E%3C/svg%3E") !important;
}

/* ==================================================
   6. PRODUITS ACHETÉS ENSEMBLE (PC & REGLAGES GLOBAUX)
   ================================================== */
.woobt-products .woobt-product .woobt-thumb {
    display: block !important;
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    position: relative !important;
    border-radius: 12px !important;
    overflow: visible !important;
}

.woobt-products .woobt-product .woobt-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

/* Réduction globale de la largeur du champ quantité pour les accessoires */
.wpc-fbt-item .quantity input.qty, 
.woosb-item .quantity input.qty, 
.woosb-wrap .woosb-products .woosb-item .quantity input.qty,
.woobt-product .woobt-quantity input.qty {
    width: 45px !important; 
    max-width: 45px !important;
    min-width: 45px !important;
    padding: 0 5px !important;
    text-align: center !important;
}

.wpc-fbt-item .quantity, 
.woosb-item .quantity, 
.woobt-product .woobt-quantity {
    flex-basis: auto !important;
    min-width: unset !important;
    margin: 0 10px !important;
}

@media screen and (min-width: 769px) {
    .woobt-product {
        display: flex !important;
        align-items: center !important;
        margin-bottom: 15px !important;
    }
    .woobt-product .woobt-thumb {
        margin-right: 20px !important;
    }
    .woobt-product .woobt-thumb:hover img {
        transform: scale(2.5);
        z-index: 999;
        position: relative;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        object-fit: contain !important;
        background-color: #fff;
    }
}

/* ==================================================
   7. RESPONSIVE : TABLETTES (< 1024px)
   ================================================== */
@media (max-width: 1024px) { 
    #goal-header-mobile { 
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        background-color: #ffffff !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    }
}

/* ==================================================
   8. RESPONSIVE : SMARTPHONES (< 768px)
   ================================================== */
@media only screen and (max-width: 768px) {
    /* --- Bandeau Breadcrumb --- */
    body section#goal-breadscrumb {
        min-height: 180px !important; 
        padding-top: 30px !important; 
        padding-bottom: 20px !important;
    }

    /* --- Boutons Panier & Sélecteur Quantité --- */
    .woocommerce div.product form.cart {
        display: block !important; 
        width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .woocommerce div.product form.cart .quantity {
        display: inline-flex !important;
        margin-bottom: 20px !important;
    }
    
    .woocommerce div.product form.cart button, 
    .woocommerce div.product form.cart .button {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 0 12px 0 !important; 
        white-space: normal !important;
        box-sizing: border-box !important;
        line-height: 1.2 !important;
    }

    /* --- Achetés Ensemble (Ligne unique) --- */
    ul.wpc-fbt-products-list li, 
    .woosb-wrap .woosb-products .woosb-item,
    .wpc-fbt-item, .woosb-item, .woobt-product {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px !important;
        border-bottom: 1px solid #ddd !important;
    }

    .wpc-fbt-item input[type="checkbox"], .woosb-item input, .woobt-product .woobt-choose { 
        margin: 0 5px 0 8px !important; 
        flex-shrink: 0 !important; 
    }
    
    .wpc-fbt-item img, .woosb-item img, .woobt-product .woobt-thumb { 
        width: 40px !important; 
        max-width: 40px !important; 
        margin: 0 5px !important; 
        flex-shrink: 0 !important; 
    }
    
    .wpc-fbt-item .wpc-fbt-title, .woosb-item .woosb-title, .woosb-item .woosb-title a, .woobt-product .woobt-title { 
        font-size: 12px !important; 
        line-height: 1.1 !important; 
        flex-grow: 1 !important; 
        text-align: left !important; 
        margin: 0 !important; 
    }
    
    .wpc-fbt-item .wpc-fbt-price, .woosb-item .woosb-price, .woobt-product .woobt-price { 
        font-size: 13px !important; 
        font-weight: bold !important; 
        white-space: nowrap !important; 
        margin-left: 5px !important; 
    }
    
    .wpc-fbt-item .quantity, .woosb-item .quantity, .woobt-product .woobt-quantity { 
        display: inline-flex !important; 
        margin: 0 5px !important;
        flex-shrink: 0 !important;
    }

/* --- 3. ALIGNER "COMPARER" ET "LISTE DE SOUHAIT" (UNIQUEMENT SUR PAGE PRODUIT) --- */
    /* L'ajout de .single-product protège tes pages de collections/boutique */
    .single-product .summary.entry-summary button.woosc-btn,
    .single-product .summary.entry-summary button.woosw-btn {
        display: inline-block !important;
        width: auto !important;
        margin: 0 15px 15px 0 !important; /* 0 marge à gauche, 15px à droite */
        padding: 10px 15px !important;
        float: left !important; /* Force l'alignement sur la même ligne à gauche */
        clear: none !important;
        text-align: center !important;
        border-radius: 4px !important;
    }

    /* Nettoyage du bloc juste en dessous pour que le texte suivant ne remonte pas */
    .single-product #ppcp-recaptcha-v2-container, 
    .single-product .delivery-shipping-info {
        clear: both !important; 
    }

 /* --- 4. ONGLETS FIXES ET RÉPARTIS SANS SCROLL --- */
    ul.tabs-list.nav.nav-tabs {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* Force sur une seule ligne */
        justify-content: space-between !important;
        overflow: hidden !important; /* Désactive tout scroll/slider */
        border-bottom: 1px solid #ddd !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
    }

    /* On tue définitivement les fausses barres de défilement */
    ul.tabs-list.nav.nav-tabs .ps-scrollbar-x-rail,
    ul.tabs-list.nav.nav-tabs .ps-scrollbar-y-rail {
        display: none !important;
    }

    ul.tabs-list.nav.nav-tabs > li {
        display: block !important;
        flex: 1 1 0 !important; /* Magie : force chaque onglet à faire exactement 33% de large */
        float: none !important;
        margin: 0 !important; /* On supprime les marges pour gagner de la place */
        padding: 0 2px !important;
        text-align: center !important; /* Centre le texte dans son bloc */
    }

    ul.tabs-list.nav.nav-tabs > li > a {
        display: block !important;
        white-space: nowrap !important; /* Empêche le mot de se casser en deux */
        padding: 10px 0 !important;
        border: none !important;
        font-weight: 600 !important;
        background: transparent !important;
        font-size: 13px !important; /* On réduit à 13px pour que "Description" rentre sans forcer */
        text-overflow: ellipsis; /* Si l'écran est vraiment minuscule, ajoute "..." au lieu de casser */
        overflow: hidden !important;
    }
	<script>
document.addEventListener("DOMContentLoaded", function() {
    var backButtons = document.querySelectorAll('.sliding-menu__back');
    backButtons.forEach(function(button) {
        if (button.innerText.trim() === 'Back') {
            button.innerText = 'Retour';
        }
    });
});
</script>