/* Les styles existants sont conservés, ajustez-les si nécessaire avec Bootstrap */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Header */
.header {
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #eac57b;
}

.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #eac57b;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #eac57b;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
}

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

.header-btn {
    background: #eac57b;
	text-decoration: none;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.header-btn:hover {
    background: #010000;
    color: white;
}

.cart-icon {
    position: relative;
    background: #333;
    color: white;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; /* Pour centrer le chiffre */
    align-items: center;
    justify-content: center;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #eac57b;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    min-width: 20px; /* Pour éviter que le cercle ne soit trop petit */
    text-align: center;
}


/* Main container */
.container {
    display: flex;
    max-width: 1400px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 20px;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    height: fit-content;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px; /* Ajusté pour être sous le header */
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: color 0.3s;
}

.sidebar li:hover {
    color: #eac57b;
}

/* Styles pour le carousel */
.carousel {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 30px; /* Ajouté pour espace après le carousel */
}

.carousel-inner {
    border-radius: 15px;
}

.carousel-item {
    transition: transform 0.6s ease;
}

.carousel-item img {
    width: 100%;
    height: 400px; /* Hauteur fixe pour le carousel */
    object-fit: cover;
}

/* Boutons de navigation */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: #010100;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: #eac57b;
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
    background-size: 100%, 100%;
    /* Bootstrap 5 utilise des SVG intégrés, assurez-vous qu'ils sont visibles */
    filter: brightness(0) invert(1);
    /* Si les icônes ne s'affichent pas, cela pourrait être dû à des SVG non chargés
       ou à des problèmes de chemin. Bootstrap gère cela par défaut. */
}

/* Indicateurs (si vous les utilisez) */
.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    margin: 0 5px;
}

.carousel-indicators .active {
    background-color: #eac57b;
}

/* Animation pour le fade entre slides */
.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none; /* Important pour Bootstrap 5 fade */
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Responsive du carousel */
@media (max-width: 768px) {
    .carousel-item img {
        height: 250px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
}       

/* Main content */
.main-content {
    flex: 1;
}

/* Hero section - Utilisé ici comme un conteneur pour le carousel, sans son propre fond */
/* J'ai retiré le background et le padding si le carousel prend toute la place */
.hero-section {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */ /* Retiré car le carousel a son propre visuel */
    border-radius: 20px;
    /* padding: 40px; */ /* Retiré si le carousel occupe tout */
    color: white; /* Peut être utile si vous ajoutez du texte par-dessus */
    /* margin-bottom: 30px; */ /* Déplacé vers .carousel pour un meilleur espacement */
    position: relative;
    overflow: hidden;
}

/* Product sections */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.view-all {
    color: #eac57b;
    text-decoration: none;
    font-weight: 500;
}

/* Product grid */
.product-grid {
    display: grid;
    /* Règle de base pour les écrans larges */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    /* Taille et mise en forme du conteneur */
    width: 100%; /* S'adapte à la largeur du parent */
    height: 250px; /* Hauteur fixe pour un affichage uniforme */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Décoration et gestion du débordement */
    background: #ffffff; /* Fond blanc, comme dans l'exemple */
    border: 1px solid #e0e0e0; /* Bordure légère */
    border-radius: 8px; /* Bords arrondis */
    overflow: hidden;
}

.product-image img {
    /* Règle essentielle pour l'adaptation de l'image */
    width: 100%;
    height: 100%;
    object-fit: contain; /* L'image est entièrement visible sans être coupée */
}

.product-info {
    padding: 15px;
}

.product-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.product-price {
    color: #eac57b;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-btn {
    width: 100%;
    background: #eac57b;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.product-btn:hover {
    background: #010000;
    color: white;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.category-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.category-name {
    font-weight: 600;
    color: #333;
}

/* Deal cards - non utilisé dans le HTML fourni, mais les styles sont là */
.deal-card {
    background: linear-gradient(135deg, #eac57b, #eac57b);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
}

.deal-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: #000000;
    color: white;
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: #eac57b;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 5px 0;
    color: #bdc3c7;
}
.footer-section li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-section li a:hover {
    color: #eac57b;
}


/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        top: auto; /* Supprime le sticky sur mobile */
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 10px;
    }
    
    .search-container {
        order: 3;
        max-width: 100%;
        margin: 0;
    }
    .header-actions {
        width: 100%;
        justify-content: space-around;
    }
}
/* AJOUT POUR AFFICHER DEUX ARTICLES PAR LIGNE SUR MOBILE */
@media (max-width: 767px) {
    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Force 2 colonnes */
        gap: 15px;
    }
    .product-card {
        width: 100%; /* La carte prend la largeur de sa colonne */
    }
}

/* Style du bouton flottant WhatsApp */
.whatsapp-btn-footer {
    position: fixed; /* Rendre le bouton flottant */
    bottom: 20px;    /* 20 pixels du bas de la page */
    right: 20px;     /* 20 pixels de la droite de la page */
    background-color: #25d366; /* La couleur verte de WhatsApp */
    color: white;    /* Couleur de l'icône */
    border-radius: 50%; /* Rendre le bouton rond */
    width: 60px;     /* Largeur du bouton */
    height: 60px;    /* Hauteur du bouton */
    display: flex;   /* Pour centrer l'icône */
    justify-content: center; /* Centrage horizontal de l'icône */
    align-items: center;     /* Centrage vertical de l'icône */
    font-size: 30px; /* Taille de l'icône */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ombre pour un effet de relief */
    z-index: 1000;   /* S'assurer que le bouton est au-dessus des autres éléments */
    transition: transform 0.3s ease-in-out; /* Animation au survol */
}

/* Effet de survol */
.whatsapp-btn-footer:hover {
    transform: scale(1.1); /* Agrandit le bouton de 10% au survol */
    color: white;    /* Couleur de l'icône */	
}

/* Conteneur principal du menu */
.menu {
    width: 250px;
}

/* Conteneur principal du dropdown */
.dropdown {
    position: relative; /* Essentiel pour positionner le menu par rapport au bouton */
    width: 100%;
}

/* Bouton qui ouvre le dropdown */
.dropdown-toggle {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: left; /* Aligner le texte à gauche */
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-toggle:hover {
    background-color: #eac57b;
    color: white;
}

/* Flèche indiquant que c'est un dropdown */
.dropdown-toggle::after {
    content: '▼'; /* Unicode pour une petite flèche vers le bas */
    font-size: 10px;
}

/* Contenu du dropdown (la liste des catégories) */
.dropdown-menu {
    position: absolute;
    top: 100%; /* S'affiche juste en dessous du bouton */
    left: 0;
    z-index: 1000; /* Assure qu'il est au-dessus des autres éléments */
    width: 100%;
    max-height: 250px; /* Limite la hauteur et ajoute une barre de défilement */
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin-top: 5px;
    display: none; /* Cache le menu par défaut */
    opacity: 0; /* Pour l'animation de fondu */
    transition: opacity 0.3s ease-in-out;
}

/* Afficher le dropdown lorsque le conteneur a la classe "open" (gérée par JavaScript) */
.dropdown.open .dropdown-menu {
    display: block; /* Affiche le menu */
    opacity: 1;
}

/* Styles pour les éléments de la liste du dropdown */
.dropdown-menu li {
    padding: 0; /* Réinitialise le padding pour éviter les doubles espacements */
    border-bottom: none;
}

.dropdown-item {
    display: block; /* Rendre le lien un bloc pour qu'il prenne toute la largeur */
    width: 100%;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #eac57b;
}