/* ==========================================================================
   ORIGIN_UI — MASTER STYLESHEET (V1.1 OPTIMISÉE)
   Theme System: Modular & Variable-Based for SaaS Customization
   ========================================================================== */

/* ==========================================================================
   1. CONFIGURATION MAÎTRE (:ROOT)
   ========================================================================== */
:root {
    /* --- PALETTE DE COULEURS (BRANDING) --- */
    --primary: #007bff;
    --primary-rgb: 0, 123, 255; 
    --secondary: #6c757d;
    --secondary-rgb: 108, 117, 125;
    
    /* Couleur d'accentuation (Promos, Badges) */
    --accent: #dc3545; 
    --accent-rgb: 220, 53, 69;
    
    /* --- ARRIÈRE-PLAN & TEXTE --- */
    --bg-body-color: #f8f9fa;
    --bg-body-image: none;
    --bg-body-repeat: no-repeat;
    --bg-body-size: cover;
    --bg-body-attachment: scroll;
    --bg-body-position: center top;
    
    --bg-card: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;

    /* --- COULEURS SPÉCIFIQUES (AJOUTÉES POUR LE CMS) --- */
    --color-price: #007bff; /* Prix */
    
    /* FOOTER : Variables indépendantes pour contrôle CMS */
    --footer-bg: #6c757d;            /* Par défaut = Secondaire */
    --footer-title: #ffffff;         /* Par défaut = Blanc */
    --footer-text: rgba(255,255,255,0.8); /* Par défaut = Blanc cassé */

    /* --- TYPOGRAPHIE --- */
    --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.5;
    --heading-weight: 700;

    /* --- HEADER & NAV --- */
    --header-height: 70px;
    --header-bg: rgba(255, 255, 255, 0.98);
    --header-backdrop-filter: blur(10px);
    --header-border-bottom: 1px solid rgba(0,0,0,0.05);
    
    --header-position: sticky; 
    --header-sticky-top: 0;
    --header-z-index: 1020;

    /* --- FORMES (RADIUS) --- */
    --radius-btn: 8px;
    --radius-card: 12px;
    --radius-input: 8px;
    --radius-badge: 4px;
    --border-width: 1px;
    --border-color: #dee2e6;

    /* --- CONTROLES CARTES --- */
    --gap-actions: 12px;
    --cart-grow: 1;
    --justify-actions: space-between;
    --order-icon: 0;
    --order-cart: 1;
    --btn-text-transform: none;

    /* --- BOUTONS (STYLE) --- */
    --btn-padding-y: 0.75rem;
    --btn-padding-x: 1.5rem;
    --btn-font-weight: 600;
    --btn-letter-spacing: 0px;

    /* --- OMBRES (DEPTH) --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.15);
    
    /* --- INTERACTION & ANIMATION --- */
    --transition-base: 0.3s;
    --ease-base: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --card-hover-transform: translateY(-5px);
    --card-border-hover: transparent; 

    /* --- LAYOUT --- */
    --container-max-width: 1320px;
    --spacing-section: 4rem;
    --input-height: 48px;
    
    /* --- SYSTEME Z-INDEX (HIERARCHIE STRICTE) --- */
    --z-dropdown: 1000;
    
    /* ÉTAGE 1 : Le site normal */
    --z-promo: 1020;        /* Bannière Promo */
    --z-sticky: 1030;       /* Header Header */
    --z-search: 1040;       /* Barre recherche */
    --z-bottom-nav: 1050;   /* Navigation bas mobile */
    
    /* ÉTAGE 2 : Les éléments flottants (Modales, Popups) */
    --z-modal-backdrop: 2000;
    --z-modal: 2050;
    
    /* ÉTAGE 3 : LE MENU MOBILE (Au-dessus de TOUT) */
    --z-offcanvas-backdrop: 99990; 
    --z-offcanvas: 99999; 
}

/* ==========================================================================
   2. BASE & RESET
   ========================================================================== */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* Empêche le scroll horizontal */
    width: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-main);
    
    background-color: var(--bg-body-color);
    background-image: var(--bg-body-image);
    background-repeat: var(--bg-body-repeat);
    background-size: var(--bg-body-size);
    background-attachment: var(--bg-body-attachment);
    background-position: var(--bg-body-position);
    
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typographie Maître */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    color: var(--text-main);
    margin-bottom: 0.5em;
}

/* Liens Maîtres */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-base) var(--ease-base);
}

a:hover {
    color: var(--text-main);
    text-decoration: none;
}

/* Images responsives */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Utility Override */
.text-muted {
    color: var(--text-muted) !important;
}
.product-options, .base-price, .contact-address, .suborder-item {
    color: var(--text-muted);
}

/* ==========================================================================
   3. HEADER, NAVIGATION & MOBILE UI (VERSION PREMIUM CORRIGÉE)
   ========================================================================== */

/* --- CONFIGURATION GLOBALE HEADER --- */
.boutique-header {
    background-color: var(--header-bg);
    backdrop-filter: var(--header-backdrop-filter);
    -webkit-backdrop-filter: var(--header-backdrop-filter);
    border-bottom: var(--header-border-bottom);
    
    position: var(--header-position, sticky); 
    top: var(--header-sticky-top, 0);
    
    z-index: var(--z-sticky);
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.boutique-header .container-fluid {
    min-height: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 15px;
    padding-right: 15px;
}

/* --- LOGO & TITRE --- */
/* Desktop */
.shop-name-desktop {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    font-weight: 800;
    color: var(--text-main) !important; /* Force la couleur texte */
    font-family: var(--font-heading);
    transition: color 0.2s;
}

.shop-name-desktop:hover {
    color: var(--primary) !important; /* Couleur marque au survol */
    text-decoration: none;
}

/* Mobile (Centré) */
.shop-name-mobile-center, .mobile-header-logo {
    display: none;
}

/* --- NAVIGATION DESKTOP (LIENS) --- */
.main-nav-desktop .nav-link {
    font-weight: 600;
    color: var(--text-main) !important; /* Force couleur texte */
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
    font-family: var(--font-body);
}

.main-nav-desktop .nav-link:hover,
.main-nav-desktop .nav-link.active {
    color: var(--primary) !important; /* Force couleur primaire */
}

/* --- DROPDOWNS (SOUS-MENUS PC) --- */
.dropdown-menu {
    background-color: var(--bg-card) !important; /* Fond dynamique */
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg) !important;
    border-radius: var(--radius-card) !important;
}

.dropdown-item {
    color: var(--text-main) !important; /* Texte dynamique */
    font-family: var(--font-body);
    padding: 0.5rem 1.5rem;
    transition: all 0.2s;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: var(--bg-body-color) !important;
    color: var(--primary) !important;
}

/* --- BOUTONS & ICÔNES HEADER --- */
.header-right-icons .btn,
.header-right-icons a {
    color: var(--text-main) !important; /* Force couleur texte */
    background: transparent;
    border: none;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.header-right-icons .btn:hover,
.header-right-icons a:hover {
    color: var(--primary) !important;
}

.header-right-icons .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.5em;
    border-radius: var(--radius-badge);
    background: linear-gradient(135deg, var(--accent) 0%, #ff6b6b 100%) !important;
    color: #ffffff;
}

/* --- BARRE DE RECHERCHE (DROPDOWN) --- */
.search-bar-container {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card); 
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    z-index: var(--z-search);
    padding: 1rem 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-bar-container .form-control {
    border-radius: 50px 0 0 50px;
    border-right: none;
    padding-left: 1.5rem;
    background-color: var(--bg-body-color);
    color: var(--text-main);
    border-color: var(--border-color);
}

.search-bar-container .btn {
    border-radius: 0 50px 50px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    padding: 0 1.5rem;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}


/* ==========================================================================
   MOBILE UI SPECIFICS (APP-LIKE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Layout */
    .boutique-header .container-fluid {
        min-height: 55px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Logo Gauche */
    .header-left-group.d-md-none {
        display: flex !important; 
        align-items: center;
        justify-content: flex-start;
        flex: 1;
        z-index: 10;
    }
    .header-left-group.d-none { display: none !important; }

    .mobile-header-logo {
        display: block;
        height: 32px;
        width: auto;
        object-fit: contain;
    }

    /* Nom Centre */
    a.d-md-none > .shop-name-mobile-center {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-family: var(--font-heading);
        font-size: 1rem;
        font-weight: 800;
        color: var(--text-main) !important; /* Force couleur texte */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40%;
        z-index: 1;
        text-align: center;
        pointer-events: none;
    }
    .shop-name-mobile-center { pointer-events: auto; }

    /* Droite */
    .header-right-icons {
        flex: 1; 
        justify-content: flex-end; 
        display: flex;
        z-index: 10;
    }
    .header-right-icons a[href*="page=panier"],
    .header-left-group .btn[data-bs-target="#mobileMenuHeader"] { 
        display: none !important; 
    }

    body { padding-bottom: 80px !important; }
}


/* ==========================================================================
   OFFCANVAS MENU (MENU LATÉRAL MOBILE CORRIGÉ)
   ========================================================================== */
.offcanvas {
    z-index: var(--z-offcanvas) !important; 
    position: fixed;
    top: 0; bottom: 0; left: 0;
    height: 100vh !important;
    width: 85%;
    max-width: 350px;
    
    background-color: var(--bg-card) !important; 
    color: var(--text-main);
    
    visibility: hidden; 
    box-shadow: none;
    
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out, visibility 0.3s;
}

.offcanvas.show {
    transform: translateX(0) !important;
    visibility: visible !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5); 
}

.offcanvas-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Titre du Menu */
.offcanvas-title {
    color: var(--text-main) !important;
    font-family: var(--font-heading);
    font-weight: 800;
}

.offcanvas-header .btn-close {
    filter: grayscale(1) invert(1) contrast(0.5); 
}

.offcanvas-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 100px;
    background-color: var(--bg-card);
}

.offcanvas-backdrop {
    z-index: var(--z-offcanvas-backdrop) !important;
    background-color: rgba(0,0,0,0.5) !important;
}

/* Liens classiques */
.offcanvas-body .nav-link {
    font-size: 1.1rem;
    padding: 0.8rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-main) !important;
    width: 100%;
    display: block;
}

.offcanvas-body .nav-link:active,
.offcanvas-body .nav-link:focus {
    color: var(--primary) !important;
    background-color: transparent;
}

/* --- CORRECTIF SPÉCIFIQUE : BOUTON "MON PANIER" --- */
/* On cible le bouton qui a la classe .btn-outline-dark dans le menu mobile */
.offcanvas-body .btn-outline-dark {
    /* On remplace la couleur noire fixe par la couleur de texte dynamique */
    color: var(--text-main) !important;
    border-color: var(--text-main) !important;
    
    /* On s'assure qu'il utilise la police du corps */
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.2s ease;
}

/* Au survol ou clic */
.offcanvas-body .btn-outline-dark:hover,
.offcanvas-body .btn-outline-dark:active {
    /* On passe en couleur primaire (Marque) */
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important; /* Texte blanc sur fond coloré */
}

/* ==========================================================================
   PROMO BANNER (CORRECTIF FINAL FIXE/SCROLL)
   ========================================================================== */
.promo-banner {
    background-color: var(--promo-bg, var(--accent)); 
    color: var(--promo-text-color, var(--text-inverse)); 
    
    padding: 8px 0;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    position: relative;
    overflow: hidden; 
    white-space: nowrap;
    
    /* Alignement dynamique (Centre ou Gauche) */
    text-align: var(--promo-align, left);
    
    z-index: 10; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    
    transition: background-color 0.3s ease, color 0.3s ease;
}

.promo-text-inner {
    /* Affichage dynamique (Block pour centrer, Inline-block pour scroller) */
    display: var(--promo-display, inline-block);
    
    /* Le correctif est ici : 0 si fixe, 100% si scroll */
    padding-left: var(--promo-padding-left, 100%);
    
    /* Animation */
    animation: var(--promo-animation, promo-scroll 20s linear infinite);
    will-change: transform;
}

/* L'animation ne doit jouer que si elle est définie */
@keyframes promo-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Mobile */
@media (max-width: 768px) {
    .promo-banner { font-size: 0.8rem; padding: 6px 0; }
}

/* ==========================================================================
   5. PRODUCT CARDS & LISTS (PREMIUM & FLEXIBLE)
   ========================================================================== */

/* --- Conteneur de la Carte --- */
.product-card.market-style {
    background-color: var(--bg-card);
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-card);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; 
    transition: transform 0.3s var(--ease-base), box-shadow 0.3s var(--ease-base), border-color 0.3s;
}

.product-card.market-style:hover {
    transform: var(--card-hover-transform);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary); 
    z-index: 2;
}

/* --- Badges --- */
.product-card.market-style .product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.product-card.market-style .badge {
    padding: 6px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-badge);
    box-shadow: var(--shadow-sm);
    border: none;
}

.badge-promo { 
    background-color: var(--accent); 
    color: #fff; 
}

/* Badge Nouveau (Dégradé) */
.badge-new { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff; 
}

.badge-out-of-stock { 
    background-color: var(--text-main); 
    color: var(--bg-card); 
    opacity: 0.9; 
}

/* --- Zone Image --- */
.product-image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; 
    background-color: #fff; 
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.product-card.market-style .product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 15px; 
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.product-card.market-style:hover .product-image {
    transform: scale(1.08);
}

/* --- Zone Informations --- */
.product-info {
    padding: 1.25rem; 
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
    justify-content: space-between;
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    
    /* Force la couleur du titre (Variable CMS) */
    color: var(--text-main) !important;
    
    height: 2.8em; 
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.product-title a:hover {
    color: var(--primary) !important;
}

.product-pricing {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 800;
    
    /* Force la couleur du prix (Variable CMS) */
    color: var(--color-price) !important;
    
    line-height: 1;
}

.base-price {
    font-size: 0.9rem;
    color: var(--text-muted) !important; /* Force couleur secondaire */
    text-decoration: line-through;
    font-weight: 400;
}

/* --- Barre d'Actions (Flexibilité Totale) --- */
.product-actions-bar {
    padding: 12px 1.25rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    min-height: 60px;
    
    display: flex;
    align-items: center;
    
    /* Variables dynamiques CMS (Alignement & Espace) */
    justify-content: var(--justify-actions, space-between);
    gap: var(--gap-actions, 12px); 
}

/* Bouton Icône */
.icon-button {
    width: 42px; 
    height: 42px;
    flex-shrink: 0;
    
    border-radius: var(--radius-btn); 
    border: 1px solid var(--border-color);
    background-color: var(--bg-body-color);
    color: var(--text-muted) !important;
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1.1rem;

    /* Ordre dynamique */
    order: var(--order-icon, 0);
}

.icon-button:hover:not(:disabled) {
    /* STYLE PREMIUM : Icône en dégradé au survol */
    border-color: transparent !important;
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-body-color);
}

/* Bouton Panier */
.product-actions-bar .btn-add-cart {
    /* Taille dynamique (Full ou Compact) */
    flex-grow: var(--cart-grow, 1); 
    width: auto; 
    padding: 0 20px;

    height: 42px; 
    border-radius: var(--radius-btn);
    
    /* STYLE PREMIUM : Fond dégradé */
    background-color: var(--primary); /* Fallback */
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    
    color: #ffffff !important;
    border: none !important;
    
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: var(--btn-text-transform, uppercase);
    letter-spacing: 0.5px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);

    /* Ordre dynamique */
    order: var(--order-cart, 1);
}

.product-actions-bar .btn-add-cart:hover {
    transform: translateY(-2px);
    /* Inversion subtile du dégradé */
    background-image: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.4);
}

/* 1. TITRES PRODUITS (Cartes & Page Détail) */
.product-card .product-title,
.product-card .product-title a,
.product-title-h1,
.card-title,
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main) !important;
    text-decoration: none;
}

/* Au survol du titre dans la carte : Couleur Primaire */
.product-card .product-title a:hover {
    color: var(--primary) !important;
}

/* --- Mobile Specifics --- */
@media (max-width: 768px) {
    .product-info { padding: 0.85rem; }
    .product-title { font-size: 0.9rem; height: 2.6em; margin-bottom: 0.5rem; }
    .current-price { font-size: 1rem; }
    
    .product-actions-bar {
        padding: 10px;
        min-height: 50px;
    }
    
    .icon-button, 
    .product-actions-bar .btn-add-cart {
        height: 38px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   5. Fichier : includes/boutique/gallery_carousel.php
   ========================================================================== */

/* --- Carousel Container --- */
.carousel-wrapper {
    position: relative;
    width: 100%;
    /* Hauteur Mobile (Compact) */
    height: 300px; 
    overflow: hidden;
    
    /* MODIFICATION : Couleur placeholder dynamique */
    background-color: var(--border-color); 
    
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    
    /* Pas de border-radius sur mobile pour effet "Edge-to-Edge" type App */
    border-radius: 0; 
}

/* Responsive Heights configuration */
@media (min-width: 768px) {
    .carousel-wrapper {
        height: 450px;
        /* Sur desktop, on applique le radius choisi par le marchand */
        border-radius: var(--radius-card); 
        margin-bottom: var(--spacing-section);
    }
}

@media (min-width: 1200px) {
    .carousel-wrapper {
        height: 550px;
    }
}

/* --- Slides Track --- */
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); /* Custom ease-out */
    will-change: transform;
    cursor: grab;
}

.carousel-track:active {
    cursor: grabbing;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    -webkit-user-drag: none;
}

/* --- Images --- */
.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: translateZ(0); /* GPU acceleration */
}

/* --- Navigation Controls (Arrows) --- */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    
    /* Les flèches de navigation restent toujours rondes (UX Standard) */
    border-radius: 50%; 
    
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden by default on Desktop */
}

/* Show arrows on hover */
.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: #fff;
    color: var(--primary); /* S'adapte à la couleur du thème */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
    border-color: #fff;
}

.carousel-arrow.left { left: 20px; }
.carousel-arrow.right { right: 20px; }

/* --- Indicators (Dots) --- */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.carousel-indicators .dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
}

.carousel-indicators .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-indicators .dot.active {
    /* MODIFICATION : Utilisation de la couleur Primaire pour le branding */
    background: var(--primary); 
    
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    width: 25px; /* Pill shape for active state */
    border-radius: 10px;
}

/* --- Mobile Optimization --- */
@media (max-width: 768px) {
    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        opacity: 1; /* Always show on mobile */
        background: rgba(0, 0, 0, 0.2);
        border: none;
    }
    
    .carousel-arrow.left { left: 10px; }
    .carousel-arrow.right { right: 10px; }
    
    .carousel-indicators {
        bottom: 15px;
        padding: 4px 8px;
        gap: 8px;
    }
}

/* ==========================================================================
   6. Fichier : includes/boutique/shop_description.php
   ========================================================================== */

/* --- Section Container --- */
.shop-description {
    background-color: var(--bg-card);
    position: relative;
    
    /* Intégration complète au Design System */
    border-radius: var(--radius-card); 
    border: var(--border-width) solid var(--border-color);
    box-shadow: var(--shadow-sm); 
    
    padding: 2rem; 
    margin-bottom: var(--spacing-section);
}

/* --- Title Typography --- */
.shop-desc-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* --- Description Text --- */
.shop-desc-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 400;
    /* On force la couleur muted mais définie dynamiquement */
    color: var(--text-muted) !important; 
}

/* --- Decorative Separator (STYLE PREMIUM) --- */
.shop-desc-separator {
    width: 50px;
    height: 4px;
    
    /* MODIFICATION : Dégradé au lieu de couleur plate pour l'élégance */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    
    border-radius: 2px;
    opacity: 0.8;
    transition: width 0.3s ease;
}

/* Hover Effect on Section triggers Separator expansion */
.shop-description:hover .shop-desc-separator {
    width: 80px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .shop-description {
        padding: 1.5rem; /* Padding réduit sur mobile */
        border-radius: var(--radius-btn); /* Rayon légèrement réduit */
    }

    .shop-desc-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .shop-desc-text {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ==========================================================================
   THEME ORIGIN UI - MASTER CSS (V FINAL)
   ========================================================================== */

/* --- 1. CORE : VARIABLES & RESET --- */
:root {
    /* Couleurs Dynamiques (Écrasées par le PHP) */
    --primary: #007bff;
    --primary-rgb: 0, 123, 255;
    --bg-body-color: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #333333;

    /* Variables Structurelles */
    --radius-s: 8px;
    --radius-m: 12px;
    --radius-pill: 50px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 35px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.lp-body {
    background-color: var(--bg-body-color) !important;
    color: var(--text-main) !important;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

a { text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* CONTENEUR PRINCIPAL (Fixe la largeur sur Desktop pour l'ergonomie) */
@media (min-width: 992px) {
    .lp-content {
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
        padding: 0 15px;
    }
}

/* Animation Pulse Générique */
.pulse-button { animation: pulseBtn 2s infinite; }
@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}

/* --- 2. HEADER & TOPBAR --- */
.lp-topbar {
    width: 100%; text-align: center; padding: 10px 15px;
    font-size: 14px; font-weight: 700;
    z-index: 9999; position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.lp-header { border-bottom: 1px solid rgba(0,0,0,0.05); }

/* --- 3. GRILLE PRODUITS ([products]) --- */
.lp-product-grid {
    display: flex; flex-wrap: wrap;
    margin-right: -10px; margin-left: -10px;
    margin-bottom: 40px;
}

.lp-product-grid > .col {
    flex: 0 0 50%; max-width: 50%; /* Mobile : 2 colonnes */
    padding: 10px; box-sizing: border-box;
}

@media (min-width: 768px) {
    .lp-product-grid > .col {
        flex: 0 0 25%; max-width: 25%; /* Desktop : 4 colonnes */
    }
}

.product-card-hover {
    background: var(--bg-card);
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: var(--radius-m);
    overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
    transition: var(--transition);
}

.product-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--primary) !important;
}

.card-img-top {
    width: 100%; height: 180px; 
    object-fit: contain; padding: 15px;
    background: #fff; border-bottom: 1px solid rgba(0,0,0,0.03);
}

.lp-card-body {
    padding: 15px; flex-grow: 1; 
    display: flex; flex-direction: column; justify-content: space-between; text-align: center;
}

.lp-text-primary { color: var(--primary) !important; font-weight: 800; font-size: 1.1rem; }

.lp-btn-outline {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    font-weight: 700; font-size: 0.85rem; padding: 8px 15px;
    border-radius: 50px; width: 100%; transition: all 0.2s;
}
.lp-btn-outline:hover { background: var(--primary); color: #fff; }

/* Pack Spécial */
.lp-card-pack {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid var(--primary) !important; border-radius: 20px;
}
.lp-price-badge {
    background: var(--primary); color: #fff;
    font-size: 2rem; font-weight: 800; padding: 10px 25px; border-radius: 12px;
}
.lp-btn-light {
    background: #fff; color: var(--primary); border: 2px solid #fff;
    font-weight: 800; padding: 12px 30px; border-radius: 50px;
}
.lp-btn-light:hover { background: #f0f0f0; color: var(--primary); }

/* --- 4. STICKY BAR (Mobile Only) --- */
.lp-sticky-bar {
    position: fixed; bottom: -100px; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,0.08); padding: 12px 20px;
    z-index: 9990; /* Juste sous le chat */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lp-sticky-bar.visible { bottom: 0; }

.lp-sticky-container {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 600px; margin: 0 auto; gap: 15px;
}
.sticky-price-box { flex: 0 0 auto; text-align: left; line-height: 1.1; }

.lp-sticky-btn {
    flex: 1; background-color: var(--primary); color: #fff !important;
    border: none; border-radius: var(--radius-pill); padding: 12px 20px;
    font-weight: 800; font-size: 1rem; text-transform: uppercase;
    text-decoration: none; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    animation: pulseBtn 2s infinite; display: block;
}

/* CACHÉ SUR DESKTOP (Fix pour Notifications) */
@media (min-width: 769px) {
    .lp-sticky-bar { display: none !important; visibility: hidden !important; }
}
@media (max-width: 768px) {
    .lp-sticky-bar { padding: 10px 15px; }
}

/* --- 5. FICHE PRODUIT DETAIL --- */
.lp-product-hero {
    background: var(--bg-card); border-radius: var(--radius-m);
}
.lp-product-hero img { transition: transform 0.5s ease; }
.lp-product-hero:hover img { transform: scale(1.03); }
.lp-btn-main {
    background-color: var(--primary) !important; border: 2px solid var(--primary) !important;
    color: #fff !important; font-weight: 800; text-transform: uppercase;
    padding: 15px 30px; font-size: 1.1rem; border-radius: var(--radius-pill);
    transition: transform 0.2s; width: 100%; display: block; text-align: center;
}
.lp-btn-main:hover { transform: translateY(-3px); background-color: #fff !important; color: var(--primary) !important; }

/* --- 6. FORMULAIRE DE COMMANDE --- */
.lp-order-box {
    background: var(--bg-card); border-radius: var(--radius-m);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05);
    margin: 3rem 0; overflow: hidden;
}
.lp-card-header {
    background-color: var(--primary); color: #fff; padding: 1.5rem; border: none;
}
.lp-order-box .card-body { padding: 2rem !important; }
.lp-order-box .form-control, .lp-order-box .form-select {
    border: 2px solid #f0f0f0; background-color: #fcfcfc;
    padding: 12px 15px; font-size: 1rem; border-radius: 8px;
}
.lp-order-box .form-control:focus {
    border-color: var(--primary); background-color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}
.btn-qty { border: 2px solid #e0e0e0; background: #fff; width: 35px; font-weight: bold; }
#display_total { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

/* --- 7. STOCK BAR (Scarcity) --- */
.lp-stock-container {
    background-color: #fff !important; border: 1px solid rgba(220, 53, 69, 0.25) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.05); border-radius: var(--radius-m);
}
.lp-badge-urgent {
    background-color: #dc3545; color: #fff !important; padding: 6px 15px;
    border-radius: 50px; font-size: 0.75rem; font-weight: 800;
}
.lp-stock-container .progress-bar {
    background-color: #dc3545;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    background-size: 1rem 1rem;
}

/* --- 8. COUNTDOWN --- */
.lp-countdown {
    background: linear-gradient(135deg, var(--primary) 0%, #343a40 100%) !important;
    color: #fff; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.timer-box {
    background: rgba(255, 255, 255, 0.95); color: #333;
    border-radius: var(--radius-s); box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    min-width: 60px;
}
.timer-box .h3 { font-family: monospace; color: var(--primary); font-size: 1.5rem; }

/* --- 9. AVIS CLIENTS --- */
.lp-reviews-section .card {
    background-color: var(--bg-card); border: none;
    border-top: 4px solid var(--primary) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.lp-reviews-section .fa-star { color: #ffc107; font-size: 1.1rem; }

/* --- 10. FAQ --- */
.lp-faq .accordion-item {
    background-color: var(--bg-card); border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-s) !important; margin-bottom: 10px; overflow: hidden;
}
.lp-faq .accordion-button:not(.collapsed) {
    color: var(--primary); background-color: rgba(var(--primary-rgb), 0.08);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

/* --- 11. TRUST BADGES --- */
.lp-trust-badges {
    background-color: var(--bg-card); border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.lp-trust-badges:hover i { transform: scale(1.2); color: var(--primary); transition: 0.3s; }

/* --- 12. WHATSAPP --- */
.lp-whatsapp-float {
    background-color: #25d366 !important; color: #fff !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4) !important;
    animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- 13. SALES POPUP --- */
#lp-sales-popup {
    background-color: #fff; border-left: 4px solid #28a745 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); z-index: 9998;
}
#lp-sales-popup .rounded-circle { background-color: #f8f9fa !important; color: #28a745 !important; }

/* --- 15. NEWSLETTER --- */
.lp-newsletter-box {
    background-color: var(--bg-card); border: 2px dashed rgba(0,0,0,0.1) !important;
    transition: 0.3s;
}
.lp-newsletter-box:hover { border-color: rgba(var(--primary-rgb), 0.4) !important; transform: translateY(-5px); }

/* AJOUT : JUSTE POUR LE BOUTON (Taille Standard) */
.lp-newsletter-box button, 
.lp-newsletter-box .btn {
    width: auto !important;        /* Empêche le bouton de faire toute la largeur */
    padding: 8px 24px !important;  /* Taille standard : ni géant, ni petit */
    font-size: 15px !important;    /* Taille de texte normale */
}

/* --- 16. PAGE MERCI --- */
.lp-success-alert {
    max-width: 600px; margin: 50px auto; padding: 40px;
    border-radius: 20px; background-color: var(--bg-card);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* ==========================================================================
   8. PAGE PRODUIT (DÉTAILS & ACTIONS FINALISÉS)
   ========================================================================== */

/* --- Container & Layout --- */
.product-page-section {
    background-color: var(--bg-card); /* Fond dynamique */
    padding-top: var(--spacing-section);
    padding-bottom: var(--spacing-section);
}

/* --- Breadcrumb (Fil d'Ariane) - CORRECTIF : TOUT EN PRINCIPAL --- */
/* Le séparateur (>) */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
    line-height: 1;
    color: var(--text-main) !important; /* Force couleur principale */
}

/* Les liens (Accueil / Boutique) */
.breadcrumb-item a { 
    color: var(--text-main) !important; /* Force couleur principale */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    opacity: 0.8; /* Légère transparence pour hiérarchie */
}

.breadcrumb-item a:hover {
    color: var(--primary) !important;
    opacity: 1;
}

/* La page actuelle */
.breadcrumb-item.active { 
    color: var(--text-main) !important; /* Force couleur principale */
    font-weight: 700; 
}

/* --- Main Image Area --- */
.main-image-wrapper {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    background-color: #fff; /* Toujours blanc pour l'image */
    border: 1px solid var(--border-color);
    cursor: zoom-in;
    box-shadow: var(--shadow-sm);
}

#variant-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

/* --- Gallery Thumbnails --- */
.gallery-item {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-input);
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.7;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
}

.gallery-item:hover,
.gallery-item.active {
    opacity: 1;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.d-flex.overflow-x-auto::-webkit-scrollbar { height: 4px; }
.d-flex.overflow-x-auto::-webkit-scrollbar-thumb { background-color: var(--text-muted); border-radius: 4px; }

/* --- Product Info Column (Sticky) --- */
@media (min-width: 992px) {
    .sticky-product-info {
        position: sticky;
        top: 100px;
        z-index: 10;
        padding-left: 1rem;
    }
}

/* Titre H1 */
.product-title-h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main) !important; /* Couleur Principale */
    letter-spacing: -0.5px;
}

.read-more-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    cursor: pointer;
}

/* --- Pricing --- */
.price-tag-lg {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-price) !important; /* Variable CMS Prix */
    line-height: 1;
}

.price-tag-old {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: var(--text-muted) !important;
    font-weight: 400;
}

/* --- Form Elements (Variantes) --- */
.variant-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted) !important;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: block;
}

.variant-select {
    cursor: pointer;
    font-size: 1rem;
    height: 50px;
    background-color: var(--bg-body-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-input);
}

/* --- Quantity Selector (Style Pro) --- */
.qty-input-group {
    width: 150px;
    height: 50px; 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    background-color: var(--bg-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease;
}

.qty-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.qty-btn {
    width: 45px;
    height: 100%;
    background-color: var(--bg-body-color);
    border: none;
    border-right: 1px solid var(--border-color); 
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
}

.qty-btn:last-child { border-right: none; border-left: 1px solid var(--border-color); }
.qty-btn:hover { background-color: var(--border-color); color: var(--primary); }
.qty-btn:active { transform: scale(0.95); }

#qty-input {
    flex-grow: 1;
    height: 100%;
    border: none;
    background: var(--bg-card);
    color: var(--text-main) !important;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
    appearance: none;
    outline: none !important;
}
#qty-input::-webkit-outer-spin-button, #qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --- Stock Badge --- */
.stock-status-badge {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-badge);
    display: inline-flex;
    align-items: center;
}
.stock-in { color: #198754; background-color: rgba(25, 135, 84, 0.1); border: 1px solid rgba(25, 135, 84, 0.2); }
.stock-out { color: var(--accent); background-color: rgba(220, 53, 69, 0.1); border: 1px solid rgba(220, 53, 69, 0.2); }

/* --- Action Buttons --- */
.btn-action-lg {
    padding: 16px 20px;
    font-weight: 700;
    border-radius: var(--radius-btn);
    text-transform: var(--btn-text-transform);
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.2s ease-in-out;
}

.btn-add-cart {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-add-cart:hover:not(:disabled) {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

/* Bouton Acheter (Dégradé Signature) */
.btn-buy-now {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-buy-now:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* --- Trust Badges --- */
.trust-badge {
    font-size: 0.8rem;
    text-align: center;
    padding: 0 10px;
    color: var(--text-muted) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}
.trust-badge i { font-size: 1.5rem; color: var(--primary); margin-bottom: 5px; }

/* --- Description Content (CORRECTIF COULEUR SECONDAIRE) --- */

/* 1. Description Complète (Page Produit) */
.full-description {
    line-height: 1.8;
    font-size: 1.1rem;
    /* On force la couleur secondaire comme demandé */
    color: var(--text-muted) !important; 
}

/* On force les enfants aussi pour écraser les styles de l'éditeur */
.full-description p, 
.full-description ul, 
.full-description li,
.full-description span,
.full-description strong {
    color: var(--text-muted) !important;
    background-color: transparent !important;
}

.full-description img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-card);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* --- Mini Description Produit (LE CORRECTIF EST ICI) --- */
/* On cible le conteneur qui a la classe .text-secondary dans le PHP */
.sticky-product-info .text-secondary {
    color: var(--text-muted) !important; /* Force votre couleur secondaire CMS */
}

/* --- Mobile Specifics --- */
@media (max-width: 768px) {
    .product-title-h1 { font-size: 1.5rem; }
    .price-tag-lg { font-size: 1.75rem; }
    .btn-action-lg { padding: 14px; font-size: 0.9rem; }
    .d-flex.gap-2 { padding-bottom: 5px; }
}

/* ==========================================================================
   9. ALL PRODUCTS PAGE (CATALOGUE PREMIUM & CORRIGÉ)
   ========================================================================== */

/* --- Section Header (Banner) --- */
.section-header-banner {
    background-color: var(--secondary); /* Fallback */
    position: relative;
    border-radius: var(--radius-card);
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    
    /* Texte blanc forcé car sur image sombre */
    color: var(--text-inverse); 
}

.section-header-banner img {
    transition: transform 10s linear; 
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-header-banner:hover img {
    transform: scale(1.1);
}

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.display-4 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

/* --- Section Title --- */
.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* --- Sorting & Filters Bar (Barre de tri) --- */
/* On cible la classe Bootstrap .bg-light pour la transformer */
.bg-light.border {
    background-color: var(--bg-card) !important; /* Fond dynamique */
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-input);
    padding: 0.5rem 1rem !important;
    box-shadow: var(--shadow-sm);
    
    /* Force la couleur de texte par défaut */
    color: var(--text-main) !important;
}

/* CORRECTIF COMPTEUR : Force la couleur du nombre de produits */
/* Même si le PHP a "text-dark", cette règle l'écrasera */
.bg-light.border .text-dark,
.bg-light.border strong, 
.bg-light.border b,
.bg-light.border span {
    color: var(--text-main) !important;
}

/* Le Selecteur (Trier par) */
#sort_by {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-main) !important; /* Force la couleur */
    cursor: pointer;
    border: none;
    background-color: transparent !important;
    outline: none;
}

/* Options du menu déroulant */
#sort_by option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Label "Trier :" */
label[for="sort_by"] {
    color: var(--text-muted) !important;
}

#sort_by:focus {
    box-shadow: none;
    color: var(--primary) !important;
}

/* --- Pagination (STYLE SIGNATURE) --- */
.pagination {
    gap: 5px;
}

.page-item .page-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 600;
    
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main); /* Chiffres normaux */
    
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background-color: var(--bg-body-color);
    color: var(--primary) !important;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Pagination Active : Dégradé */
.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: #ffffff !important; /* Chiffre actif blanc */
    border: none;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.page-item.disabled .page-link {
    background-color: transparent;
    border-color: transparent;
    color: var(--text-muted) !important;
    cursor: default;
    opacity: 0.6;
}

/* --- Empty State --- */
.text-center.py-5 i {
    color: var(--border-color);
    margin-bottom: 1rem;
    font-size: 3rem;
}

.text-center.py-5 h4 {
    color: var(--text-main) !important;
}

/* --- Mobile Optimization --- */
@media (max-width: 768px) {
    .section-header-banner {
        height: 180px !important;
    }
    
    .section-header-banner h1 {
        font-size: 1.8rem;
    }

    .d-flex.flex-column.flex-md-row {
        align-items: stretch !important;
    }
    
    .bg-light.border {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 1rem;
    }
    
    .row.g-4 {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }
}

/* ==========================================================================
   10. CART PAGE (PANIER COMPLET & CORRIGÉ FINAL)
   ========================================================================== */

/* --- Page Layout --- */
.cart-page .page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-bottom: 2rem;
}

/* --- Empty State (Panier Vide) --- */
#empty-cart-message {
    font-size: 1.2rem;
    background-color: var(--bg-card); /* Fond dynamique */
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-card);
    padding: 3rem;
    text-align: center;
}

/* Bouton "Commencer mes achats" (Signature Gradient) */
#empty-cart-button .btn-lg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff !important;
    border: none;
    
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-btn);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: transform 0.3s ease;
}

#empty-cart-button .btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* --- Merchant Group Cards --- */
.merchant-cart-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    overflow: hidden;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.merchant-cart-card:hover {
    box-shadow: var(--shadow-md);
}

.merchant-cart-card .card-header {
    background-color: var(--bg-body-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.merchant-cart-card .card-title {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

.shop-link {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.shop-link:hover {
    color: var(--primary);
}

/* --- Cart Item Rows --- */
.cart-item-row {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card);
    transition: background-color 0.2s;
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-row:hover {
    background-color: var(--bg-body-color);
}

.cart-item-row .product-title {
    font-size: 1rem;
    color: var(--text-main);
    font-weight: 600;
    font-family: var(--font-heading);
}

.product-options {
    font-size: 0.85rem;
    margin-top: 4px;
    color: var(--text-muted);
}

.product-stock-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.line-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- Quantity Controls (CORRECTIF LARGEUR & COULEUR) --- */
.quantity-control {
    width: 120px; 
    height: 40px; 
    margin: 0 auto;
    
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    overflow: hidden;
    background-color: var(--bg-card);
    
    display: flex !important; 
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.quantity-control .qty-input {
    background-color: var(--bg-card);
    border: none;
    border-left: 1px solid var(--border-color); 
    border-right: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--text-main) !important;
    text-align: center;
    
    /* Flex 1 pour remplir l'espace correctement */
    flex: 1; 
    width: auto !important; 
    min-width: 0;
    
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}

.quantity-control .qty-input::-webkit-outer-spin-button,
.quantity-control .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-control .btn-qty {
    background-color: var(--bg-body-color);
    border: none;
    color: var(--text-main);
    
    /* Taille fixe pour les boutons */
    flex: 0 0 35px; 
    width: 35px !important;
    
    height: 100% !important; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s;
    z-index: 2;
}

.quantity-control .btn-qty:hover {
    background-color: var(--border-color);
    color: var(--primary);
}

/* ==========================================================================
   CORRECTIF COMPLET : RESUME, FORMULAIRES & TEXTES
   ========================================================================== */

/* Carte de Résumé */
.order-summary-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
    z-index: 100;
    color: var(--text-main); /* Force couleur par défaut */
}

.order-summary-card .card-title {
    font-weight: 800;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

/* 1. Textes Secondaires (Libellés: Sous-total, Livraison, Wilaya...) */
.order-summary-card .text-muted,
.order-summary-card .d-flex span:first-child,
.cart-page label,
.cart-page .form-label,
.cart-page .form-check-label {
    color: var(--text-main) !important; /* Ou --text-muted selon préférence */
    font-weight: 600;
}

/* 2. Valeurs (Prix, Choix) */
.order-summary-card .d-flex span:last-child,
#total-articles-value, 
#total-delivery-value {
    color: var(--text-main) !important;
    font-weight: 700;
}

/* 3. Prix Total Final (Bleu/Primaire) */
.cart-page .final-total-amount,
.order-summary-card .final-total-amount {
    color: var(--primary) !important; 
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: none !important;
}

/* 4. Champs de Formulaire (Inputs & Selects) */
.cart-page select,
.cart-page input[type="text"],
.cart-page textarea,
.order-summary-card .form-select,
.order-summary-card .form-control {
    background-color: var(--bg-body-color) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-input);
}

/* Options des listes déroulantes */
.cart-page select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Placeholders (Texte gris dans les champs) */
.cart-page textarea::placeholder,
.cart-page input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

/* 5. Checkbox "J'accepte" */
.form-check-input {
    border-color: var(--border-color);
    background-color: var(--bg-body-color);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.order-summary-card a {
    color: var(--primary);
    text-decoration: underline;
}

/* 6. Boutons d'Action (Dégradés) */
.order-summary-card .btn-primary,
.order-summary-card .btn-checkout,
a[href*="action=checkout"],
.btn-continue-shopping {
    display: block;
    width: 100%;
    border-radius: var(--radius-btn);
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

/* Finaliser (Dégradé) */
.order-summary-card .btn-primary,
.order-summary-card .btn-checkout,
a[href*="action=checkout"] {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: #ffffff !important;
    padding: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.order-summary-card .btn-primary:hover,
.order-summary-card .btn-checkout:hover,
a[href*="action=checkout"]:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
}

/* Continuer (Contour) */
.btn-continue-shopping {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    padding: 12px 20px;
    margin-top: 10px;
}

.btn-continue-shopping:hover {
    background-color: var(--bg-body-color);
    border-color: var(--text-main);
    color: var(--text-main);
}

/* --- Promo Code Block --- */
.promo-code-block {
    background-color: var(--bg-body-color);
    border-radius: var(--radius-input);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.promo-code-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-color: var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
}

.apply-promo-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: var(--text-main);
    color: var(--bg-card);
    border: none;
}

/* ==========================================================================
   CORRECTIF MODALES (GUEST CHECKOUT & OPTIONS)
   ========================================================================== */

/* Conteneur Principal */
.modal-content {
    border-radius: 16px; 
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-card); /* Fond dynamique */
}

/* En-tête */
.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    background-color: var(--bg-card);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-weight: 800;
    color: var(--text-main) !important;
}

/* Corps (Formulaires) */
.modal-body {
    padding: 2rem;
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Labels */
.modal-body label,
.modal-body .form-label {
    color: var(--text-main) !important;
    font-weight: 600;
}

/* Inputs & Selects (Champs) */
.modal-body .form-control,
.modal-body .form-select {
    background-color: var(--bg-body-color) !important; /* Contraste léger */
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-input);
}

/* Focus sur les champs */
.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* --- CORRECTIF 1 : Placeholder (Texte d'exemple adresse) --- */
.modal-body .form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.6;
}

/* --- CORRECTIF 2 : Les Options des Listes Déroulantes --- */
/* Cible les options de Wilaya, Commune et Centre */
.modal-body select option {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    padding: 10px;
}

/* Footer */
.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    background-color: var(--bg-body-color);
    border-radius: 0 0 16px 16px;
}

/* Bouton "Valider" (Style Signature) */
.modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: #ffffff !important;
    
    border-radius: var(--radius-btn);
    padding: 12px 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
    transition: all 0.3s ease;
}

.modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.3);
}

/* 1. LABELS "Mode de livraison" & "Wilaya" (Souvent dans des <strong>) */
.cart-page .card-body strong,
.cart-page .card-body b,
.cart-page .card-body label {
    color: var(--text-main) !important; /* Force la couleur principale */
}

/* Cible spécifiquement le texte "Wilaya de livraison : Oran" */
.merchant-cart-card p strong,
.merchant-cart-card p span,
.merchant-cart-card i {
    color: var(--text-main) !important;
}

/* 2. Icônes à côté des labels (Camion, Localisation) */
.cart-page .card-body i {
    color: var(--primary) !important; /* On les met en couleur thème */
}

/* 3. LIGNES DE SOUS-TOTAUX (Dans la carte marchand, aligné à droite) */
/* Le Label (ex: "Sous-total articles :", "Livraison :") */
.merchant-cart-card .text-end p,
.merchant-cart-card .text-end strong {
    color: var(--text-muted) !important; /* Force gris/secondaire */
}

/* 4. LES MONTANTS (ex: "1700.00 DZD") */
/* On cible les <span> à l'intérieur des totaux pour les mettre en valeur */
.merchant-cart-card .text-end span,
.merchant-cart-card .text-end .fw-bold {
    color: var(--text-main) !important; /* Force noir/blanc */
    font-weight: 800 !important;
}

/* 5. TOTAL BOUTIQUE (Le gros total par marchand) */
.total-merchant-label,
.total-merchant-label span {
    color: var(--primary) !important; /* Force bleu/primaire */
    font-size: 1.1rem !important;
}

/* 6. TEXTE D'EXEMPLE (Placeholder dans textarea Note) */
.cart-page textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.5;
}

/* 7. CHECKBOX "J'ACCEPTE" (Label) */
.form-check-label {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
}

/* ==========================================================================
   MOBILE CART OPTIMIZATION (GRID LAYOUT PRO)
   ========================================================================== */
@media (max-width: 768px) {
    .cart-item-row {
        padding: 1rem 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .cart-item-row > .row {
        display: grid;
        /* Colonnes : Checkbox (30px) | Image (90px) | Espace | Contenu */
        grid-template-columns: 30px 90px 1fr; 
        /* Lignes : Titre | Info | Prix | Quantité */
        grid-template-rows: auto auto auto auto;
        column-gap: 12px;
        row-gap: 6px;
        align-items: start;
        position: relative;
    }

    /* 1. Checkbox */
    .cart-item-row > .row > div:nth-child(1) {
        grid-column: 1;
        grid-row: 1 / span 4;
        align-self: center;
        width: auto !important;
        display: flex;
        justify-content: center;
    }

    /* 2. Image */
    .cart-item-row > .row > div:nth-child(2) {
        grid-column: 2;
        grid-row: 1 / span 4;
        width: auto !important;
        align-self: start;
    }
    .cart-item-row .col-2 img {
        width: 90px;
        height: 90px;
        object-fit: cover;
        border-radius: var(--radius-input);
        border: 1px solid var(--border-color);
        background-color: #fff; /* Toujours blanc pour l'image */
    }

    /* 3. Titre */
    .cart-item-row > .row > div:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
        width: 100% !important;
        padding-right: 35px; /* Place pour le bouton supprimer */
        text-align: left !important;
        align-self: start;
    }
    .cart-item-row .product-title {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 2px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Info Stock / Options */
    .product-stock-status {
        grid-column: 3;
        grid-row: 2;
        font-size: 0.8rem;
        margin-bottom: 4px;
        display: block;
        color: var(--text-muted);
    }

    /* 4. Prix */
    .cart-item-row > .row > div:nth-child(5) {
        grid-column: 3;
        grid-row: 3;
        width: 100% !important;
        text-align: left !important;
    }
    .line-total {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--primary);
        margin: 4px 0;
    }

    /* 5. Quantité */
    .cart-item-row > .row > div:nth-child(4) {
        grid-column: 3;
        grid-row: 4;
        width: auto !important;
        display: flex;
        justify-content: flex-start;
        margin-top: 5px;
    }
    .quantity-control {
        width: 110px;
        height: 36px;
        margin: 0;
    }

    /* 6. Bouton Supprimer (Absolu Haut Droite) */
    .cart-item-row > .row > div:nth-child(6) {
        position: absolute;
        top: 1;
        right: 0;
        width: auto !important;
        padding: 0;
        z-index: 5;
    }
    .cart-item-row .btn-remove {
        border: 1px solid rgba(220, 53, 69, 0.2);
        background: rgba(220, 53, 69, 0.05);
        color: #dc3545; /* Rouge Danger sémantique */
        
        padding: 6px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-btn);
        font-size: 1rem;
        transition: all 0.2s;
    }
    .cart-item-row .btn-remove:active {
        background: #dc3545;
        color: #fff;
    }
    /* 1. On force la Modale à passer DEVANT la barre du bas */
    .modal {
        z-index: 9999 !important; /* Niveau très haut */
    }
    
    .modal-backdrop {
        z-index: 9990 !important; /* Juste derrière la modale */
    }

    /* 2. On remonte le bouton pour qu'il ne soit pas collé au bord de l'écran */
    .modal-footer {
        /* On ajoute un coussin en bas pour le confort du pouce */
        padding-bottom: 30px !important; 
        
        /* Gestion iPhone (Barre noire) */
        padding-bottom: calc(30px + env(safe-area-inset-bottom)) !important;
        
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* 3. Bouton large pour le mobile */
    .modal-footer .btn {
        width: 100%;
        padding: 14px;
        font-size: 1.1rem;
    }
}

/* ==========================================================================
   10. CONTACT & PAGES LÉGALES (VERSION FINALE CORRIGÉE)
   ========================================================================== */

/* --- CONTACT PAGE (STRUCTURE) --- */
.contact-page-container {
    max-width: 960px;
    margin: 0 auto;
    padding-top: 2rem;
}

/* --- Section Titles --- */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    position: relative;
    padding-bottom: 1.5rem;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* --- Info Card (Coordonnées) --- */
.contact-info-card {
    background-color: var(--bg-card); /* Fond dynamique */
    border: var(--border-width) solid var(--border-color);
    border-radius: var(--radius-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.contact-info-card .card-title {
    color: var(--text-main);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

/* CORRECTIF : Force la couleur des textes d'infos qui ont des classes Bootstrap */
.contact-info-card .text-muted,
.contact-info-card p, 
.contact-info-card li, 
.contact-info-card span:not(.badge) {
    color: var(--text-muted) !important;
}

.contact-info-card .text-dark,
.contact-info-card a.text-dark {
    color: var(--text-main) !important; /* Remplace le noir forcé par la couleur principale */
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-info-card a:hover,
.contact-info-card a.text-dark:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}

/* Icônes Rondes */
.icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.icon-box i { font-size: 1.5rem; }

.icon-box:hover {
    background-color: var(--primary);
    color: #fff;
}


/* --- Social Buttons (Contact Page) --- */
.contact-info-card .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.contact-info-card .btn-outline-secondary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff !important; 
    transform: translateY(-2px);
}

/* --- Formulaire de Contact --- */
.contact-form-card {
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.contact-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-bottom: none;
    color: #fff;
    padding: 1.5rem;
}

/* CORRECTIF : On écrase le bg-light du PHP pour le fond du formulaire */
.contact-form-card .card-body,
.contact-form-card .bg-light {
    background-color: var(--bg-card) !important; 
    padding: 2rem;
}

/* Labels du formulaire */
.contact-form-card label, 
.form-label {
    color: var(--text-main) !important;
    font-weight: 600;
}

.contact-form-card .form-control {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-color);
    background-color: var(--bg-body-color); 
    color: var(--text-main);
    transition: all 0.2s ease;
}

.contact-form-card .form-control:focus {
    background-color: var(--bg-card);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.contact-form-card .form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* STYLE PREMIUM : Bouton Envoyer en dégradé */
.contact-submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff !important;
    border: none;
    
    border-radius: var(--radius-btn);
    letter-spacing: 1px;
    font-weight: 700;
    padding: 12px 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

.contact-submit-btn:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--primary-rgb), 0.3);
}


/* ==========================================================================
   CONTACT BLOCK COMPONENT (Map & Address)
   ========================================================================== */
.merchant-contact {
    position: relative;
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.contact-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.contact-address,
.contact-address p {
    font-size: 1.1rem;
    color: var(--text-muted) !important;
    font-weight: 400;
}

.map-container {
    border-radius: var(--radius-card);
    overflow: hidden;
    background-color: var(--bg-body-color);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.map-container:hover {
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    display: block;
    width: 100%;
    min-height: 300px;
}

/* ==========================================================================
   PAGES LÉGALES (Text Content)
   ========================================================================== */
.card-body.text-secondary {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main) !important; /* Meilleur contraste */
    text-align: left;
    background-color: var(--bg-card); /* Fond dynamique */
}

.card-body.text-secondary strong,
.card-body.text-secondary b {
    color: var(--text-main);
    font-weight: 700;
}

.card-body.text-secondary h1,
.card-body.text-secondary h2,
.card-body.text-secondary h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.card-body.text-secondary a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.card-body.text-secondary a:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .contact-info-card .card-body, 
    .contact-form-card .card-body {
        padding: 1.5rem !important;
    }

    .map-container iframe {
        height: 250px;
    }
    
    .merchant-contact {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   12. THANK YOU / ORDER CONFIRMATION PAGE (PREMIUM & DARK MODE READY)
   ========================================================================== */

/* --- Page Layout --- */
.thank-you-page {
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-section {
    background-color: var(--bg-card); /* Fond dynamique */
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lg);
    padding: 3rem 2rem !important;
    border: var(--border-width) solid var(--border-color);
}

/* --- Typography & Icons --- */
.page-title-confirmation {
    color: #198754; /* Succès universel */
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.page-title-confirmation i {
    display: block;
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #198754;
    animation: scaleIn 0.5s var(--ease-base);
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

.section-subtitle {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid var(--bg-body-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
    font-family: var(--font-heading);
}

/* --- Order Details Card --- */
.order-details-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    background-color: var(--bg-body-color); /* Contraste léger */
    box-shadow: none !important;
}

.card-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.order-details-list .list-group-item {
    background-color: transparent;
    border-color: var(--border-color);
    padding: 0.75rem 0;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-main);
}

.order-details-list .list-group-item strong {
    color: var(--text-main); /* Texte principal pour être lisible */
    font-weight: 600;
}

/* --- Status Badges (Optimisé Contraste) --- */
.order-status-badge {
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-badge);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Couleurs statiques lisibles */
.status-pending { background-color: #ffc107; color: #212529; }
.status-confirmed { background-color: #0dcaf0; color: #212529; }
.status-shipped { background-color: #6610f2; color: #fff; }
.status-delivered { background-color: #198754; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }
.status-returned { background-color: #6c757d; color: #fff; }
.status-exceeded { background-color: var(--bg-card); color: #ffc107; border: 1px solid #ffc107; }

/* --- Cost Summary --- */
.cost-summary-item {
    font-size: 1rem;
    color: var(--text-main);
}

.promo-discount-row {
    background-color: rgba(220, 53, 69, 0.1); 
    padding: 0.5rem;
    border-radius: var(--radius-input);
    color: #dc3545;
}

/* Bloc Total Final (Dégradé Signature) */
.final-total-row {
    /* Secours OBLIGATOIRE */
    background-color: var(--primary); 
    
    /* Dégradé */
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    
    color: #ffffff !important; /* Texte blanc forcé */
    padding: 1.5rem;
    border-radius: var(--radius-card);
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    border: none;
}

.final-total-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff !important;
}

.final-total-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff !important; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* --- Merchant Sub-orders --- */
.merchant-suborder-details {
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--secondary);
    background-color: var(--bg-card);
    border-radius: var(--radius-card);
}

.suborder-shop-title {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

.shop-name-highlight {
    color: var(--primary);
}

.suborder-item {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.suborder-total-amount {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
    font-weight: 700;
}

/* --- Items Table (Responsive) --- */
.ordered-items-table th {
    background-color: var(--bg-body-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
}

.ordered-items-table td {
    vertical-align: middle;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.variant-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Blurring logic for Limit Exceeded --- */
.blurred-content {
    filter: blur(4px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.blur-overlay-message {
    border: 2px solid #ffc107;
    background-color: var(--bg-card); 
    color: #ffc107;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 10;
    position: relative;
    border-radius: var(--radius-card);
}

/* --- BOUTON "CONTINUER MES ACHATS" (STYLE SIGNATURE) --- */
.thank-you-page .btn, 
.thank-you-page .btn-primary,
.confirmation-section a.btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: #ffffff !important;
    
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 30px;
    border-radius: var(--radius-btn);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
    transition: all 0.3s ease;
    
    /* Assurer que le bouton est bien visible */
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
}

.thank-you-page .btn:hover, 
.thank-you-page .btn-primary:hover,
.confirmation-section a.btn:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.4);
    color: #ffffff !important;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .page-title-confirmation {
        font-size: 1.8rem;
    }
    
    .page-title-confirmation i {
        font-size: 3rem;
    }

    .order-details-list .list-group-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .final-total-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* Mode "Carte" pour le tableau sur mobile */
    .ordered-items-table thead {
        display: none;
    }

    .ordered-items-table, 
    .ordered-items-table tbody, 
    .ordered-items-table tr, 
    .ordered-items-table td {
        display: block;
        width: 100%;
    }

    .ordered-items-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-card);
        overflow: hidden;
        background-color: var(--bg-card);
    }

    .ordered-items-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .ordered-items-table td:last-child {
        border-bottom: none;
    }

    .ordered-items-table td::before {
        content: attr(data-label);
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-align: left;
        margin-right: 1rem;
    }
}

/* ==========================================================================
   13. FOOTER & NAVIGATION MOBILE (100% CONTRÔLE CMS)
   ========================================================================== */

/* --- Footer Principal --- */
#theme-footer-override {
    /* Variable spécifique Footer */
    background-color: var(--footer-bg) !important;
    color: var(--footer-text);
    
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    padding-top: 4rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

/* Titres */
#theme-footer-override h5,
#theme-footer-override h6 {
    color: var(--footer-title) !important;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Textes courants */
#theme-footer-override p,
#theme-footer-override small,
#theme-footer-override li {
    color: var(--footer-text) !important;
    opacity: 0.9;
}

/* Liens */
#theme-footer-override a {
    color: var(--footer-text) !important;
    opacity: 0.8;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

#theme-footer-override a:hover {
    color: var(--primary) !important; /* Couleur de marque au survol */
    opacity: 1;
    text-decoration: none;
    transform: translateX(3px);
    display: inline-block;
}

/* --- COPYRIGHT --- */
.footer-copyright-wrapper {
    /* On utilise la couleur du texte pour la bordure, avec transparence */
    border-top: 1px solid currentColor !important; 
    opacity: 0.6;
    padding-top: 20px;
    margin-top: 20px;
}

.footer-brand-link {
    color: var(--footer-title) !important; /* Utilise la couleur Titre pour ressortir */
    font-weight: 700;
    text-decoration: none;
    opacity: 1;
}

/* --- Newsletter --- */
/* On garde un fond semi-transparent pour s'adapter à toutes les couleurs de fond */
#newsletter-form-footer .input-group {
    background-color: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-input);
}

/* Si le fond est très clair (blanc), on inverse pour que l'input se voie */
@media (prefers-color-scheme: light) {
    /* Note : C'est une approximation. L'idéal serait une variable --input-bg-footer */
}

#newsletter-form-footer .form-control {
    color: var(--footer-text) !important;
}

#newsletter-form-footer .form-control::placeholder {
    color: var(--footer-text);
    opacity: 0.6;
}

/* Bouton Signature */
#newsletter-form-footer .btn-newsletter {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-btn);
    font-weight: 600;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION (APP STYLE)
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    
    background-color: var(--bg-card); 
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-modal);
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.4rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item.active i {
    transform: translateY(-2px);
}

/* Badge Panier Mobile */
.mobile-bottom-nav .cart-icon-wrapper {
    position: relative;
    display: inline-block;
    line-height: 1;
}

.mobile-bottom-nav .cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    
    background-color: var(--accent); 
    color: #ffffff;
    
    border: 2px solid var(--bg-card); 
    
    border-radius: 10px;
    font-size: 0.65rem;
    padding: 0.25em 0.5em;
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    z-index: 2;
}

/* Espace pour ne pas cacher le footer sur mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px !important;
    }
}

/* ==========================================================================
   14. NOTIFICATIONS & MESSAGES FLASH (STYLE ORIGIN UI)
   Adaptation dynamique pour CMS (Dark Mode & Branding)
   ========================================================================== */

/* --- 1. Personnalisation Toastify (Popups JS) --- */
.toastify {
    /* Fond dynamique (S'adapte au mode sombre/clair) */
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    
    /* Formes & Ombres du thème */
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-lg) !important;
    
    /* Typographie du thème */
    font-family: var(--font-body) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    
    padding: 16px 24px !important;
    max-width: 400px !important;
    
    /* Bordure décorative par défaut */
    border-left: 5px solid var(--border-color);
}

/* Variante SUCCÈS (Le Style Signature : Dégradé) */
.toast-signature-success,
.toastify.success {
    /* Dégradé Primaire -> Secondaire */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    color: #ffffff !important; /* Texte blanc forcé */
    border: none !important; /* Pas de bordure sur le dégradé */
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.3) !important;
}

/* Variante ERREUR (Utilise l'accent/rouge) */
.toast-signature-error,
.toastify.error {
    background: var(--bg-card) !important;
    color: var(--accent) !important; /* Rouge dynamique */
    border-left: 5px solid var(--accent) !important;
}

/* --- 2. Personnalisation Alertes Bootstrap (Messages PHP) --- */
.alert {
    border: none;
    border-radius: var(--radius-card);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    background-color: var(--bg-card); /* Base propre */
    color: var(--text-main);
}

/* Barre latérale décorative commune */
.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

/* SUCCÈS : Dégradé complet (Plus impactant) */
.alert-success {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff;
}
.alert-success::before { 
    background-color: rgba(255,255,255,0.3); /* Barre subtile */
}
.alert-success a { color: #ffffff; text-decoration: underline; }

/* ERREUR : Fond carte + Bordure Rouge Accent */
.alert-danger {
    /* On utilise une transparence pour que ça marche sur fond noir ou blanc */
    background-color: rgba(220, 53, 69, 0.05); 
    color: var(--accent); /* Rouge dynamique */
}
.alert-danger::before { background-color: var(--accent); }

/* INFO : Fond carte + Bordure Primaire */
.alert-info {
    background-color: rgba(var(--primary-rgb), 0.05);
    color: var(--primary);
}
.alert-info::before { background-color: var(--primary); }

/* AVERTISSEMENT : Jaune (Standard Sémantique) */
.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #b7791f; /* On garde une couleur lisible */
}
/* En Dark Mode, le jaune peut être dur à lire, on adapte si besoin */
@media (prefers-color-scheme: dark) {
    .alert-warning { color: #ffca2c; }
}
.alert-warning::before { background-color: #ffc107; }

/* --- 3. Messages Newsletter (Footer) --- */
#newsletter-message-footer {
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

/* Ici, on force des couleurs claires car le footer est souvent sombre */
#newsletter-message-footer .text-success {
    color: #28a745 !important; 
}
#newsletter-message-footer .text-danger {
    color: #ff6b6b !important;
}
#newsletter-message-footer .text-warning {
    color: #ffc107 !important;
}

/* ==========================================================================
   CORRECTIF BOUTON "VOIR TOUT" (INTEGRATION CMS)
   ========================================================================== */

/* On cible spécifiquement le bouton "Voir tout" dans les entêtes de section */
.d-flex .btn-outline-primary,
.section-header .btn,
.btn-see-all {
    /* 1. COULEUR : Utilise la variable dynamique */
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    background-color: transparent !important;
    
    /* 2. FORME : Obéit au réglage "Arrondis" du CMS */
    border-radius: var(--radius-btn) !important;
    
    /* 3. TYPOGRAPHIE : Obéit au réglage "Style des boutons" (Maj/Min) */
    text-transform: var(--btn-text-transform, none) !important;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.4rem 1rem;
    
    transition: all 0.3s ease;
}

/* EFFET AU SURVOL (DÉGRADÉ SIGNATURE) */
.d-flex .btn-outline-primary:hover,
.section-header .btn:hover,
.btn-see-all:hover {
    /* Le fond devient le dégradé choisi */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
    border-color: transparent !important;
    color: #ffffff !important; /* Texte blanc */
    
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

/* ==========================================================================
   3. SECTIONS DYNAMIQUES (BOUTIQUE)
   Correspondance : /includes/boutique/home_render.php
   ========================================================================== */

/* ==========================================================================
   PARTIE 1 : GRILLES PRODUITS & FLASH SALES (PREMIUM)
   ========================================================================== */

/* --- 1. DESIGN DES SECTIONS GÉNÉRALES --- */
.section-product-grid {
    position: relative;
    /* On ajoute une transition douce pour l'apparition */
    transition: all 0.5s ease-in-out;
}

/* Header de section (Titre + Bouton) */
.section-product-grid .d-flex.border-bottom {
    border-bottom: 1px solid rgba(0,0,0,0.05) !important; /* Bordure très subtile */
    padding-bottom: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.section-title {
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

/* Icône dans le titre */
.section-title i {
    background: rgba(var(--primary-rgb), 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    margin-right: 12px !important;
    color: var(--primary);
}

/* Bouton "Voir tout" Premium */
.btn-outline-dark.rounded-pill {
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.4rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-outline-dark.rounded-pill:hover {
    background-color: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- 2. SECTION COVER (IMAGE BANNIÈRE) --- */
.section-cover {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    /* Ombre portée diffuse et luxueuse */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transform: translateZ(0);
}

.section-cover img {
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
    width: 100%;
    display: block;
}

.section-cover:hover img {
    transform: scale(1.05); /* Zoom lent et cinématographique */
}

/* --- 3. SECTION FLASH SALE (VENTE FLASH) --- */
.section-flash-sale {
    background: linear-gradient(to right, #fff5f5, #fff) !important; /* Dégradé subtil rouge pâle */
    border-top: 1px solid rgba(220, 53, 69, 0.1);
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
    position: relative;
}

/* Le conteneur du compte à rebours */
.section-flash-sale .border-danger {
    border-color: rgba(220, 53, 69, 0.2) !important;
    background: #fff;
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.08) !important;
    padding: 1rem 1.5rem !important;
    border-radius: 50px !important; /* Forme de pilule parfaite */
}

.countdown-timer {
    font-family: 'Courier New', monospace; /* Police monospace pour éviter que les chiffres sautent */
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
    display: inline-block;
    min-width: 140px;
}

/* Animation pulsation sur l'icône éclair */
.section-flash-sale .fa-bolt {
    animation: flash-pulse 2s infinite;
}

@keyframes flash-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; color: #ffca2c; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   MOBILE RESPONSIVE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Ajustement des espacements globaux */
    .section-product-grid {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* En-tête de section sur mobile */
    .section-product-grid .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    /* Le bouton "Voir tout" prend toute la largeur sur mobile pour être facile à cliquer */
    .section-product-grid .btn-outline-dark.rounded-pill {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Titres plus petits */
    .section-title {
        font-size: 1.25rem !important; /* ~20px */
    }
    .section-title i {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    /* --- RESPONSIVE FLASH SALE --- */
    .section-flash-sale .row {
        text-align: center;
    }
    
    .section-flash-sale .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .section-flash-sale .text-md-end {
        text-align: center !important;
    }

    /* Le timer s'adapte en colonne si besoin */
    .section-flash-sale .d-inline-flex {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .section-flash-sale .me-3 {
        margin-right: 0 !important;
        margin-bottom: 5px;
    }
    
    /* Grille produits : ajustement des gouttières sur mobile */
    .row.g-3 {
        --bs-gutter-x: 0.75rem; /* Espacement plus serré horizontalement */
        --bs-gutter-y: 1rem;
    }
}

/* ==========================================================================
   PARTIE 2 : BUNDLES & VIDÉO
   ========================================================================== */

/* --- 1. SECTION BUNDLE (PACK PROMO) --- */
.section-bundle .card {
    border: 1px solid rgba(0,0,0,0.04) !important; /* Bordure ultra fine */
    box-shadow: 0 20px 50px rgba(0,0,0,0.05) !important; /* Ombre portée très douce */
    background: #fff !important; /* On force le blanc pour le "clean look" */
    border-radius: var(--radius-card);
}

/* Titre du pack */
.section-bundle h3 i {
    color: var(--primary);
    transform: rotate(-10deg);
    display: inline-block;
}

/* Les petites cartes produits dans le pack */
.section-bundle .product-card-hover {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent !important; /* Invisible par défaut */
}

.section-bundle .product-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    border-color: rgba(var(--primary-rgb), 0.2) !important; /* Bordure colorée au survol */
    z-index: 2;
}

/* Badge de prix sur les images produits */
.section-bundle .badge.bg-dark {
    backdrop-filter: blur(4px);
    background: rgba(0,0,0,0.8) !important;
    font-weight: 600;
    border-radius: 4px;
}

/* --- BOÎTE DE TOTAL (Le bloc d'achat) --- */
.bundle-total-box {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--radius-card);
    border: 1px dashed var(--border-color); /* Bordure pointillée style "coupon" */
    position: relative;
    overflow: visible; /* Pour laisser dépasser le badge "Économisez" */
}

/* Badge "ÉCONOMISEZ X DA" */
.bundle-save-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 12px 12px; /* Arrondi seulement en bas */
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    letter-spacing: 1px;
    top: -1px !important; /* Colle au haut de la boîte */
}

/* Prix Total */
.bundle-total-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary); /* Utilise la couleur principale de la marque */
    letter-spacing: -1px;
}

/* Bouton Ajouter au pack avec Animation Pulse */
.pulse-anim {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}
.pulse-anim:active {
    transform: scale(0.98);
}

/* L'animation de l'ombre qui respire */
@keyframes btn-pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(var(--primary-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); }
}
.pulse-anim {
    animation: btn-pulse-glow 2s infinite;
}

/* --- 2. SECTION VIDEO HERO --- */
.section-video .video-wrapper {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* Ombre cinéma */
    background: #000;
    transform: translateZ(0); /* Hack performance */
}

/* Overlay (Texte sur la vidéo) */
.section-video .video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* Dégradé professionnel pour rendre le texte lisible */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    padding: 4rem 2rem 2rem 2rem;
    color: #fff;
    pointer-events: none; /* Laisse passer les clics vers les contrôles vidéo */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 2)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* --- BUNDLE MOBILE --- */
    .section-bundle .card-body {
        padding: 1.5rem !important; /* Moins de padding interne */
    }
    
    /* Grille 2 colonnes serrées pour les produits du pack */
    .section-bundle .row-cols-2 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* On réduit la taille du titre des produits dans le pack */
    .section-bundle h6 {
        font-size: 0.75rem !important;
    }
    
    /* Le badge de prix sur l'image devient plus petit */
    .section-bundle .badge.bg-dark {
        font-size: 0.7rem;
        padding: 0.35em 0.5em;
    }

    /* Boîte total pack */
    .bundle-total-box {
        margin-top: 1rem;
        padding: 1.5rem 1rem; /* Plus compact */
    }
    .bundle-total-price {
        font-size: 1.5rem; /* Prix un peu plus petit sur mobile */
    }

    /* --- VIDEO MOBILE --- */
    /* On force la hauteur de la vidéo à être proportionnelle sur mobile */
    .section-video iframe, 
    .section-video video {
        height: 250px !important; /* Override du style inline PHP de 500px */
        width: 100% !important;
    }
    
    .section-video .video-overlay {
        padding: 2rem 1rem 1rem 1rem;
    }
    .section-video .video-overlay h3 {
        font-size: 1.2rem;
    }
    .section-video .video-overlay p {
        font-size: 0.9rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limite à 2 lignes sur mobile */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ==========================================================================
   PARTIE 3 : TRUST BADGES, FAQ & TÉMOIGNAGES
   ========================================================================== */

/* --- 1. SECTION TRUST BADGES (RÉASSURANCE) --- */
.section-trust {
    background: #fff;
    /* Séparation visuelle douce si la section précédente est grise */
    border-top: 1px solid rgba(0,0,0,0.03); 
}

.trust-item {
    padding: 1.5rem 1rem;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* On centre le contenu verticalement si besoin */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Animation au survol : légère levée */
.trust-item:hover {
    transform: translateY(-5px);
}

.trust-icon {
    font-size: 2rem; /* ~32px */
    color: var(--primary);
    margin-bottom: 1.25rem;
    /* Cercle subtil derrière l'icône */
    background: rgba(var(--primary-rgb), 0.08);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.trust-item:hover .trust-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

.trust-item h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

/* --- 2. SECTION FAQ (ACCORDÉON STYLE "ÎLOTS") --- */
.section-faq .accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Espace entre les questions */
}

/* On casse le style par défaut de Bootstrap pour faire des blocs séparés */
.section-faq .accordion-item {
    border: 1px solid transparent;
    border-radius: var(--radius-card) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.section-faq .accordion-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.05);
}

/* Bouton de la question */
.section-faq .accordion-button {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    color: var(--text-main);
    box-shadow: none !important; /* Enlève le glow bleu moche de Bootstrap */
}

/* État ouvert (Active) */
.section-faq .accordion-button:not(.collapsed) {
    background-color: rgba(var(--primary-rgb), 0.04);
    color: var(--primary);
    font-weight: 700;
}

/* L'icône flèche par défaut de Bootstrap, on la teinte en primaire quand ouvert */
.section-faq .accordion-button:not(.collapsed)::after {
    filter: saturate(100%) hue-rotate(0deg); /* Astuce : Reset filters si besoin */
    /* Idéalement, on utiliserait un SVG custom, mais on garde le natif pour compatibilité */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d6efd'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}
/* Note: Le %230d6efd dans l'URL SVG ci-dessus est le bleu Bootstrap par défaut. 
   Si votre --primary est différent, le chevron restera bleu standard Bootstrap sauf si on remplace le SVG. */

.section-faq .accordion-body {
    padding: 1.5rem;
    padding-top: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- 3. SECTION TÉMOIGNAGES (PREUVE SOCIALE) --- */
.section-testimonials {
    /* Fond très légèrement gris pour détacher les cartes blanches */
    background-color: #f8f9fa !important; 
}

.section-testimonials .card {
    border: none;
    border-radius: 16px !important; /* Très arrondi */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.3s ease;
    height: 100%;
}

.section-testimonials .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Les étoiles */
.section-testimonials .text-warning {
    color: #ffc107 !important; /* Jaune or standard */
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* Le texte de l'avis */
.section-testimonials .fst-italic {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.6;
    font-family: Georgia, "Times New Roman", Times, serif; /* Police Serif pour le côté "Citation" */
    opacity: 0.8;
}

/* Badge "Achat Vérifié" */
.section-testimonials .text-success {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    display: inline-block;
    background: rgba(25, 135, 84, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 3)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Trust Badges : Grille 2x2 serrée */
    .section-trust .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 2rem;
    }
    
    .trust-item {
        padding: 0;
    }
    .trust-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    .trust-item h6 {
        font-size: 0.9rem;
    }
    .trust-item p {
        font-size: 0.8rem;
        line-height: 1.2;
    }

    /* FAQ : Titres plus petits pour éviter les retours à la ligne moches */
    .section-faq .accordion-button {
        padding: 1rem;
        font-size: 0.95rem;
    }
    .section-faq .accordion-body {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Témoignages : Scroll horizontal optionnel ou empilement */
    /* Ici le PHP utilise col-md-4 donc ça s'empile naturellement. */
    .section-testimonials .card {
        margin-bottom: 1rem;
        padding: 1.5rem !important; /* Moins de padding interne */
    }
    .section-testimonials .fst-italic {
        font-size: 1rem;
    }
}

/* ==========================================================================
   PARTIE 4 : STORIES, LOOKBOOK & CONTENU
   ========================================================================== */

/* --- 1. SECTION STORIES (STYLE INSTAGRAM) --- */
.section-stories {
    background: #fff;
    /* Masquer la barre de défilement tout en gardant le scroll */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.section-stories ::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 85px; /* Largeur fixe pour alignement */
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
}

.story-item:active {
    transform: scale(0.95);
}

/* L'anneau coloré autour de la story */
.story-ring {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    padding: 3px; /* Espace pour le dégradé */
    /* Dégradé Premium "Social" (Rose/Or/Violet) */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    margin-bottom: 8px;
    position: relative;
}

/* Si on veut un style plus "Marque", on peut utiliser les vars :
   background: linear-gradient(45deg, var(--primary), var(--accent)); 
*/

.story-circle {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    padding: 3px; /* Bordure blanche intérieure */
    overflow: hidden;
}

.story-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

/* Zoom sur la photo au survol */
.story-item:hover .story-circle img {
    transform: scale(1.1);
}

.story-title {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* --- 2. SECTION LOOKBOOK (POINTS CHAUDS) --- */
.lookbook-wrapper {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #000; /* Fond noir pour éviter flash blanc */
}

.lookbook-wrapper img {
    display: block;
    width: 100%;
    transition: opacity 0.3s;
}

/* Le Point (Le +) */
.hotspot-point {
    position: absolute;
    width: 30px;
    height: 30px;
    /* On utilise translate -50% pour que le point soit pile au centre des coordonnées */
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: pointer;
}

/* L'icône blanche centrale */
.hotspot-icon {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    position: relative;
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hotspot-point:hover .hotspot-icon {
    transform: scale(1.2) rotate(90deg); /* Rotation sympa au survol */
    color: var(--primary);
}

/* L'onde de choc (Animation) */
.hotspot-pulse {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: 1;
}

@keyframes ping {
    75%, 100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* La Carte Produit Flottante */
.hotspot-card {
    position: absolute;
    bottom: 40px; /* Au-dessus du point */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 100;
    text-align: left;
}

/* Petite flèche sous la carte */
.hotspot-card::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #fff transparent transparent;
}

/* Apparition au survol */
.hotspot-point:hover .hotspot-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* --- 3. BANNER CAROUSEL (SLIDER) --- */
.carousel-inner {
    border-radius: var(--radius-card);
    overflow: hidden;
}

/* Flèches de navigation plus modernes */
.carousel-control-prev, .carousel-control-next {
    width: 5%; /* Zone de clic plus fine */
    opacity: 0; /* Invisible par défaut pour le clean look */
    transition: opacity 0.3s;
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5); /* Fond sombre pour contraste */
    border-radius: 50%;
    padding: 1.5rem;
    background-size: 50%;
}

/* --- 4. TEXT BLOCK (CONTENU ÉDITORIAL) --- */
.text-block-section {
    max-width: 900px;
    margin: 0 auto;
}

.text-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
}

.text-content h2, .text-content h3 {
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.text-content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 4)
   ========================================================================== */
@media (max-width: 768px) {
    /* Stories : Scroll horizontal fluide */
    .stories-wrapper {
        justify-content: flex-start !important; /* Aligner à gauche pour le scroll */
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .story-item {
        width: 75px; /* Un peu plus petit sur mobile */
        flex-shrink: 0;
    }
    
    .story-ring {
        width: 68px;
        height: 68px;
    }

    /* Lookbook : Sur mobile, la carte s'affiche au clic (naturellement via :hover sur iOS/Android) */
    .hotspot-card {
        width: 180px;
        bottom: 35px;
        left: 50%;
        transform: translateX(-50%); /* Pas de décalage Y pour éviter les bugs tactiles */
    }
    
    .hotspot-card .small.fw-bold {
        font-size: 0.75rem; /* Texte plus petit */
    }

    /* Carousel : Flèches toujours visibles sur mobile car pas de hover */
    .carousel-control-prev, .carousel-control-next {
        opacity: 1;
    }
    .carousel-control-prev-icon, .carousel-control-next-icon {
        padding: 1rem; /* Plus petit */
    }
}

/* ==========================================================================
   PARTIE 5 : MARQUEE, BEFORE/AFTER & TABLES
   ========================================================================== */

/* --- 1. MARQUEE (TEXTE DÉFILANT) --- */
.marquee-track {
    gap: 2rem; /* Espace entre les deux blocs de texte */
}

.marquee-content span {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-heading);
    /* On assure une fluidité parfaite sur mobile */
    -webkit-font-smoothing: antialiased; 
    transform: translateZ(0);
}

/* --- 2. SECTION BEFORE / AFTER (AVANT/APRÈS) --- */
.section-before-after {
    position: relative;
    z-index: 2;
}

.ba-wrapper {
    /* Ombre portée forte pour donner de la profondeur à l'image */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
    border: 4px solid #fff; /* Cadre photo blanc */
    transform: translateZ(0); /* Force l'accélération matérielle */
}

/* Le curseur (La poignée centrale) */
#badge-<?= $baId ?> { 
    /* Note: Le PHP génère l'ID, mais on peut cibler via la classe générique si on l'ajoute, 
       ici on cible la div qui contient l'icône via une règle générique pour le style */
}

/* On cible la div qui sert de poignée (celle avec l'icône arrows) */
.ba-wrapper div[id^="badge-"] {
    background: #fff !important;
    width: 48px !important;
    height: 48px !important;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    transition: transform 0.1s ease;
    cursor: ew-resize;
}

/* Effet au clic sur la poignée */
.ba-wrapper:active div[id^="badge-"] {
    transform: translate(-50%, -50%) scale(1.1) !important;
}

/* La ligne de séparation verticale */
.ba-wrapper div[id^="overlay-"] {
    border-right: 2px solid #fff !important;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3); /* Ombre portée sur la partie "Avant" */
}

/* Les étiquettes "Avant" / "Après" */
.ba-wrapper span {
    backdrop-filter: blur(4px); /* Effet verre dépoli */
    background: rgba(0, 0, 0, 0.6) !important;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.7rem !important;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 12px !important;
}

/* --- 3. TABLEAU DE COMPARAISON (PREMIUM) --- */
.section-comparison .table-responsive {
    border-radius: var(--radius-card);
    /* Scrollbar invisible mais fonctionnelle */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.section-comparison .table-responsive::-webkit-scrollbar {
    display: none;
}

.section-comparison table {
    border-collapse: separate;
    border-spacing: 0;
}

/* En-têtes de colonnes */
.section-comparison thead th {
    background-color: #fff;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Colonne "Recommandé" (Highlight) */
.section-comparison .bg-primary.bg-opacity-10 {
    background-color: rgba(var(--primary-rgb), 0.06) !important;
}

/* Le badge "Recommandé" */
.section-comparison .badge.bg-primary {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5em 1em;
    box-shadow: 0 4px 6px rgba(var(--primary-rgb), 0.3);
}

/* Lignes du corps */
.section-comparison tbody tr {
    transition: background-color 0.2s;
}

.section-comparison tbody tr:hover {
    background-color: rgba(0,0,0,0.01); /* Très léger gris au survol de la ligne */
}

.section-comparison tbody td {
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* La première colonne (Titres des lignes) */
.section-comparison tbody td:first-child {
    color: var(--text-main);
    font-weight: 700 !important;
}

/* Les icônes Check/Cross */
.section-comparison .fa-circle-check {
    filter: drop-shadow(0 2px 4px rgba(25, 135, 84, 0.2));
}

.section-comparison .fa-circle-xmark {
    opacity: 0.3;
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 5)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Before/After sur mobile */
    .ba-wrapper {
        border-width: 2px; /* Cadre plus fin */
    }
    
    /* Bouton "Découvrir" plus large */
    .section-before-after .btn {
        width: 100%;
    }

    /* Tableau : Gestion du scroll horizontal */
    .section-comparison .table-responsive {
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1); /* Indique qu'il y a du contenu à droite */
    }
    
    .section-comparison th, 
    .section-comparison td {
        min-width: 120px; /* Force une largeur min pour ne pas écraser le texte */
        padding: 1rem 0.5rem !important;
        font-size: 0.85rem !important;
    }
    
    .section-comparison tbody td:first-child {
        position: sticky;
        left: 0;
        background: #fff; /* Garde la 1ère colonne visible */
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
        min-width: 140px;
    }
    
    /* Ajustement badge recommandé */
    .section-comparison .badge.bg-primary {
        display: none; /* On cache le badge "Recommandé" sur mobile s'il prend trop de place, ou on le réduit */
    }
    /* Alternative : afficher le badge mais plus petit */
    /*
    .section-comparison .badge.bg-primary {
        font-size: 0.5rem;
        padding: 0.3em 0.6em;
    }
    */
}

/* ==========================================================================
   PARTIE 6 : TABS, HERO & COUNTDOWN
   ========================================================================== */

/* --- 1. SECTION PRODUCT TABS (ONGLETS) --- */
.section-tabs .nav-pills {
    background: #f1f3f5;
    display: inline-flex;
    padding: 0.5rem;
    border-radius: 50px; /* Forme de pilule géante */
}

.section-tabs .nav-link {
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 40px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none; /* On enlève les bordures par défaut */
}

.section-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.5);
}

.section-tabs .nav-link.active {
    background-color: #fff;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Ombre douce au lieu d'un fond de couleur plat */
    font-weight: 800;
}

/* Animation fluide entre les onglets */
.tab-pane {
    transition: opacity 0.4s ease-in-out;
}

/* --- 2. SECTION PRODUCT HERO (PRODUIT VEDETTE) --- */
.section-product-hero {
    /* Dégradé subtil pour donner du volume */
    background: radial-gradient(circle at 10% 20%, rgb(248, 249, 250) 0%, rgb(241, 243, 245) 90%);
    overflow: hidden;
}

/* Badge "Produit Vedette" */
.section-product-hero .badge {
    padding: 0.6em 1.2em;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.7rem;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
}

.section-product-hero h2.display-5 {
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text-main);
}

/* Image du produit Hero */
.section-product-hero img.product-card-hover {
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Ombre portée au sol */
    filter: drop-shadow(0 25px 25px rgba(0,0,0,0.15)); 
}

.section-product-hero:hover img.product-card-hover {
    transform: scale(1.05) rotate(-2deg); /* Légère rotation dynamique */
}

/* Prix */
.section-product-hero .text-danger {
    color: var(--accent) !important;
}

/* --- 3. SECTION COUNTDOWN OFFER (OFFRE LIMITÉE) --- */
.section-countdown {
    background-attachment: fixed; /* Effet Parallaxe */
    position: relative;
    color: #fff;
}

.section-countdown h2 {
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Les boîtes du timer */
#timer-box-<?= $uniqId ?> {
    /* Note: Le sélecteur ID est dynamique, on cible via la classe parente */
}
.section-countdown div[id^="timer-box-"] > div {
    background: rgba(255, 255, 255, 0.1) !important; /* Fond translucide "Glassmorphism" */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
    min-width: 90px;
    border-radius: 16px !important;
    transition: transform 0.3s;
}

.section-countdown div[id^="timer-box-"] > div:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2) !important;
}

.section-countdown .display-6 {
    font-weight: 800;
    font-family: monospace; /* Pour aligner les chiffres */
}

.section-countdown small {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Le bouton blanc */
.section-countdown .btn-light {
    background: #fff;
    color: #000;
    border: none;
    transition: all 0.3s;
}
.section-countdown .btn-light:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 6)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Onglets : Scroll horizontal si trop nombreux */
    .section-tabs .nav-pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 1rem; /* Espace pour scrollbar invisible */
        background: transparent;
        width: 100%;
        border-radius: 0;
    }
    
    .section-tabs .nav-link {
        white-space: nowrap;
        background: #fff;
        border: 1px solid var(--border-color);
        margin-right: 0.5rem;
    }
    .section-tabs .nav-link.active {
        border-color: var(--primary);
    }

    /* Product Hero : Image plus petite */
    .section-product-hero img.product-card-hover {
        max-height: 250px !important;
        margin-bottom: 2rem;
    }
    .section-product-hero h2 {
        font-size: 2rem; /* Titre plus petit */
    }

    /* Countdown : Grille 2x2 pour les boîtes de temps */
    .section-countdown div[id^="timer-box-"] {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
    .section-countdown div[id^="timer-box-"] > div {
        flex: 1 1 40%; /* 2 par ligne */
        min-width: auto;
    }
}

/* ==========================================================================
   PARTIE 7 : CATÉGORIES, MOSAÏQUE & DIVIDERS
   ========================================================================== */

/* --- 1. CATEGORY SHOWCASE (VITRINE CATÉGORIES) --- */
.section-categories {
    position: relative;
    z-index: 2;
}

/* Mode Carousel (Style "Stories Instagram") */
.section-categories .d-flex.overflow-auto {
    padding-bottom: 1.5rem !important; /* Espace pour l'ombre */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Scroll fluide iOS */
    /* Masquer scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.section-categories .d-flex.overflow-auto::-webkit-scrollbar {
    display: none;
}

.section-categories a.text-decoration-none {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.section-categories a.text-decoration-none:hover {
    transform: translateY(-5px);
}

.section-categories .rounded-circle {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
}

/* Au survol, on ajoute une bordure colorée autour du cercle */
.section-categories a:hover .rounded-circle {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.2) !important;
}

/* Mode Grid (Tuiles) */
.section-categories .card {
    border-radius: var(--radius-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-categories .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}

.section-categories .card-img {
    transition: transform 1.2s ease, filter 0.3s ease;
}
.section-categories .card:hover .card-img {
    transform: scale(1.1); /* Zoom lent */
    filter: brightness(0.6) !important; /* Assombrit un peu plus pour lisibilité texte */
}

.section-categories .card-title {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

/* --- 2. PRODUCTS MOSAIC (GRILLE BENTO) --- */
/* Note : Le PHP met un style inline height: 500px, on le garde sur Desktop mais on l'override sur mobile */

.group-hover {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-card); /* Arrondi global des cases */
}

/* Gradient sombre en bas des images pour lire le texte */
.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.group-hover .small {
    font-weight: 500;
    opacity: 0.9;
}

/* Zoom effect (déjà présent dans le PHP mais on l'affine) */
.transition-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.group-hover:hover .transition-zoom {
    transform: scale(1.08);
}

/* --- 3. SHAPE DIVIDERS (VAGUES ET COURBES) --- */
/* Ces classes gèrent les divTop et divBottom du wrapper */

.has-divider-top, .has-divider-bottom {
    position: relative;
    /* On s'assure que le contenu ne passe pas sous le divider */
}

/* Le SVG généré par getSvgShapeDivider doit avoir ces propriétés pour coller aux bords */
.custom-shape-divider-top, 
.custom-shape-divider-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2; /* Au-dessus du background, sous le contenu */
}

.custom-shape-divider-top {
    top: 0;
}

.custom-shape-divider-bottom {
    bottom: 0;
}

.custom-shape-divider-top svg, 
.custom-shape-divider-bottom svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 100%; /* La hauteur est définie par le PHP (ex: 50px) */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ==========================================================================
   MOBILE RESPONSIVE (PARTIE 7 & GLOBAL FIXES)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* --- MOSAIC MOBILE FIX --- */
    /* CRUCIAL : On casse la hauteur fixe de 500px du PHP sur mobile */
    .section-wrapper .row[style*="height: 500px"] {
        height: auto !important;
        display: flex;
        flex-direction: column;
    }

    /* La grande colonne de gauche devient une case normale */
    .section-wrapper .col-md-6.h-100 {
        height: 300px !important; /* Hauteur fixe pour la première image */
        margin-bottom: 0.5rem;
    }

    /* Les colonnes de droite (les 4 petits produits) */
    .section-wrapper .col-md-6.d-flex.flex-column {
        height: auto !important;
    }

    /* On donne une hauteur aux petits produits */
    .section-wrapper .d-flex.h-50 {
        height: 150px !important;
        margin-bottom: 0.5rem;
    }
    
    /* --- CATEGORIES MOBILE --- */
    /* On s'assure que les ronds ne sont pas trop gros sur petits écrans */
    .section-categories .rounded-circle {
        width: 90px !important;
        height: 90px !important;
    }
    .section-categories a {
        min-width: 100px !important;
    }
}

/* ==========================================================================
   🛠️ CORRECTIFS FINAUX V3 (LOOKBOOK FIX, TABLE & VIBRATIONS)
   ========================================================================== */

/* 1. LE CONTENEUR */
.lookbook-wrapper {
    position: relative;
    overflow: hidden !important; /* Garde tout dans le cadre */
    border-radius: var(--radius-card);
    z-index: 1;
}

/* 2. LE POINT (Le +) */
.hotspot-point {
    position: absolute;
    width: 32px !important;
    height: 32px !important;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hotspot-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
}

/* 3. LA CARTE PRODUIT (Plus large pour l'image) */
.hotspot-card {
    position: absolute;
    bottom: 45px !important; 
    left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* On élargit un peu pour que l'image respire */
    width: max-content !important;
    max-width: 220px !important;   
    background: #fff;
    padding: 8px !important;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.25); /* Ombre plus forte pour détacher du fond */
    
    display: flex !important;
    align-items: center;
    gap: 12px; /* Espace entre image et texte */
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 20;
    pointer-events: none;
}

.hotspot-card::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #fff transparent transparent;
}

/* Apparition */
.hotspot-point:hover .hotspot-card {
    opacity: 1;
    visibility: visible;
    bottom: 50px !important;
    pointer-events: auto;
}

/* 4. L'IMAGE PRODUIT (AGRANDIE) */
.hotspot-card img {
    /* Taille augmentée pour bonne visibilité */
    width: 60px !important;
    height: 60px !important;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa; /* Fond gris clair si image transparente */
}

/* 5. LE TEXTE */
.hotspot-card div {
    flex: 1;
    text-align: left;
    min-width: 100px; /* Force une largeur min pour le texte */
}

.hotspot-card .small.fw-bold {
    font-size: 0.85rem !important; /* Texte un peu plus grand */
    line-height: 1.3;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite à 2 lignes max */
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal; /* Autorise le retour à la ligne */
}

.hotspot-card .text-primary {
    font-size: 0.9rem !important;
    font-weight: 800;
}

/* 6. MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .hotspot-card {
        max-width: 180px !important;
        padding: 6px !important;
    }
    .hotspot-card img {
        /* Taille correcte pour mobile */
        width: 50px !important;
        height: 50px !important;
    }
    .hotspot-card .small.fw-bold {
        font-size: 0.75rem !important;
    }
}

/* --- 2. CORRECTIF TABLEAU COMPARATIF (DESKTOP vs MOBILE) --- */
/* (Ce code fonctionne déjà, on le garde tel quel) */

/* Mobile : Scroll horizontal activé + 1ère colonne fixe */
@media (max-width: 991px) {
    .section-comparison .table-responsive {
        display: block; width: 100%; overflow-x: auto !important; -webkit-overflow-scrolling: touch; padding-bottom: 10px;
    }
    .section-comparison th, .section-comparison td { min-width: 150px !important; white-space: nowrap; }
    .section-comparison tbody td:first-child { position: sticky; left: 0; background: #fff; z-index: 5; box-shadow: 2px 0 5px rgba(0,0,0,0.05); }
}

/* Desktop : Pleine largeur, pas de scroll */
@media (min-width: 992px) {
    .section-comparison .table-responsive { overflow-x: visible !important; display: table; width: 100% !important; }
    .section-comparison table { width: 100%; table-layout: fixed; }
    .section-comparison th, .section-comparison td { min-width: auto !important; white-space: normal !important; word-wrap: break-word; }
    .section-comparison tbody td:first-child { position: static; box-shadow: none; }
}

/* --- 3. ANIMATION VIBRATION (BOUTONS ATTENTION) --- */
/* (Ce code fonctionne déjà, on le garde tel quel) */
@keyframes attention-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); transform: scale(1); }
    50% { transform: scale(1.02); }
    70% { box-shadow: 0 0 0 15px rgba(var(--primary-rgb), 0); transform: scale(1); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); transform: scale(1); }
}
.pulse-anim, .section-before-after .btn, .section-countdown .btn, .section-product-hero .btn-primary {
    animation: attention-pulse 2s infinite !important; position: relative; z-index: 5;
}
.section-countdown .btn { animation-name: attention-pulse-white !important; }
@keyframes attention-pulse-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* ==========================================================================
   3. OVERRIDES BOOTSTRAP (Pour forcer l'utilisation des variables :root)
   ========================================================================== */

/* 1. Force le texte "text-primary" à utiliser votre couleur */
.text-primary {
    color: var(--primary) !important;
}

/* 2. Force les fonds "bg-primary" (Badges, etc.) */
.bg-primary {
    background-color: var(--primary) !important;
}

/* 3. Force les boutons "btn-primary" */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse); /* Couleur du texte (blanc généralement) */
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    /* On assombrit légèrement au survol, ou on garde la même */
    background-color: var(--primary); 
    border-color: var(--primary);
    opacity: 0.9; 
    color: var(--text-inverse);
}

/* 4. Force les contours "btn-outline-primary" (si utilisés) */
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--text-inverse);
}

/* 5. Cas spécifique : Fond avec opacité (Tableau comparatif) */
/* Bootstrap utilise bg-opacity-10, on doit s'assurer que ça marche avec la variable */
.bg-primary.bg-opacity-10 {
    background-color: rgba(var(--primary-rgb), 0.1) !important;
}

/* ==========================================================================
   X. MODULES : SMART COLLECTIONS & VITRINES (Flexible)
   ========================================================================== */

/* --- 1. Navigation des Onglets (Pills) --- */
.section-smart-collection .nav-pills {
    gap: 10px;
}

.section-smart-collection .nav-link {
    color: var(--text-main);
    background-color: var(--bg-card);
    border: 1px solid rgba(0,0,0, 0.08); /* Bordure subtile */
    border-radius: var(--radius-btn);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.section-smart-collection .nav-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.section-smart-collection .nav-link.active {
    background-color: var(--primary) !important; /* Force la couleur du thème */
    color: var(--text-inverse) !important;
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md);
}

/* --- 2. Stories (Bulles Rondes) --- */
.story-ring {
    border-color: var(--primary) !important; /* Bordure couleur thème */
    padding: 3px; /* Espace entre bordure et image */
    background: transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.story-ring:hover {
    transform: scale(1.05); /* Effet zoom léger au survol */
    cursor: pointer;
}

.story-ring img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid var(--bg-card); /* Petit contour blanc interne */
}

/* --- 3. Vitrine Grille (Hover Effects) --- */
.group-hover {
    border-radius: var(--radius-card) !important;
    overflow: hidden;
}

.group-hover .transition-zoom {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group-hover:hover .transition-zoom {
    transform: scale(1.1);
}

/* Ombre portée sur le texte pour lisibilité sur image */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0,0,0, 0.7);
}

/* --- 4. Carrousel Horizontal (Scrollbar cachée) --- */
/* Masquer scrollbar pour Chrome, Safari and Opera */
.d-flex.overflow-auto::-webkit-scrollbar {
    display: none;
}
/* Masquer scrollbar pour IE, Edge and Firefox */
.d-flex.overflow-auto {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Cartes du carrousel */
.section-smart-collection a .rounded-3 {
    border-radius: var(--radius-card) !important;
    border-color: var(--border-color) !important;
    background-color: var(--bg-card);
    transition: var(--transition-base);
}

.section-smart-collection a:hover .rounded-3 {
    border-color: var(--primary) !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* =========================================
   FIX MOSAÏQUE RESPONSIVE (MOBILE)
   ========================================= */

@media (max-width: 991px) { /* Cible Tablettes et Mobiles */
    
    /* 1. On annule la hauteur fixe de 500px du conteneur */
    .mosaic-container {
        height: auto !important;
        min-height: auto !important;
        padding-bottom: 1rem;
    }

    /* 2. On force les lignes à s'adapter */
    .mosaic-container .row {
        height: auto !important;
    }

    /* 3. On réinitialise les colonnes pour qu'elles s'empilent proprement */
    .mosaic-container .col-md-6,
    .mosaic-container .col-md-7,
    .mosaic-container .col-md-5,
    .mosaic-container .h-100,
    .mosaic-container .h-50 {
        height: auto !important;
        min-height: auto !important;
    }

    /* 4. On donne une hauteur fixe à CHAQUE image pour qu'elle soit visible */
    /* Cela cible le lien <a> qui entoure l'image */
    .mosaic-container a.d-block {
        height: 300px !important; /* Belle hauteur pour mobile */
        margin-bottom: 15px; /* Espacement entre les blocs */
    }

    /* 5. Cas spécifique pour les "petits" blocs (quand il y a 5 produits) */
    /* On les laisse en 2 colonnes sur mobile pour ne pas faire une liste interminable */
    .mosaic-container .d-flex.h-50.gap-2 {
        display: flex !important;
        flex-direction: row !important;
        height: auto !important;
        margin-bottom: 15px;
    }
    
    .mosaic-container .d-flex.h-50.gap-2 > div {
        width: 50% !important;
    }
    
    .mosaic-container .d-flex.h-50.gap-2 a.d-block {
        height: 200px !important; /* Un peu moins haut pour les duos */
        margin-bottom: 0;
    }
}

/* --- Video Hero --- */
.section-video-hero video {
    display: block; /* Supprime l'espace sous la vidéo */
}

/* Ombre portée sur le texte pour lisibilité extrême */
.text-shadow {
    text-shadow: 0 2px 15px rgba(0,0,0, 0.5);
}

/* Animation pulsation bouton */
@keyframes pulse-white {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.pulse-anim:hover {
    animation: pulse-white 1.5s infinite;
}
