/*
Theme Name: ape-fontenilles
Theme URI: 
Author: Winseo
Author URI: https://winseo.fr
Description: Thème agence pour le Full Site Editing
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 8.0
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: winseo_
*/

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}
.win-dp-none{display:none !important;}
/* =========================
   Variables communes
   À PERSONNALISER : adapter ou supprimer selon les décors du projet.
   Garder le format de chemin racine-relatif (/wp-content/...) plutôt
   qu'une URL en dur, pour que ça survive à la migration de domaine.
========================= */
:root {
    --win-border-img: clamp(5px, 3.183px + 0.568vw, 10px);
}

/********** BOUCLE EVENEMENTS PAGE ACCUEIL ***/
.ape-carte-rdv .wp-block-post-excerpt__more-text,
.ape-liste-agenda .wp-block-post-excerpt__more-text {
    display: none;
}

/* Événements dynamiques – boucles de requête */
.ape-liste-agenda {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ape-liste-agenda>li {
    margin: 0;
}

.ape-liste-agenda .ape-pastille-date {
    background: var(--wp--preset--color--jaune-doux);
    color: var(--wp--preset--color--primary);
    transform: rotate(-3deg);
}

.ape-liste-agenda>li:nth-child(4n+2) .ape-pastille-date {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--white, #fff);
    transform: rotate(2deg);
}

.ape-liste-agenda>li:nth-child(4n+3) .ape-pastille-date {
    background: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--white, #fff);
    transform: rotate(-2deg);
}

.ape-liste-agenda>li:nth-child(4n+4) .ape-pastille-date {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white, #fff);
    transform: rotate(3deg);
}

/* Carte « Prochain rendez-vous » : espacements dans la boucle */
.ape-carte-rdv .wp-block-post>* {
    margin-block: 0;
}

.ape-carte-rdv .wp-block-post>*+* {
    margin-block-start: 1.25rem;
}

/* Agenda : titre et extrait collés, comme sur la maquette */
.ape-ligne-texte>* {
    margin-block: 0;
}

.ape-ligne-texte .wp-block-post-excerpt__excerpt {
    margin: 0;
}

/* Étiquettes de catégorie : même couleur partout (agenda + dernières infos) */
.wp-block-post-terms.ape-etiquette,
.wp-block-post .ape-article-categories a {
    background: var(--wp--preset--color--peche);
}

/* par défaut */
.category-evenements .wp-block-post-terms.ape-etiquette,
.category-evenements .ape-article-categories a {
    background: var(--wp--preset--color--jaune-doux);
}

.category-ecole .wp-block-post-terms.ape-etiquette,
.category-ecole .ape-article-categories a {
    background: var(--wp--preset--color--bleu-pale);
}

.wp-block-post-terms.ape-etiquette a {
    text-decoration: none;
    color: inherit;
}

/********************************************
                    GENERAL 
**********************************************/
/*_______ BTN RETOUR EN HAUT_________*/
.back-to-top {
    position: fixed;
    bottom: var(--wp--preset--spacing--m);
    right: var(--wp--preset--spacing--s);
    width: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    z-index: 9;
}

.back-to-top.is-anchored {
    position: absolute;
    bottom: auto;
}

/*________________ TARGET_____________*/
:target {
    scroll-margin-top: 100px;
}

/*_______ CLASSES UTILITAIRES_________*/
.max-20 {
    max-width: 20vw;
}

.win-translateY-50 {
    transform: translateY(50%);
}

.win-translateY-offset50 {
    transform: translateY(-50%);
}

.win-zi-5 {
    z-index: 5;
    position: relative;
}

.win-zi-100 {
    z-index: 100;
    position: relative;
}

.win-border {
    border: var(--win-border-img) solid #fff;
}


/*_______ CORE/COLUMNS_________*/
.wp-block-columns {
    row-gap: var(--wp--preset--spacing--m);
    column-gap: var(--wp--preset--spacing--l);
}

/*_______ CORE/DETAILS_________*/
.win-details summary:not(.wp-block-details.is-style-p-list summary) {
    padding-bottom: var(--wp--preset--spacing--xs);
    border-bottom: 1px solid var(--wp--preset--color--primary);
}

/*________________ CORE/LINK_____________*/
a[aria-current=page] {
    color: var(--wp--preset--color--primary) !important;
}

.wp-block-navigation a[aria-current=page] {
    /* Page active : surligneur jaune permanent, sans soulignement */
    text-decoration: none;
    background-size: 100% 100%;
}

a[aria-current=page]:hover {
    font-weight: inherit;
}

/*________________ CARTE / QUERY LOOP CLIQUABLE_____________
  Pattern générique : une Query Loop dont chaque carte de résultat
  est entièrement cliquable via un lien en position absolute par-dessus.
  Garder les classes .carte-portfolio / .carte-lien comme convention
  commune à tous les projets, ou renommer en .carte-link / .card-link
  si on veut un nom plus neutre que "portfolio" pour les projets sans
  portfolio.
*/
.wp-block-post .carte-portfolio {
    position: relative;
}

.carte-lien {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    font-size: 0;
    background: transparent;
}

.wp-block-post.a-un-lien .carte-portfolio {
    cursor: pointer;
}

/********************************************
                    MENU 
**********************************************/
.wp-block-navigation__submenu-container {
    min-width: 16rem !important;
    top: calc(100% + 0.75rem) !important;
    border: none !important;
    border-radius: 1.25rem;
    padding: 0.5rem 0;
    background: var(--wp--preset--color--white) !important;
    box-shadow: var(--wp--preset--shadow--carte) !important;
}

.wp-block-navigation-item.has-child>.wp-block-navigation__submenu-container {
    left: 0 !important;
    right: auto !important;
}

/* Logo et bouton Contact ne rétrécissent pas, uniquement dans l'en-tête
   (appliqué partout, la règle empêchait les groupes de boutons de passer à la ligne) */
.ape-header .wp-block-site-logo,
.ape-header .wp-block-buttons {
    flex-shrink: 0 !important;
}

.wp-block-site-logo img {
    height: 4.5rem !important;
    width: auto !important;
    max-width: none !important;
}

.wp-block-navigation .wp-block-navigation__container {
    row-gap: var(--wp--preset--spacing--s) !important;
}

/*________________ MENU MOBILE_____________*/
/* 1. Le sous-menu repasse dans le flux, pleine largeur, sans décalage latéral */
.wp-block-navigation__overlay-container .wp-block-navigation.is-vertical .wp-block-navigation__submenu-container {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    flex-basis: 100%;
    min-width: 0;
    box-shadow: none;
    background: transparent;
}

/* 2. On autorise le <li> à faire passer le sous-menu sous le bouton */
.wp-block-navigation__overlay-container .wp-block-navigation.is-vertical .wp-block-navigation-item.has-child {
    flex-wrap: wrap;
}

/*________________ TAILLE ICON HAMBURGER_____________*/
.wp-block-navigation__responsive-container-open svg {
    width: 40px;
    height: 40px;
}

/********************************************
                 HEADER APE
**********************************************/
.ape-header {
    position: relative;
    z-index: 10;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 0.25rem 1.25rem rgba(37, 59, 110, 0.06);
}

.ape-header-droite {
    gap: 1.75rem;
}

.ape-header .wp-block-navigation {
    font-weight: 600;
}

.ape-header .wp-block-navigation__container {
    column-gap: 1.75rem;
}

.ape-header .wp-block-button__link {
    padding: 0.625rem 1.375rem;
}

/********************************************
                 FOOTER APE
**********************************************/
.ape-footer {
    position: relative;
    text-align: center;
    margin-top: 0 !important;
    padding-top: var(--wp--preset--spacing--l);
    padding-bottom: 1rem;
}

/* Blobs décoratifs : pseudo-éléments, aucun fichier image.
   Footer sans fond (même crème que la page) : la jaune déborde vers le haut
   sur la section précédente ; la pêche s'arrête au bas de la page pour ne
   pas allonger le défilement. */
.ape-footer::before,
.ape-footer::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.ape-footer::before {
    left: -6rem;
    top: -10rem;
    width: 26rem;
    height: 22rem;
    background: var(--wp--preset--color--jaune-doux);
    border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
}

.ape-footer::after {
    right: -8rem;
    bottom: 0;
    width: 26rem;
    height: 14rem;
    background: var(--wp--preset--color--peche);
    border-radius: 50% 50% 0 0 / 13rem 13rem 0 0;
}

@media (width < 600px) {
    .ape-footer::before {
        scale: 0.6;
        transform-origin: left top;
    }

    .ape-footer::after {
        scale: 0.6;
        transform-origin: right bottom;
    }
}

.ape-footer p {
    margin: 0;
}

.ape-footer-titre {
    font-size: var(--wp--preset--font-size--xl);
    font-weight: 700;
    line-height: 1.2;
}

.ape-btn-mail .wp-block-button__link {
    font-size: var(--wp--preset--font-size--s);
    padding: 1rem 2rem;
}

.ape-footer-liens {
    gap: 0.5rem 1.75rem;
    margin-top: var(--wp--preset--spacing--m) !important;
    font-weight: 600;
    font-size: 0.9375rem;
}

.ape-footer-bas {
    gap: 0.5rem 1.5rem;
    margin-top: var(--wp--preset--spacing--m) !important;
    padding-top: 1rem;
    border-top: 1px solid var(--wp--preset--color--peche);
    font-size: var(--wp--preset--font-size--xxs);
}

.ape-footer-bas a {
    font-weight: 500;
}

/* Menu mobile (overlay) */
.ape-overlay {
    padding: 1.5rem;
}

.ape-overlay .wp-block-navigation {
    font-weight: 600;
    font-size: var(--wp--preset--font-size--m);
    margin-block: var(--wp--preset--spacing--m);
}

/* =========================
   Separateur de Colonnes
========================= */
.separator-3col {
    gap: var(--wp--preset--spacing--s) 0;
}

.separator-3col .wp-block-column:not(:last-child) {
    border-right: 1px solid var(--wp--preset--color--primary);
    padding-right: var(--wp--preset--spacing--s);
}

.separator-3col .wp-block-column:not(:first-child) {
    padding-left: var(--wp--preset--spacing--s);
}

@media (max-width: 767px) {
    .separator-3col .wp-block-column:not(:last-child) {
        border-right: none;
        padding-right: 0;
    }

    .separator-3col .wp-block-column:not(:first-child) {
        padding-left: 0;
    }
}

/********************************************
                   RESPONSIVE 
**********************************************/
@media (width < 1281px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (width > 1024px) {
    .hide-on-desktop {
        display: none !important;
    }
}

@media (width < 1025px) {
    .hide-on-tablet {
        display: none !important;
    }

    .win-margin-mobile {
        padding-left: 10vw !important;
        padding-right: 10vw !important;
    }

    .win-center-mobile {
        text-align: center;
        margin: auto !important;
    }

    .win-reverse {
        -webkit-flex-direction: column-reverse;
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
    }

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

@media (width < 600px) {
    .responsive-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .hide-on-mobile {
        display: none !important;
    }
}

/********************************************
        COMPOSANTS APE (contenu des pages)
**********************************************/
.ape-intro {
    font-size: 1.1875rem;
    max-width: 36rem;
}

.ape-section-texte {
    max-width: 40rem;
}

.ape-petit {
    font-size: 0.9375rem;
}

.ape-gras {
    font-weight: 600;
}

/* Icône dans une pastille pastel */
.wp-block-group.ape-icone {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    align-items: center;
}

.ape-icone .wp-block-image {
    margin: 0;
}

.ape-icone img {
    display: block;
}

/* Carte entièrement cliquable : le lien du titre couvre toute la carte */
.ape-carte-lien {
    position: relative;
}

.ape-carte-lien .ape-lien a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.ape-carte-lien .ape-lien a {
    text-decoration: none;
}
/* Pastille de catégorie cliquable au-dessus du lien qui couvre la carte */
.ape-carte-lien .wp-block-post-terms {
    position: relative;
    z-index: 3;
    width: fit-content;
}
/* Pastilles de catégorie : léger rétrécissement au survol */
.wp-block-post-terms.ape-etiquette,
.ape-article-categories a {
    display: inline-block;
    transition: transform 0.2s ease;
}

.wp-block-post-terms.ape-etiquette:hover,
.ape-article-categories a:hover {
    transform: scale(0.9);
}

@media (prefers-reduced-motion: reduce) {

    .wp-block-post-terms.ape-etiquette,
    .ape-article-categories a {
        transition: none;
    }
}

/* Accès rapides */
.wp-block-group.ape-acces {
    padding: 1.25rem;
    gap: 1rem;
    border-radius: 1.5rem;
    align-items: center;
}

.ape-acces p {
    margin: 0;
}

.ape-acces-titre {
    font-weight: 600;
    font-size: 1.125rem;
}

/* Pastille date */
.wp-block-group.ape-pastille-date {
    width: 4.25rem;
    height: 4.25rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    transform: rotate(-3deg);
}

.ape-pastille-date p {
    margin: 0 !important;
}

.ape-pastille-date p:first-child {
    font-size: 1.75rem;
}

.ape-pastille-date p:last-child {
    font-size: 1.1875rem;
}

.wp-block-group.ape-pastille-date--grande {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1.25rem;
    transform: rotate(-4deg);
    box-shadow: 0 0.5rem 1.25rem rgba(37, 59, 110, 0.18);
}

.ape-pastille-date--grande p:first-child {
    font-size: 2.5rem;
}

.ape-pastille-date--grande p:last-child {
    font-size: 1.25rem;
    letter-spacing: 0.04em;
}

/* Carte « Prochain rendez-vous » */
.ape-carte-rdv .is-style-surtitre {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.wp-block-group.ape-rdv-ligne {
    gap: 1.25rem;
    align-items: center;
}

.ape-rdv-ligne h2,
.ape-rdv-ligne p {
    margin: 0;
}

/* Lignes d'agenda */
.wp-block-group.ape-ligne-agenda {
    padding: 1rem 1.5rem 1rem 1rem;
    gap: 0.75rem 1.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--wp--preset--shadow--carte);
}

.ape-ligne-texte {
    flex: 1 1 16rem;
}

.ape-ligne-texte p {
    margin: 0;
}

.ape-ligne-titre {
    font-weight: 600;
    font-size: 1.25rem;
}

.ape-ligne-titre a {
    text-decoration: none;
}

/* Étiquettes */
.ape-etiquette {
    display: inline-block;
    margin: 0;
    padding: 0.25rem 0.875rem !important;
    border-radius: var(--wp--custom--radius--full);
    font-size: 0.875rem;
    font-weight: 700;
}

.wp-block-post-terms.ape-etiquette a {
    text-decoration: none;
    color: inherit;
}

/* Cartes avec visuel (événements, articles) */
.wp-block-group.ape-carte-visuel {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.ape-carte-visuel .wp-block-image,
.ape-carte-visuel .wp-block-post-featured-image {
    margin: 0;
}

.ape-carte-visuel img {
    display: block;
    width: 100%;
}

.ape-carte-corps {
    padding: 1.25rem 1.5rem 1.5rem;
}

.ape-carte-corps>* {
    margin-block: 0 0.5rem;
}

.ape-carte-corps .is-style-surtitre {
    font-size: 1.125rem;
}

.ape-carte-corps h3 {
    font-size: var(--wp--preset--font-size--m);
}

.ape-carte-corps .wp-block-post-excerpt__more-link {
    font-weight: 600;
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    background-size: 100% 100%;
}

/* Cartes d'action (Participer) */
/* Le dernier élément (bouton ou lien) est calé en bas de la carte */
.ape-carte-action> :last-child {
    margin-top: auto;
}

.ape-carte-action h3,
.ape-carte-action p {
    margin: 0;
}

/* Bandeau marine */
.wp-block-group.ape-bandeau {
    padding: 3rem 2.5rem;
    border-radius: 2rem;
}

.ape-chiffre {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--wp--preset--color--jaune-doux);
}

.ape-bandeau .wp-block-column p {
    margin: 0.25rem 0 0;
}

.ape-bandeau a {
    color: var(--wp--preset--color--white);
}

/* Sections avec formes décoratives (styles de groupe « Formes … »)
   Les formes débordent en haut et en bas sur les sections voisines pour
   une transition fluide. z-index -1 : toujours derrière tous les contenus
   (aucune section ne doit avoir de fond opaque). Le débordement horizontal
   est coupé par overflow-x: clip sur html et body. */
.is-style-blobs-bleu-jaune,
.is-style-blobs-vert-peche {
    position: relative;
}

.is-style-blobs-bleu-jaune::before,
.is-style-blobs-bleu-jaune::after,
.is-style-blobs-vert-peche::before,
.is-style-blobs-vert-peche::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.is-style-blobs-bleu-jaune::before {
    left: -8rem;
    top: -6rem;
    width: 30rem;
    height: 26rem;
    background: var(--wp--preset--color--bleu-pale);
    border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%;
}

.is-style-blobs-bleu-jaune::after {
    right: -9rem;
    bottom: -10rem;
    width: 30rem;
    height: 30rem;
    background: var(--wp--preset--color--jaune-doux);
    border-radius: 50%;
}

.is-style-blobs-vert-peche::before {
    right: -10rem;
    top: -4rem;
    width: 28rem;
    height: 26rem;
    background: var(--wp--preset--color--vert-pale);
    border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
}

.is-style-blobs-vert-peche::after {
    left: -8rem;
    bottom: -8rem;
    width: 24rem;
    height: 24rem;
    background: var(--wp--preset--color--peche);
    border-radius: 50%;
}

/* Mobile : formes réduites, ancrées dans leur coin */
@media (width < 600px) {
    .is-style-blobs-bleu-jaune::before {
        scale: 0.6;
        transform-origin: left top;
    }

    .is-style-blobs-bleu-jaune::after {
        scale: 0.6;
        transform-origin: right bottom;
    }

    .is-style-blobs-vert-peche::before {
        scale: 0.6;
        transform-origin: right top;
    }

    .is-style-blobs-vert-peche::after {
        scale: 0.6;
        transform-origin: left bottom;
    }
}

/* Liens soulignés dans le texte ; pas dans les menus ni les cartes */
a:where(:not(.wp-element-button)) {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

/* Survol : effet surligneur jaune doux qui se trace de gauche à droite.
   Le fin soulignement marine reste pour qu'on reconnaisse un lien sans survol. */
a:where(:not(.wp-element-button)) {
    background-image: linear-gradient(transparent 55%, var(--wp--preset--color--jaune-doux) 55%);
    background-size: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.25s ease;
}

a:where(:not(.wp-element-button)):hover,
a:where(:not(.wp-element-button)):focus-visible {
    background-size: 100% 100%;
}

/* Surligneur sur plusieurs lignes : chaque ligne reçoit son propre dégradé
   (sinon il ne couvre que la dernière ligne). Les titres d'articles en boucle
   sont en inline-block par défaut : on les repasse en ligne. */
a:where(:not(.wp-element-button)) {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.wp-block-post-title a {
    display: inline;
}

/* Pas de surligneur : liens-images, pastilles colorées, texte blanc sur marine */
a:has(img),
.wp-block-site-logo a,
.wp-block-post-terms a,
.ape-filtres a,
.ape-bandeau a {
    background-image: none !important;
}

.ape-bandeau a:hover {
    text-decoration-thickness: 3px;
}

.wp-block-navigation a:where(:not([aria-current=page])) {
    text-decoration: none;
}

.wp-block-navigation a:where(:not([aria-current=page])):hover {
    text-decoration: none;
}

/* Boutons : transition douce */
.wp-block-button__link {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Bouton « Contour » : fond jaune doux au survol */
.wp-block-button.is-style-alt .wp-block-button__link:hover,
.wp-block-button.is-style-alt .wp-block-button__link:focus-visible {
    background-color: var(--wp--preset--color--jaune-doux);
    color: var(--wp--preset--color--primary);
    border-color: var(--wp--preset--color--primary);
}

/* Titres : pas de marge au-dessus (le surtitre colle au titre) */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-block-start: 0 !important;
}

/********************************************
        ARTICLE (modèle single)
**********************************************/
.ape-retour {
    margin-bottom: var(--wp--preset--spacing--s) !important;
}

.ape-article-colonnes {
    column-gap: 3.5rem;
}

.ape-article-meta {
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.ape-article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ape-article-categories a {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    border-radius: var(--wp--custom--radius--full);
    background: var(--wp--preset--color--jaune-doux);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.ape-article-categories .wp-block-post-terms__separator {
    display: none;
}

.ape-chapo {
    font-size: 1.1875rem;
    font-weight: 600;
    max-width: 40rem;
}

.ape-chapo .wp-block-post-excerpt__excerpt {
    margin: 0;
}

/* Visuel : affiche inclinée, cadre blanc ; la colonne disparaît sans image */
.ape-article-visuel {
    padding-top: 1rem;
}

.ape-article-visuel .wp-block-post-featured-image {
    position: sticky;
    top: 8rem;
    margin: 0;
}

.ape-article-visuel img {
    border: 0.5rem solid var(--wp--preset--color--white);
    border-radius: 1.25rem;
    transform: rotate(2deg);
    box-shadow: 0 1.25rem 3rem rgba(37, 59, 110, 0.2);
}

.ape-article-visuel:not(:has(img)) {
    display: none;
}

.ape-article-publie {
    margin-top: 2rem;
    opacity: 0.8;
}

.ape-article-publie p {
    margin: 0;
}

/* Encart date (composition) */
.wp-block-group.ape-encart-date {
    gap: 1rem 1.5rem;
    padding: 1rem 1.5rem 1rem 1rem;
    border-radius: 1.5rem;
    max-width: 40rem;
}

.ape-encart-texte {
    flex: 1 1 16rem;
}

.ape-encart-texte p {
    margin: 0;
}

.ape-encart-titre {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Formes décoratives : variantes de la page L'APE */
.is-style-blobs-bleu-peche,
.is-style-blobs-vert-jaune {
    position: relative;
}

.is-style-blobs-bleu-peche::before,
.is-style-blobs-bleu-peche::after,
.is-style-blobs-vert-jaune::before,
.is-style-blobs-vert-jaune::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
}

.is-style-blobs-bleu-peche::before {
    right: -8rem;
    top: -8rem;
    width: 28rem;
    height: 24rem;
    background: var(--wp--preset--color--bleu-pale);
    border-radius: 58% 42% 55% 45% / 50% 55% 45% 50%;
}

.is-style-blobs-bleu-peche::after {
    left: -10rem;
    bottom: -12rem;
    width: 26rem;
    height: 26rem;
    background: var(--wp--preset--color--peche);
    border-radius: 50%;
}

.is-style-blobs-vert-jaune::before {
    left: -10rem;
    top: -6rem;
    width: 30rem;
    height: 28rem;
    background: var(--wp--preset--color--vert-pale);
    border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
}

.is-style-blobs-vert-jaune::after {
    right: -8rem;
    bottom: -10rem;
    width: 26rem;
    height: 26rem;
    background: var(--wp--preset--color--jaune-doux);
    border-radius: 50%;
}

@media (width < 600px) {
    .is-style-blobs-bleu-peche::before {
        scale: 0.6;
        transform-origin: right top;
    }

    .is-style-blobs-bleu-peche::after {
        scale: 0.6;
        transform-origin: left bottom;
    }

    .is-style-blobs-vert-jaune::before {
        scale: 0.6;
        transform-origin: left top;
    }

    .is-style-blobs-vert-jaune::after {
        scale: 0.6;
        transform-origin: right bottom;
    }
}

/* Sommaire de page : liens d'ancre en pastilles blanches (réutilisable sur toute page longue) */
.ape-sommaire {
    gap: 0.625rem;
}

.ape-sommaire .wp-block-button__link {
    padding: 0.5rem 1.25rem;
    border: none;
    background: var(--wp--preset--color--white);
    box-shadow: var(--wp--preset--shadow--carte);
}

/* Bloc Détails en carte (archives, FAQ… réutilisable partout) */
.ape-details {
    padding: 1.25rem 1.5rem;
    border-radius: 1.5rem;
    background: var(--wp--preset--color--white);
    box-shadow: var(--wp--preset--shadow--carte);
}

.ape-details summary {
    cursor: pointer;
    font-weight: 600;
}

/* Page /infos : filtres par catégorie (bloc Catégories, réutilise les pastilles .ape-article-categories) */
ul.ape-filtres {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ape-filtres .current-cat a {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white) !important;
}

/* Date des articles : préciser que c'est la date de publication */
.wp-block-post-date.ape-date::before {
    content: "Publié le ";
}

/* Vignettes /infos : date + « Lire la suite » en pied de carte, calés en bas */
.ape-carte-infos {
    display: flex;
    flex-direction: column;
}

.ape-carte-infos .ape-carte-corps {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ape-carte-pied {
    margin-top: auto !important;
    padding-top: 0.75rem;
    gap: 0.5rem 1rem;
}

.ape-carte-pied .ape-date {
    opacity: 0.8;
}

.ape-carte-pied .wp-block-read-more {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    background-size: 100% 100%;
}

/* Fluent Forms : champs et bouton aux couleurs de la charte (page Contact) */
.fluentform .ff-el-form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--wp--preset--color--bleu-pale);
    border-radius: 1rem;
    background: var(--wp--preset--color--white);
    color: var(--wp--preset--color--primary);
    font: inherit;
}

.fluentform .ff-el-form-control:focus {
    border-color: var(--wp--preset--color--primary);
    outline: 2px solid var(--wp--preset--color--jaune-doux);
    outline-offset: 1px;
}

.fluentform .ff-el-input--label label {
    font-weight: 600;
    color: var(--wp--preset--color--primary);
}

.fluentform .ff-btn-submit {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--wp--custom--radius--full);
    background-color: var(--wp--preset--color--primary) !important;
    color: var(--wp--preset--color--white) !important;
    font: inherit;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}

.fluentform .ff-btn-submit:hover,
.fluentform .ff-btn-submit:focus {
    background-color: var(--wp--preset--color--jaune-doux) !important;
    color: var(--wp--preset--color--primary) !important;
    opacity: 1;
}

/* Polaroïds (L'équipe) : photo carrée 6 rem dans un cadre blanc incliné.
   Sans photo, la silhouette s'affiche sur un fond pastel qui change
   automatiquement d'une personne à l'autre ; une vraie photo le recouvre. */
.wp-block-group.ape-polaroid {
    width: 7rem;
    padding: 0.5rem 0.5rem 0.625rem;
    gap: 0;
    background: var(--wp--preset--color--white);
    border-radius: 0.875rem;
    box-shadow: 0 0.5rem 1.25rem rgba(37, 59, 110, 0.13);
    text-align: center;
    line-height: 1.25;
}
.ape-polaroid .wp-block-image { margin: 0; }
.ape-polaroid img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    background: var(--wp--preset--color--bleu-pale);
}
.ape-polaroid:nth-child(4n+2) img { background: var(--wp--preset--color--vert-pale); }
.ape-polaroid:nth-child(4n+3) img { background: var(--wp--preset--color--jaune-doux); }
.ape-polaroid:nth-child(4n+4) img { background: var(--wp--preset--color--peche); }
.ape-polaroid:nth-child(4n+1) { rotate: -2deg; }
.ape-polaroid:nth-child(4n+2) { rotate: 1.5deg; }
.ape-polaroid:nth-child(4n+3) { rotate: -1deg; }
.ape-polaroid:nth-child(4n+4) { rotate: 2.5deg; }
.ape-polaroid p { margin: 0; }
.ape-polaroid-nom { margin-top: 0.5rem !important; font-weight: 600; font-size: 0.875rem; }
.ape-polaroid-role { font-size: 0.8125rem; }
.ape-polaroid .ape-etiquette { margin-top: 0.25rem; padding: 0.125rem 0.625rem !important; font-size: 0.75rem; }

/* Bouton e-mail du pied de page : enveloppe devant l'adresse.
   Masque SVG : l'icône prend la couleur du texte (blanc, marine au survol). */
.ape-btn-mail .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.ape-btn-mail .wp-block-button__link::before {
    content: "";
    flex: 0 0 auto;
    width: 1.375rem;
    height: 1.375rem;
    background-color: currentColor;
    -webkit-mask: url("assets/icons/enveloppe.svg") center / contain no-repeat;
    mask: url("assets/icons/enveloppe.svg") center / contain no-repeat;
}
/*Bilan Ventes */
.ape-bilan {
    gap: 2rem;
}

.ape-bilan-item>* {
    margin-block: 0;
}

.ape-bilan-item+.ape-bilan-item {
    padding-left: 2rem;
    border-left: 1px solid rgb(255 255 255 / 0.25);
}

.ape-bilan-annee {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* L'année précédente en blanc, pas en jaune : elle passe au second plan sans perdre en contraste */
.ape-bilan-item--passe .ape-chiffre {
    color: var(--wp--preset--color--white);
}

@media (max-width: 37.5rem) {
    .ape-bilan-item+.ape-bilan-item {
        padding-left: 0;
        padding-top: 1.5rem;
        border-left: 0;
        border-top: 1px solid rgb(255 255 255 / 0.25);
    }
}