/* ==========================================================================
   1. VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
    --primary-blue: #0d6efd;
    --dark-blue: #0056b3;
    --light-blue: rgba(13, 110, 253, 0.08);
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
	--bg-light: #eeecea;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --radius-lg: 1rem;
    --radius-md: 0.6rem;
}

/* ==========================================================================
   2. STRUCTURE DE BASE (Sticky Footer)
   ========================================================================== */
html, body {
    height: 100%;

	background: 
		/* Lueur centrale accentuée (effet "cœur de l'orage") */
		radial-gradient(circle at center, rgba(160, 210, 255, 0.4) 0%, transparent 60%),
		/* Lueur diffuse en haut à gauche */
		radial-gradient(circle at 15% 15%, rgba(130, 180, 255, 0.3) 0%, transparent 40%),
		/* Dégradé de base "bleu acier" plus texturé */
		linear-gradient(25deg, 
		  rgba(60, 75, 95, 1) 0%, 
		  rgba(90, 105, 125, 1) 30%, 
		  rgba(130, 150, 180, 1) 50%, 
		  rgba(90, 105, 125, 1) 70%, 
		  rgba(60, 75, 95, 1) 100%
		);
	  background-attachment: fixed !important;
	  background-size: cover;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    margin: 0;
	overflow-x: hidden;
}

#app-content {
    flex: 1 0 auto; /* Pousse le footer vers le bas */
	background-color: transparent !important;
	margin-top: 0; /* CORRECTION : Supprime l'espace vide sous le menu */
}

.main-footer {
    flex-shrink: 0;
    background-color: #1a1a1a !important;
    color: #ffffff;
}

/* ==========================================================================
   3. TYPOGRAPHIE & ÉLÉMENTS UI
   ========================================================================== */
.x-small { font-size: 0.75rem; }

.badge-category {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

/* ==========================================================================
   4. NAVIGATION & MEGA MENU
   ========================================================================== */
.main-header {
    background: #eeecea;
    box-shadow: var(--shadow-sm);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--dark-blue) !important;
}

/* Mega Menu Logic */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 25px;
    background: transparent;
}

.mega-menu-link {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    transition: all 0.2s ease-in-out;
    background-color: var(--bg-light);
}

.mega-menu-link:hover {
    background-color: var(--primary-blue);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   5. BOUTIQUE : FILTRES & SIDEBAR
   ========================================================================== */
.filter-sidebar {
    background: #ffffff;
    border-radius: var(--radius-md);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

/* Style spécifique pour le range de prix */
.form-range::-webkit-slider-thumb { background: var(--primary-blue); }
.form-range::-moz-range-thumb { background: var(--primary-blue); }

/* ==========================================================================
   6. GRILLE DE PRODUITS (Cartes)
   ========================================================================== */
.product-card {
    border: none !important;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue) !important;
}

.product-title-hover {
    transition: color 0.2s;
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    font-weight: 600;
}

.product-card:hover .product-title-hover {
    color: var(--primary-blue);
}

/* ==========================================================================
   7. FICHE PRODUIT (DÉTAILS)
   ========================================================================== */
.product-description-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 15px;
}

.product-description-container::-webkit-scrollbar {
    width: 5px;
}

.product-description-container::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 10px;
}

/* ==========================================================================
   8. PANIER & BOUTONS
   ========================================================================== */

/* Animation par défaut pour les lignes du tableau ou conteneurs simples */
.transition-hover:hover {
    transform: translateX(-5px);
    background-color: var(--bg-light);
    transition: all 0.2s ease;
}

/* CORRECTION : Comportement spécifique pour les BOUTONS */
/* On annule le fond gris clair et le décalage à gauche pour les boutons */
button.transition-hover:hover, 
a.btn.transition-hover:hover {
    transform: translateY(-3px) !important; /* On soulève au lieu de glisser */
    background-color: inherit; /* On laisse Bootstrap gérer sa couleur par défaut */
}

/* Force les couleurs pour le bouton bleu (Valider / Payer) */
.btn-primary.transition-hover:hover {
    background-color: var(--dark-blue) !important;
    border-color: var(--dark-blue) !important;
    color: #ffffff !important; /* Force le texte blanc */
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3) !important;
}

/* Force les couleurs pour le bouton rouge (Vider le panier) */
.btn-outline-danger.transition-hover:hover {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3) !important;
}

.qty-input {
    max-width: 50px;
}

/* ==========================================================================
   9. ANIMATIONS & ÉTATS
   ========================================================================== */
.fade-in {
    animation: fadeInAnimation 0.4s ease-out forwards;
}

@keyframes fadeInAnimation {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.cursor-pointer { cursor: pointer; }

/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */
@media (max-width: 991px) {
    .filter-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
        max-height: none;
    }
}