/* =========================================================
   FÉY-LOISIRS
   PAGE GÉNÉRALE DES ACTUALITÉS
   ========================================================= */


/* =========================================================
   VARIABLES LOCALES
   ========================================================= */

body.blog,
body.single-post {
    --fl-news-primary: var(--global-palette1, #008ca3);
    --fl-news-primary-dark: var(--global-palette2, #006f82);
    --fl-news-text: var(--global-palette3, #25252a);
    --fl-news-text-soft: var(--global-palette5, #66666d);
    --fl-news-cream: var(--global-palette8, #faf6ea);
    --fl-news-yellow: var(--global-palette10, #f8c900);
    --fl-news-white: #ffffff;
    --fl-news-border: rgba(0, 140, 163, 0.15);
    --fl-news-shadow: 0 18px 48px rgba(37, 37, 42, 0.09);
}


/* =========================================================
   EN-TÊTE DE LA PAGE
   ========================================================= */

body.blog .entry-hero.post-archive-hero-section {
    background: transparent;
}

body.blog .entry-hero .entry-hero-container-inner {
    min-height: 0;
    padding: clamp(3.5rem, 7vw, 5.5rem) 1.5rem 2rem;
}

body.blog .entry-hero .hero-section-overlay {
    display: none;
}

body.blog .entry-hero .hero-container {
    width: min(1180px, 100%);
    max-width: 1180px;
}

body.blog .post-archive-title {
    text-align: center;
}

body.blog .post-home-title {
    position: relative;
    margin: 0;
    padding-bottom: 1.2rem;
    color: var(--fl-news-text);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

body.blog .post-home-title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 78px;
    height: 5px;
    margin: auto;
    border-radius: 999px;
    background: var(--fl-news-yellow);
}


/* =========================================================
   ZONE PRINCIPALE
   ========================================================= */

body.blog .content-area {
    margin-top: 0;
    margin-bottom: 0;
    padding: 1.5rem 0 clamp(4rem, 7vw, 6rem);
}

body.blog .content-container.site-container {
    width: min(1180px, calc(100% - 3rem));
    max-width: 1180px;
}


/* =========================================================
   GRILLE DES ACTUALITÉS
   ========================================================= */

body.blog #archive-container {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.blog #archive-container > .entry-list-item {
    min-width: 0;
    margin: 0;
}


/* Une seule actualité publiée */

body.blog #archive-container > .entry-list-item:only-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 540px);
}


/* =========================================================
   CARTE D’ACTUALITÉ
   ========================================================= */

body.blog #archive-container article.loop-entry {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--fl-news-border);
    border-radius: 24px;
    background: var(--fl-news-white);
    box-shadow: var(--fl-news-shadow);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

body.blog #archive-container article.loop-entry:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 140, 163, 0.3);
    box-shadow: 0 24px 58px rgba(37, 37, 42, 0.14);
}


/* =========================================================
   IMAGE MISE EN AVANT
   ========================================================= */

body.blog #archive-container .post-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    padding: 0 !important;
    aspect-ratio: 16 / 9;
    background: var(--fl-news-cream);
}

body.blog #archive-container .post-thumbnail-inner {
    width: 100%;
    height: 100%;
}

body.blog #archive-container .post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

body.blog #archive-container article.loop-entry:hover .post-thumbnail img {
    transform: scale(1.035);
}


/* =========================================================
   CONTENU DE LA CARTE
   ========================================================= */

body.blog #archive-container .entry-content-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.6rem;
    border-top: 4px solid var(--fl-news-yellow);
}

/* Pas de seconde séparation jaune lorsqu’une image existe */

body.blog #archive-container article.has-post-thumbnail .entry-content-wrap {
    border-top: 0;
}


/* Catégorie */

body.blog #archive-container .entry-taxonomies {
    margin: 0 0 0.8rem;
}

body.blog #archive-container .category-links a {
    display: inline-flex;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 140, 163, 0.1);
    color: var(--fl-news-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* Titre */

body.blog #archive-container .entry-title {
    margin: 0 0 0.9rem;
    font-size: clamp(1.4rem, 2vw, 1.7rem);
    line-height: 1.25;
}

body.blog #archive-container .entry-title a {
    color: var(--fl-news-text);
    text-decoration: none;
}

body.blog #archive-container .entry-title a:hover,
body.blog #archive-container .entry-title a:focus {
    color: var(--fl-news-primary-dark);
}


/* Métadonnées */

body.blog #archive-container .entry-meta {
    margin: 0 0 1.2rem;
    color: var(--fl-news-text-soft);
    font-size: 0.88rem;
}

/* Le nom technique du compte administrateur n’est pas affiché */

body.blog #archive-container .posted-by {
    display: none;
}

body.blog #archive-container .posted-on {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

body.blog #archive-container .posted-on::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fl-news-yellow);
}


/* Extrait */

body.blog #archive-container .entry-summary {
    margin: 0 0 1.4rem;
    color: var(--fl-news-text-soft);
    line-height: 1.7;
}

body.blog #archive-container .entry-summary p {
    margin: 0;
}


/* Pied et bouton */

body.blog #archive-container .entry-footer {
    margin-top: auto;
}

body.blog #archive-container .entry-actions,
body.blog #archive-container .more-link-wrap {
    margin: 0;
}

body.blog #archive-container .post-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    background: var(--fl-news-primary);
    color: var(--fl-news-white);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

body.blog #archive-container .post-more-link:hover,
body.blog #archive-container .post-more-link:focus {
    background: var(--fl-news-primary-dark);
}

body.blog #archive-container .post-more-link .kadence-svg-iconset {
    margin-left: 0.55rem;
    transition: transform 0.2s ease;
}

body.blog #archive-container article.loop-entry:hover
.post-more-link .kadence-svg-iconset {
    transform: translateX(3px);
}


/* =========================================================
   PAGINATION
   ========================================================= */

body.blog .navigation.pagination {
    margin-top: 3rem;
}

body.blog .navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

body.blog .navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--fl-news-border);
    border-radius: 999px;
    background: var(--fl-news-white);
    color: var(--fl-news-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

body.blog .navigation.pagination .page-numbers.current,
body.blog .navigation.pagination a.page-numbers:hover,
body.blog .navigation.pagination a.page-numbers:focus {
    border-color: var(--fl-news-primary);
    background: var(--fl-news-primary);
    color: var(--fl-news-white);
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media screen and (max-width: 1024px) {

    body.blog #archive-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }

    body.blog #archive-container > .entry-list-item:only-child {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 767px) {

    body.blog .entry-hero .entry-hero-container-inner {
        padding: 2.75rem 1rem 1.5rem;
    }

    body.blog .post-home-title {
        font-size: clamp(2rem, 10vw, 2.7rem);
    }

    body.blog .content-area {
        padding: 1rem 0 3.5rem;
    }

    body.blog .content-container.site-container {
        width: calc(100% - 2rem);
    }

    body.blog #archive-container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    body.blog #archive-container > .entry-list-item:only-child {
        grid-column: auto;
        width: 100%;
        max-width: none;
    }

    body.blog #archive-container article.loop-entry {
        border-radius: 19px;
    }

    body.blog #archive-container .entry-content-wrap {
        padding: 1.3rem;
    }

    body.blog #archive-container .post-more-link {
        width: 100%;
    }
}


/* =========================================================
   ACCESSIBILITÉ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    body.blog #archive-container article.loop-entry,
    body.blog #archive-container .post-thumbnail img,
    body.blog #archive-container .post-more-link,
    body.blog #archive-container .post-more-link .kadence-svg-iconset {
        transition: none;
    }

    body.blog #archive-container article.loop-entry:hover,
    body.blog #archive-container article.loop-entry:hover .post-thumbnail img {
        transform: none;
    }
}

/* =========================================================
   FICHE INDIVIDUELLE D’UNE ACTUALITÉ
   ========================================================= */

body.single-post .content-area {
    margin-top: 0;
    margin-bottom: 0;
    padding: clamp(3rem, 6vw, 5rem) 0;
}

body.single-post .content-container.site-container {
    width: min(1000px, calc(100% - 3rem));
    max-width: 1000px;
}

body.single-post .content-wrap {
    display: block;
}


/* =========================================================
   IMAGE MISE EN AVANT
   ========================================================= */

body.single-post .post-thumbnail.article-post-thumbnail {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    aspect-ratio: 16 / 9;
    background: var(--fl-news-cream);
}

body.single-post .post-thumbnail.article-post-thumbnail .post-thumbnail-inner {
    width: 100%;
    height: 100%;
}

body.single-post .post-thumbnail.article-post-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*
 * Kadence place actuellement le contenu par-dessus l’image.
 * Cette règle annule ce chevauchement.
 */

body.single-post .kadence-thumbnail-position-behind + article.single-entry {
    margin-top: 0;
}


/* =========================================================
   CARTE PRINCIPALE DE L’ARTICLE
   ========================================================= */

body.single-post article.single-entry {
    position: relative;
    z-index: 2;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--fl-news-border);
    border-top: 0;
    border-radius: 0 0 24px 24px;
    background: var(--fl-news-white);
    box-shadow: var(--fl-news-shadow);
}

body.single-post article.single-entry:not(.has-post-thumbnail) {
    border-top: 1px solid var(--fl-news-border);
    border-radius: 24px;
}

body.single-post article.single-entry .entry-content-wrap {
    padding: clamp(1.6rem, 5vw, 3.5rem);
}


/* =========================================================
   EN-TÊTE DE L’ARTICLE
   ========================================================= */

body.single-post article.single-entry .entry-header {
    margin-bottom: 2.25rem;
}

body.single-post article.single-entry .entry-taxonomies {
    margin: 0 0 1rem;
}

body.single-post article.single-entry .category-links a {
    display: inline-flex;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 140, 163, 0.1);
    color: var(--fl-news-primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
}

body.single-post article.single-entry .entry-title {
    position: relative;
    margin: 0;
    padding-bottom: 1.1rem;
    color: var(--fl-news-text);
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

body.single-post article.single-entry .entry-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 72px;
    height: 5px;
    border-radius: 999px;
    background: var(--fl-news-yellow);
}


/* =========================================================
   DATE ET AUTEUR
   ========================================================= */

body.single-post article.single-entry .entry-meta {
    margin-top: 1.25rem;
    color: var(--fl-news-text-soft);
    font-size: 0.9rem;
}

/* Masque le nom technique du compte administrateur */

body.single-post article.single-entry .posted-by {
    display: none;
}

body.single-post article.single-entry .posted-on {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

body.single-post article.single-entry .posted-on::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fl-news-yellow);
}


/* =========================================================
   CONTENU ÉDITORIAL
   ========================================================= */

body.single-post article.single-entry .entry-content {
    color: var(--fl-news-text);
    font-size: 1.05rem;
    line-height: 1.8;
}

body.single-post article.single-entry .entry-content > :first-child {
    margin-top: 0;
}

body.single-post article.single-entry .entry-content p {
    margin-bottom: 1.35rem;
}

body.single-post article.single-entry .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--fl-news-primary-dark);
    font-size: clamp(1.6rem, 3vw, 2rem);
    line-height: 1.3;
}

body.single-post article.single-entry .entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--fl-news-text);
}

body.single-post article.single-entry .entry-content img {
    border-radius: 18px;
}


/* =========================================================
   BOUTON DE RETOUR
   ========================================================= */

body.single-post .fl-news-back {
    margin: 2.5rem 0 0;
}

body.single-post .fl-news-back a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.2rem;
    border: 1px solid var(--fl-news-border);
    border-radius: 999px;
    background: var(--fl-news-white);
    color: var(--fl-news-primary-dark);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

body.single-post .fl-news-back a:hover,
body.single-post .fl-news-back a:focus {
    border-color: var(--fl-news-primary);
    background: var(--fl-news-primary);
    color: var(--fl-news-white);
}


/* =========================================================
   ÉLÉMENTS KADENCE NON RETENUS
   ========================================================= */

/*
 * On remplace la navigation précédent/suivant
 * par le bouton Retour aux actualités.
 */

body.single-post .post-navigation {
    display: none;
}

/*
 * Les publications similaires ne sont pas retenues
 * dans la première version du site.
 */

body.single-post .entry-related {
    display: none;
}

/*
 * Les commentaires ne sont pas utilisés
 * pour les actualités de l’association.
 */

body.single-post .comments-area {
    display: none;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media screen and (max-width: 767px) {

    body.single-post .content-area {
        padding: 2rem 0 3.5rem;
    }

    body.single-post .content-container.site-container {
        width: calc(100% - 2rem);
    }

    body.single-post .post-thumbnail.article-post-thumbnail {
        border-radius: 19px 19px 0 0;
        aspect-ratio: 16 / 9;
    }

    body.single-post article.single-entry {
        border-radius: 0 0 19px 19px;
    }

    body.single-post article.single-entry:not(.has-post-thumbnail) {
        border-radius: 19px;
    }

    body.single-post article.single-entry .entry-content-wrap {
        padding: 1.4rem;
    }

    body.single-post article.single-entry .entry-title {
        font-size: clamp(1.85rem, 9vw, 2.5rem);
    }

    body.single-post article.single-entry .entry-content {
        font-size: 1rem;
        line-height: 1.72;
    }

    body.single-post .fl-news-back a {
        width: 100%;
    }
}