/* Variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #0ea5e9;
    --accent-color: #06b6d4;
    --text-dark: #0f172a;
    --text-light: #475569;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #0ea5e9 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-accent: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* Hero Section */
.category-hero {
    position: relative;
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: 2;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(14, 165, 233, 0.9) 100%);
    z-index: 3;
}

.category-header {
    position: relative;
    z-index: 4;
}

.category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--primary-dark);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.category-badge:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.category-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    color: #ffffff;
}

.category-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 500;
}

.category-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 14px 24px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-weight: 600;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Section des Articles */
.articles-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Cartes d'Articles */
.article-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.article-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    color: white;
    font-size: 2rem;
    transform: translateX(-20px);
    transition: transform 0.3s ease;
}

.article-card:hover .image-overlay i {
    transform: translateX(0);
}

.article-content {
    padding: 24px;
}

.article-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.meta-date, .meta-reading-time {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.article-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.view-count {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.read-more:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* État vide */
.empty-state {
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

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

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .category-hero {
        padding: 80px 0 60px;
    }
    
    .category-title {
        font-size: 2.5rem;
    }
    
    .category-description {
        font-size: 1.1rem;
    }
    
    .category-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .articles-section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .category-title {
        font-size: 2rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
}