/* =================================================================
   STYLE.CSS - KICKS V32.7 (PARTIE 1 : BASE, CATALOGUE & MODALES)
================================================================= */

/* --- 1. VARIABLES & COULEURS GLOBALES --- */
:root {
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #121212;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    --accent-color: #000000;
    --accent-text: #ffffff;
    --success-color: #00c853;
    --error-color: #d50000;
    --header-height: 70px;
    --container-width: 1440px;
    --radius: 6px;

    /* Variables GDT (Guide des Tailles) */
    --gdt-orange: #FF6600;
    --gdt-black: #111111;
    --gdt-bg: #fbfbfc;
    --gdt-card: #ffffff;
    --gdt-soft: #f6f6f7;
    --gdt-accent: #fff2e6;
    
    /* Variables Avis Clients (Pop) */
    --pop-accent-1: #ff6f61; /* Corail */
    --pop-accent-2: #00ff00; /* Vert */
    --pop-bg-deep: #101010;
}

body.dark-mode {
    --bg-color: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #181818;
    --text-primary: #f5f5f5;
    --text-secondary: #aaaaaa;
    --text-muted: #888888;
    --border-color: #333333;
    --accent-color: #ffffff;
    --accent-text: #000000;
    --gdt-bg: #121212;
    --gdt-card: #1e1e1e;
    --gdt-black: #ffffff;
}

/* --- 2. RESET & GLOBAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-family: 'Oswald', sans-serif; text-transform: uppercase; margin-bottom: 10px; }

/* UTILS */
.hidden { display: none !important; }
.full-width { width: 100%; }

/* --- 4. TOP BAR & HEADER --- */
.top-bar {
    background-color: var(--accent-color); color: var(--accent-text);
    padding: 8px 0; font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; overflow: hidden; white-space: nowrap;
    position: relative; z-index: 1001;
}
.marquee-content { display: inline-block; white-space: nowrap; animation: marquee 25s linear infinite; padding-left: 100%; }
.marquee-content span { display: inline-block; padding-right: 50px; }
@keyframes marquee { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(-100%, 0, 0); } }

#main-header {
    position: sticky; top: 0; z-index: 1000;
    background-color: var(--bg-color); border-bottom: 1px solid var(--border-color);
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: var(--header-height); }

/* Logo */
.logo-wrapper { min-width: 140px; display: flex; align-items: center; }
.logo-wrapper img { max-height: 55px; width: auto; object-fit: contain; }
body:not(.dark-mode) .logo-light { display: block; }
body:not(.dark-mode) .logo-dark { display: none; }
body.dark-mode .logo-light { display: none; }
body.dark-mode .logo-dark { display: block; }

/* Recherche PC */
.mobile-controls { display: none; } 
.search-container { flex: 1; max-width: 500px; margin: 0 30px; position: relative; }
.search-input-wrapper {
    display: flex; align-items: center; background-color: var(--bg-secondary);
    border: 1px solid var(--border-color); border-radius: 50px; padding: 8px 20px;
}
.search-input-wrapper input { flex: 1; background: transparent; border: none; outline: none; color: var(--text-primary); }

.search-dropdown, #search-results {
    position: absolute; top: 120%; left: 0; width: 100%;
    background-color: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1100; max-height: 400px; overflow-y: auto;
}
.search-result-item { display: flex; align-items: center; padding: 10px 15px; border-bottom: 1px solid var(--border-color); cursor: pointer; }
.search-result-item:hover { background-color: var(--bg-secondary); }
.search-result-item img { width: 50px; height: 50px; margin-right: 15px; object-fit: cover; }

/* Actions Header */
.header-actions { display: flex; gap: 15px; align-items: center; }
.cart-icon-wrapper { position: relative; }
.cart-badge {
    position: absolute; top: -5px; right: -5px; background-color: var(--error-color);
    color: white; font-size: 10px; font-weight: bold; padding: 2px 5px; border-radius: 10px;
}

/* Filtres PC */
.filters-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 10px 20px; border-bottom: 1px solid var(--border-color); align-items: center; }
.filters-scroll select {
    padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border-color);
    background-color: var(--bg-card); color: var(--text-secondary); font-family: inherit;
    font-size: 0.85rem; cursor: pointer; outline: none; min-width: 120px;
}

/* --- 5. CONTENU PRINCIPAL & HERO --- */
#main-content { position: relative; z-index: 1; }

/* Bannière Catégorie */
#category-hero-section {
    width: 100%; height: 300px;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    display: none; align-items: center; justify-content: center;
    position: relative; margin-bottom: 30px;
}
#category-hero-section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; }
#category-hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 20px; }
#category-hero-content h2 { font-size: 2.5rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

/* Grille Produits */
.catalog-section { padding: 20px 0 40px; min-height: 60vh; }
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
    background-color: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; transition: transform 0.3s; border: 1px solid transparent;
    cursor: pointer; position: relative; z-index: 2;
}
.product-card:hover { transform: translateY(-5px); border-color: var(--border-color); }

/* NOUVEAU: Logique de Survol Image */
.product-image-wrapper { width: 100%; aspect-ratio: 1/1; background-color: #f4f4f4; position: relative; }
.product-image-wrapper img { 
    width: 100%; height: 100%; object-fit: cover; 
    transition: opacity 0.3s ease-in-out;
}
.product-image-wrapper img.main-img { opacity: 1; }
.product-image-wrapper img.hover-img { position:absolute; top:0; left:0; opacity:0; } 
.product-image-wrapper:hover img.main-img { opacity: 0; }
.product-image-wrapper:hover img.hover-img { opacity: 1; }

.category-badge {
    position: absolute; top: 10px; left: 10px; z-index: 5;
    background: var(--accent-color); color: var(--accent-text);
    padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.hover-sizes {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center;
    align-content: center; flex-wrap: wrap; gap: 6px; padding: 15px;
    opacity: 0; transition: opacity 0.3s ease; z-index: 5; pointer-events: none;
}
/* --- LE SEUL BLOC DE SURVOL DONT TU AS BESOIN --- */

/* 1. On affiche la 2ème image au survol */
.product-card:hover .hover-img {
    opacity: 1 !important;
    z-index: 3;
}

/* 2. On cache TOUT le texte et le fond noir qui polluent */
.product-card:hover .hover-sizes, 
.product-card:hover .size-tag-mini, 
.product-card:hover .product-description {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 3. On s'assure que la main-img disparaît pour laisser place à la 2ème */
.product-card:hover .main-img {
    opacity: 0;
}
.product-info { padding: 15px; }
.product-brand { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; }
.product-title { font-size: 1rem; font-weight: 600; margin: 5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* NOUVEAU: Styles Prix Barré */
.price-group { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.product-price { font-weight: 700; font-size: 1.1rem; color: var(--text-primary); }
.product-old-price { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; font-weight: 400; }

.load-trigger { height: 50px; margin-top: 20px; width: 100%; clear: both; }

/* Pagination */
.pagination-controls { display: flex; justify-content: center; gap: 10px; margin: 40px 0; width: 100%; }
.page-btn {
    padding: 10px 15px; background-color: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 6px; cursor: pointer; font-weight: 600; color: var(--text-primary); transition: all 0.2s ease;
}
.page-btn:hover { border-color: var(--accent-color); }
.page-btn.active { background-color: var(--accent-color); color: var(--accent-text); border-color: var(--accent-color); }

/* --- 6. GESTION DES MODALES & DRAWER --- */
.modal, .drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    
    display: flex !important;
    align-items: center;    
    justify-content: center; 
    pointer-events: none;

    /* REMPLACEZ LES DEUX LIGNES CI-DESSOUS */
    background: rgba(0, 0, 0, 0.5) !important; 
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px);
}
.modal.open, .drawer.open { visibility: visible; opacity: 1; pointer-events: auto; }

/* Remplacez les lignes 232 à 235 par ceci */
.modal-overlay, .drawer-overlay {
    display: none !important;
}

.modal, .drawer {
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px);
}
.close-modal, .close-drawer {
    font-size: 2rem; width: 44px; height: 44px; background: rgba(0, 0, 0, 0.08);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    position: absolute; top: 15px; right: 15px; z-index: 100; cursor: pointer;
    transition: all 0.2s ease; line-height: 0; color: #111; border: none;
}
.close-modal:hover, .close-drawer:hover { background: rgba(0, 0, 0, 0.2); transform: rotate(90deg); }
body.dark-mode .close-modal, body.dark-mode .close-drawer { color: #ffffff; background: rgba(255, 255, 255, 0.15); }

/* --- 7. DRAWER PANIER & FILTRES MOBILES --- */
.drawer-content {
    position: absolute; top: 0; right: -100%; width: 100%; max-width: 450px; height: 100%;
    background-color: var(--bg-card); transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column; z-index: 2001;
}
.drawer.open .drawer-content { right: 0; }
.drawer-header, .drawer-footer { 
    padding: 20px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; 
    display: flex; justify-content: space-between; align-items: center;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

.cart-item { display: flex; gap: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; background: #f4f4f4; }
.cart-item-details { flex: 1; }
.cart-title { font-weight: 600; font-size: 0.9rem; }
.cart-size { font-size: 0.8rem; color: #666; margin-bottom: 5px; }
.cart-price { font-weight: 700; }

.qty-control { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-control button { padding: 2px 8px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); }
.remove-btn { margin-left: auto; color: var(--error-color) !important; text-decoration: underline; font-size: 0.8rem; border: none !important; }

/* Boutons */
@keyframes pulsate { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } 100% { transform: scale(1); opacity: 1; } }
.pulsate { animation: pulsate 2s infinite ease-in-out; }
.btn-primary { 
    background-color: var(--accent-color); color: var(--accent-text); padding: 12px 20px;
    border-radius: 6px; font-weight: 600; text-transform: uppercase;
    width: 100%; border: none; transition: 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

/* --- 8. MODALE PRODUIT & NOUVELLE SECTION SIMILAIRES --- */
.modal-content {
    /* On retire le positionnement absolute et les translate */
    position: relative; 
    background-color: var(--bg-card);
    
    /* Gestion de la largeur pour Ultra-Wide */
    width: 95%; 
    max-width: 1100px; /* Taille optimale sur PC */
    
    /* Gestion de la hauteur pour ne pas déborder */
    max-height: 90vh; 
    
    border-radius: 12px;
    z-index: 2002;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Le scroll se gère à l'intérieur */
}

.product-content { max-width: 1200px; padding: 0; }

/* --- CORRECTIF MODALE : Augmentation de la taille de la grille et de l'image --- */
.product-modal-grid { 
    display: grid; 
    grid-template-columns: 60% 40%; /* Augmentation de la colonne image (60%) */
    height: 650px; /* Augmentation de la hauteur totale (était 600px) */
    overflow-y: hidden;
}
@media (max-width: 850px) {
    .product-modal-grid { 
        grid-template-columns: 1fr; height: auto; max-height: none; overflow-y: visible;
    }
}

.modal-gallery {
    height: 100%; background: #f9f9f9; display: flex; flex-direction: column;
    justify-content: space-between; padding: 20px; position: relative; overflow: hidden;
}
body.dark-mode .modal-gallery { background: #1a1a1a; }

.modal-details {
    height: 100%; display: flex; flex-direction: column;
    padding: 25px 30px; overflow-y: auto; 
}

/* --- CORRECTIF MODALE : Augmentation de la hauteur max de l'image --- */
.main-image-container {
    flex: 1; width: 100%; display: flex; align-items: center; justify-content: center;
    max-height: 550px; /* Augmentation de 450px à 550px */
    overflow: hidden !important; cursor: zoom-in; position: relative;
}
.main-image-container img {
    max-height: 100%; max-width: 100%; object-fit: contain;
    transition: transform 0.4s ease-out; transform-origin: center center;
}
.thumbnails-row {
    flex: 0 0 auto; display: flex; justify-content: flex-start; gap: 10px;
    width: 100%; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin;
}
.thumbnails-row img {
    width: 70px; height: 70px; border-radius: 8px; border: 2px solid transparent;
    opacity: 0.8; cursor: pointer; object-fit: contain; background: #fff; flex-shrink: 0;
}
.thumbnails-row img.active, .thumbnails-row img:hover {
    opacity: 1; border-color: var(--text-primary); transform: scale(1.05);
}

.related-products-section {
    padding: 30px 40px; border-top: 1px solid var(--border-color); background: var(--bg-secondary);
}
@media (max-width: 850px) { .related-products-section { padding: 20px 15px; } }
.related-products-section h3 { margin-bottom: 20px; font-size: 1.4rem; }
.related-grid { gap: 15px; }

#modal-title { margin-bottom: 5px; font-size: 1.6rem; line-height: 1.1; word-wrap: break-word; }
#modal-price { margin-bottom: 10px; font-size: 1.3rem; font-weight: 700; }
.product-description p { line-height: 1.5; color: var(--text-secondary); font-size: 0.95rem; }

.size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 5px; }
.size-btn { padding: 10px 5px; font-size: 0.9rem; font-weight: 700; border: 2px solid var(--border-color); border-radius: 4px; transition: all 0.2s; }
.size-btn.selected { background-color: var(--accent-color); color: var(--accent-text); border-color: var(--accent-color); }

.text-modal .modal-content { padding: 0; max-height: 90vh; height: auto; display: block; }
.text-modal .modal-content h2 { padding: 20px 20px 0; margin-bottom: 0; }
#content-cgv, #content-mentions, #content-paypal4x, #content-klarna, #content-livraison {
    padding: 20px; overflow-y: auto; line-height: 1.6; color: var(--text-secondary);
    max-height: 65vh; display: block; 
}
/* =================================================================
   STYLE.CSS - KICKS V32.7 (PARTIE 2 : CHECKOUT, MEDIA QUERIES & EXTRAS)
================================================================= */

/* --- 9. CHECKOUT V2 (GRID LAYOUT) --- */
.modal-checkout .modal-content {
    max-height: 95vh; width: 95%; max-width: 900px; 
}
.checkout-grid { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 20px; 
}
.checkout-section h4 { 
    border-bottom: 2px solid var(--border-color); padding-bottom: 10px;
    margin-bottom: 20px; color: var(--accent-color); 
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px;
    font-family: inherit; background: var(--bg-card); color: var(--text-primary);
}

/* Fix Autocomplétion Z-INDEX */
#cp-suggestions {
    z-index: 99999 !important; background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color); border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); max-height: 200px; overflow-y: auto;
    position: absolute; width: 100%; margin-top: 5px;
}
#cp-suggestions li { padding: 10px; cursor: pointer; border-bottom: 1px solid #eee; }
#cp-suggestions li:hover { background-color: var(--bg-secondary); }

.shipping-options label {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border-color); padding: 12px; margin-bottom: 10px;
    border-radius: 6px; cursor: pointer; transition: background 0.2s;
}
.shipping-options label:hover { background: var(--bg-secondary); }
.shipping-options input[type="radio"] { width: auto; margin-right: 10px; }

.checkout-summary-col { 
    background: var(--bg-secondary); padding: 25px; border-radius: 8px; height: fit-content; 
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; }
.summary-total { 
    border-top: 1px solid var(--border-color); padding-top: 15px; margin-top: 15px; 
    font-weight: 800; font-size: 1.2rem; display: flex; justify-content: space-between; 
}

.summary-discount { color: var(--success-color); }
#fees-row { color: var(--error-color); }

.payment-method-selector { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; }
.pay-btn-select {
    flex: 1; padding: 10px 5px; border: 1px solid var(--border-color);
    background-color: var(--bg-card); border-radius: 4px; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center;
    color: var(--text-primary); min-width: 80px;
}
.pay-btn-select:hover { background-color: var(--bg-secondary); }
.pay-btn-select.selected { 
    border-color: var(--accent-color); background-color: var(--accent-color); 
    color: var(--accent-text); box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

#promo-code-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
#apply-promo-btn { 
    border-top-left-radius: 0; border-bottom-left-radius: 0; 
    background: var(--text-primary); color: var(--bg-color); 
    font-weight: bold; border: 1px solid var(--text-primary); 
    transition: opacity 0.2s;
}
#apply-promo-btn:hover { opacity: 0.8; }

#btn-pay-stripe, #btn-pay-virement { margin-top: 10px; height: 55px; font-size: 1.1rem; letter-spacing: 0.5px; width: 100%; }

/* --- 11. FOOTER --- */
#main-footer { 
    background-color: var(--bg-secondary); padding: 60px 0 20px; margin-top: 60px;
    border-top: 1px solid var(--border-color); position: relative; z-index: 10; 
}
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer-col button { text-align: left; color: var(--text-secondary); margin-bottom: 10px; display: block; }
.footer-col button:hover { color: var(--text-primary); text-decoration: underline; }
.payment-icons img { height: 30px; margin-right: 10px; display: inline-block; }
.whatsapp-float { 
    position: fixed; bottom: 30px; right: 30px; z-index: 9000; transition: transform 0.3s; 
}
.whatsapp-float img { width: 60px; height: 60px; }
.whatsapp-float:hover { transform: scale(1.1); }

/* --- 12. CORRECTIFS DARK MODE SPECIFIQUES --- */
body.dark-mode .checkout-summary-col { background-color: #222; }
body.dark-mode .form-group input, body.dark-mode .form-group select { background-color: #2a2a2a; border-color: #444; color: #fff; }
body.dark-mode .shipping-options label { border-color: #444; }
body.dark-mode .shipping-options label:hover { background-color: #2a2a2a; }
body.dark-mode .pay-btn-select { background-color: #1e1e1e; border-color: #444; color: #fff; }
body.dark-mode .pay-btn-select.selected { border-color: #fff; background-color: #333; }
body.dark-mode .pay-btn-select:hover { background-color: #2a2a2a; }
body.dark-mode .modal-gallery { background-color: #1a1a1a; }
body.dark-mode .size-btn { border-color: #444; background-color: #222; color: #fff; }
body.dark-mode .size-btn:hover { border-color: #fff; background-color: #333; }
body.dark-mode .size-btn.selected { background-color: #ffffff; color: #000000; border-color: #ffffff; }
body.dark-mode .thumbnails-row img { background: #333; border-color: #444; }

/* =================================================================
   PARTIE MEDIA QUERIES & OPTIMISATIONS MOBILES
================================================================= */

/* --- 13. OPTIMISATIONS TABLETTE ET MOBILE (Max 1024px) --- */
@media (max-width: 1024px) {
    .container { padding: 0 15px; }
    
    /* HEADER : Gestion du Menu Burger et des Filtres Off-Canvas */
    .filters-scroll { display: none !important; }
    .mobile-controls { display: flex; align-items: center; order: 1; }
    #mobile-menu-trigger {
        padding: 5px; width: 44px; height: 44px; display: flex !important;
        align-items: center; justify-content: center;
    }
    .logo-wrapper { flex: 0 0 auto; order: 2; margin-right: 15px; }
    .search-container { order: 3; margin: 0 10px; }
    .header-actions { order: 4; }
    
    /* Drawer de Filtres (Off-Canvas Menu) */
    #mobile-filter-drawer .drawer-content {
        max-width: 300px; left: 0; right: auto; 
        transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2002;
    }
    #mobile-filter-drawer.open .drawer-content { transform: translateX(0); }
    #mobile-filters-content { display: flex; flex-direction: column; gap: 15px; padding: 20px; }
    #mobile-filters-content select { width: 100%; padding: 10px; font-size: 1rem; border-radius: 6px; }
    
    /* Modale Produit */
    .modal-content.product-content {
        width: 95%; margin: 20px auto; top: 0; left: 50%;
        transform: translate(-50%, 0%); max-height: 95vh; overflow-y: scroll;
        flex-direction: column;
    }
    .product-modal-grid { grid-template-columns: 1fr; height: auto; }
}

/* --- 14. OPTIMISATIONS SMARTPHONE (Max 768px) --- */
@media (max-width: 768px) {
    .container { padding: 0 15px; }
    h2 { font-size: 1.5rem; }

    /* HEADER */
    .header-container { flex-wrap: nowrap; height: var(--header-height); padding: 0 15px; }
    .logo-wrapper { min-width: unset; margin-left: 10px; }
    .logo-wrapper img { max-height: 40px; }
    
    /* Réduction barre de recherche */
    .search-container { flex: 1; max-width: 250px; margin: 0 5px; } 
    .search-input-wrapper { padding: 6px 10px; }

    /* Catalogue (Portrait) */
    .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .related-products-section { padding: 20px 15px; }
    
    /* Modale Produit */
    .size-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .size-btn { font-size: 0.8rem; padding: 8px 4px; }
    .modal-details { padding: 15px; }

    /* CHECKOUT MOBILE */
    .checkout-grid { grid-template-columns: 1fr; padding: 15px; gap: 20px; }
    .checkout-form-col { order: 1; }
    .checkout-summary-col { order: 2; margin-bottom: 20px; }
    .form-group input, .form-group select { padding: 8px; font-size: 0.9rem; }
    
    /* Footer */
    .footer-cols { grid-template-columns: 1fr; }
    .footer-col { margin-bottom: 20px; }
    
    /* Modales texte */
    .text-modal .modal-content div[id^="content-"] { max-height: 75vh; padding: 15px; }

    /* Fix image produit mobile */
    .product-image-wrapper { width: 100%; aspect-ratio: 1 / 1; background-color: #f4f4f4; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
    .product-image-wrapper img { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; }
    
    /* Badges mobile */
    .category-badge, span[style*="background:black"], span[style*="background:#ff6600"] { 
        font-size: 0.6rem !important; padding: 2px 5px !important; top: 5px !important; left: 5px !important;
        right: auto !important; max-width: 80%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
    }
    .product-image-wrapper span:nth-of-type(2) { top: 25px !important; }

    /* Info produit mobile */
    .product-info { padding: 8px 5px !important; }
    .product-brand { font-size: 0.7rem !important; margin-bottom: 2px; }
    .product-title { font-size: 0.85rem !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
    .product-price { font-size: 0.95rem !important; }
    .add-btn-mini { width: 25px; height: 25px; font-size: 1rem; line-height: 25px; }
    
    /* Checkout Promo Code Mobile */
    .promo-code-container { width: 100%; display: flex; gap: 5px; }
    .promo-code-container input#promo-code-input { flex: 4; max-width: 80%; }
    .promo-code-container button#apply-promo-btn { flex: 1; min-width: 50px; padding: 8px; }
    
    /* Checkout Paiement Mobile */
    .payment-method-selector { display: flex; flex-wrap: wrap; gap: 5px; }
    .payment-method-selector .pay-btn-select { flex: 1 1 48%; margin: 0; padding: 10px 5px; font-size: 0.85rem; text-align: center; }
}

/* --- 14b. OPTIMISATION MODE PAYSAGE (LANDSCAPE) --- */
@media (max-width: 1024px) and (orientation: landscape) {
    /* 1. On force les produits à rester petits pour en mettre 4 ou 5 par ligne */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 15px !important;
    }
    
    /* Réduction de la hauteur de bannière pour économiser l'écran vertical */
    #category-hero-section {
        height: 200px !important;
    }

    /* Padding ajusté */
    .container {
        padding: 0 20px;
    }

    /* En paysage, la modale produit doit utiliser la largeur max */
    .modal-content.product-content {
        width: 90% !important;
        max-width: 800px;
    }
}

/* --- 15. OPTIMISATIONS TRES PETITS ÉCRANS (Max 480px) --- */
@media (max-width: 480px) {
    .header-container { padding: 0 10px; }
    .drawer-content { max-width: 100%; }
    #mobile-filter-drawer .drawer-content { max-width: 90%; }
    .main-image-container { height: 200px; }
    .thumbnails-row img { width: 50px; height: 50px; }
    .size-grid { grid-template-columns: repeat(auto-fit, minmax(50px, 1fr)); }
    .checkout-grid { padding: 10px; }
}

/* =================================================================
   STYLES SPECIFIQUES AU GDT (Guide des Tailles)
================================================================= */
.gdt-internal-header {
    background:linear-gradient(90deg,var(--gdt-orange),#ff9a4d); padding:20px;
    border-radius:12px; color:#fff; margin-bottom:18px; box-shadow:0 6px 30px rgba(20,20,20,0.06);
}
.gdt-internal-header h1 { font-size:26px; margin-bottom:8px; font-weight:800; letter-spacing:0.6px; }
.gdt-internal-header p { margin:0; font-size:16px; opacity:0.95; }

.controls { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.tab {
    background:transparent; color:#fff; padding:10px 14px; border-radius:999px;
    border:1px solid rgba(255,255,255,0.12); cursor:pointer; transition:all .15s; font-size: 14px; flex-shrink: 0;
}
.tab.active { background:#fff; color:var(--gdt-orange); font-weight:800; border:0; box-shadow:0 8px 20px rgba(255,154,77,0.12); }

.gdt-layout-grid { display:grid; grid-template-columns:1fr 360px; gap:18px; margin-top:18px; }
@media (max-width:920px) { 
    .gdt-layout-grid { grid-template-columns:1fr; } 
    .preview { order:-1; margin-bottom:18px; } 
}

.card { background:var(--gdt-card); border-radius:12px; padding:20px; box-shadow:0 12px 28px rgba(20,20,20,0.06); border:1px solid var(--gdt-soft); }
.card h2 { color:var(--gdt-orange); margin:0 0 10px 0; font-size:24px; }

.table-wrap { overflow-x: auto; border-radius:8px; margin-bottom:15px; }
.table { width:100%; min-width:600px; border-collapse:collapse; margin-top:8px; font-size:16px; }
.table th, .table td { padding:12px 10px; border:1px solid #f0f0f0; text-align:center; color:var(--text-secondary); }
.table th { background:var(--gdt-accent); color:var(--gdt-black); font-weight:700; }
.table tbody tr:nth-child(even) { background:#faf8f6; }

.preview {
    background:linear-gradient(180deg,#ffffff,#fffdf8); border-radius:12px; padding:16px;
    color:var(--text-secondary); text-align:center; box-shadow:0 10px 28px rgba(20,20,20,0.04); border:1px solid var(--gdt-soft);
}
.brand-title { font-size:20px; font-weight:800; color:var(--text-primary); margin-bottom:6px; }
.logo-image { width: 180px; max-height: 80px; object-fit: contain; display: block; margin: 6px auto 12px auto; }
.note { font-size:15px; color:var(--text-secondary); line-height:1.5; }

/* =================================================================
   RGPD COOKIE MODAL STYLES
================================================================= */
.cookie-modal {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 20000;
    display: flex; justify-content: center; align-items: flex-end; backdrop-filter: blur(2px);
}
.cookie-modal.hidden { display: none !important; }

.cookie-content {
    background: var(--bg-card); width: 100%; max-width: 500px; padding: 25px;
    border-radius: 12px 12px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out; text-align: center;
}
@media (min-width: 768px) {
    .cookie-modal { align-items: center; }
    .cookie-content { border-radius: 12px; max-width: 450px; }
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cookie-content h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--text-primary); }
.cookie-content p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.4; }
.cookie-option { display: flex; gap: 10px; align-items: flex-start; }
.cookie-option input { margin-top: 4px; }
.cookie-actions { display: flex; flex-direction: column; gap: 15px; align-items: center; }
.main-cookie-btns { display: flex; gap: 10px; width: 100%; }

.btn-secondary {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 12px; border-radius: 6px;
    font-weight: 600; cursor: pointer; flex: 1;
}
.btn-secondary:hover { background: var(--bg-secondary); }

body.dark-mode .cookie-content { background: #1a1a1a; border-top: 1px solid #333; }
body.dark-mode .btn-secondary { border-color: #444; color: #fff; }

/* --- PERSONNALISATION TEXTE BANNIÈRES CANVA --- */
#category-hero-content h2 {
    color: #000000;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    font-size: 3rem;
    font-weight: 800;
}

#category-hero-content p {
    color: #000000;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    font-size: 1.2rem;
}
/* --- DESIGN DES BOUTONS DE TAILLES DANS LA MODALE --- */
.size-selector-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.size-chip {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 60px;
}

.size-chip:hover {
    border-color: #000;
    background: #f8f8f8;
}

.size-chip.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.size-chip.out-of-stock {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
    background: #eee;
}

/* =================================================================
   FIX FINAL TOUS ÉCRANS (ULTRA-WIDE, DESKTOP & MOBILE)
   ================================================================= */

/* 1. RÉGLAGE GLOBAL DES MODALES (Correctif Scroll & Centrage) */
.modal-overlay, 
.checkout-modal-overlay, 
#product-modal,
#size-guide-modal {
    display: flex !important;
    overflow-y: auto !important; /* Active le scroll si le contenu dépasse */
    align-items: flex-start !important; /* Aligne en haut pour permettre le défilement sur PC */
    padding: 20px 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.open, 
.checkout-modal-overlay.open, 
#product-modal.open,
#size-guide-modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* On s'assure que le contenu défilable ne casse pas le centrage */
.modal-details {
    overflow-y: auto;
    flex: 1;
}

/* 2. ADAPTATION ÉCRANS LARGES (PC & ULTRA-WIDE) */
@media screen and (min-width: 1025px) {
    .modal-content, 
    .checkout-modal-content {
        margin: 40px auto !important; /* Centre la modale avec de l'espace en haut/bas */
        max-height: none !important; /* Libère la hauteur pour éviter de bloquer le scroll */
        width: 90% !important;
        max-width: 1000px !important; /* Taille lisible sur grand écran */
    }

    /* Guide des tailles plus large sur PC */
    #size-guide-modal .gdt-container {
        max-width: 1100px !important;
        width: 90% !important;
        margin: 20px auto !important;
    }

    /* Optimisation spécifique Ultra-Wide (Écrans > 1600px) */
    @media (min-width: 1600px) {
        .product-modal-container {
            max-width: 1400px !important;
            display: grid !important;
            grid-template-columns: 1.2fr 1fr !important; /* Image plus grande à gauche */
            gap: 50px !important;
        }
        
        .product-image-section img {
            max-height: 80vh !important;
            object-fit: contain;
        }
    }
}

/* 3. CORRECTIF OPTIMISATION GRID PAYSAGE (MOBILE/TABLETTE) */
@media (max-width: 1024px) and (orientation: landscape) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 12px !important;
        padding: 10px !important;
    }

    .product-title {
        font-size: 0.75rem !important;
        margin: 2px 0 !important;
    }

    .product-price {
        font-size: 0.85rem !important;
    }

    .catalog-section {
        padding-top: 10px !important;
    }

    #category-hero-section {
        height: 120px !important;
        margin-bottom: 15px !important;
    }
    
    #category-hero-content h2 {
        font-size: 1.8rem !important;
    }

    .modal-content.product-content {
        max-height: 98vh !important;
    }
    
    .product-modal-grid {
        grid-template-columns: 1fr 1fr !important;
        height: auto !important;
    }

    .main-image-container {
        max-height: 250px !important;
    }
}

/* 4. BADGE PAYPAL 4X DYNAMIQUE */
.paypal-4x-badge {
    display: inline-flex;
    align-items: center;
    background: #f2f5f7;
    border: 1px solid #0070ba;
    border-radius: 4px;
    padding: 6px 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #003087;
    animation: paypalPulse 2s infinite;
}

.paypal-4x-badge img {
    height: 16px;
    margin-right: 8px;
}

.paypal-4x-badge strong {
    color: #0070ba;
    margin: 0 4px;
}

@keyframes paypalPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 112, 186, 0.2); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(0, 112, 186, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 112, 186, 0); }
}

/* 5. ÉLÉMENTS DIVERS (FOOTER, NEWSLETTER, VIDÉO) */
.hidden-4x { 
    display: none !important; 
}

.newsletter-column {
    position: relative;
    z-index: 1 !important;
}

#main-footer button[data-modal], 
#btn-pay-virement {
    position: relative;
    z-index: 999 !important;
    pointer-events: auto;
}

.video-mini {
    max-width: 450px;
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 2px solid var(--border-color);
}

/* Force la réactivation du scroll sur le body en cas de conflit */
body.modal-open {
    overflow: hidden !important; /* Empêche le scroll du fond */
}
@media (max-width: 1024px) {
    /* On s'assure que le menu burger permet le scroll */
    #drawer-filters .drawer-content {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
    }

    #mobile-filters-content {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
    }

    /* Fixe le bouton en bas du menu */
    #apply-filters-mobile-btn {
        display: block !important;
        background-color: #000 !important;
        color: #fff !important;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        z-index: 1000;
        text-transform: uppercase;
    }
}
/* --- FIX UNIVERSEL SCROLL MODALES (PC ULTRA-LARGE) --- */

/* On cible la modale du Guide des Tailles ET celle du Formulaire de commande */
#modal-gdt .modal-content, 
#order-modal .modal-content,
.modal-content {
    display: block !important;
    position: relative !important;
    max-height: 85vh !important; /* Force la modale à s'arrêter à 85% de la hauteur de l'écran */
    overflow-y: auto !important;  /* Active la barre de défilement interne */
    margin: 5vh auto !important;  /* Ajoute de l'espace en haut et en bas */
    padding-right: 10px;          /* Espace pour ne pas coller à la barre de scroll */
}

/* Personnalisation de la barre de scroll pour qu'elle soit bien visible sur PC */
#modal-gdt .modal-content::-webkit-scrollbar,
#order-modal .modal-content::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}

#modal-gdt .modal-content::-webkit-scrollbar-thumb,
#order-modal .modal-content::-webkit-scrollbar-thumb {
    background: #333 !important; /* Barre sombre pour être vue sur fond blanc */
    border-radius: 10px;
}

#modal-gdt .modal-content::-webkit-scrollbar-track,
#order-modal .modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* Empêche le reste de la page derrière de bouger quand la modale est ouverte */
body.modal-open {
    overflow: hidden !important;
}