/* Styles pour le widget Archive d'Actualités */

/**
 * STRUCTURE PRINCIPALE
 * Organisation des colonnes et conteneurs principaux du widget
 */
.fs-posts-archive {
    width: 100%;
    font-family: inherit;
}

/**
 * CONTENEUR PRINCIPAL
 * Définition du conteneur principal du widget
 */
.fs-posts-archive-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
}

/**
 * COLONNES PRINCIPALES
 * Définition des colonnes principales du widget
 */
.fs-posts-archive .main-column {
    width: 75%;
}

.fs-posts-archive .sidebar-column {
    width: 25%;
}

/**
 * STYLES DES CARTES D'ACTUALITÉS
 * Styles communs à toutes les cartes (standard, featured, sticky)
 */
.fs-posts-archive .post-card {
    background-color: #fff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/**
 * LIEN CLIQUABLE SUR TOUTE LA CARTE
 * Rend toute la carte cliquable en utilisant le lien à l'intérieur
 */
.fs-posts-archive .post-card .card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/**
 * EFFETS DE SURVOL
 * Définition des effets de survol pour les cartes
 */

.fs-posts-archive .post-card:hover {
    transform: translateY(-3px);
    /* cursor: pointer; */
}

.fs-posts-archive .post-card.hovered {
    transform: translateY(-5px);
}

/**
 * CARTE MISE EN AVANT (FEATURED)
 * Styles spécifiques pour les cartes mises en avant en haut de page
 * Ces cartes ont un layout horizontal et des couleurs distinctives
 */
.fs-posts-archive .featured-posts {
    margin-bottom: 20px;
}

.fs-posts-archive .post-card.featured {
    margin-bottom: 30px;
    background-color: #f8f9fa;
    border-left: 4px solid #0073aa;
}

.fs-posts-archive .featured-card-container {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.featured-card-container a {
    width: 50%;
}

.fs-posts-archive .featured-image {
    width: 100%;
    height: 100%;
    max-height: 300px;
}

.fs-posts-archive .featured-image img {
    border-radius: 20px;
}

.fs-posts-archive .featured-content {
    width: 50%;
    padding: 30px;
    background-color: #f8f9fa;
}

.fs-posts-archive .featured-content .post-title {
    margin-bottom: 5px;
}

.fs-posts-archive .featured-content .post-excerpt {
    font-size: 1.05em;
    line-height: 1.7;
}

.fs-posts-archive .featured-content .read-more-link {
    color: white;
    font-weight: 600;
}

.fs-posts-archive .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/**
 * POSTS ÉPINGLÉS (STICKY)
 * Styles spécifiques pour les cartes épinglées
 * Ces cartes ont une bordure et un fond distinctifs
 */
.fs-posts-archive .sticky-posts {
    margin-bottom: 30px;
}

.fs-posts-archive .post-card.sticky {
    border-left: 4px solid #e9b44c;
    background-color: #fffdf7;
}

.fs-posts-archive .post-card.sticky .post-content {
    padding: 25px;
}

/**
 * CARTES STANDARDS
 * Organisation en grille ou flex des cartes standards
 */
.fs-posts-archive .posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fs-posts-archive .posts-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.fs-posts-archive .posts-flex .post-card {
    flex: 0 0 calc(33.333% - 20px);
    margin-bottom: 20px;
}

.fs-posts-archive .standard-card-container .post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}

.fs-posts-archive .standard-card-container .post-content {
    padding: 20px;
    position: relative;
    z-index: 0;
}

/**
 * STYLES COMMUNS POUR LES CARTES
 * Typographie, espacements et couleurs partagés par tous les types de cartes
 * IMPORTANT: Les couleurs des titres sont configurables via Elementor
 */
.fs-posts-archive .post-date {
    width: 100%;
    font-size: 0.9em;
    color: #666;
    margin-bottom: -15px;
}

.fs-posts-archive .date {
    min-width: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3px;
    border: solid 1px rgba(255, 255, 255, 0.3);
}

.fs-posts-archive .date .day {
    color: #F3BE72;
    font-family: "Lato", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 900;
    line-height: 24px;
    margin-bottom: 3px;
}

.fs-posts-archive .date .separator {
    display: block;
    position: absolute;
    width: 10px;
    height: 1px;
    background-color: #fff;
}

.fs-posts-archive .date .month {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.80);
    font-family: "Lato", sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
}

.fs-posts-archive .post-title {
    width: 80%;
    font-size: 1.4em;
    margin-bottom: 5px;
    line-height: 1.3;
    margin-top: -15px;
}

.fs-posts-archive .post-title a {
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* Suppression de color: inherit pour permettre l'application des couleurs d'Elementor */
}

.fs-posts-archive .post-title a:hover {
    /* Couleur gérée par Elementor */
    text-decoration: none;
}

/* Style des liens de titre */
.fs-posts-archive .post-card .post-title a {
    text-decoration: none;
    transition: color 0.3s ease;
    color: #134169;
}

/* Indication visuelle que la carte est cliquable */
.fs-posts-archive .post-card:hover .read-more-link {
    text-decoration: underline;
}

.fs-posts-archive .post-excerpt {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.fs-posts-archive .post-more {
    margin-top: auto;
}

.fs-posts-archive .read-more-link {
    display: inline-block;
    color: #134169;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.fs-posts-archive .post-card:hover .read-more-link::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.fs-posts-archive .post-card:hover .read-more-link {
    color: #0073aa;
}

/**
 * AGENDA
 * Styles pour la section agenda dans la sidebar
 */
.fs-posts-archive .agenda-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
}

.fs-posts-archive .agenda-title {
    margin: 0 0 20px;
}

/* Accordéon */
.fs-posts-archive .accordion-item {
    margin-bottom: 10px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.fs-posts-archive .accordion-item:last-child {
    border-bottom: none;
}

.fs-posts-archive .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.fs-posts-archive .header-content,
.fs-posts-archive .simple-event .header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.fs-posts-archive .simple-event {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.fs-posts-archive .title-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fs-posts-archive .accordion-header .title,
.fs-posts-archive .simple-event .title {
    margin: 0;
    color: #FFF;
    font-family: "Lato", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
    line-height: 24px;
    display: block;
}

.fs-posts-archive .voir-plus {
    color: rgba(255, 255, 255, 0.6);
    font-family: "Lato", sans-serif;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 16px;
    margin-top: 4px;
}

.fs-posts-archive .accordion-icon {
    transition: transform 0.3s ease;
}

.fs-posts-archive .accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.fs-posts-archive .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.fs-posts-archive .accordion-content.active {
    max-height: 500px;
}

.fs-posts-archive .accordion-body {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
}

/* Media queries pour la compatibilité mobile */
@media screen and (max-width: 767px) {
    .fs-posts-archive .post-date {
        width: auto;
        margin-right: 10px;
    }




    .fs-posts-archive .header-content {
        gap: 10px;
    }

    .fs-posts-archive .simple-event {
        gap: 10px;
    }

    .fs-posts-archive .accordion-header .title,
    .fs-posts-archive .simple-event .title {
        font-size: 1em;
    }
}

/**
 * PAGINATION
 * Styles pour les contrôles de pagination en bas de page
 */
.fs-posts-archive .pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
    background-color: rgba(247, 247, 247, 1);
}
.fs-posts-archive .pagination-container::after {
    content: "";
    display: block;
    position: absolute;
    width: 100vw;
    height: 100%;
    max-height: 36px;
    background-color: rgba(247, 247, 247, 1);
    right: 100%;
}
.fs-posts-archive .pagination-container::before {
    content: "";
    display: block;
    position: absolute;
    width: 100vw;
    height: 100%;
    max-height: 36px;
    background-color: rgba(247, 247, 247, 1);
    left: 100%;
}


.fs-posts-archive .pagination-container .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    margin: 0 5px;
    padding: 0 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.fs-posts-archive .pagination-container .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.fs-posts-archive .pagination-container .page-numbers:hover {
    background-color: #f5f5f5;
    border-color: #0073aa;
}

.fs-posts-archive .pagination-container .prev,
.fs-posts-archive .pagination-container .next {
    font-weight: bold;
}

/**
 * RESPONSIVE
 * Adaptations pour tablettes (max-width: 1024px) et mobiles (max-width: 767px)
 */
@media (max-width: 1024px) {

    .post-title {
        width: 100%;
    }

    .fs-posts-archive-container {
        gap: 20px;
    }

    .fs-posts-archive .main-column {
        width: 70%;
    }

    .fs-posts-archive .sidebar-column {
        width: 30%;
    }

    .fs-posts-archive .featured-card-container {
        flex-direction: column;
    }

    .featured-card-container a {
        width: 100%;
    }

    .fs-posts-archive .featured-image,
    .fs-posts-archive .featured-content {
        width: 100%;
    }

    .fs-posts-archive .featured-image img {
        max-height: 300px;
    }

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

    .fs-posts-archive .posts-flex .post-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 980px) {

    .fs-posts-archive .post-title {
        width: 100%;
    }

    .fs-posts-archive-container {
        flex-direction: column-reverse;
    }

    .fs-posts-archive .main-column,
    .fs-posts-archive .sidebar-column {
        width: 100% !important;
    }

    .fs-posts-archive .posts-grid {
        grid-template-columns: 1fr;
    }

    .fs-posts-archive .posts-flex .post-card {
        flex: 0 0 100%;
    }

    .fs-posts-archive .featured-content {
        padding: 20px;
    }

    /* Ajuster l'agenda pour qu'il soit plus visible sur mobile */
    .fs-posts-archive .agenda-container {
        margin-top: 30px;
    }
}