/* ================================================================
   STYLES DES BLOCS GUTENBERG — Frontend Bio et Local
   Miroir de editor-style.css pour le rendu public des pages.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Boogaloo&display=swap');

/* ── Variables ───────────────────────────────────────────────── */
:root {
    --rose:  #D2097A;
    --vert:  #009C50;
    --jaune: #FFDB16;
}

/* ── Mise en page du contenu de la page ─────────────────────── */
.site-main .entry-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}


/* ── Anti-orphelins : évite qu'un mot (ou une syllabe/ponctuation) isolé
   ne se retrouve seul sur la dernière ligne à certaines largeurs d'écran.
   Dégradation silencieuse si non supporté (Safari/Firefox ignorent juste
   la valeur et gardent le retour à la ligne par défaut). ───────────────── */
h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

p, li {
    text-wrap: pretty;
}

@media (min-width: 992px) {
    .site-main .entry-content {
        padding: 12px 16px 24px;
    }

    /* ── Override du sélecteur WordPress qui centre le contenu dans les sections ── */
    /* WordPress génère : .is-layout-constrained > :where(:not(.alignleft)...) { max-width: 645px; margin: auto !important } */
    /* On surcharge pour nos sections spécifiques avec une spécificité plus haute */

    /* Petite largeur (défaut) : marges larges */
    /* .wp-block-group.is-style-section-verte.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)),
    .wp-block-group.is-style-section-verte .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)),
    .wp-block-group.is-style-section-rose.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)),
    .wp-block-group.is-style-section-rose .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)),
    .wp-block-group.is-style-section-blanche.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)),
    .wp-block-group.is-style-section-blanche .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull):not(.alignwide):not(.wp-block-file)) {
        max-width: 100%;
        margin-left: 100px !important;
        margin-right: 100px !important;
    } */

    /* Grande largeur (alignwide) : marges réduites */
    .wp-block-group.is-style-section-verte.is-layout-constrained > .alignwide,
    .wp-block-group.is-style-section-verte .is-layout-constrained > .alignwide,
    .wp-block-group.is-style-section-rose.is-layout-constrained > .alignwide,
    .wp-block-group.is-style-section-rose .is-layout-constrained > .alignwide,
    .wp-block-group.is-style-section-blanche.is-layout-constrained > .alignwide,
    .wp-block-group.is-style-section-blanche .is-layout-constrained > .alignwide {
        max-width: 100% !important;
        margin-left: 24px !important;
        margin-right: 24px !important;
    }

    /* Pleine largeur (alignfull) : sans marge supplémentaire */
    .wp-block-group.is-style-section-verte.is-layout-constrained > .alignfull,
    .wp-block-group.is-style-section-verte .is-layout-constrained > .alignfull,
    .wp-block-group.is-style-section-rose.is-layout-constrained > .alignfull,
    .wp-block-group.is-style-section-rose .is-layout-constrained > .alignfull,
    .wp-block-group.is-style-section-blanche.is-layout-constrained > .alignfull,
    .wp-block-group.is-style-section-blanche .is-layout-constrained > .alignfull {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Boutons de téléchargement : alignés à gauche avec le même retrait */
    /* .wp-block-group.is-style-section-verte.is-layout-constrained > .wp-block-file,
    .wp-block-group.is-style-section-verte .is-layout-constrained > .wp-block-file,
    .wp-block-group.is-style-section-rose.is-layout-constrained > .wp-block-file,
    .wp-block-group.is-style-section-rose .is-layout-constrained > .wp-block-file,
    .wp-block-group.is-style-section-blanche.is-layout-constrained > .wp-block-file,
    .wp-block-group.is-style-section-blanche .is-layout-constrained > .wp-block-file {
        margin-left: 100px !important;
        margin-right: auto !important;
    } */
}

/* Les blocs alignfull sortent du conteneur pour occuper toute la largeur */
.site-main .entry-content > .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ── Bouton — base commune aux 4 variations ───────────────────── */
.wp-block-button.is-style-rose .wp-block-button__link,
.wp-block-button.is-style-vert .wp-block-button__link,
.wp-block-button.is-style-blanc .wp-block-button__link,
.wp-block-button.is-style-jaune .wp-block-button__link {
    border-radius: 10px;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    text-decoration: none;
}

/* Pleins (Rose/Vert) : mêmes padding/bordure/texte blanc, seul le fond change */
.wp-block-button.is-style-rose .wp-block-button__link,
.wp-block-button.is-style-vert .wp-block-button__link {
    color: #fff;
    border: none;
    padding: 12px 28px;
}
.wp-block-button.is-style-rose .wp-block-button__link:hover,
.wp-block-button.is-style-vert .wp-block-button__link:hover {
    opacity: 0.85;
    color: #fff;
}

/* Bordés (Blanc/Jaune) : mêmes padding/bordure/transition, fond + survol changent */
.wp-block-button.is-style-blanc .wp-block-button__link,
.wp-block-button.is-style-jaune .wp-block-button__link {
    box-sizing: border-box;
    color: var(--vert);
    border: 2px solid;
    padding: 10px 26px;
    transition: background-color 0.2s ease;
}

/* ── Bouton Rose ─────────────────────────────────────────────── */
.wp-block-button.is-style-rose .wp-block-button__link {
    background-color: #D2097A;
}

/* ── Bouton Vert ─────────────────────────────────────────────── */
.wp-block-button.is-style-vert .wp-block-button__link {
    background-color: #009C50;
}

/* ── Bouton Blanc (survol jaune) ─────────────────────────────── */
.wp-block-button.is-style-blanc .wp-block-button__link {
    background-color: #fff;
    border-color: var(--vert);
}
.wp-block-button.is-style-blanc .wp-block-button__link:hover {
    background-color: var(--jaune);
    color: var(--vert);
}

/* ── Bouton Jaune (survol blanc) ──────────────────────────────── */
.wp-block-button.is-style-jaune .wp-block-button__link {
    background-color: var(--jaune);
    border-color: transparent;
}
.wp-block-button.is-style-jaune .wp-block-button__link:hover {
    background-color: #fff;
    color: var(--vert);
}

/* ── Section fond vert ───────────────────────────────────────── */
.wp-block-group.is-style-section-verte {
    background-color: #009C50;
    color: #fff;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

/* Taille responsive : plus petit sur petits écrans (chevauchait parfois
   boutons/texte), plus grand sur grands/très grands écrans (plus visible) */
.wp-block-group.is-style-section-verte::after {
    content: '';
    position: absolute;
    bottom: 2px;
    /* Aligné au bord gauche du contenu centré (layout "constrained" de
       Gutenberg, cf. --wp--style--global--content-size), pas au bord de
       l'écran ; reste collé au bord de la section tant que le contenu
       n'est pas encore plus étroit que l'écran (mobile). */
    left: max(5px, calc(50% - (var(--wp--style--global--content-size, 645px) / 2) - 100px));
    width: 60px;
    height: 60px;
    background-image: url('../images/icons/perso1.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom left;
    pointer-events: none;
}

@media (min-width: 768px) {
    .wp-block-group.is-style-section-verte::after {
        width: 90px;
        height: 90px;
    }
}

@media (min-width: 1200px) {
    .wp-block-group.is-style-section-verte::after {
        width: 130px;
        height: 130px;
    }
}
.wp-block-group.is-style-section-verte h1,
.wp-block-group.is-style-section-verte h2,
.wp-block-group.is-style-section-verte h3,
.wp-block-group.is-style-section-verte h4,
.wp-block-group.is-style-section-verte p,
.wp-block-group.is-style-section-verte li {
    color: #fff;
}

/* ── Bouton dans section verte : jaune / vert ────────────────── */
.wp-block-group.is-style-section-verte .wp-block-button.is-style-rose .wp-block-button__link {
    background-color: var(--jaune);
    color: var(--vert);
}
.wp-block-group.is-style-section-verte .wp-block-button.is-style-rose .wp-block-button__link:hover {
    opacity: 0.85;
    color: var(--vert);
}

/* ── Section fond rose ───────────────────────────────────────── */
.wp-block-group.is-style-section-rose {
    background-color: #D2097A;
    color: #fff;
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

/* Taille responsive : plus petit sur petits écrans (chevauchait parfois
   boutons/texte), plus grand sur grands/très grands écrans (plus visible) */
.wp-block-group.is-style-section-rose::after {
    content: '';
    position: absolute;
    bottom: 2px;
    /* Symétrique de la section verte : aligné au bord droit du contenu
       centré plutôt qu'au bord de l'écran. */
    right: max(5px, calc(50% - (var(--wp--style--global--content-size, 645px) / 2) - 100px));
    width: 60px;
    height: 60px;
    background-image: url('../images/icons/perso2.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom right;
    transform: scaleX(-1);
    pointer-events: none;
}

@media (min-width: 768px) {
    .wp-block-group.is-style-section-rose::after {
        width: 90px;
        height: 90px;
    }
}

@media (min-width: 1200px) {
    .wp-block-group.is-style-section-rose::after {
        width: 130px;
        height: 130px;
    }
}
.wp-block-group.is-style-section-rose h1,
.wp-block-group.is-style-section-rose h2,
.wp-block-group.is-style-section-rose h3,
.wp-block-group.is-style-section-rose h4,
.wp-block-group.is-style-section-rose p,
.wp-block-group.is-style-section-rose li {
    color: #fff;
}

/* ── Section fond blanc ──────────────────────────────────────── */
.wp-block-group.is-style-section-blanche {
    background-color: #ffffff;
    color: #000000;
    padding: 40px 24px;
}
.wp-block-group.is-style-section-blanche h1,
.wp-block-group.is-style-section-blanche h2,
.wp-block-group.is-style-section-blanche h4 {
    font-family: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    color: #009C50;
    font-weight: 400;
}
.wp-block-group.is-style-section-blanche h3 {
    font-family: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    color: #000 !important;
    font-weight: 400;
}

/* ── Titre Bio et Local ──────────────────────────────────────── */
.wp-block-heading.is-style-titre-bio,
.entry-title {
    font-family: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    color: #D2097A;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 32px;
    line-height: 1.1;
    margin-bottom: 24px;
    text-align: center;
}
@media (min-width: 768px) {
    .wp-block-heading.is-style-titre-bio,
    .entry-title { font-size: 42px; }
}

/* ── Titre "Cartouche rose" (reprend .home-section-pill) ──────── */
.wp-block-heading.is-style-cartouche-rose {
    /* Boîte de type bloc (100% de la largeur autorisée, comme tout autre
       titre) mais rétrécie au contenu via width:fit-content — le fond rose
       ne couvre donc que la largeur du texte, pas toute la ligne. */
    display: block;
    width: fit-content;
    background: #D2097A;
    border-radius: 40px;
    padding: 8px 24px;
    font-family: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
    font-size: 28px;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
    font-weight: 400;
}

/* ── Séparateur vert ─────────────────────────────────────────── */
.wp-block-separator.is-style-vert {
    border-color: #009C50;
    border-top-width: 3px;
}

/* ── Accordion FAQ Bio et Local (core/accordion WP 6.9) ─────── */

/* Un seul cadre rose arrondi autour de tout l'accordéon, items collés */
.entry-content .wp-block-accordion {
    --wp--style--block-gap: 0px;
    border: 2px solid #D2097A;
    border-radius: 12px;
    overflow: hidden;
}

/* Séparateur entre items (ligne rose, sauf après le dernier) */
.entry-content .wp-block-accordion-item:not(:last-child) {
    border-bottom: 2px solid #D2097A;
}

/* Titre rose */
.entry-content .wp-block-accordion-heading,
.entry-content .wp-block-accordion-heading__toggle,
.entry-content .wp-block-accordion-heading__toggle-title {
    color: var(--rose) !important;
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* Bouton toggle */
.entry-content .wp-block-accordion-heading__toggle {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    margin: 0;
    line-height: 1.4;
}

/* Ligne de séparation titre / contenu quand item ouvert */
.entry-content .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle {
    border-bottom: 2px solid #D2097A;
}

.entry-content .wp-block-accordion-heading__toggle-title {
    flex: 1;
}

/* Masquer le + natif de WP */
.entry-content .wp-block-accordion-heading__toggle-icon {
    display: none;
}

/* Chevron ^ rose */
.entry-content .wp-block-accordion-heading__toggle::after {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #D2097A;
    border-top: 2.5px solid #D2097A;
    transform: rotate(-45deg) translateY(3px);
    transition: transform .25s ease;
}

.entry-content .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle::after {
    transform: rotate(135deg) translateY(0);
}

/* Panneau de contenu */
.entry-content .wp-block-accordion-panel {
    padding: 12px 20px 16px;
}
.entry-content .wp-block-accordion-panel p,
.entry-content .wp-block-accordion-panel li {
    color: #000;
}
.entry-content .wp-block-accordion-panel strong {
    color: var(--rose);
}

/* ── Dans une section verte ─────────────────────────────────── */
.wp-block-group.is-style-section-verte .wp-block-accordion {
    border-color: rgba(255, 255, 255, 0.6);
}
.wp-block-group.is-style-section-verte .wp-block-accordion-item:not(:last-child) {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}
.wp-block-group.is-style-section-verte .wp-block-accordion-heading,
.wp-block-group.is-style-section-verte .wp-block-accordion-heading__toggle,
.wp-block-group.is-style-section-verte .wp-block-accordion-heading__toggle-title {
    color: #fff !important;
}
.wp-block-group.is-style-section-verte .wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}
.wp-block-group.is-style-section-verte .wp-block-accordion-heading__toggle::after {
    border-right-color: #fff;
    border-top-color: #fff;
}
.wp-block-group.is-style-section-verte .wp-block-accordion-panel {
    color: #fff;
}

/* ── Fichier PDF Bio et Local (core/file) ────────────────────── */

/* Variante blanc (fond blanc, bordure + texte + icônes verts) */
.wp-block-file.is-style-ressource-pdf-blanc {
    background-color: #fff;
    border: 2px solid #009C50;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    text-decoration: none;
}
.wp-block-file.is-style-ressource-pdf-blanc .wp-block-file__content-wrapper {
    flex: 1;
    min-width: 0;
}
.wp-block-file.is-style-ressource-pdf-blanc a:not(.wp-block-file__button) {
    color: #009C50;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 26px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 34px;
}
.wp-block-file.is-style-ressource-pdf-blanc a:not(.wp-block-file__button)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-image: url('../images/icons/pdf-green.svg');
    background-repeat: no-repeat;
    background-size: contain;
}
.wp-block-file.is-style-ressource-pdf-blanc .wp-block-file__button {
    background: transparent;
    border: none;
    padding: 0;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    font-size: 0;
    color: transparent;
    background-image: url('../images/icons/down-arrow-grren.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    cursor: pointer;
}
.wp-block-file.is-style-ressource-pdf-blanc .wp-block-file__button:hover {
    opacity: 0.8;
}

/* Variante verte (fond vert, icônes blancs) */
.wp-block-file.is-style-ressource-pdf {
    background-color: #009C50;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    text-decoration: none;
}
.wp-block-file.is-style-ressource-pdf .wp-block-file__content-wrapper {
    flex: 1;
    min-width: 0;
}
.wp-block-file.is-style-ressource-pdf a:not(.wp-block-file__button) {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 26px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 34px;
}
.wp-block-file.is-style-ressource-pdf a:not(.wp-block-file__button)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    background-image: url('../images/icons/pdf-white.svg');
    background-repeat: no-repeat;
    background-size: contain;
}
.wp-block-file.is-style-ressource-pdf .wp-block-file__button {
    background: transparent;
    border: none;
    padding: 0;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    font-size: 0;
    color: transparent;
    background-image: url('../images/icons/down-arrow-white.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 22px 22px;
    cursor: pointer;
}
.wp-block-file.is-style-ressource-pdf .wp-block-file__button:hover {
    opacity: 0.8;
}


/* ── Tailles h2 / h3 responsives (override les styles inline des patterns) ── */
.entry-content h2,
.wp-block-group h2 {
    font-size: 28px !important;
}
.entry-content h3,
.wp-block-group h3 {
    font-size: 22px !important;
}
@media (min-width: 768px) {
    .entry-content h2,
    .wp-block-group h2 {
        font-size: 32px !important;
    }
    .entry-content h3,
    .wp-block-group h3 {
        font-size: 28px !important;
    }
}

/* ── Classes couleur générées par theme.json ─────────────────── */
.has-rose-color        { color: #D2097A !important; }
.has-vert-color        { color: #009C50 !important; }
.has-jaune-color       { color: #FFDB16 !important; }
.has-blanc-color       { color: #ffffff !important; }
.has-noir-color        { color: #000000 !important; }

.has-rose-background-color        { background-color: #D2097A !important; }
.has-vert-background-color        { background-color: #009C50 !important; }
.has-jaune-background-color       { background-color: #FFDB16 !important; }
.has-blanc-background-color       { background-color: #ffffff !important; }
.has-noir-background-color        { background-color: #000000 !important; }
.has-gris-clair-background-color  { background-color: #f5f5f5 !important; }

/* ── Police Boogaloo ─────────────────────────────────────────── */
.has-boogaloo-font-family {
    font-family: 'Boogaloo', 'Arial Rounded MT Bold', sans-serif;
}

/* ── Hover bouton principal (home-nav-block) ─────────────────── */
.home-nav-block-icon img {
    transition: transform 0.15s ease;
}
.home-nav-block-text {
    transition: transform 0.35s ease;
}
.home-nav-block:hover .home-nav-block-icon img {
    animation: nav-block-bounce 0.55s ease;
}
.home-nav-block:hover .home-nav-block-text {
    animation: nav-text-slide 0.6s ease forwards;
    transition: none;
}
@keyframes nav-block-bounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-11px); }
    55%  { transform: translateY(-3px); }
    75%  { transform: translateY(-7px); }
    100% { transform: translateY(0); }
}
@keyframes nav-text-slide {
    0%   { transform: translateX(0); }
    65%  { transform: translateX(6px); }
    100% { transform: translateX(-2px); }
}

.page h1 {
    margin:auto;
    max-width: 1000px;
}