/* VARIABLES GLOBALES & RESET */
:root {
    --primary-color: #0b4c53;   /* Vert canard / Teinte V-Boum */
    --dark-color: #1e293b;      /* Anthracite */
    --light-bg: #f8fafc;        /* Fond clair gris/bleu */
    --white: #ffffff;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--dark-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* HEADER & NAVBAR */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 6px;
    font-size: 12px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.search-bar {
    display: flex;
    width: 45%;
}

.search-bar input {
    width: 80%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    width: 20%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
}

.header-actions {
    display: flex;
    gap: 20px;
}

.action-item {
    font-size: 14px;
    font-weight: 500;
}

.cart-count {
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 11px;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
}

.shop-categories-btn {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
}

.shop-now-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

.dropdown-categories {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    margin-top: 5px;
}

.dropdown-content a {
    color: var(--dark-color) !important;
    padding: 12px 16px;
    display: block;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    transition: 0.2s;
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color) !important;
    padding-left: 20px;
}

/* Affiche le menu au survol */
.dropdown-categories:hover .dropdown-content {
    display: block;
}

/* HERO BANNER */
.hero-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #e6f2f3; /* Teinte bleutée très claire de ton image */
    padding: 60px 8%;
}

.hero-content {
    max-width: 50%;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.btn-dark {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.hero-image-placeholder img {
    max-width: 100%;
    border-radius: 8px;
}


/* CONTAINER DU CARROUSEL GLOBAL */
.hero-carousel-container {
    position: relative;
    width: 100%;
    height: 500px; /* Ajuste la hauteur selon tes besoins */
    overflow: hidden;
}

.carousel-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

/* STYLE DE CHAQUE DIAPOSITIVE */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

/* La diapositive visible prend les devants */
.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* CONTENU DE LA DIAPOSITIVE */
.hero-content {
    max-width: 50%;
    animation: fadeInUp 0.6s ease-out forwards;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.hero-image-placeholder {
    max-width: 45%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-image-placeholder img {
    max-height: 90%;
    width: auto;
    object-fit: contain;
}

/* BOUTONS DE NAVIGATION (FLECHES) */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--dark-color);
    transition: 0.3s;
}

.carousel-nav:hover {
    background: var(--primary-color);
    color: white;
}

.carousel-nav.prev { left: 20px; }
.carousel-nav.next { right: 20px; }

/* POINTS INDICATEURS (DOTS) */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.carousel-dots .dot.active, .carousel-dots .dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* PETITE ANIMATION DE TEXTE AU CHANGEMENT DE SLIDE */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* STRUCTURES SECTIONS EN GRILLE */
.section-container {
    padding: 60px 8%;
}

.bg-light {
    background-color: var(--light-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
}

.section-header p {
    color: var(--text-muted);
}

/* GRILLE DES CATÉGORIES */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) /*repeat(auto-fit, minmax(220px, 1fr))*/;
    gap: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    
    /*padding: 0 20%;*/
}

/* Sur les tablettes et téléphones, on réduit le nombre de colonnes */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cartes par ligne */
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: 1fr; /* 1 carte par ligne */
    }
}

.category-card {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.category-card img {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
    object-fit: cover;
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-muted);
}

/* GRILLE PRODUITS (BEST SELLERS) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.product-img-wrapper {
    position: relative;
    background: #f1f5f9;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.product-img-wrapper img {
    max-height: 200px;
    object-fit: contain;
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.product-info .price {
    font-weight: 700;
    color: var(--dark-color);
    font-size: 16px;
    margin-bottom: 10px;
}

.rating {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* HISTOIRE (STORY SECTION) */
.story-section {
    display: flex;
    background-color: var(--primary-color);
    color: var(--white);
    align-items: center;
    margin: 40px 8%;
    border-radius: 12px;
    overflow: hidden;
}

.story-content {
    padding: 50px;
    width: 60%;
}

.story-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.story-content p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn-outline-white {
    border: 2px solid white;
    color: white;
    display: inline-block;
}

.story-image {
    width: 40%;
}

.story-image img {
    width: 100%;
    /*height: 100%;*/
    object-fit: cover;
    vertical-align: middle;
}

/* CARACTÉRISTIQUES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.text-center { text-align: center; }

.feature-item {
    padding: 20px;
}

.feature-icon {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h5 {
    font-size: 16px;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: var(--text-muted);
}

.trust-badge {
    margin-top: 30px;
}

.badge {
    background: #e6f2f3;
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

/* NEWSLETTER */
.newsletter-section {
    background-color: #eaf4f5;
    text-align: center;
    padding: 50px 8%;
}

.newsletter-section h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.btn-subscribe {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 600;
}

/* FOOTER */
.main-footer {
    background-color: var(--dark-color);
    color: #cbd5e1;
    padding: 50px 8% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
}

.footer-col h5 {
    color: white;
    font-size: 14px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 13px;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    font-size: 18px;
}


/* CODE DU DESIGN MOBILE */

/* Évite les calculs de marge complexes qui font déborder les blocs */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Supprime le rectangle bleu moche au clic sur mobile */
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Sécurité absolue : aucun scroll horizontal sur le site */
    position: relative;
}

/* Optimisation de la taille des polices et des clics tactiles */
input, button, select, a {
    font-size: 16px !important; /* Force 16px minimum pour empêcher iOS/Android de zoomer automatiquement */
}

/* Zone de clic minimale recommandée par Google pour les pouces (44x44 pixels) */
.add-to-cart, .qty-btn, .carousel-nav, .shop-categories-btn, .nav-bar a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 10px;
        flex-wrap: nowrap;
    }
    /* Permet aux raccourcis de catégories dynamiques de défiler horizontalement avec le doigt */
    #dynamic-nav-shortcuts {
        display: flex !important;
        overflow-x: auto;
        white-space: nowrap;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch; /* Défilement fluide sur iOS */
        gap: 15px;
        padding-bottom: 5px;
    }
    #dynamic-nav-shortcuts::-webkit-scrollbar { display: none; } /* Cache la barre de défilement */
}


@media (max-width: 768px) {
    .hero-carousel-container {
        height: auto;
        padding: 20px 10px;
    }
    .carousel-slide {
        flex-direction: column-reverse !important; /* L'image passe AU-DESSUS du texte sur mobile */
        text-align: center;
        gap: 15px;
    }
    .hero-content h1 {
        font-size: 20px !important; /* Titre plus compact */
    }
    .hero-image-placeholder img {
        max-height: 200px; /* Évite que l'image ne prenne tout l'écran */
        object-fit: contain;
    }
    .carousel-nav { display: none; } /* On cache les flèches gauches/droites inutiles grâce au Swipe tactile qu'on a codé */
}


@media (max-width: 768px) {
    .search-bar {
        width: 100%;
        margin: 10px 0;
    }
    #search-results-box {
        position: fixed; /* Devient un calque complet */
        top: 60px;
        left: 0;
        right: 0;
        width: 100vw;
        max-height: calc(100vh - 60px);
        border-radius: 0;
    }
}


/* ========================================================== */
/* COUCHE DE CORRECTION GLOBAL HEADER & NAV POUR MOBILE       */
/* ========================================================== */

@media (max-width: 768px) {
    
    /* ---------------------------------------------------
       1. LE HEADER & LA BARRE DE RECHERCHE
    --------------------------------------------------- */
    .header-container {
        display: flex !important;
        flex-direction: column !important; /* Empile le logo, la recherche et les icônes */
        align-items: center !important;
        padding: 10px 15px !important;
        gap: 12px !important;
    }

    .search-bar {
        width: 100% !important; /* Force la recherche à prendre toute la largeur */
        max-width: 100% !important;
        margin: 0 !important;
    }

    .search-bar form {
        display: flex !important;
        width: 100% !important;
    }
    
    .nav-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 5px 10px !important;
        background: #fff !important;
    }
    
    .nav-links {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* AU LIEU DE MASQUER, on adapte le bouton des catégories pour le mobile */
    .dropdown-categories {
        display: inline-block !important; /* On le garde visible */
        position: relative;
    }
    
    .shop-categories-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        background: #f1f5f9;
        border-radius: 6px;
        color: #0b4c53 !important;
        white-space: nowrap;
    }
    
    /* Force le menu déroulant à s'afficher proprement au-dessus du flux sur mobile */
    .dropdown-content {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999 !important;
        background: white;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        min-width: 200px;
        border-radius: 6px;
    }

    /* Le bandeau des raccourcis à défilement horizontal prend le reste de l'espace */
    #dynamic-nav-shortcuts {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        flex-grow: 1;
        gap: 15px;
        padding: 5px 0;
        -webkit-overflow-scrolling: touch;
    }
    #dynamic-nav-shortcuts::-webkit-scrollbar { display: none; }

    .shop-now-btn { display: none !important; }
    
    /* ---------------------------------------------------
       4. OPTIMISATION DE LA SECTION STORY (.story-section)
    --------------------------------------------------- */
    .story-section {
        display: flex !important;
        flex-direction: column !important; /* Empile l'image et le texte verticalement */
        padding: 30px 15px !important;     /* Marges internes plus compactes pour mobile */
        gap: 20px !important;              /* Espace équilibré entre l'image et le texte */
        text-align: center !important;     /* Centre le texte pour un rendu plus harmonieux */
        height: auto !important;           /* Laisse la section s'adapter naturellement au contenu */
    }

    /* Ajustement du bloc contenant le texte de votre histoire */
    .story-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
    }

    .story-content h2, 
    .story-content .story-title {
        font-size: 22px !important;        /* Titre principal plus adapté aux smartphones */
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }

    .story-content p, 
    .story-content .story-text {
        font-size: 14px !important;        /* Lecture confortable sur petit écran */
        line-height: 1.6 !important;
        color: #475569 !important;         /* Couleur adoucie pour réduire la fatigue visuelle */
        margin-bottom: 15px !important;
    }

    /* Ajustement du bloc contenant l'image de la section */
    .story-image-container,
    .story-img-box {
        width: 100% !important;
        max-height: 250px !important;      /* Limite la hauteur de l'image pour ne pas repousser le texte trop bas */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
        border-radius: 8px !important;     /* Coins légèrement arrondis pour un effet moderne */
    }

    .story-image-container img,
    .story-img-box img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;      /* L'image remplit l'espace proprement sans se déformer */
        max-height: 250px !important;
    }

    /* Ajustement d'un éventuel bouton d'action ("En savoir plus", "Notre histoire") */
    .story-content .btn,
    .story-link {
        display: inline-block !important;
        width: 100% !important;            /* Le bouton prend toute la largeur pour être cliqué facilement au pouce */
        max-width: 200px !important;       /* Mais reste limité pour ne pas être trop étiré */
        padding: 12px 20px !important;
        font-size: 14px !important;
        margin: 10px auto 0 auto !important;
    }
    
    /* ---------------------------------------------------
       5. OPTIMISATION DE LA PAGE DÉTAILS (.product-details)
    --------------------------------------------------- */
    /* Conteneur principal de la fiche produit */
    .details-container, 
    .product-details-wrapper {
        display: flex !important;
        flex-direction: column !important; /* Empile les images puis les infos */
        padding: 15px !important;
        gap: 20px !important;
        height: auto !important;
    }

    /*--- BLOC GAUCHE : GALERIE D'IMAGES ---*/
    .product-images-left,
    .details-image-box {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Image principale du produit */
    .main-product-img,
    .details-image-box img {
        max-height: 300px !important; /* Limite la hauteur pour que le bouton d'achat reste visible sans trop scroller */
        width: auto !important;
        object-fit: contain !important;
    }

    /* Miniatures (si présentes sous l'image principale) */
    .product-thumbnails,
    .thumb-images-container {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-top: 10px !important;
        width: 100% !important;
        overflow-x: auto !important; /* Permet de glisser les miniatures horizontalement si elles sont nombreuses */
        padding-bottom: 5px;
    }

    .product-thumbnails img,
    .thumb-btn img {
        width: 50px !important;
        height: 50px !important;
        object-fit: cover !important;
        border-radius: 4px !important;
    }

    /*--- BLOC DROITE : INFORMATIONS TEXTUELLES ---*/
    .product-info-right,
    .details-content-box {
        width: 100% !important;
        padding: 0 !important;
    }

    .product-title-heading,
    .details-content-box h1 {
        font-size: 22px !important; /* Titre du produit plus compact */
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }

    .product-price-tag,
    .details-content-box .price {
        font-size: 20px !important;
        font-weight: 700 !important;
        color: #0b4c53 !important;
        margin-bottom: 15px !important;
    }

    .product-description-text,
    .details-content-box .description {
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #475569 !important;
        margin-bottom: 20px !important;
    }

    /*--- FORMULAIRE D'ACHAT ET QUANTITÉ ---*/
    /* Aligne le choix de la quantité et le bouton AJOUTER au panier sur la même ligne ou les empile proprement */
    .product-action-form,
    .details-content-box form {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Ajustement du champ de sélection de la quantité (si présent sur la fiche produit) */
    .quantity-select-wrapper,
    .details-content-box input[type="number"],
    .details-content-box select {
        width: 100% !important;
        height: 44px !important; /* Hauteur idéale pour le clic tactile */
        font-size: 16px !important; /* Évite le zoom automatique sur iOS */
        border: 1px solid #cbd5e1 !important;
        border-radius: 6px !important;
        padding: 0 10px !important;
    }

    /* Force le bouton ADD TO CART à occuper toute la largeur disponible pour un appui facile */
    .details-content-box form button[type="submit"],
    .add-to-cart-btn-main {
        width: 100% !important;
        height: 48px !important; /* Bouton plus haut et plus confortable pour le pouce */
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 5px !important;
    }
    
    /* ---------------------------------------------------
       6. RESTRUCTURATION DE .product-main-section (Fiche Produit)
    --------------------------------------------------- */
    .product-main-section {
        display: flex !important;
        flex-direction: column !important; /* Force l'empilement vertical (Image en haut, détails en bas) */
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 15px !important;    /* Ajuste les marges pour ne pas coller aux bords de l'écran */
        gap: 20px !important;              /* Crée un espace propre entre le bloc image et le bloc texte */
        height: auto !important;           /* Laisse la section s'étendre selon sa vraie hauteur */
        box-sizing: border-box !important;
    }

    /* Sécurité pour tous les enfants directs de la section principale */
    .product-main-section > div {
        width: 100% !important;            /* Force les blocs internes (gauche/droite) à prendre 100% de la largeur */
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Si ton image ou ta galerie est enveloppée dans une classe spécifique à l'intérieur */
    .product-main-section .product-image-container,
    .product-main-section .image-box {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    .product-main-section .product-image-container img,
    .product-main-section .image-box img {
        max-height: 280px !important;      /* Limite la hauteur de l'image pour garder les boutons visibles à l'écran */
        width: auto !important;
        object-fit: contain !important;    /* Empêche l'image du produit de se déformer */
    }

    /* Si le bloc d'informations à droite possède un formulaire d'achat */
    .product-main-section .product-info-box,
    .product-main-section .details-box {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* ========================================================== */
/* COUCHE DE CORRECTION DU HERO CARROUSEL POUR MOBILE         */
/* ========================================================== */
@media (max-width: 768px) {
    .hero-carousel-container {
        display: block !important;
        visibility: visible !important;
        height: 480px !important; /* On force une hauteur fixe sur mobile pour éviter l'écrasement */
        position: relative !important;
        padding: 15px !important;
        background-color: #e6f2f3; /* Couleur de secours */
    }

    .carousel-slider {
        height: 100% !important;
        position: relative !important;
    }

    /* Force les slides actives à occuper tout l'espace requis */
    .carousel-slide.active {
        display: flex !important;
        flex-direction: column-reverse !important; /* Image en haut, texte en bas */
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        height: 100% !important;
        gap: 15px !important;
    }
    
    .carousel-slide:not(.active) {
        display: none !important; /* Cache proprement les autres */
    }

    .hero-content {
        width: 100% !important;
        padding: 0 !important;
    }

    .hero-content h1 {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin: 5px 0 !important;
    }

    .hero-image-placeholder {
        width: 100% !important;
        height: 180px !important; /* Espace réservé à l'image */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .hero-image-placeholder img {
        max-height: 100% !important;
        width: auto !important;
        object-fit: contain !important;
    }

    .hero-buttons {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-top: 10px !important;
    }

    .carousel-nav { display: none !important; }
}

/* Container du dropdown */
.dropdown-auth {
    position: relative;
    display: inline-block;
}

/* Style du menu déroulant */
#auth-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* Juste en dessous du lien */
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 180px;
    z-index: 1000;
    padding: 8px 0;
    animation: fadeIn 0.2s ease-in-out;
}

/* Liens à l'intérieur du menu */
#auth-menu a {
    display: block;
    padding: 10px 20px;
    color: #475569;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

/* Effet au survol des options */
#auth-menu a:hover {
    background: #f8fafc;
    color: #0b4c53; /* Votre couleur teal principale */
}

/* Animation douce pour l'apparition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}