/* ============================================
   ACTUALITE PAGE - Styles spécifiques
   Les styles communs sont dans index.css
   ============================================ */

.article-title {
    margin: 40px;
    margin-bottom: 0px;
}

.article-content {
    margin-bottom: 40px;
}

/* main {
    margin: 50px;
} */
/* 
.container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 0px;
}
 */



/* Main Content */
.news-page {
    max-width: var(--container-width);
    margin: 60px auto;
}


/* --- Section Hero (Bannière) --- */
.hero-banner {
    background: linear-gradient(rgba(0, 85, 150, 0.75),
            rgba(0, 85, 150, 0.75)),
        url('../images/mot-du-coordinnateur.png');
    /* Image avec le pick-up blanc */
    background-size: cover;
    background-position: center;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    border-radius: 5px;
    background-color: var(--primary-blue);
}

.hero-banner h1 {

    font-size: 56px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Sansation';
    font-weight: 700;
}


/* Breadcrumb base styles are now in index.css */
/* Page-specific breadcrumb overrides */
.breadcrumb i {
    margin: 20px;
    font-size: small;
}

/* --- Navigation par Type (Articles, Revues, etc.) --- */
.filters {
    text-align: center;
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-link {
    display: inline-block;
    text-decoration: none;
    font-weight: 400 !important;
    font-size: 14px;
    color: #006DB7 !important;
}



.filter-link:hover {
    background: white;
    color: #006DB7 !important;
    padding: 8px 20px;
    border: 1px solid #006DB7;
    border-radius: 10px;
    font-weight: 400 !important;
}

.no-posts {
    text-align: center;
    width: 100vw;

}



/* --- Grille d'Actualités --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%; /* Hauteur uniforme pour toutes les cartes */
}

.news-card:hover {
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    width: 100%;
    height: 300px; /* Hauteur fixe pour toutes les images */
    overflow: hidden; /* Masquer le débordement */
    flex-shrink: 0; /* Empêche le rétrécissement */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garde le ratio et remplit l'espace */
    display: block;
}

.card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--primary-blue);
    color: white;
    padding: 5px 15px;
    font-size: 14px;
    border-radius: 4px;
    font-family: 'Helvetica';
    font-weight: 700;
    text-transform: capitalize;
    z-index: 2;
}

.badge a {
    text-decoration: none;
    color: white;
}

.card-content {
    padding: 20px;
    color: var(--bg-light);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Prend l'espace restant */
    min-height: 120px; /* Hauteur minimale pour le contenu */
}

.card-content time {
    display: block;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
    font-family: sans-serif;
    font-weight: 400;
}

.card-content h3,
.card-content .card-title {
    font-size: 20px;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.4;
    font-family: 'Sansation';
    font-weight: 700;
    
    /* Limitation à 1 ligne avec points de suspension */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content h3 a,
.card-content .card-title a {
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    
    /* Héritage de la limitation à 1 ligne */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 60px;
}

.pagination button,
.pagination span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-light);
}

.pagination button.active {
    background-color: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* .scroll-top is now in index.css */

/* detail actualuté*/
/* Main Content */
.single-actualite {
    /*
    max-width: var(--container-width);
    margin: 60px 50px;
    */
    text-align: center;
}

.single-actualite .article-header {
    text-align: center;
    /* max-width: 900px; */
    margin-bottom: 40px;
    border: 2px salmon;
    align-items: center;
}





.category-tag {
    display: inline-block;
    background-color: #E6F0FF;
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    display: none;
}

.article-title {
    font-family: 'Sansation';
    font-size: 42px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    color: #292929;

}

.article-title span {
    font-family: 'Helvetica';
    text-transform: lowercase;
    font-size: 14px;
    font-weight: 400;
}

.date {
    margin-top: 16px;
    gap: 16px;
    color: var(--text-light);
    font-family: 'Helvetica';
    text-transform: lowercase;
    font-size: 14px;
    font-weight: 400;
}

.lire {
    color: #0056b3;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.lire::before {
    content: "\25CF";
    margin-right: 8px;
}

.article-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;

}

.featured-image-container {
    /* width: 100%; */
    height: 516px;
    border-radius: 12px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    align-items: center;
    object-fit: cover;

}

.article-body {
    max-width: 800px;
    text-align: justify;
    margin: auto;
    /* Align left or center? Description didn't specify, assuming left aligned to title for now or usually centered. Let's stick to readable width */
}

.article-body p {
    margin-bottom: 24px;
    font-size: 18px;
    color: #333;
    line-height: 1.8;
}

/* Related News */
.related-news {
    background-color: var(--bg-light);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.related-container {
    /* max-width: var(--container-width); */
    margin: 0 var(--section-margin);
    /* padding: 0 20px; */
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #111;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.card-image {
    height: 240px;
    background-color: #ddd;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 600;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: #111;
    
    /* Limitation à 1 ligne avec points de suspension */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title a {
    color: #111;
    text-decoration: none;
    display: block;
    
    /* Héritage de la limitation à 1 ligne */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
}

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


@media (max-width: 992px) {
    .hero-banner {
        height: 200px;
    }

    .hero-banner h1 {
        font-size: 48px;
    }

    .article-title {
        font-size: 32px;
    }

    .featured-image-container {
        height: 400px;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .article-title {
        font-size: 28px;
        margin: 0px;
        margin-bottom: 0px;
    }

    .featured-image-container {
        height: 300px;
        margin: 0 calc(var(--section-margin) * 0.5);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .related-container {
        /* max-width: var(--container-width); */
        margin: 0 calc(var(--section-margin)*0.5);
        /* padding: 0 20px; */
    }
}




/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-banner {
        height: 150px;
    }

    .hero-banner h1 {
        font-size: 2rem;
        margin: 0px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .filter-btn {
        margin-bottom: 10px;
        width: 45%;
    }

    /* Filters container défilant horizontalement */
    .filters-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 15px;
        gap: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .filters-container::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari */
    }

    .filter-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

.badge::before {
    content: "";
    margin-right: 0;
}

@media (max-width: 480px) {
    .hero-banner {
        height: 120px;
    }

    .hero-banner h1 {
        font-size: 1.5rem;
    }
}