/* ==========================================================================
   BLOG LIST - Page de liste des articles de blog
   ========================================================================== */

/* Hero section blog */
.blog-hero {
    background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* Statistiques du blog */
.blog-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.articles-main {
    flex: 1;
}

/* Filtres par catégories */
.categories-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 8px 20px;
    border: 2px solid #1a73e8;
    background: white;
    color: #1a73e8;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.category-btn:hover,
.category-btn.active {
    background: #1a73e8;
    color: white;
    text-decoration: none;
}

/* Article en vedette */
.featured-article {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 40px;
}

.featured-image {
    background: linear-gradient(45deg, #1a73e8, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    min-height: 300px;
    position: relative;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    background: #fbbc05;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    width: fit-content;
}

.featured-content h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
    line-height: 1.3;
}

.featured-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.featured-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-link:hover {
    text-decoration: underline;
}

/* Grille des articles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes fixes */
    gap: 30px;
    margin-top: 30px;
}

/* Cartes d'articles */
.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Image de l'article */
.article-image {
    height: 200px;
    background: linear-gradient(45deg, #1a73e8, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-coming {
    background: #fff3cd;
    color: #856404;
}

/* Contenu de l'article */
.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Métadonnées de l'article */
.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.blog-date {
    color: #666;
    font-size: 0.9rem;
    margin-right: 15px;
}

.blog-reading-time {
    color: #666;
    font-size: 0.9rem;
    margin-right: 15px;
}

.blog-reading-time::before {
    content: '⏱️';
    margin-right: 5px;
}

.blog-category {
    background: #1a73e8;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}

.blog-category:hover {
    background: #0d5bbc;
    color: white;
    text-decoration: none;
}

/* Titre de l'article */
.article-title {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
    text-decoration: none;
    line-height: 1.3;
    font-weight: 600;
}

.article-title:hover {
    color: #1a73e8;
    text-decoration: none;
}

/* Extrait de l'article */
.article-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Tags de l'article */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}

.tag:hover {
    background: #bbdefb;
    color: #1976d2;
    text-decoration: none;
}

/* Lien "Lire la suite" */
.read-more {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.read-more:hover {
    text-decoration: underline;
    color: #0d5bbc;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar h3 {
    color: #1a73e8;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

/* Liste sidebar */
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.sidebar-list a:hover {
    color: #1a73e8;
    text-decoration: none;
}

.sidebar-count {
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Newsletter signup */
.newsletter-signup {
    background: linear-gradient(135deg, #1a73e8, #0d5bbc);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: center;
}

.newsletter-signup h4 {
    margin-bottom: 15px;
    color: white;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
}

.newsletter-btn:hover {
    background: #e6a800;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    padding: 20px;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}


.pagination-btn:disabled {
    background: #f8f9fa;
    color: #999;
    cursor: not-allowed;
}

.pagination-btn:disabled:hover {
    background: #f8f9fa;
    color: #999;
    border-color: #ddd;
}

/* Search bar dans sidebar */
.search-widget {
    margin-bottom: 30px;
}

.search-form {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.9rem;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a73e8;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Widget articles populaires */
.popular-posts {
    margin-bottom: 30px;
}

.popular-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-post-item:last-child {
    border-bottom: none;
}

.popular-thumbnail {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #1a73e8, #34a853);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 5px;
    display: block;
}

.popular-title:hover {
    color: #1a73e8;
    text-decoration: none;
}

.popular-date {
    font-size: 0.8rem;
    color: #999;
}

/* Messages d'état */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-articles-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-articles h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Loading state */
.loading-articles {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        order: -1;
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .blog-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .content-grid {
        padding: 0 15px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 60px 0;
    }
    
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .featured-content {
        padding: 25px;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
    
    .newsletter-form {
        gap: 8px;
    }
    
    .newsletter-input,
    .newsletter-btn {
        padding: 8px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   CORRECTIONS BLOG - À ajouter à la fin de blog-list.css
   ========================================================================== */

/* CORRECTION 1 : Grid articles - 2 colonnes au lieu de 3 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* ← 2 colonnes fixes */
    gap: 30px;
    margin-top: 30px;
}

/* CORRECTION 2 : Réduire la taille des icônes/emojis */
.article-image {
    height: 160px; /* ← Réduit de 200px à 160px */
    font-size: 3rem; /* ← Réduit de 3rem à 3rem (déjà bon) */
    background: linear-gradient(45deg, #1a73e8, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.featured-image {
    font-size: 4rem; /* ← Réduit de 4rem */
    background: transparent; /* Featured reste avec fond gradient du parent */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    min-height: 250px; /* Réduit de 300px */
    position: relative;
}

/* CORRECTION 3 : Améliorer les cartes d'articles */
.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Titre plus lisible */
.article-title {
    font-size: 1.3rem; /* ← Augmenté de 1.4rem */
    color: #333;
    margin-bottom: 15px;
    text-decoration: none;
    line-height: 1.4;
    font-weight: 600;
}

/* CORRECTION 4 : Filtres catégories plus visibles et fonctionnels */
.categories-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: flex-start; /* ← Changé de center à flex-start */
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
}

.category-btn:hover {
    background: #e3f2fd;
    color: #1a73e8;
    transform: translateY(-2px);
    text-decoration: none;
}

/* CORRECTION 5 : Featured article amélioré */
.featured-article {
    background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(26, 115, 232, 0.2);
    display: grid;
    grid-template-columns: 1fr; /* ← Une seule colonne pour plus d'espace */
    gap: 0;
    margin-bottom: 50px;
    color: white;
    padding: 40px;
}

.featured-content {
    padding: 0; /* ← Retiré le padding car déjà dans le parent */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    color: white; /* ← Force le blanc */
    margin-bottom: 15px;
}

.featured-content .article-title {
    color: white !important;
    font-size: 2rem;
}

.featured-excerpt {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Tags dans featured */
.featured-article .tag {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    backdrop-filter: blur(10px);
}

/* Bouton featured */
.featured-article .read-more {
    display: inline-block;
    background: white;
    color: #1a73e8;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content;
}

.featured-article .read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sidebar h3:first-child {
    margin-top: 0;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-list li {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sidebar-list a:hover {
    background: #f8f9fa;
    color: #1a73e8;
    padding-left: 25px;
    text-decoration: none;
}

/* Newsletter dans sidebar */
.newsletter-signup,
.newsletter-box {
    background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    text-align: center;
}

.newsletter-box h3 {
    color: white !important;
    margin: 0 0 10px 0 !important;
}

/* CORRECTION 7 : Stats du hero */
.blog-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* CORRECTION 8 : Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1400px; /* ← Augmenté pour plus d'espace */
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   RESPONSIVE - CORRECTIONS
   ========================================================================== */

@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        order: -1; /* Sidebar en haut sur tablette */
    }
    
    .articles-grid {
        grid-template-columns: 1fr; /* ← 1 colonne sur tablette */
    }
    
    .featured-article {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0;
    }
    
    .blog-hero h1 {
        font-size: 2.2rem;
    }
    
    .blog-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-article {
        padding: 25px;
    }
    
    .featured-image {
        font-size: 3rem;
        min-height: 180px;
    }
    
    .featured-content .article-title {
        font-size: 1.5rem !important;
    }
    
    .categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 15px;
        gap: 8px;
    }
    
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .article-image {
        height: 140px;
        font-size: 2.5rem;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 50px 0;
    }
    
    .blog-hero h1 {
        font-size: 1.8rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .featured-article {
        padding: 20px;
    }
    
    .featured-content .article-title {
        font-size: 1.3rem !important;
    }
    
    .article-image {
        height: 120px;
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}