/*
Theme Name: Fireplace Pure HTML
Author: Amine Qtyab
Version: 5.5 - Fix Sticky Bug iOS & Big Phones
*/

/* ==========================================================================
   1. BASE & RESET
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; scroll-behavior: smooth; }
html { width: 100%; margin: 0; padding: 0; }
/* Le overflow-x: hidden est UNIQUEMENT sur le body pour ne pas casser le Sticky sur iPhone */
body { overflow-x: hidden; width: 100%; background-color: #f8f9fa; color: #333; line-height: 1.6; padding-top: 75px; }
img, video, iframe { max-width: 100%; display: block; height: auto; border-radius: 8px; }
a { text-decoration: none; color: inherit; }

/* ==========================================================================
   2. HEADER PROFESSIONNEL (FIXED)
   ========================================================================== */
.main-header { background-color: #ffffff; box-shadow: 0 4px 20px rgba(0,0,0,0.08); position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; border-bottom: 1px solid #eee; padding: 15px 0; }
.header-inner { max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center;}
.logo img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: #444; transition: color 0.3s; }
.nav-links a:hover { color: #d9363e; }
.dropdown { position: relative; }
.dropdown-content { visibility: hidden; opacity: 0; position: absolute; background-color: #fff; min-width: 240px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-radius: 8px; top: 100%; left: 0; padding: 10px 0; transition: all 0.3s; border: 1px solid #f0f0f0; }
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transform: translateY(5px); }
.dropdown-content a { padding: 10px 20px; display: block; font-size: 0.85rem !important; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.menu-toggle { display: none; font-size: 1.5rem; background: none; border: none; cursor: pointer; order: -1; position: relative; z-index: 1005; }

@media (max-width: 1024px) {
    .menu-toggle { display: block; }
    .nav-links { position: fixed; top: 0; left: -100%; width: 80%; height: 100vh; background: #fff; flex-direction: column; align-items: flex-start; padding: 80px 30px; transition: 0.4s; box-shadow: 10px 0 30px rgba(0,0,0,0.1); z-index: 1004; }
    .nav-links.active { left: 0; }
    .nav-links a { font-size: 1.2rem; width: 100%; padding: 15px 0; border-bottom: 1px solid #eee; }
    .dropdown-content { position: static; visibility: visible; opacity: 1; box-shadow: none; border: none; padding-left: 20px; display: none; }
    .dropdown.active .dropdown-content { display: block; }
}

/* ==========================================================================
   3. PANIER DÉROULANT (DROPDOWN)
   ========================================================================== */
.cart-dropdown { position: absolute; top: 60px; right: 0; width: 320px; background-color: #fff; border: 1px solid #eaeaea; box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 1002; opacity: 0; visibility: hidden; transition: all 0.2s ease-in-out; transform: translateY(10px); }
.cart-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.cart-body { padding: 20px; max-height: 350px; overflow-y: auto; }
.empty-cart-msg { text-align: center; color: #888; }
.cart-item { display: flex; gap: 15px; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; align-items: flex-start; }
.cart-item-remove { color: #999; font-size: 12px; cursor: pointer; border: 1px solid #ccc; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; margin-top: 5px; }
.cart-item-remove:hover { border-color: #d9363e; color: #fff; background: #d9363e;}
.cart-item-img { width: 60px; height: 60px; background-color: #ffffff; flex-shrink: 0; border: 1px solid #eee; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 4px;}
.cart-item-info { flex-grow: 1; }
.cart-item-info h4 { font-size: 13px; margin: 0 0 5px 0; color: #555; font-weight: bold; line-height: 1.4; }
.cart-item-price-row { color: #888; font-size: 13px; }
.cart-item-price-val { color: #d9363e; font-weight: bold; }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background-color: #fcfcfc; display: none; }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 15px; color: #555; }
.cart-subtotal span:last-child { color: #d9363e; font-weight: bold; font-size: 18px; }
.btn-checkout-dropdown { display: block; width: 100%; background-color: #d9363e; color: #fff; text-align: center; padding: 12px; text-decoration: none; font-size: 14px; font-weight: bold; transition: background-color 0.3s; margin-bottom: 10px; border: none; cursor: pointer; border-radius: 4px;}
.btn-checkout-dropdown:hover { background-color: #c92a31; }
.view-cart-link { display: block; text-align: center; font-size: 13px; color: #d9363e; text-decoration: none; }

/* ==========================================================================
   4. SECTIONS PAGE D'ACCUEIL (INDEX.HTML)
   ========================================================================== */
.hero-video-container { width: 100%; height: 75vh; background-color: #111; display: flex; align-items: flex-end; justify-content: flex-start; position: relative; overflow: hidden; }
.hero-video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, rgba(0, 0, 0, 0) 80%); z-index: 1; }
.hero-content { position: relative; z-index: 2; text-align: left; color: white; padding-left: 5vw; padding-bottom: 5vh; max-width: 700px; display: flex; flex-direction: column; align-items: flex-start; }
.hero-content h1 { font-size: 3rem; font-weight: 700; margin-bottom: 12px; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); line-height: 1.1; }
.hero-content p { font-size: 1.15rem; margin-bottom: 25px; text-shadow: 1px 1px 4px rgba(0,0,0,0.6); opacity: 0.95; }
.hero-cta-btn { background-color: #e74c3c; color: white; padding: 14px 32px; border-radius: 30px; font-weight: bold; text-transform: uppercase; box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); display: inline-block;}

.trust-badges { display: flex; justify-content: center; gap: 30px; padding: 20px 10px; background-color: #fff; border-bottom: 1px solid #eee; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 0.85rem; color: #555; max-width: 150px;}
.badge-icon { font-size: 1.8rem; display: block; margin-bottom: 5px; }

.promo-container { padding: 20px; max-width: 1200px; margin: 0 auto; }
.promo-banner { background-color: #e74c3c; color: white; text-align: center; padding: 20px; border-radius: 8px; display: flex; flex-direction: column; justify-content: center; aspect-ratio: 4 / 1;}

.bestsellers-section, .shop-section { max-width: 1200px; margin: 20px auto 40px auto; padding: 0 20px; }
.section-title, .category-title { font-size: 1.8rem; text-align: center; color: #2c3e50; border-bottom: 2px solid #e74c3c; display: inline-block; margin-bottom: 30px; padding-bottom: 5px; }
.category-title { font-size: 1.5rem; text-align: left; }

.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.subcategories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-frame { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 25px; margin-bottom: 30px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

.product-card, .subcategory-card { background: #fff; border: 1px solid #eaeaea; border-radius: 8px; padding: 15px; text-align: center; transition: transform 0.2s; display: flex; flex-direction: column;}
.product-card:hover, .subcategory-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.product-img, .sub-image-placeholder { width: 100%; aspect-ratio: 1; background-color: #f4f4f4; border-radius: 6px; margin-bottom: 15px; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; }
.sub-image-placeholder { aspect-ratio: 4/3; color: white; font-weight: bold; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

.product-title { font-weight: 600; margin-bottom: 5px; font-size: 1.1rem; }
.product-desc { font-size: 0.85rem; color: #777; margin-bottom: 10px;}
.subcategory-name { padding: 15px; font-weight: 600; font-size: 1rem; color: #333; flex-grow: 1; display: flex; align-items: center; justify-content: center; }
.product-price { color: #e74c3c; font-weight: bold; font-size: 1.2rem; margin-bottom: 15px; }
.btn-cart { background: #2c3e50; color: white; padding: 10px; display: block; border-radius: 4px; font-weight: bold; margin-top: auto; text-transform: uppercase;}

.bottom-info { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1200px; margin: 0 auto 40px auto; padding: 0 20px; }
.info-box { background: #fff; padding: 30px; border-radius: 8px; border: 1px solid #ddd; min-height: 250px; display: flex; flex-direction: column; justify-content: center;}

/* ==========================================================================
   5. CONFIGURATEUR PRODUIT (COMPACT & STICKY DESKTOP)
   ========================================================================== */
.main-wrapper { max-width: 1200px; margin: 20px auto 30px auto; padding: 0 20px; }
.breadcrumb { font-size: 0.85rem; color: #888; margin-bottom: 15px; }

/* Grille principale : Align-items: start est VITAL pour le Sticky Desktop */
.product-container { 
    background: #fff; padding: 20px; border-radius: 12px; 
    display: grid; grid-template-columns: 1fr 1fr; gap: 30px; 
    margin-bottom: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); 
    align-items: start; 
}

/* Colonne de gauche fixée sur PC */
.gallery-column {
    position: sticky; 
    top: 90px; /* Colle juste en dessous du header */
    display: flex; flex-direction: column; gap: 10px;
}

.product-image { 
    background-color: #ffffff; border-radius: 8px; width: 100%;
    aspect-ratio: 16 / 9; max-height: 400px; border: 1px solid #eee; 
    background-size: contain; background-repeat: no-repeat; background-position: center; 
    transition: background-image 0.4s ease-in-out; 
}
.thumbnail-row { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { 
    width: 60px; height: 60px; border-radius: 6px; border: 1px solid #eee; cursor: pointer; 
    background-size: contain; background-repeat: no-repeat; background-position: center; 
    transition: all 0.2s; background-color: #ffffff;
}
.thumb.active, .thumb:hover { border-color: #d9363e; box-shadow: 0 0 5px rgba(217, 54, 62, 0.2); opacity: 1; }

/* Résumé Dynamique (Sous l'image) */
.dynamic-summary {
    background: #f8f9fa; padding: 12px 15px; border-radius: 6px;
    font-size: 0.9rem; color: #444; border-left: 4px solid #d9363e;
    line-height: 1.5; margin-top: 5px;
}
.dynamic-summary strong { color: #111; }

/* Design pour guider le client dans la configuration */
.config-badge { 
    background-color: #111; color: #fff; padding: 5px 12px; 
    border-radius: 20px; font-size: 0.75rem; font-weight: bold; 
    display: inline-block; margin-bottom: 12px; 
    text-transform: uppercase; letter-spacing: 1px;
}
.config-instruction { 
    font-size: 0.9rem; color: #666; margin-bottom: 15px; 
    line-height: 1.4; border-bottom: 1px solid #eee; padding-bottom: 15px;
}
.step-number {
    background-color: #d9363e; color: white; border-radius: 50%;
    width: 22px; height: 22px; display: inline-flex; align-items: center; 
    justify-content: center; font-size: 0.8rem; margin-right: 8px; font-weight: bold;
}

/* Colonne de droite (Le configurateur ultra-compact) */
.configurator { display: flex; flex-direction: column; gap: 12px; }
.config-header h1 { font-size: 1.8rem; color: #333; margin: 0 0 10px 0; line-height: 1.1; }
.product-meta-container { border-bottom: 1px dashed #eee; padding-bottom: 10px; margin-bottom: 0; }
.product-meta { font-size: 0.8rem; color: #777; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;}
.stock-badge { color: #198754; font-weight: bold; background: #e8f5e9; padding: 4px 8px; border-radius: 20px; font-size: 0.8rem; }
.social-proof { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #d9363e; font-weight: 600; background: #fff0f0; padding: 6px 10px; border-radius: 4px; display: inline-flex; width: fit-content;}

.config-header .price { font-size: 1.6rem; color: #d9363e; font-weight: bold; margin-top: 5px;}
.config-group { border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.config-label { font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; color: #333; font-size: 0.95rem; }

.option-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-btn { padding: 8px 12px; border: 1px solid #ddd; background: #fff; cursor: pointer; transition: all 0.2s; font-size: 0.85rem; color: #555; border-radius: 4px; outline: none; }
.opt-btn:hover { border-color: #333; }
.opt-btn.active { background: #333; color: #fff; border-color: #333; font-weight: bold;}

.burner-btn, .size-btn { display: none !important; }
.burner-btn.show, .size-btn.show { display: inline-block !important; }

.action-row { display: flex; gap: 10px; margin-top: 5px; align-items: stretch; }
.qty-selector { display: flex; align-items: center; border: 1px solid #ddd; background: #fff; border-radius: 4px; overflow: hidden;}
.qty-btn { background: #f8f9fa; border: none; padding: 0 12px; font-size: 1.1rem; cursor: pointer; color: #555; }
.qty-input { width: 40px; text-align: center; border: none; font-size: 1rem; font-weight: bold; color: #333; pointer-events: none; }
.add-to-cart { flex-grow: 1; background-color: #d9363e; color: white; border: none; padding: 12px; font-size: 1rem; font-weight: bold; cursor: pointer; border-radius: 4px; text-transform: uppercase; transition: background-color 0.2s;}
.add-to-cart:hover { background-color: #c92a31; }

.trust-signals { display: flex; justify-content: space-between; padding: 10px; background: #fbfbfb; border: 1px dashed #ddd; border-radius: 6px; font-size: 0.75rem; color: #555; margin-top: 0;}
.success-banner { background-color: #198754; color: #fff; padding: 12px 20px; font-size: 14px; margin-bottom: 20px; display: none; align-items: center; justify-content: space-between; border-radius: 6px; }
.success-banner.show { display: flex; animation: fadeIn 0.3s; }
.btn-view-cart-banner { background-color: #fff; color: #198754; padding: 6px 12px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 0.85rem; }

/* ==========================================================================
   6. ONGLETS (TABS), CART, CHECKOUT & RELATED
   ========================================================================== */
.tabs-section { background: #fff; padding: 25px; border-radius: 12px; margin-bottom: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
.tab-headers { display: flex; border-bottom: 2px solid #eee; gap: 30px; margin-bottom: 25px; overflow-x: auto; white-space: nowrap;}
.tab-btn { background: none; border: none; font-size: 1.05rem; font-weight: bold; color: #888; padding: 10px 0; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-btn.active { color: #d9363e; border-bottom-color: #d9363e; }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab-description { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.specs-list { list-style: none; padding: 0; }
.specs-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; color: #555; font-size: 0.95rem;}
.dimension-diagram { width: 100%; height: 250px; background-color: #f8f9fa; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; color: #888; font-style: italic; border-radius: 8px; margin-top: 20px;}
.download-box { border: 1px solid #eee; padding: 30px; border-radius: 8px; text-align: center; background: #fafafa;}
.btn-download { display: inline-block; background: #333; color: #fff; padding: 10px 20px; border-radius: 4px; font-weight: bold; margin-top: 15px;}
.review-card { border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }

.page-title { font-size: 2.2rem; color: #333; margin-bottom: 30px; border-bottom: 2px solid #eee; padding-bottom: 15px; }
.cart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.cart-items-container { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); padding: 30px; }
.cart-headers { display: flex; justify-content: space-between; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; font-size: 0.9rem; color: #888; font-weight: 600; text-transform: uppercase; }
.cart-row { display: flex; align-items: center; border-bottom: 1px solid #eee; padding: 20px 0; transition: background-color 0.2s; }
.cart-row:last-child { border-bottom: none; padding-bottom: 0; }
.item-remove { color: #ccc; font-size: 1.5rem; cursor: pointer; border: none; background: none; margin-right: 15px; transition: color 0.2s; padding: 5px; }
.item-remove:hover { color: #d9363e; }
.item-image { width: 90px; height: 90px; background-color: #ffffff; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 8px; border: 1px solid #eee; margin-right: 20px; }
.item-details { flex-grow: 1; }
.item-title { font-size: 1.1rem; color: #333; font-weight: 600; margin-bottom: 5px; display: block; text-decoration: none;}
.item-title:hover { color: #d9363e; }
.item-row-total { width: 120px; text-align: right; font-weight: bold; font-size: 1.1rem; color: #d9363e; }

.cart-summary { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); padding: 30px; position: sticky; top: 100px; }
.cart-summary h2 { font-size: 1.4rem; border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; color: #555; font-size: 1rem; }
.total-price-val { color: #d9363e; font-weight: bold; font-size: 1.4rem;}
.btn-checkout { display: block; width: 100%; background-color: #d9363e; color: #fff; text-align: center; padding: 16px; border-radius: 4px; font-size: 1.1rem; font-weight: bold; text-transform: uppercase; border: none; cursor: pointer; text-decoration: none; margin-top:20px; transition: background-color 0.3s;}
.btn-checkout:hover { background-color: #c92a31; }

#checkout-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.card { background-color: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); margin-bottom: 20px; border: 1px solid #eaeaea; }
.card h2 { font-size: 24px; border-bottom: 2px solid #eee; padding-bottom: 15px; margin-bottom: 25px; color: #111; }
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #444; }
.form-group input, .form-group textarea { width: 100%; padding: 14px; border: 1px solid #ccc; border-radius: 4px; font-size: 15px; transition: border-color 0.3s; }
.form-group input:focus, .form-group textarea:focus { border-color: #d9363e; outline: none; }
.form-group textarea { min-height: 100px; resize: vertical; }

.payment-option { display: flex; align-items: center; padding: 18px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 15px; cursor: pointer; transition: all 0.2s;}
.payment-option.active { border-color: #d9363e; background-color: #fff5f5; }
.payment-option input { margin-right: 15px; accent-color: #d9363e; transform: scale(1.2); }
.payment-option span { font-weight: 600; font-size: 1.05rem; }

.btn-submit { width: 100%; background-color: #d9363e; color: #fff; padding: 18px; border: none; border-radius: 4px; font-size: 16px; font-weight: bold; cursor: pointer; text-transform: uppercase; transition: background-color 0.3s; }
.btn-submit:hover { background-color: #c92a31; }
.btn-submit:disabled { background-color: #aaa; cursor: not-allowed; }

.order-number-box { background: #fdfdfd; border: 2px dashed #d9363e; padding: 20px; border-radius: 8px; display: inline-block; margin: 20px 0; }
.order-number-box h2 { font-size: 2rem; color: #d9363e; margin: 0; }

.tracking-container { max-width: 800px; margin: 60px auto; padding: 0 20px; }
.tracking-card { background-color: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #eaeaea; text-align: center; }

.related-products { margin-bottom: 60px; }
.related-products h2 { text-align: center; margin-bottom: 30px; font-size: 1.8rem; color: #333; border-bottom: 2px solid #d9363e; display: inline-block; padding-bottom: 5px; position: relative; left: 50%; transform: translateX(-50%); }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.related-card { background: #fff; border-radius: 8px; padding: 15px; text-align: center; border: 1px solid #eaeaea; transition: transform 0.2s ease, box-shadow 0.2s ease; display: block;}
.related-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.related-img { width: 100%; aspect-ratio: 1; background-color: #ffffff; background-size: contain; background-repeat: no-repeat; background-position: center; border-radius: 6px; margin-bottom: 15px; display:flex; align-items:center; justify-content:center; color:#888;}
.related-title { font-size: 1rem; color: #333; margin-bottom: 5px; }
.related-price { color: #d9363e; font-weight: bold; }

footer { background-color: #2c3e50; color: white; padding: 40px 20px 20px; margin-top: 80px; clear: both; display: block; width: 100%; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 20px; }
.footer-col { min-width: 250px; }
.footer-col h3 { margin-bottom: 15px; color: #e74c3c; }
.footer-col p, .footer-col a { margin-bottom: 8px; font-size: 0.95rem; color: #ddd; display: block; }

.mobile-sticky-info { display: none; }

/* ==========================================================================
   🚨 RESPONSIVE MOBILE (STICKY ULTRA-COMPACT & IMAGE PLUS GRANDE)
   ========================================================================== */
@media (max-width: 768px) {
    /* L'astuce vitale ici est "display: block;" pour permettre au sticky de glisser sans contrainte flex */
    .product-container { 
        display: block; 
        padding: 10px; 
    }
    
    .tab-description, .cart-grid, #checkout-container { grid-template-columns: 1fr; gap: 15px; padding: 10px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .cart-headers { display: none; } 
    .cart-row { flex-wrap: wrap; position: relative; padding: 20px 0; }
    .item-image { width: 70px; height: 70px; margin-right: 15px; } 
    .item-details { width: calc(100% - 130px); }
    .item-row-total { width: auto; position: absolute; bottom: 20px; right: 0; }
    .item-remove { position: absolute; top: 15px; right: 0; margin: 0; }
    .form-row { flex-direction: column; gap: 20px; }

    /* On laisse le contenu du .gallery-column libre pour que le sticky interagisse avec .product-container */
    .gallery-column { display: contents; } 

    .sticky-mobile-zone {
        position: -webkit-sticky;
        position: sticky;
        top: 70px; 
        z-index: 1000; 
        background: rgba(255, 255, 255, 0.98); 
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
        padding: 5px 10px; 
        margin: -10px -10px 10px -10px; 
        border-bottom: 1px solid #eaeaea;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    /* En-tête du sticky (Prix et Stock) */
    .mobile-sticky-info { display: flex !important; justify-content: space-between; align-items: center; padding-bottom: 2px;}
    .mobile-price { font-size: 1.25rem; font-weight: 800; color: #d9363e; }
    .mobile-stock { font-size: 0.7rem; padding: 3px 8px; border-radius: 4px; }

    /* IMAGE OPTIMISÉE POUR TOUS LES TÉLÉPHONES */
    .product-image { 
        height: 140px !important; 
        width: 100%;
        background-size: contain !important;
        background-position: center !important;
        background-color: transparent !important;
        border: none !important;
        margin: 0;
        margin-bottom: 5px !important;
    }
    
    .config-header .price { display: none; } 

    /* ON CACHE LE RÉSUMÉ SUR MOBILE POUR GAGNER DE LA PLACE */
    .dynamic-summary { display: none !important; }
    
    .thumbnail-row { gap: 6px; justify-content: center; margin-top: 5px; order: 2; }
    .thumb { width: 45px; height: 45px; border-radius: 4px; }
    
    .configurator { gap: 8px; order: 4; }
    .config-badge { font-size: 0.65rem; margin-bottom: 5px; padding: 3px 8px; }
    
    /* TITRE RÉDUIT SUR MOBILE */
    .config-header h1 { font-size: 1.2rem; margin-top: 5px; margin-bottom: 5px; }
    
    .config-instruction { font-size: 0.8rem; margin-bottom: 10px; padding-bottom: 10px; }
    .product-meta-container { padding-bottom: 5px; border-bottom: none; }
    
    .config-group { padding-bottom: 8px; }
    .config-label { font-size: 0.85rem; margin-bottom: 6px; }
    .step-number { width: 18px; height: 18px; font-size: 0.7rem; margin-right: 5px; }
    
    .option-buttons { gap: 5px; }
    .opt-btn { padding: 6px 10px; font-size: 0.8rem; }
    
    .action-row { margin-top: 5px; }
    .qty-selector { height: 40px; }
    .qty-btn { padding: 0 10px; }
    .qty-input { width: 35px; font-size: 0.9rem; }
    .add-to-cart { padding: 10px; font-size: 0.95rem; height: 40px; }
    .trust-signals { padding: 8px; font-size: 0.7rem; margin-top: 5px; }

    /* =========================================================
       CORRECTIFS POUR L'ACCUEIL MOBILE (ANTI-DÉBORDEMENT)
       ========================================================= */
       
    /* 1. Forcer 1 seule colonne pour les produits et catégories */
    .products-grid, .subcategories-grid {
        grid-template-columns: 1fr; 
        gap: 15px;
    }

    /* 2. Permettre aux badges (Livraison, Garantie) de passer à la ligne */
    .trust-badges {
        flex-wrap: wrap;
        gap: 15px;
    }
    .badge {
        min-width: 140px; /* Garde les badges lisibles */
    }

    /* 3. Ajuster la bannière promo pour qu'elle ne soit pas écrasée */
    .promo-banner {
        aspect-ratio: auto;
        padding: 30px 15px;
    }

    /* 4. Ajuster le texte sur la vidéo pour qu'il ne touche pas les bords */
    .hero-content {
        padding-right: 5vw;
    }
    .hero-content h1 {
        font-size: 2.2rem; /* Titre un peu plus petit sur mobile */
    }
}