/* ==================================== */
/* Styles Généraux de la Liste Actualités */
/* ==================================== */

.actuality-container h1 {
    margin: 40px 40px 0; /* Marge supérieure ajustée pour espacement */
    color: rgba(11, 41, 81, 1);
    text-align: center;
}

.annees-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    text-align: center;
    margin: 20px 0 40px;
    color: rgba(11, 41, 81, 1);
    font-size: 16px;
}

.annees-navigation a {
    text-decoration: none;
}

/* Conteneur principal de la liste */
.actuality-list-container {
    display: grid;
    /* Adapte le nombre de colonnes (min 250px) */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 20px; /* Ajout d'un padding pour les petits écrans */
}

/* ==================================== */
/* Style de la Vignette d'Actualité */
/* ==================================== */

.actuality-item {
    display: flex;
    flex-direction: column; /* Image au-dessus, contenu en-dessous */
    border-radius: 20px;
    border: 1px solid rgba(39, 142, 225, 1);
    overflow: hidden;
    background-color: rgba(248, 246, 242, 1);
    text-align: center;
    height: 400px; /* Hauteur fixe pour une uniformité */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ajout d'une légère ombre */
}

/* ==================================== */
/* Image : Moitié supérieure (50%) */
/* ==================================== */

/*.actuality-item .image {*/
/*    display: flex;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    width: 100%;*/
/*    !* 50% de la hauteur totale de l'item *!*/
/*    height: 50%;*/
/*    padding: 10px;*/
/*    !* Changement pour simuler la transparence (si l'image n'est pas remplie) */
/*       En réalité, le fond sera la couleur du conteneur parent (.actuality-item) */
/*       ou simplement blanc, selon ce que vous souhaitez voir derrière l'image PNG.*/
/*    *!*/
/*    background-color: transparent;*/
/*}*/

/*.actuality-item .image img {*/
/*    max-width: 100%;*/
/*    max-height: 100%;*/
/*    !* Assure que l'image couvre l'espace sans déformation et est centrée *!*/
/*    object-fit: contain;*/
/*}*/

.actuality-item .image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 50%;

    padding: 10px;
    box-sizing: border-box;

    background-color: white;
    overflow: hidden;
}

.actuality-item .image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
    display: block;
}

/* ==================================== */
/* Contenu (Infos) : Moitié inférieure (50%) */
/* ==================================== */

.actuality-infos {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pour pousser le 'En savoir plus' vers le bas */
    width: 100%;
    /* 50% de la hauteur totale de l'item */
    height: 50%;
    padding: 0;
    background-color: rgba(248, 246, 242, 1);
}

/* Contenu textuel (date/type/titre) */
.actuality-infos .text {
    /* Utilise l'espace restant après la barre date-type */
    flex-grow: 1;
}

.date-type {
    background-color: rgba(39, 142, 225, 1);
    color: white;
    padding: 10px;
    font-family: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px; /* Légèrement réduit */
    font-weight: bold;
}

.actuality-infos h2.titre {
    color: rgba(11, 41, 81, 1);
    font-size: 14px;
    font-weight: 600; /* Plus de poids pour le titre */
    padding: 10px;
    margin: 5px 0;
    text-transform: none;
    /* Limiter le titre à quelques lignes pour ne pas déborder */
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limite à 3 lignes */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lien 'En savoir plus' */
.voir-plus {
    padding: 10px;
    /*border-top: 1px solid rgba(39, 142, 225, 0.3); !* Séparateur subtil *!*/
}

.voir-plus a {
    color: rgba(39, 142, 225, 1);
    text-decoration: none;
    font-weight: bold;
}

.voir-plus a:hover {
    color: orange;
    font-weight: 600;
}

@media screen and (max-width: 768px) {

    .actuality-container {
        padding-top: 0; /* si ton menu fixe cache le titre */
    }

    .actuality-container h1 {
        margin: 20px 15px 10px;
        font-size: 20px;
        line-height: 1.2;
    }

    .annees-navigation {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;

        gap: 6px 10px;

        margin: 15px 10px 25px;
        line-height: 1.5;

        font-size: 13px;
        text-align: center;
    }

    .annees-navigation a {
        display: inline-block;
    }

    .annees-navigation span {
        font-size: 13px !important;
    }

    .actuality-list-container {
        display: flex;
        flex-direction: column;
        gap: 20px;

        width: 100%;
        max-width: 100%;

        margin: 20px 0;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .actuality-item {
        width: 100%;
        height: auto;
        min-height: 0;

        border-radius: 12px;
    }

    .actuality-item .image {
        height: 180px;
        padding: 8px;
    }

    .actuality-infos {
        height: auto;
        min-height: 0;
    }

    .date-type {
        padding: 8px;
        font-size: 11px;
    }

    .actuality-infos h2.titre {
        font-size: 13px;
        line-height: 1.3;

        padding: 10px;
        margin: 0;

        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .actuality-infos .voir-plus {
        padding: 8px 10px 12px;
    }

    .actuality-infos .voir-plus a {
        font-size: 12px;
    }
}