/* Définitions de base et couleurs (reprises de style.css) */
:root {
    --primary-color: forestgreen; 
    --secondary-color: forestgreen; 
    --text-color: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
}

.blog-section {
    background-color: var(--light-bg);
}

/* --- GRILLE PRINCIPALE (ARTICLES + SIDEBAR) --- */
.blog-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Articles plus larges que la sidebar */
    gap: 40px;
}

.text-left {
    text-align: left;
}

/* --- FLUX DES ARTICLES --- */
.article-card {
    background: var(--white);
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex; /* Utilisation de flexbox pour l'image et le contenu */
    transition: transform 0.3s, opacity 0.3s;
}

.article-image {
    width: 35%; /* L'image prend un tiers de la carte */
    min-height: 200px;
    background-size: cover;
    background-position: center;
    /* Remplacer la couleur par une image de fond réelle */
}

.article-content {
    width: 65%;
    padding: 25px;
}

.article-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.article-content p {
    color: #666;
    margin-bottom: 15px;
}

.meta {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}
.meta i {
    margin-right: 5px;
}

.read-more {
    color: var(--secondary-color);
    font-weight: bold;
}

/* --- TAGS DE L'ARTICLE --- */
.tags-list {
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e6f0f8;
    color: var(--primary-color);
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tag:hover {
    background-color: #c9e1f5;
}

/* Masquage par JS */
.article-card.hidden {
    display: none;
    opacity: 0;
}

.no-results-message {
    grid-column: 1 / -1; 
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: #888;
}

/* --- SIDEBAR (WIDGETS) --- */
.blog-sidebar {
    height: fit-content;
    position: sticky;
    top: 20px;
}

.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.sidebar-widget h4 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Tags Cloud (pour le filtrage dans la sidebar) */
.tags-cloud .tag-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #eee;
    color: var(--text-color);
    border-radius: 20px;
    margin: 5px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.tags-cloud .tag-link:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Newsletter Widget */
.newsletter-widget input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

.newsletter-widget .btn {
    display: block;
    width: 100%;
}

/* Articles Récents */
.sidebar-widget ul {
    padding-left: 20px;
    list-style: disc;
}

.sidebar-widget ul li {
    margin-bottom: 8px;
}

.sidebar-widget ul li a {
    color: var(--text-color);
}
.sidebar-widget ul li a:hover {
    color: var(--secondary-color);
}


/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: 1fr; 
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .article-card {
        flex-direction: column; 
    }
    
    .article-image, .article-content {
        width: 100%;
        min-height: 150px;
    }
}