/**
 * Styles pour la page d'accueil UMOA
 * Design System unifié Web ↔ Mobile
 * Thème Purple/Violet inspiré du design mobile
 * 
 * @package UMOA
 * @version 3.0
 */

/* Variables de couleur Purple Theme - Design System Unifié */
:root {
    --umoa-violet: #7B2CBF; /* Violet UMOA - Couleur maître unique */
    --umoa-violet-light: #9D4EDD; /* Violet UMOA clair */
    --umoa-violet-dark: #5A189A; /* Violet UMOA foncé */
    --purple-primary: #7B2CBF; /* Alias pour compatibilité */
    --purple-light: #9D4EDD; /* Alias pour compatibilité */
    --purple-dark: #5A189A; /* Alias pour compatibilité */
    --purple-overlay: rgba(123, 44, 191, 0.8);
}

/* ============================================================================
   SLIDER HERO
   ============================================================================ */

.hero-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    margin-bottom: var(--spacing-12);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    box-shadow: var(--shadow-soft-lg);
}

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

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.slide-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
}

.slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.8s ease-out;
}

.slide-description {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease-out;
}

.slide-content .btn {
    animation: slideInUp 1.2s ease-out;
}

/* Contrôles du slider */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 10;
    pointer-events: none;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--curve-spring);
    pointer-events: all;
    color: var(--gray-800);
    box-shadow: var(--shadow-soft-md);
}

.slider-btn:hover {
    background: var(--white);
    transform: scale(1.1);
    box-shadow: var(--shadow-soft-lg);
    color: var(--blue-deep);
}

.slider-btn:active {
    transform: scale(0.95);
}

.slider-btn.prev {
    left: 2rem;
}

.slider-btn.next {
    right: 2rem;
}

/* Indicateurs */
.slider-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: 2px solid var(--white);
    background: transparent;
    cursor: pointer;
    transition: all var(--duration-normal) var(--curve-spring);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.indicator:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.5);
}

.indicator.active {
    background: var(--white);
    transform: scale(1.2);
    box-shadow: 0 2px 12px rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.home-main {
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-8) 0;
    color: var(--gray-900);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    border-radius: var(--radius-full);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-8);
}

.section-link {
    color: var(--blue-medium);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--duration-fast) var(--curve-ease-out);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-md);
}

.section-link:hover {
    color: var(--blue-deep);
    background-color: var(--gray-50);
    transform: translateX(4px);
}

/* ============================================================================
   SECTION VENLLRE (VENDRE)
   ============================================================================ */

.venllre-section {
    padding: var(--spacing-12) 0;
    background: var(--white);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.venllre-section .container {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

.section-title-venllre {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-8) 0;
    color: var(--gray-900);
    text-align: center;
}

.venllre-carousel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
}

.venllre-banner-large {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4);
    height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.venllre-panel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--duration-normal) var(--curve-spring);
}

.venllre-panel:hover {
    transform: scale(1.02);
}

.venllre-panel-image {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.venllre-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.venllre-panel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-6);
    color: var(--white);
    z-index: 2;
}

.venllre-panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-2) 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.venllre-panel-subtitle {
    font-size: 1rem;
    margin: 0;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ============================================================================
   CATÉGORIES - SCROLL HORIZONTAL
   ============================================================================ */

.categories-section {
    padding: var(--spacing-12) 0;
    background: var(--white);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-8) 0;
    color: var(--gray-900);
    position: relative;
    display: inline-block;
}

.section-title-text {
    color: var(--gray-900);
}

.section-title-highlight {
    color: var(--purple-primary);
    position: relative;
}

.section-title-highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    border-radius: var(--radius-full);
}

.section-title::after {
    display: none; /* Désactiver l'ancien underline */
}

.categories-scroll {
    position: relative;
}

.categories-scroll-container {
    display: flex;
    gap: var(--spacing-4);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: var(--spacing-2) 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.categories-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.categories-grid {
    display: flex;
    gap: var(--spacing-4);
    min-width: max-content;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6) var(--spacing-5);
    text-align: center;
    text-decoration: none;
    color: var(--gray-900);
    transition: all var(--duration-normal) var(--curve-spring);
    box-shadow: var(--shadow-soft-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-3);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    transform: scaleX(0);
    transition: transform var(--duration-normal) var(--curve-spring);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft-lg);
    color: var(--purple-primary);
    border-color: var(--purple-light);
}

.category-banner {
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-2);
    background: var(--gray-100);
}

.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:active {
    transform: translateY(-4px) scale(0.98);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    margin-bottom: var(--spacing-2);
    transition: all var(--duration-normal) var(--curve-spring);
}

.category-card:hover .category-icon {
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    transform: scale(1.1);
}

.categories-indicators {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2);
    margin-top: var(--spacing-4);
}

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--purple-primary);
    opacity: 0.3;
    transition: opacity var(--duration-normal);
}

.category-dot:first-child {
    opacity: 1;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.category-emoji {
    font-size: 2rem;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.category-count {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

/* ============================================================================
   MODAL TOUTES LES CATÉGORIES (MOBILE)
   ============================================================================ */

.categories-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--curve-ease-out);
}

.categories-modal.active {
    display: flex;
    opacity: 1;
}

.categories-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.categories-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--curve-spring);
    overflow: hidden;
}

.categories-modal.active .categories-modal-content {
    transform: translateY(0);
}

.categories-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-6) var(--spacing-4);
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.categories-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.categories-modal-close {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--curve-ease-out);
    color: var(--gray-700);
    padding: 0;
}

.categories-modal-close:hover {
    background: var(--gray-200);
    transform: scale(1.1);
}

.categories-modal-close:active {
    transform: scale(0.95);
}

.categories-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-4);
    -webkit-overflow-scrolling: touch;
}

.categories-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-4);
    padding-bottom: var(--spacing-4);
}

.category-card-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-5);
    text-align: center;
    text-decoration: none;
    color: var(--gray-900);
    transition: all var(--duration-normal) var(--curve-spring);
    box-shadow: var(--shadow-soft-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-3);
    border: 2px solid transparent;
}

.category-card-modal:hover,
.category-card-modal:active {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft-lg);
    color: var(--purple-primary);
    border-color: var(--purple-light);
}

.category-icon-modal {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--curve-spring);
}

.category-card-modal:hover .category-icon-modal,
.category-card-modal:active .category-icon-modal {
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    transform: scale(1.1);
}

.category-icon-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.category-emoji-modal {
    font-size: 1.75rem;
}

.category-name-modal {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.category-count-modal {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
}

/* Desktop: Cacher la modal et désactiver le clic */
@media (min-width: 769px) {
    .categories-modal {
        display: none !important;
    }
    
    .categories-title-clickable {
        cursor: default;
    }
}

/* Mobile: Style du titre cliquable */
@media (max-width: 768px) {
    .categories-title-clickable {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        transition: all var(--duration-fast) var(--curve-ease-out);
    }
    
    .categories-title-clickable:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
}

/* ============================================================================
   PRODUITS / VENTES - SCROLL HORIZONTAL
   ============================================================================ */

.latest-sales-section {
    padding: var(--spacing-12) 0;
    background: var(--gray-50);
}

.products-scroll {
    position: relative;
}

.products-scroll-container {
    display: flex;
    gap: var(--spacing-4);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: var(--spacing-2) 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.products-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Tablette: Grille 3 colonnes */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-scroll-container {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: auto;
        gap: 16px;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding: 0;
    }
    
    .product-card {
        min-width: unset !important;
        max-width: none !important;
        width: 100% !important;
    }
}

/* Desktop: Grille responsive avec plusieurs colonnes */
@media (min-width: 1024px) {
    .products-scroll-container {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        grid-auto-rows: auto;
        gap: 20px;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding: 0;
    }
    
    /* Pour les très grands écrans, limiter à 5 colonnes max */
    @media (min-width: 1400px) {
        .products-scroll-container {
            grid-template-columns: repeat(5, 1fr);
        }
    }
    
    /* Pour les écrans moyens (1024px - 1399px), 4 colonnes */
    @media (min-width: 1024px) and (max-width: 1399px) {
        .products-scroll-container {
            grid-template-columns: repeat(4, 1fr);
        }
    }
    
    /* Catégories: Afficher toutes les catégories en grille sur desktop, sans scroll */
    .categories-scroll-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: var(--spacing-4);
        overflow-x: visible;
        overflow-y: visible;
        padding: 0;
        scroll-behavior: auto;
    }
    
    .category-card {
        min-width: unset;
        width: 100%;
    }
}

.products-grid {
    display: flex;
    gap: var(--spacing-4);
    min-width: max-content;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden; /* Garder hidden pour les coins arrondis, mais permettre le contenu visible */
    box-shadow: var(--shadow-soft-md);
    transition: all var(--duration-normal) var(--curve-spring);
    position: relative;
    min-width: 280px;
    max-width: 320px; /* Limiter la largeur maximale pour éviter les images trop grandes */
    flex-shrink: 0;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: auto; /* Hauteur automatique pour s'adapter au contenu */
}

/* Sur desktop, les cartes doivent s'adapter à la grille */
@media (min-width: 1024px) {
    .product-card {
        min-width: unset;
        max-width: none;
        width: 100%;
    }
}

/* Desktop: Ajuster la largeur des cartes dans la grille */
@media (min-width: 1024px) {
    .product-card {
        min-width: unset;
        max-width: none;
        width: 100%;
        flex-shrink: 1;
        flex-grow: 1;
    }
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: border-color var(--duration-normal) var(--curve-spring);
    pointer-events: none;
    z-index: 0; /* S'assurer que le pseudo-élément est en arrière-plan */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft-lg);
}

.product-card:hover::after {
    border-color: var(--purple-light);
}

.product-card:active {
    transform: translateY(-4px) scale(0.98);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0; /* Permettre au flex de gérer la hauteur */
    position: relative;
    z-index: 1; /* S'assurer que le contenu est au-dessus du pseudo-élément ::after */
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    max-height: 200px;
    min-height: 150px;
    height: auto;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Réduire l'effet de zoom au survol pour éviter les débordements */
.product-card:hover .product-image img {
    transform: scale(1.02); /* Réduit de 1.05 à 1.02 pour un effet plus subtil */
}

.product-badge {
    position: absolute;
    top: var(--spacing-3);
    right: var(--spacing-3);
    padding: var(--spacing-1) var(--spacing-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft-sm);
    animation: scaleIn 0.3s var(--curve-spring);
}

.product-info {
    padding: var(--spacing-3);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px; /* Espacement réduit entre les éléments */
    min-height: 0; /* Permettre au flex de gérer la hauteur */
    width: 100%;
    box-sizing: border-box; /* Inclure le padding dans la largeur */
    position: relative;
    z-index: 2; /* S'assurer que le contenu est visible au-dessus du pseudo-élément */
    visibility: visible; /* Forcer la visibilité */
    opacity: 1; /* Forcer l'opacité */
}

/* Supprimer les marges par défaut de tous les enfants directs */
.product-info > * {
    margin: 0;
}

.product-name {
    font-size: 0.875rem; /* 14px Desktop */
    font-weight: 600;
    margin: 0; /* Supprimer la marge, le gap du parent gère l'espacement */
    color: var(--gray-900);
    line-height: 1.3; /* Réduire le line-height pour plus de compacité */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limite à 2 lignes maximum */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.6em; /* Réduire la hauteur minimale */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.product-category {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0; /* Supprimer la marge, le gap du parent gère l'espacement */
    line-height: 1.3; /* Réduire le line-height */
}

.product-rating {
    display: flex;
    gap: 2px;
    margin: 0; /* Supprimer la marge, le gap du parent gère l'espacement */
    font-size: 0.875rem;
    line-height: 1;
}

.star {
    display: inline-block;
    font-size: 0.875rem;
}

.star-filled {
    opacity: 1;
}

.star-empty {
    opacity: 0.3;
}

.product-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0; /* Supprimer la marge, le gap du parent gère l'espacement */
    gap: var(--spacing-2);
}

.product-price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #27ae60; /* Couleur verte spécifiée */
    flex: 1;
}

.btn-product-view {
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    color: var(--white);
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--duration-normal) var(--curve-spring);
    white-space: nowrap;
}

.btn-product-view:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-soft-md);
}

.product-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0; /* Supprimer la marge, le gap du parent gère l'espacement */
    flex-shrink: 0; /* Empêcher la réduction de taille */
    overflow: visible; /* Permettre la visibilité */
}

.product-location {
    font-size: 0.75rem;
    color: var(--gray-500);
    line-height: 1.2; /* Réduire le line-height pour plus de compacité */
    margin: 0; /* Supprimer toute marge */
}

/* ============================================================================
   DÉBALLAGES FLASH
   ============================================================================ */

.flash-unboxing-section {
    padding: var(--spacing-16) 0;
    background: #7B2CBF; /* Violet UMOA - couleur unie */
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.flash-unboxing-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: var(--radius-full);
}

.flash-unboxing-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: var(--radius-full);
}

.flash-unboxing-section .section-title {
    color: white;
}

.flash-unboxing-section .section-link {
    color: white;
    opacity: 0.9;
}

.unboxing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.unboxing-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    transition: all var(--duration-normal) var(--curve-spring);
    box-shadow: var(--shadow-soft-lg);
}

.unboxing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft-xl);
}

.unboxing-card:active {
    transform: translateY(-4px) scale(0.98);
}

.unboxing-link {
    text-decoration: none;
    color: #333;
    display: block;
}

.unboxing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-4);
}

.unboxing-badge {
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.unboxing-timer {
    font-size: 0.875rem;
    font-weight: 600;
}

.unboxing-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-4) 0;
    color: var(--gray-900);
}

.unboxing-meta {
    display: flex;
    gap: var(--spacing-4);
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ============================================================================
   ENCHÈRES
   ============================================================================ */

.auctions-section {
    padding: var(--spacing-16) 0;
}

.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.auction-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft-md);
    transition: all var(--duration-normal) var(--curve-spring);
    position: relative;
}

.auction-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: border-color var(--duration-normal) var(--curve-spring);
    pointer-events: none;
}

.auction-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft-lg);
}

.auction-card:hover::after {
    border-color: var(--blue-light);
}

.auction-card:active {
    transform: translateY(-4px) scale(0.98);
}

.auction-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.auction-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.auction-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-normal);
}

.auction-card:hover .auction-image img {
    transform: scale(1.05);
}

.auction-badge {
    position: absolute;
    top: var(--spacing-3);
    right: var(--spacing-3);
    padding: var(--spacing-1) var(--spacing-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft-sm);
    animation: scaleIn 0.3s var(--curve-spring);
}

.auction-info {
    padding: var(--spacing-4);
}

.auction-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-3) 0;
    color: var(--gray-900);
}

.auction-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin: var(--spacing-2) 0;
}

.auction-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: var(--spacing-3);
}

.auction-timer {
    font-weight: 600;
}

/* ============================================================================
   BOUTIQUES
   ============================================================================ */

.shops-section {
    padding: var(--spacing-16) 0;
    background: var(--gray-50);
}

.shops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.shop-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-6);
    box-shadow: var(--shadow-soft-md);
    transition: all var(--duration-normal) var(--curve-spring);
}

.shop-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft-lg);
}

.shop-card:active {
    transform: translateY(-4px) scale(0.98);
}

.shop-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.shop-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-4);
}

.shop-avatar {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-soft-sm);
}

.shop-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-info {
    flex: 1;
}

.shop-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-1) 0;
    color: var(--gray-900);
}

.shop-owner {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.shop-stats {
    display: flex;
    gap: var(--spacing-6);
    font-size: 0.875rem;
    color: var(--gray-600);
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--border-color);
}

/* ============================================================================
   BOUTON WHATSAPP FLOTTANT
   ============================================================================ */

.whatsapp-float {
    position: fixed;
    bottom: var(--spacing-8);
    right: var(--spacing-8);
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 
        0 4px 12px rgba(37, 211, 102, 0.4),
        0 0 0 0 rgba(37, 211, 102, 0.4);
    z-index: 10001;
    transition: all var(--duration-normal) var(--curve-spring);
    text-decoration: none;
    animation: pulseWhatsApp 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(37, 211, 102, 0.3);
    cursor: pointer;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 
        0 6px 20px rgba(37, 211, 102, 0.6),
        0 0 0 8px rgba(37, 211, 102, 0.1);
    background: #20ba5a;
}

.whatsapp-float:active {
    transform: scale(0.95);
    background: #1ea952;
}

@keyframes pulseWhatsApp {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(37, 211, 102, 0.4),
            0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 
            0 4px 12px rgba(37, 211, 102, 0.4),
            0 0 0 12px rgba(37, 211, 102, 0);
    }
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
    .hero-slider {
        height: 400px;
    }
    
    .slide-title {
        font-size: 2.5rem;
    }
    
    .slide-description {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    /* 1. Réduire les marges des sections (padding) */
    .home-main section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    .venllre-section,
    .categories-section,
    .latest-sales-section,
    .flash-unboxing-section,
    .auctions-section,
    .shops-section {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        overflow-x: hidden !important;
    }
    
    .venllre-section .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .section-title,
    .section-title-venllre {
        margin-bottom: 15px !important;
        font-size: 1.5rem;
    }
    
    /* 2. Compacter le Slider Hero */
    .hero-slider,
    .slider-container {
        height: 300px !important;
        margin-bottom: var(--spacing-4);
    }
    
    .slide-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem;
    }
    
    .slide-description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .slide-content {
        padding: 1rem;
    }
    
    .slider-controls {
        padding: 0 0.5rem;
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(4px);
        opacity: 0.6;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .slider-btn:hover {
        opacity: 0.8;
        transform: scale(1.05);
    }
    
    .slider-indicators {
        display: none !important;
    }
    
    /* 3. Optimiser la "Section Vendre" */
    .venllre-carousel {
        gap: 0 !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .venllre-banner-large {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100% !important;
        max-width: 100% !important;
        height: 155px !important;
        max-height: 155px !important;
        box-sizing: border-box;
    }
    
    .venllre-panel {
        height: 155px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .venllre-panel-title {
        font-size: 1rem !important;
        margin-bottom: var(--spacing-1);
    }
    
    .venllre-panel-subtitle {
        font-size: 0.75rem;
    }
    
    .venllre-panel-content {
        padding: var(--spacing-4);
    }
    
    /* Catégories - Scroll horizontal sur mobile */
    .categories-scroll-container {
        padding-left: var(--spacing-4);
        padding-right: var(--spacing-4);
        gap: var(--spacing-2);
    }
    
    .category-card {
        min-width: 75px; /* Réduit pour afficher au moins 4 catégories */
        padding: var(--spacing-3) var(--spacing-2);
        gap: var(--spacing-2);
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
    }
    
    .category-emoji {
        font-size: 1.25rem;
    }
    
    .category-name {
        font-size: 0.6875rem;
        line-height: 1.2;
    }
    
    /* Produits - Grille 2 colonnes sur mobile */
    .products-scroll-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-3) !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding-left: var(--spacing-4);
        padding-right: var(--spacing-4);
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .product-card {
        min-width: unset !important;
        max-width: none !important;
        width: 100% !important;
    }
    
    .unboxing-grid,
    .shops-grid {
        grid-template-columns: 1fr;
    }
    
    /* 5. Supprimer les éléments secondaires sur Mobile */
    .slide-description,
    .category-count {
        display: none;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: calc(var(--mobile-bottom-height, 64px) + var(--spacing-4) + env(safe-area-inset-bottom, 0px));
        right: var(--spacing-4);
        z-index: 10001;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(37, 211, 102, 0.3);
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    /* Réduire encore plus les espacements sur très petits écrans */
    .home-main section {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .venllre-section,
    .categories-section,
    .latest-sales-section,
    .flash-unboxing-section,
    .auctions-section,
    .shops-section {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
        overflow-x: hidden !important;
    }
    
    .venllre-section .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .section-title,
    .section-title-venllre {
        font-size: 1.25rem;
        margin-bottom: 12px !important;
    }
    
    /* Slider encore plus compact */
    .hero-slider,
    .slider-container {
        height: 250px !important;
    }
    
    .slide-title {
        font-size: 1rem !important;
    }
    
    /* Section Vendre - Panneaux plus compacts */
    .venllre-carousel {
        gap: 0 !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .venllre-banner-large {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    .venllre-panel {
        height: 120px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .venllre-panel-title {
        font-size: 0.875rem !important;
    }
    
    .venllre-panel-subtitle {
        font-size: 0.6875rem;
    }
    
    .venllre-panel-content {
        padding: var(--spacing-3);
    }
    
    /* 4. Grille de produits (2 colonnes sur mobile) */
    .products-scroll-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        overflow-x: visible !important;
        overflow-y: visible !important;
        padding: 0 var(--spacing-4);
    }
    
    .product-card {
        width: 100% !important;
        min-width: unset !important;
        max-width: none !important;
        margin: 0;
        flex-shrink: 0;
        overflow: hidden !important; /* Garder hidden pour les coins arrondis */
        height: auto !important; /* Hauteur automatique */
    }
    
    .product-link {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
    }
    
    .product-image {
        max-height: 180px !important; /* Réduire sur mobile */
    }
    
    .category-card {
        min-width: 70px; /* Réduit encore plus pour très petits écrans */
        padding: var(--spacing-2) var(--spacing-1);
        gap: var(--spacing-1);
    }
    
    .category-icon {
        width: 36px;
        height: 36px;
    }
    
    .category-emoji {
        font-size: 1.125rem;
    }
    
    .category-name {
        font-size: 0.625rem;
        line-height: 1.1;
    }
    
    .categories-scroll-container {
        gap: var(--spacing-1);
    }
    
    /* Réduire les espacements des cartes de produits */
    .product-info {
        padding: var(--spacing-2) !important; /* Réduire encore plus le padding sur mobile */
        display: flex;
        flex-direction: column;
        gap: 3px !important; /* Espacement très réduit entre les éléments */
        min-height: 0; /* Permettre au flex de gérer la hauteur */
        width: 100% !important;
        box-sizing: border-box !important;
        position: relative;
        z-index: 2 !important; /* S'assurer que le contenu est visible */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .product-name {
        font-size: 0.75rem; /* 12px Mobile */
        margin: 0 !important; /* Supprimer toutes les marges */
        line-height: 1.25 !important; /* Réduire le line-height pour plus de compacité */
        min-height: 2.5em !important; /* Réduire la hauteur minimale */
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .product-category {
        font-size: 0.8125rem;
        margin: 0 !important; /* Supprimer toutes les marges */
        line-height: 1.25 !important; /* Réduire le line-height */
    }
    
    .product-rating {
        margin: 0 !important; /* Supprimer toutes les marges */
        font-size: 0.75rem;
        gap: 1px;
        flex-shrink: 0;
        line-height: 1;
    }
    
    .product-price-display {
        margin: 0 !important; /* Supprimer toutes les marges */
        display: flex;
        justify-content: flex-start; /* Aligner le prix à gauche sans le bouton */
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .product-price-value {
        font-size: 0.9375rem !important; /* Légèrement réduit pour mobile */
        font-weight: 700;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #27ae60; /* Couleur verte cohérente */
        line-height: 1.2;
    }
    
    .btn-product-view {
        display: none; /* Cacher le bouton "Voir" sur mobile - l'article entier est cliquable */
    }
    
    .product-footer {
        margin: 0 !important; /* Supprimer toutes les marges */
        flex-shrink: 0; /* Empêcher la réduction de taille */
        width: 100%;
    }
    
    .product-location {
        word-wrap: break-word;
        word-break: break-word;
        width: 100%;
        font-size: 0.6875rem !important; /* Légèrement plus petit sur mobile */
        line-height: 1.2 !important; /* Réduire le line-height pour plus de compacité */
        margin: 0 !important; /* Supprimer toute marge */
    }
    
    /* S'assurer qu'il n'y a pas de prix en dehors de product-price-display */
    .product-info > .product-price-value {
        display: none;
    }
}

/* ============================================================================
   DESKTOP OPTIMIZATIONS - Prévenir zoom et déformation
   ============================================================================ */

@media (min-width: 1024px) {
    /* ========================================================================
       BANNIÈRES HERO - Contraintes de hauteur max sur desktop
       ======================================================================== */
    
    /* Limiter la hauteur du slider hero sur desktop */
    .hero-slider {
        max-height: 500px; /* Limite la hauteur maximale sur desktop */
        height: 500px; /* Hauteur fixe pour éviter l'étirement */
    }
    
    /* Contrainte de hauteur pour les images de slide */
    .slide-image {
        max-height: 500px; /* Limite la hauteur maximale */
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* ========================================================================
       SECTION VENLLRE - Contraintes de hauteur max sur desktop
       ======================================================================== */
    
    /* Limiter la hauteur des panneaux venllre sur desktop */
    .venllre-banner-large {
        max-height: 400px; /* Limite la hauteur maximale sur desktop */
        height: 300px; /* Hauteur fixe pour éviter l'étirement */
    }
    
    /* Contrainte de hauteur pour les images de panneaux venllre */
    .venllre-panel-image {
        max-height: 400px; /* Limite la hauteur maximale */
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* ========================================================================
       IMAGES PRODUITS - Respect du ratio et contraintes desktop
       ======================================================================== */
    
    /* Optimiser les images produits sur desktop */
    .product-image {
        aspect-ratio: 1 / 1; /* Force le ratio carré */
        max-height: 200px; /* Limite la hauteur maximale sur desktop */
        max-width: 100%; /* S'adapter à la largeur de la carte */
        width: 100%;
        overflow: hidden; /* Garder overflow hidden uniquement pour l'image */
        height: auto; /* Permettre à la hauteur de s'adapter */
    }
    
    /* S'assurer que les images dans les conteneurs produits respectent le ratio */
    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        box-sizing: border-box;
        padding: 0;
        margin: 0;
        border: none;
        max-width: 100% !important;
        max-height: 100% !important;
    }
    
    /* S'assurer que les cartes produits ne se déforment pas */
    .product-card {
        max-width: none; /* Pas de limite sur desktop, la grille gère la largeur */
        min-width: unset; /* Pas de limite minimale sur desktop */
        width: 100%; /* Prendre toute la largeur de la cellule de grille */
        overflow: hidden; /* Garder hidden pour les coins arrondis */
        height: auto; /* Hauteur automatique pour s'adapter au contenu */
    }
    
    .product-link {
        width: 100%;
        height: 100%;
        min-height: 0;
    }
    
    .product-info {
        width: 100%;
        box-sizing: border-box;
        position: relative;
        z-index: 2; /* S'assurer que le contenu est visible */
        visibility: visible;
        opacity: 1;
    }
    
    /* Réduire encore plus l'effet de zoom sur desktop pour éviter les débordements */
    .product-card:hover .product-image img {
        transform: scale(1.05); /* Effet modéré sur desktop */
    }
    
    /* Styles desktop déjà définis plus haut dans la section .products-scroll-container */
}

