/* Variables CSS */
:root {
    --primary: #2c5aa0;
    --primary-dark: #1e3d72;
    --secondary: #ff6b6b;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
}
/* Catégories */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.category-card .category-icon {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%; /* Cercle parfait */
    border: 2px solid #ffffff;
    padding: 5px;
    background-color: #f8f9fa;
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}
/* Popup confirmation panier */
#cart-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centrage exact */
    width: 300px;
    max-width: 90%;
    text-align: center;
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    z-index: 1050;
    display: none; /* Toujours caché par défaut */
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

#cart-confirmation .bi-check-circle-fill { 
    font-size: 3rem; 
    color: green; 
    margin-bottom: 10px;
}

#cart-confirmation h5 {
    font-weight: bold;
    margin-bottom: 15px;
}

#cart-confirmation .d-flex { 
    width: 100%;
    justify-content: space-between;
}

#cart-confirmation button, 
#cart-confirmation a { 
    width: 48%; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}
/* Texte catégorie */
.category-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.category-card p {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Gestion responsive */
@media (max-width: 768px) {
    .category-card .category-icon {
        width: 60px;
        height: 60px;
    }
    .category-card h4 {
        font-size: 1rem;
    }
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #ffffff;
}

/* Header */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: var(--secondary);
}

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Cart */
.cart-badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
}

/* Cards */
.product-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

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

.product-image {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Badges */
.badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    font-size: 0.8rem;
    padding: 0.5em 0.8em;
}

/* Price */
.price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.old-price {
    color: var(--gray);
    text-decoration: line-through;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    padding: 0.75rem 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Category Cards */
.category-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
    padding: 2rem 1rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Loading */
.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Cart Items */
.cart-item {
    transition: var(--transition);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.cart-item:hover {
    background-color: var(--light);
}

.quantity-input {
    max-width: 80px;
    text-align: center;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #000 100%);
    color: white;
    padding: 3rem 0 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

/* Product Gallery */
.product-gallery .main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.thumbnail {
    transition: var(--transition);
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card {
        margin-bottom: 1.5rem;
    }
    
    .cart-item {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Alertes personnalisées */
.alert-custom {
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
}

/* Filtres */
.filter-section {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.filter-section .form-label {
    font-weight: 600;
    color: var(--dark);
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Stock indicators */
.stock-high { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--danger); }