/* Variables CSS personnalisées */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --gradient-danger: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Navigation personnalisée */
.navbar {
    backdrop-filter: blur(10px);
    background: var(--gradient-primary) !important;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 2px;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-1px);
}

/* Cards améliorées */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    font-weight: 600;
}

/* Boutons personnalisés */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-success {
    background: var(--gradient-success);
}

.btn-danger {
    background: var(--gradient-danger);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    color: white;
    padding: 80px 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 100" fill="%23ffffff" opacity="0.1"><path d="M0,20 Q250,80 500,20 T1000,20 V100 H0 Z"/></svg>');
    background-size: cover;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-form {
    display: flex;
    gap: 10px;
    background: white;
    padding: 8px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 10px;
    outline: none;
}

.search-btn {
    padding: 15px 25px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Badges et tags */
.badge {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

.category-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    margin: 0 5px 5px 0;
    transition: var(--transition);
    font-size: 0.875rem;
}

.category-tag:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-2px);
}

/* Grilles responsives */
.chains-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.chain-card {
    background: white;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.chain-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--primary-color);
}

.chain-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Produits grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

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

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-info {
    padding: 1.5rem;
}

.product-category {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: var(--dark-color);
}

.product-brand {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Prix */
.price-display {
    background: var(--gradient-success);
    color: white;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
    margin: 1rem 0;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.price-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

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

.alert-success {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #064e3b;
}

.alert-danger {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #7f1d1d;
}

.alert-info {
    background: #dbeafe;
    border-left-color: #3b82f6;
    color: #1e3a8a;
}

.alert-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #78350f;
}

/* Map container */
.map-container {
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 0;
}

/* Footer */
.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
}

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

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.footer-bottom {
    padding-top: 1rem;
    text-align: center;
    color: #adb5bd;
}

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

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

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .chains-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}