/* Styles pour le blog */

.blog-main {
    padding: 2rem 0;
    background-color: var(--background);
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* En-tête du blog */
.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.blog-intro {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-light);
    line-height: 1.6;
}

/* Grille du blog */
.blog-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* Section des articles */
.articles-section {
    margin-bottom: 2rem;
}

.section-title {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Carte d'article */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.article-image {
    height: 200px;
    overflow: hidden;
}

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

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

.article-category {
    margin: 1rem 1rem 0;
}

.article-category a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.article-category a:hover {
    background-color: var(--primary);
    color: white;
}

.article-title {
    margin: 0.5rem 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

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

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

.article-meta {
    margin: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-excerpt {
    margin: 0.5rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin: 0.5rem 1rem 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.sidebar-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.2rem;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories-list li a:hover {
    color: var(--primary);
}

.categories-list li.active a {
    color: var(--primary);
    font-weight: 500;
}

.count {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Articles populaires */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-article {
    display: flex;
    gap: 1rem;
}

.popular-article-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.popular-article-content {
    flex: 1;
}

.popular-article-content h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.popular-article-content h4 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-article-content h4 a:hover {
    color: var(--primary);
}

.popular-article-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Newsletter */
.newsletter-section {
    background: var(--primary-light);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: white;
}

/* Article individuel */
.article-single {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.article-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.article-title {
    font-size: 2rem;
    margin: 0 0 1rem;
    color: var(--text);
    line-height: 1.3;
}

.article-featured-image {
    margin: 0 -2rem 2rem;
    height: 400px;
    overflow: hidden;
}

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

.article-content {
    color: var(--text);
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    margin: 2rem 0 1rem;
    color: var(--text);
}

.article-content h3 {
    margin: 1.5rem 0 1rem;
    color: var(--text);
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: var(--background-light);
    font-style: italic;
}

.article-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: var(--primary);
    color: white;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.share-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-button.facebook {
    background-color: #3b5998;
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.linkedin {
    background-color: #0077b5;
}

.share-button.email {
    background-color: #777;
}

/* Articles liés */
.related-articles {
    margin-bottom: 2rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-article-image {
    height: 180px;
    overflow: hidden;
}

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

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

.related-article-content {
    padding: 1rem;
}

.related-article-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

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

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

.related-article-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Sidebar pour l'article */
.article-sidebar {
    margin-top: 2rem;
}

/* Messages d'état */
.no-articles {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
        margin-top: 2rem;
    }
    
    .article-featured-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .articles-grid,
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-single {
        padding: 1.5rem;
    }
    
    .article-featured-image {
        margin: 0 -1.5rem 1.5rem;
        height: 250px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}