@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

:root {
    --color-primary: #ff0000;
    --color-blue-header: #57b7dc;
    --color-secondary: #f5f5f5;
    --color-accent: #c0392b;
    --color-text: #000000;
    --color-white: #ffffff;
    --color-slogan: #ff6600;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; overflow-x: clip; }
body { height: 100%; margin: 0; padding: 0; flex-direction: column; font-family: sans-serif; }
#page, #page.site { flex: 1; display: flex; flex-direction: column; padding-top: 0; background: transparent; }

/* ============================================================
   TABLETTE PORTRAIT (768px - 1024px)
   ============================================================ */

@media screen and (min-width: 430px) and (max-width: 500px) and (orientation: portrait) {

  .header-mobile {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  .hero-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .info-band {
    margin-top: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }


  /* Si le header fixe crée un espace, ajustez cette valeur */
  #content.site-content,
  main#primary {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}
.cookie-overlay {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    display: none; /* Caché par défaut */
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #e10600; /* Rappel du rouge Racing */
    padding: 20px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.cookie-content h3 {
    color: #fff;
    margin: 0 0 5px 0;
    font-family: 'Racing Sans One', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.cookie-content p {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

.cookie-link {
    color: #e10600;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
    text-transform: uppercase;
    border: none;
}

.btn-settings { background: #444; color: #fff; }
.btn-refuse { background: transparent; color: #bbb; border: 1px solid #555; }
.btn-accept { background: #e10600; color: #fff; }
.btn-cookie:hover { opacity: 0.8; transform: translateY(-2px); }

/* ==========================================================================
   SECTION 5 : SMARTPHONES (768px MAX)
   ========================================================================== */	

@media screen and (max-width: 768px) {

    /* Header principal */
    #masthead.site-header.band-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        background: #ffffff !important;
        z-index: 9999 !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
        overflow: visible !important;
    }

    /* Compensation hauteur header */
    #content.site-content { margin-top: 70px !important; }

    /* On masque uniquement le desktop */
    .main-navigation,
    .header-widget-region,
    .desktop-only,
    .header-main-sticky,
    .sticky-header-placeholder,
    .header-top,
    .header-bottom,
    .sticky-wrapper,
    .header-filler {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Layout mobile */
    .header-mobile-layout {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 15px !important;
        background: #ffffff !important;
        border-bottom: 2px solid #e60000 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    /* Logo */
    .m-header-left,
    .m-logo-container {
        display: flex !important;
        align-items: center !important;
        flex: 1 !important;
    }

    .m-logo-img {
        max-width: 180px !important;
        height: auto !important;
        display: block !important;
    }

    /* Zone droite */
    .m-col-right {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
        justify-content: flex-end !important;
    }
	
	.m-search-drawer {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 60px; /* Ajuste selon la hauteur de ton header mobile */
    left: 0;
    width: 100%;
    background: #fff;
    padding: 15px;
    z-index: 9999;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.m-search-drawer.active {
    display: block !important; /* Apparaît quand JS ajoute la classe */
}

    /* Burger */
    .menu-toggle {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 40px !important;
        background: none !important;
        border: none !important;
        padding: 5px !important;
        cursor: pointer !important;
    }

    .m-bar {
        display: block !important;
        width: 30px !important;
        height: 2px !important;
        background: #ffffff !important;
        border-radius: 2px !important;
    }

    /* Panier */
    .m-cart-link {
        position: relative !important;
        font-size: 1.8rem !important;
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
    }

    .m-cart-badge {
        position: absolute !important;
        top: -5px !important;
        right: -15px !important;
        background: #ff0000 !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: bold !important;
        padding: 2px 6px !important;
        border-radius: 10px !important;
        line-height: 1 !important;
    }

    /* Overlay menu */
    #m-nav-overlay {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 80% !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 1000000 !important;
        transition: left 0.3s ease-in-out !important;
        display: flex !important;
        flex-direction: column !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #m-nav-overlay.is-active {
        left: 0 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        box-shadow: 0 0 50px rgba(0,0,0,0.5) !important;
    }

}

/* --- BANDEAU TEXTE : SMARTPHONE --- */
@media screen and (max-width: 768px) {
    .mobile-announcement-bar {
        width: 100% !important;
        /* On réduit la hauteur sur smartphone pour l'équilibre visuel */
        min-height: 60px !important; 
        background-color: #e60000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px 15px !important;
        box-sizing: border-box !important;
        
        /* --- REMONTÉE FORCÉE --- */       
        margin-top: -20px !important; 
        position: relative !important;
        z-index: 999 !important;
    }

    /* On nettoie les espaces parents pour faciliter la remontée */
    #content.site-content, 
    main#primary {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* On soude le bas du header pour éviter que le blanc ne vienne de lui */
    #masthead.site-header {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        box-shadow: none !important;
    }

    .mobile-announcement-bar p {
        color: #ffffff !important;
        font-family: 'Racing Sans One', sans-serif !important;
        /* Taille de police adaptée au petit écran */
        font-size: 14px !important; 
        font-weight: 500 !important;
        text-transform: uppercase !important;
        margin: 0 !important;
        text-align: center !important;
        line-height: 1.2 !important;
        letter-spacing: 0.5px !important;
    }
}

@media screen and (max-width: 768px) {
    /* 1. POSITIONNEMENT GLOBAL DU CONTENEUR HERO */
    body.home section.band-hero, 
    body.home .band-hero { 
        background-image: url('https://camshaft.fr/wp-content/uploads/assets/img9mobile.png') !important; 
        min-height: 500px !important; /* On remonte un peu la hauteur pour donner de l'espace à la photo */
        background-position: center center !important; 
        background-size: cover !important;
        background-repeat: no-repeat !important;
        
        /* --- Flexbox pour positionner le contenu --- */
        display: flex !important;
        flex-direction: column !important; /* Aligne les éléments verticalement */
        justify-content: flex-end !important; /* Pousse tout le contenu (.band-inner) vers le BAS */
        align-items: center !important; /* Centre horizontalement */
    }

    /* 2. RÉGLAGE DU BLOC DE TEXTE (.band-inner) */
    .home .band-hero .band-inner { 
        /* --- Padding pour descendre le texte et créer une marge de sécurité --- */
        padding-top: 100px !important; /* Crée de l'espace au-dessus du texte pour voir la photo */
        padding-bottom: 40px !important; /* Marge de sécurité avec le bas de l'écran */
        padding-left: 20px !important;
        padding-right: 20px !important;
        
        width: 100% !important;
        
        /* --- Dégradé sombre pour la lisibilité --- */
        /* Fond transparent en haut, noir transparent en bas là où il y a le texte */
        background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.8) 100%) !important;
    }    
@media screen and (max-width: 768px) {
    /* On cible le h2 à la place du p */
    .home .band-hero h2 { 
        font-size: 15px !important; 
        margin-bottom: 20px !important;
        /* Attention : 0.8 écrase les lettres, 1.2 est idéal pour un sous-titre */
        line-height: 1.2 !important; 
        color: #ffffff !important;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.7) !important;
        font-weight: normal !important; /* Pour que ce soit moins gras qu'un h1 */
        text-align: center !important;
    }

    /* Optionnel : Ajustement du titre h1 pour être sûr qu'il suive */
    .home .band-hero h1 {
        font-size: 1.8rem !important;
        margin-bottom: 10px !important;
        color: #ffffff !important;
    }
}
}
@media screen and (max-width: 767px) {
    /* 1. Ajustement du tiroir de recherche */
    .m-search-drawer.is-active {
        padding: 10px 15px !important; /* Un peu moins haut sur mobile */
        top: var(--header-height, 70px) !important;		
        margin-top: 5px !important;         
        box-shadow: 0 10px 15px rgba(0,0,0,0.15) !important;         
        z-index: 9998 !important;
    }
    /* 2. Le formulaire en mode flexible */
.m-search-drawer form {
        display: flex !important;
        justify-content: center !important; /* Centre l'ensemble champ + bouton */
        align-items: center !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 90% !important; /* On empêche le formulaire d'aller jusqu'aux bords */
        margin: 0 auto !important; /* Centre le bloc de 90% */
    }
    /* 3. Le champ de saisie (input) */
.m-search-drawer input {
        flex: 0 1 80% !important; /* Ne prend plus que 65% au lieu de 100% */
        min-width: 0 !important;
        height: 42px !important;
        padding: 0 12px !important;
        border-radius: 6px !important;
    }
    /* 4. Le bouton OK / Rechercher */
.m-search-drawer button {
        flex: 0 0 auto !important;
        min-width: 60px !important;
        height: 42px !important;
        padding: 0 15px !important;
        border-radius: 6px !important;
        white-space: nowrap !important; /* Empêche le texte "OK" de sauter une ligne */
    }
}
/* =============================== */
/* bandeau sous hero   */
/* =============================== */
@media screen and (max-width: 768px) {
    .info-bar-custom {
        min-height: 40px;
        padding: 8px 15px;
    }
    .info-bar-custom p {
        font-size: 14px;
    }
}
	@media screen and (max-width: 768px) {
 	.home .cards-grid { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 30px !important; padding: 0px 15px 80px 15px !important; margin-top: 0; width: 85% !important; box-sizing: border-box !important; }
	.home .band-cards { padding-top: 0 !important; margin-top: 0 !important; }
	.home .card { width: 90% !important; max-width: 400px !important; margin: 0 auto !important; min-height: 280px !important; display: flex !important; flex-direction: column !important; justify-content: flex-end !important; position: relative !important; }
	.home .card-content h3 { font-size: 1.4rem !important; line-height: 1.2; }
    .home .card-content p { font-size: 1rem !important; }
    .home .card-signature { margin-top: 10px; font-size: 0.85rem; font-family: 'Racing Sans One', sans-serif; }
		
    /* --- BANDEAU INTERMÉDIAIRE --- */
    .home .bandeau-intermediaire { max-height: none !important; margin: 30px 0 !important; padding: 40px 0 !important; display: block !important; }
    .home .bandeau-content, .bandeau-content { display: flex !important; flex-direction: column !important; text-align: center !important; padding: 30px 15px !important; gap: 30px !important; }
    .bandeau-images { display: none !important; } 
    .home .bandeau-text h2 { font-size: 1.8rem !important; line-height: 1.2; }
    .home .bandeau-text p, .bandeau-text p { font-size: 1rem !important; margin: 0 auto !important; padding: 0 10px; }
    .home .btn-bandeau { width: 80%; margin: 20px auto 0 !important; }
    .home .btn-racing-icon { margin: 20px auto !important; display: flex !important; }

}
	/* --- CENTRAGE BANDEAU INTERMÉDIAIRE MOBILE --- */
@media screen and (max-width: 767px) {
    .home .bandeau-intermediaire { display: block !important; margin: 20px 0 !important; padding: 20px 0 !important; width: 100% !important; }
    .home .bandeau-content, .bandeau-content { display: flex !important; flex-direction: column !important; transform: translateX(-20px) !important; align-items: center !important; justify-content: center !important; text-align: center !important; padding: 20px 15px !important; gap: 15px !important; }
    .home .bandeau-text { width: 90% !important; margin: 0 auto !important; }
    .home .bandeau-text h2 { font-size: 1.3rem !important; line-height: 1.3 !important; margin-bottom: 10px !important; text-align: center !important; }
    .home .bandeau-text p { font-size: 0.8rem !important; line-height: 1.4 !important; margin: 0 auto !important; padding: 0 5px !important; max-width: 80% !important; text-align: center !important; } 
    .home .racing-badge { display: inline-block !important; margin: 10px auto !important; }
}
@media screen and (max-width: 768px) {
        .hide-mobile {
            display: none !important;
        }
    }
	/* --- MASQUER LE BOUTON PERSONNALISER SUR MOBILE --- */
@media screen and (max-width: 767px) {     
    .home .band-intermediate .btn-racing-icon, 
    .home .band-intermediate a[href*="personnaliser"],
    .home .btn-racing-icon { display: none !important; }   
    .home .band-intermediate { padding: 40px 20px !important; text-align: center !important; }
}
	/* --- REMPLACEMENT DU TEXTE DANS LE BADGE SUR MOBILE --- */
@media screen and (max-width: 767px) {
    .home .racing-badge { font-size: 0 !important; visibility: hidden; display: inline-block; position: relative; padding: 40px 15px !important; }
    .home .racing-badge::after { content: "Pour personnaliser, rdv sur votre PC !"; visibility: visible; font-size: 12px ; display: block; text-align: center; letter-spacing: 0; text-transform: none; }
}	
@media screen and (max-width: 768px) {
    .bandeau-mention-bas {
        padding-top: 80px;
		padding: 0 10px;
    }
    .bandeau-mention-bas p {
        font-size: 10px !important;
        line-height: 1.4 !important;
    }
}
@media screen and (max-width: 768px) {
    .contact-highlight {
        display: inline-block;
        margin-top: 5px;
        border-bottom: 2px solid #e10600; 
    }
}
    /* --- NEWS --- */
@media (max-width: 768px) {	
	.home .band-inner, 
    .home .news-container { 
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .home .news-grid { 
        display: flex !important;
        flex-direction: column !important; 
        gap: 25px !important; 
        align-items: center !important; /* Centre les enfants horizontalement */
        justify-content: center !important;        
        padding: 0 15px !important; 
        margin: 0 auto !important; 
        width: 95% !important;
        box-sizing: border-box !important;
    }

    .home .news-card {
        width: 100% !important; 
        max-width: 100% !important;
        /* On s'assure qu'il n'y a pas de marge qui pousse à gauche */
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: block !important;
    }

    /* Optionnel : Ajustement de l'image pour qu'elle soit bien centrée et propre */
    .home .news-card img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover !important;
        border-radius: 12px;
    }
}

	/* --- FOOTER OPTIMISATION SMARTPHONE --- */
@media screen and (max-width: 767px) {
    /* 1. Reset du bloc parent */
    .footer-container {
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 20px 0 !important;
        text-align: center !important;
    }

    /* 2. On neutralise chaque colonne */
    .footer-column {
        width: 100% !important;
        margin: 0 auto 30px auto !important; /* Centrage et espacement bas */
        padding: 0 !important;
        text-align: center !important;
        display: block !important;
    }

    /* 3. On force l'annulation de TOUT retrait sur les textes et titres */
    .footer-column h3, 
    .footer-column p {
        text-align: center !important;
        margin-left: auto !important; 
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        text-indent: 0 !important;
    }

    /* 4. Liens Contact & Réseaux (Email + Facebook) */
    .footer-column p a {
        display: block !important; /* Block force le texte à utiliser toute la largeur pour le centrage */
        width: 100% !important;
        margin: 0 auto !important;
        padding: 5px 0 !important; /* Plus facile à cliquer */
        text-decoration: none;
    }

    /* 5. Séparation visuelle centrée */
    #colophon .footer-column:not(:last-child) { 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        padding-bottom: 25px !important; 
        width: 80% !important; 
        margin-left: auto !important; /* ESSENTIEL pour centrer la ligne de 80% */
        margin-right: auto !important; /* ESSENTIEL pour centrer la ligne de 80% */
    }
	#colophon, 
    .site-footer, 
    .footer-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important; /* Coupe tout ce qui dépasse à droite */
    }

    /* 2. On s'assure que la ligne intérieure ne force pas de marge */
    .footer-container .row, 
    .footer-container .inner {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* 3. On verrouille le centrage des colonnes */
    .footer-column {
        width: 100% !important;
        text-align: center !important;
        /* On force le retrait de toute marge qui pousserait à gauche */
        margin: 0 auto 30px auto !important; 
        padding: 0 10px !important; /* Juste un petit padding de sécurité pour pas toucher les bords */
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   SECTION CATALOGUE & GRILLE DE PRODUITS (CARDS)
   ========================================================================== */
/* Responsive Grille */
@media (max-width: 1100px) { .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (max-width: 850px) { .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; } }
@media (max-width: 480px) { 
    /* La grille de tes produits */
    .cards-grid { 
        display: grid !important;
        grid-template-columns: 1fr !important; /* Un article par ligne sur petit écran */
        gap: 20px !important; 
        margin-top: 5px !important;  /* Colle la grille au compteur */
        padding-top: 0 !important;
    }
    .compteur-produits, {
        margin-top: 10px !important;
        margin-bottom: 5px !important; 
        text-align: center !important;
        font-size: 0.9rem !important;
        display: block !important;
    }
}
 
/* ============================================================
   ADAPTATION FILTRES POUR SMARTPHONES (768px et moins)
   ============================================================ */
@media screen and (max-width: 768px) {

    /* 1. On resserre l'espace global du conteneur */
    .filters-col {
        margin: 0 0 15px 0 !important; /* On réduit l'espace sous les filtres */
        padding: 0 10px !important;
    }

    .filters-container {
        padding: 15px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }

    /* 2. On empile les filtres verticalement pour qu'ils soient bien larges */
    .filters-form, .filtres-zone {
        flex-direction: column !important; /* Crucial pour le mobile */
        align-items: stretch !important;    /* Force les filtres à prendre toute la largeur */
        gap: 12px !important;               /* Espace entre les étages */
    }

    /* 3. On annule le min-width des tablettes qui casse tout */
    .filters-form > div, 
    .filters-form .filter-field,
    .filter-group {
        flex: 1 1 auto !important;       
        margin: 0 !important;
		width: 100% !important;   /* Largeur réduite au lieu de 100% */
    	max-width: 300px !important; 
    	min-width: unset !important;
    }

    /* 4. On ajuste les labels (s'ils existent) pour qu'ils soient alignés à gauche */
    .filters-form label {
        display: block !important;
        margin-bottom: 5px !important;
        text-align: left !important;
        font-size: 0.9rem !important;
    }

    /* 5. On agrandit les boutons pour le clic au pouce */
    .filters-form button, 
    .filters-form .buttons-container {
        width: 100% !important;
        height: 50px !important;
        margin-top: 5px !important;
		margin-bottom: 10px;
    }
/* Style du compteur optimisé pour mobile */
    .compteur-produits {
        font-size: 15px; /* Ta valeur préférée */
        color: #888;
        line-height: 1.2;
        margin-top: 2px;
    }
    
    .compteur-produits strong {
        color: #FF0000;
    }
    /* 6. RÉDUCTION DE L'ESPACE COMPTEUR / GRILLE */
    /* On cible l'espace après les filtres */
    .catalog-count, .results-count {
        margin: 10px 0 5px 0 !important;
        text-align: center !important;
    }
}
/* ==========================================================================
   4. PANIER
   ========================================================================== */
@keyframes slideArrow { 0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
/* --- AJUSTEMENT SPÉCIFIQUE MOBILES (0 à 768px) --- */
@media screen and (max-width: 768px) {  
    .breadcrumb-wrapper { 
        margin-top: 10px !important;    /* Réduit l'écart avec le header */
        padding: 0 10px !important;    /* Moins de padding sur les côtés */
        margin-bottom: 10px !important; /* Réduit l'écart avec le contenu du panier */
    }    
    
    .breadcrumb-section { 
        padding-top: 0 !important; 
        margin-top: 0 !important; 
    }

    .breadcrumb { 
        font-size: 12px;               /* Texte un peu plus petit pour tenir sur une ligne */
    }

    .breadcrumb ul { 
        flex-wrap: wrap !important; 
        gap: 3px !important; 
        justify-content: flex-start;   /* Aligne à gauche sur mobile */
    }
}

@media (max-width: 768px) {       
    .cart-title { 
        margin-left: 0 !important; 
        font-size: 22px !important; 
        justify-content: center !important; 
        text-align: center !important; 
    }    
    .cart-table, .cart-table thead, .cart-table tbody, .cart-table tr, .cart-table td { 
        display: block !important; 
        width: 100% !important; 		        
        max-width: 100vw !important; /* Largeur max = largeur de la vue */
        box-sizing: border-box !important;
        overflow: hidden !important; /* Coupe ce qui dépasse */
    }
    .cart-table thead { display: none !important; } 
    .cart-table tr { 
        margin-bottom: 25px !important; 
        border: 2px solid #000 !important; 
        border-radius: 12px !important; 
        background: #fff !important; 
        padding: 15px !important; 
        box-shadow: 4px 4px 0px #000 !important; /* Style plus moderne */
        position: relative;
    }

    /* --- 4. IMAGE ET NOM DU PRODUIT --- */
    .product-cell-container {
        flex-direction: column !important; /* Image en haut, Nom en dessous */
        align-items: center !important;
		display: flex !important;
        width: 100% !important;
    }

    .product-image-wrapper {
        width: 140px !important; /* Taille de la photo */
        margin-bottom: 10px !important;
		margin: 0 auto 10px auto !important;
    }

    .product-name {
        font-size: 1.2rem !important;
        text-align: center !important;
        margin: 0 !important;
        padding-bottom: 10px !important;
        width: 100% !important;                
        display: block !important;
        white-space: normal !important; /* Autorise le retour à la ligne du nom */
        padding: 0 5px !important;
    }

    /* --- 5. AFFICHAGE DES INFOS (Taille, Prix, etc.) --- */
    .cart-table td { 
        display: flex !important; 
        justify-content: space-between !important; /* Libellé à gauche, valeur à droite */
        align-items: center !important;          
        border-bottom: 1px solid #eee !important; 
        font-size: 0.95rem; 	
        padding: 12px 10px !important; /* Ajout d'une marge interne à gauche/droite */        
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* On utilise :before pour recréer les étiquettes que l'on a cachées dans le thead */
    .cart-table td:nth-of-type(2):before { content: "Taille :"; font-weight: bold; }
    .cart-table td:nth-of-type(3):before { content: "Prix :"; font-weight: bold; }
    .cart-table td:nth-of-type(4):before { content: "Quantité :"; font-weight: bold; }
    .cart-table td:nth-of-type(5):before { content: "Total :"; font-weight: bold; }
    .cart-table td:nth-of-type(6):before { content: "Action :"; font-weight: bold; }
    .cart-table td:last-child { border-bottom: none !important; }

    /* Correction pour que l'image zoomable ne déborde pas */
    .zoomable-img { max-width: 100% !important; height: auto !important; }
}
@media screen and (max-width: 768px) {
    /* ---CONTENEUR "PASSER A LA CAISSE" --- */
	.cart-summary {
        display: block !important; /* On annule le flex qui pousse à droite */
        width: 100% !important;
    }
.summary-box {
        /* On force le centrage */
        width: 90% !important; 
        min-width: 0 !important; /* Très important pour annuler le style PC */
        margin: 20px auto !important; 
        padding: 20px !important;
        box-shadow: 6px 6px 0px #000 !important; /* Ombre un peu plus petite sur mobile */
        float: none !important;
    }

    /* 2. On aligne les lignes de total (Sous-total, Livraison, Total) */
    .summary-line {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        font-size: 1.1rem !important;
    }

    .summary-line.total {
        border-top: 2px solid #eee;
        padding-top: 15px;
        font-size: 1.4rem !important;
        font-weight: bold !important;
        color: #e60000; /* Mise en avant du prix final */
    }

    /* 3. Le bouton "Passer à la caisse" */
    .checkout-button, .btn-checkout {
        display: block !important;
        width: 100% !important; /* Largeur totale pour être facile à cliquer au pouce */
        padding: 18px !important;
        font-size: 1.2rem !important;
        font-family: 'Racing Sans One', sans-serif !important;
        text-transform: uppercase !important;
        background: #e60000 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        text-align: center !important;
        box-shadow: 0 4px 0 #b30000 !important; /* Effet de profondeur */
        margin-top: 10px !important;
    }
}
    .checkout-button:active {
        transform: translateY(2px) !important;
        box-shadow: 0 4px 0 #b30000 !important;
    }


/* ==========================================================================
   5. FICHE PRODUIT
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* --- 2. BOUTON PERSONNALISER : DISPARITION --- */
    .single-post .btn-custom, .btn-custom {
        display: none !important; /* Le bouton disparait totalement */
    }
    /* --- 3. BLOC DES TAILLES : CENTRAGE PARFAIT --- */
    /* On abandonne le "grid" qui peut forcer des largeurs fixes et on passe en Flex */
    .single-post .size-options {
        display: flex !important;
        flex-wrap: wrap !important; /* Permet de passer à la ligne proprement */
        justify-content: center !important; /* CENTRE LES CASES */
        gap: 8px !important;
        margin-top: 12px !important;
        width: 100% !important;
		margin-left: 25px !important;
    }

    .single-post .size-box {
        flex: 0 0 22% !important; /* Environ 4 cases par ligne mais flexible */
        max-width: 60px !important; /* Évite que les cases soient trop larges */
        height: 45px !important;
        margin: 0 !important;
    }

    /* --- 4. VISUEL DES SPÉCIFICATIONS & CONTENU --- */
    .single-post .product-main-content { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 20px !important; 
    }

    /* Correction du centrage global (on enlève le margin-left 40px qui décentrait tout) */
    .action-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        margin-left: 0 !important; /* ÉTAIT À 40px : on remet à 0 pour centrer */		
        width: 100% !important;
    }

    /* --- SÉLECTEUR DE QUANTITÉ --- */
.quantity-selector {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    align-items: center !important;
    justify-content: space-between !important;
    border: 2px solid #000 !important;
    border-radius: 4px;
    width: 160px !important; /* Largeur fixe pour éviter les déformations */
    margin: 0 auto 20px auto !important; /* Centrage horizontal parfait */
    height: 50px !important;
    overflow: hidden;
    background: #fff;
    }
	.qty-mobile-btn {
    display: flex !important;
    width: 50px !important; /* Largeur fixe pour le carré du bouton */
    height: 100% !important;
    background: #f8f8f8 !important; /* Un léger gris pour les distinguer */
    border: none !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    color: #000 !important;
    flex-shrink: 0 !important; /* Interdiction de rétrécir */
}
	.quantity-selector input {
    width: 60px !important; /* Place centrale pour le chiffre */
    border: none !important;
    text-align: center !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    -moz-appearance: textfield; /* Cache les flèches par défaut du navigateur */
}

/* Cache les flèches par défaut de l'input number */
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

    /* --- AJOUT AU PANIER --- */
    #add-to-cart-btn, .add-to-cart-btn {
        width: 100% !important;
        max-width: 100% !important; /* Prend toute la largeur disponible */
        margin: 10px 0 !important;
        padding: 16px !important;
    }

    .single-post .product-title {
        font-size: 1.4rem !important; /* Un peu plus petit pour éviter les césures laides */
        text-align: center !important;
    }
}
@media screen and (max-width: 768px) {

    /* 1. RESET DU CONTENEUR PARENT */
    /* On s'assure que le wrapper principal n'a aucune marge parasite */
    .single-post .product-layout, 
    .single-post .product-main-content,
    .checkout-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 15px !important;  
        padding-right: 15px !important; 
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; 
    }
    /* 2. CENTRAGE DES ÉLÉMENTS INDIVIDUELS */
    /* On cible le titre, le prix, la galerie et les blocs d'options */
    .single-post .product-title,
    .single-post .product-price-container,
    .single-post .product-gallery,
    .single-post .product-details,
    .single-post .size-options,
    .single-post .action-group,
    .single-post .quantity-selector,
    .single-post .thumbnails-list {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        justify-content: center !important;
	}
    /* 3. FIX SPÉCIFIQUE ACTION-GROUP */    
    .single-post .action-group {
        align-items: center !important;
        margin-left: 0 !important; 
        padding: 0 !important;
    }
    /* 4. ALIGNEMENT DES IMAGES */  
    .single-post .product-gallery img {
        margin: 0 auto !important;
        display: block !important;
        max-width: 100% !important;
        height: auto !important;
    }
    /* 5. RESET DES WIDTHS SUR LES INPUTS */    
    .single-post input, .single-post select {
        box-sizing: border-box !important;
    }
}

/* COOKIES - Adaptabilité mobile */
@media screen and (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
}
@media (max-width: 600px) {
    .search-grid-layout, .cards-grid { grid-template-columns: 1fr ; }    
    
    .cards-grid .card h2 { font-size: 1.1rem; }
}
@media screen and (max-width: 480px) {
    .band-hero h1 { font-size: 1.5rem ; }
    .card { min-height: 220px ; }
}
@media screen and (max-width: 480px) {
    .breadcrumb-wrapper { margin-top: 70px ; }
    .breadcrumb { font-size: 12px ; }
}