/* Styles pour la page Blog */

/* Container principal du blog */
.blog-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Styles pour chaque article de blog */
.blog-post {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.blog-post-image {
    height: 250px;
    overflow: hidden;
}

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

.blog-post:hover .blog-post-image img {
    transform: scale(1.05);
}

.blog-post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-post-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.blog-post-content h2 {
    margin: 0 0 15px;
    font-size: 1.5rem;
    color: #5D7B93;
}

.blog-post-content p {
    margin: 0 0 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.read-more {
    margin-top: auto;
    display: inline-block;
    color: #7A9CB3;
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.read-more:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #7A9CB3;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #7A9CB3;
}

.read-more:hover:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.blog-pagination a, .blog-pagination span {
    margin: 0 5px;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

.blog-pagination a:hover {
    background-color: #7A9CB3;
    color: #fff;
}

.blog-pagination .current-page {
    background-color: #5D7B93;
    color: #fff;
}

.prev-page, .next-page {
    font-weight: 600;
}

/* Bouton retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
}

.top-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #5D7B93;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.top-button:hover {
    background-color: #7A9CB3;
}

/* Styles pour les articles individuels */
.blog-article {
    max-width: 1200px;
    margin: 120px auto 40px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Nouvelle section hero pour les articles */
.article-hero {
    position: relative;
    height: 500px;
    color: #fff;
    overflow: hidden;
}

.article-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: scale(1);
    transition: transform 8s ease;
}

.blog-article:hover .article-hero-bg {
    transform: scale(1.05);
}

.article-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
    z-index: 2;
}

.article-hero-content {
    position: relative;
    z-index: 3;
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.article-category-badge {
    display: inline-block;
    background-color: #5D7B93;
    color: #fff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.article-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

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

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

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

.article-content {
    padding: 40px;
}

.article-body {
    line-height: 1.8;
    margin-bottom: 40px;
}

.article-body h3 {
    margin: 30px 0 15px;
    color: #5D7B93;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

/* Navigation entre articles */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prev-article, .next-article, .back-to-blog {
    text-decoration: none;
    color: #5D7B93;
    padding: 10px;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.prev-article, .next-article {
    display: flex;
    flex-direction: column;
    max-width: 40%;
}

.nav-label {
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.nav-title {
    font-weight: 600;
}

.back-to-blog {
    align-self: center;
    background-color: #5D7B93;
    color: white;
    padding: 10px 20px;
}

.prev-article:hover, .next-article:hover {
    background-color: #f5f5f5;
}

.back-to-blog:hover {
    background-color: #7A9CB3;
}

/* Articles associés */
.related-articles {
    background-color: #f9f9f9;
    padding: 30px;
    margin-top: 40px;
}

.related-articles h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #5D7B93;
}

.related-articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-article {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-article:hover {
    transform: translateY(-5px);
}

.related-article a {
    text-decoration: none;
    color: inherit;
}

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

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

.related-article h4 {
    padding: 15px;
    margin: 0;
    font-size: 1rem;
    color: #5D7B93;
}

/* Responsive */
@media (min-width: 768px) {
    .blog-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-post-image {
        height: 200px;
    }
    
    .pagination {
        margin-top: 30px;
    }
    
    .pagination-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .article-hero {
        height: 350px;
    }
    
    .article-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-navigation a {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-post-image {
        height: 180px;
    }
    
    .article-hero {
        height: 300px;
    }
    
    .article-hero-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-category-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-bottom: 15px;
    }
    
    .article-share {
        margin-top: 10px;
    }
    
    .share-btn {
        width: 32px;
        height: 32px;
    }
}
