/* ==========================================================================
   Contrat de mise en page Gutenberg

   Référence : contentSize = 840 px, wideSize = 1200 px, full = pleine largeur.
   Le wrapper PHP reste toujours pleine largeur ; le gutter responsive protège
   le contenu sur tablette/mobile. Ces règles servent de filet de sécurité au
   thème hybride et reflètent le comportement natif généré par theme.json.
   ========================================================================== */
.entry-content {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.entry-content.has-global-padding {
    padding-inline: var(--bmp-page-gutter) !important;
}

.entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    width: 100%;
    max-width: var(--bmp-content-width);
    margin-inline: auto !important;
}

.entry-content.is-layout-constrained > .alignwide {
    max-width: var(--bmp-wide-width);
}

.entry-content.has-global-padding > .alignfull {
    width: calc(100% + (2 * var(--bmp-page-gutter)));
    max-width: none;
    margin-inline: calc(-1 * var(--bmp-page-gutter)) !important;
}

/* --------------------------------------------------------------------------
   Avant-pied de page global

   Un template part Gutenberg peut recevoir le padding racine généré par
   theme.json. Dans un thème hybride, ce padding n'est pas toujours compensé
   comme il l'est dans .entry-content : un bloc alignfull pouvait alors partir
   correctement à gauche mais s'arrêter d'un double gutter avant le bord droit.

   La zone structurelle est toujours pleine largeur. Sa largeur éditoriale se
   règle avec les blocs placés à l'intérieur (Groupe contraint/large, Colonnes,
   etc.), pas en rétrécissant le conteneur racine. Ces règles couvrent aussi les
   template parts déjà personnalisés en base avec l'ancienne version contrainte.
   -------------------------------------------------------------------------- */
.bmp-global-prefooter {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: clip;
}

.bmp-global-prefooter > .wp-block-template-part,
.bmp-global-prefooter .bmp-global-prefooter__blocks {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Neutralise le padding global que WordPress peut ajouter au template part ou
   au Groupe racine. Le séparateur et les autres blocs alignfull occupent alors
   réellement la largeur disponible, sans encoche du gutter à droite. */
.bmp-global-prefooter > .wp-block-template-part.has-global-padding,
.bmp-global-prefooter .bmp-global-prefooter__blocks.has-global-padding {
    padding-inline: 0 !important;
}

.bmp-global-prefooter .bmp-global-prefooter__blocks > .alignfull,
.bmp-global-prefooter .bmp-global-prefooter__blocks > .wp-block-bmp-section-divider {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
}

.wp-block-group.is-style-section-compact { padding-block: var(--wp--preset--spacing--40); }
.wp-block-group.is-style-section-large { padding-block: var(--wp--preset--spacing--60); }
.wp-block-image.is-style-rounded-corners img { border-radius: var(--bmp-radius); }

/* Une image liée reste shrink-wrap comme dans le bloc natif, mais le lien ne
 * crée plus la ligne de base typographique responsable du petit espace blanc
 * sous l'image. On évite volontairement width:100% afin de ne pas agrandir la
 * zone cliquable au-delà du média. */
.wp-block-image > a,
.wp-block-image > figure > a {
    line-height: 0;
    vertical-align: top;
}
.wp-block-image > a > img,
.wp-block-image > figure > a > img {
    display: block;
}

/* Le bloc Média & texte ne propose pas nativement un rayon propre au média.
 * Cette variation arrondit uniquement la figure média, y compris le mode
 * « recadrer pour remplir », sans arrondir le conteneur texte. */
.wp-block-media-text.is-style-bmp-media-rounded .wp-block-media-text__media {
    overflow: hidden;
    border-radius: var(--bmp-media-text-radius, var(--bmp-radius));
}
.wp-block-media-text.is-style-bmp-media-rounded .wp-block-media-text__media :where(img, video) {
    border-radius: inherit;
}

/* Réglage par bloc : les quatre angles du média peuvent être dissociés.
 * La classe est ajoutée uniquement lorsqu'une valeur personnalisée est définie. */
.wp-block-media-text.bmp-media-text-custom-radius .wp-block-media-text__media,
.bmp-media-text-custom-radius .wp-block-media-text__media {
    overflow: hidden;
    border-radius: var(--bmp-media-radius-tl, 0) var(--bmp-media-radius-tr, 0) var(--bmp-media-radius-br, 0) var(--bmp-media-radius-bl, 0);
}
.wp-block-media-text.bmp-media-text-custom-radius .wp-block-media-text__media :where(img, video),
.bmp-media-text-custom-radius .wp-block-media-text__media :where(img, video) {
    border-radius: inherit;
}

/* Média & texte : utilise un vrai gap de grille au lieu du padding interne
 * natif. Ainsi, un média réglé à 50 % partage l'espace disponible exactement
 * comme deux Colonnes 50/50 utilisant le même gap : les axes verticaux des
 * compositions successives restent alignés. Les deux fractions sont injectées
 * depuis l'attribut natif mediaWidth et le réglage de gap reste surchargeable. */
.wp-block-media-text {
    --bmp-media-text-gap: var(--bmp-grid-gap);
    --bmp-media-text-media-track: 50fr;
    --bmp-media-text-content-track: 50fr;
}
.bmp-media-text-stack-media-first { --bmp-media-text-stack-media-row: 1; --bmp-media-text-stack-content-row: 2; }
.bmp-media-text-stack-text-first { --bmp-media-text-stack-media-row: 2; --bmp-media-text-stack-content-row: 1; }
.bmp-media-text-stacked-ratio-16-9 { --bmp-media-text-stacked-aspect: 16 / 9; }
.bmp-media-text-stacked-ratio-3-2 { --bmp-media-text-stacked-aspect: 3 / 2; }
.bmp-media-text-stacked-ratio-4-3 { --bmp-media-text-stacked-aspect: 4 / 3; }
.bmp-media-text-stacked-ratio-1-1 { --bmp-media-text-stacked-aspect: 1 / 1; }

.wp-block-media-text.bmp-media-text-grid-aligned,
.editor-styles-wrapper [data-type="core/media-text"].bmp-media-text-grid-aligned .wp-block-media-text {
    column-gap: var(--bmp-media-text-gap) !important;
}
.wp-block-media-text.bmp-media-text-grid-aligned:not(.has-media-on-the-right),
.editor-styles-wrapper [data-type="core/media-text"].bmp-media-text-grid-aligned .wp-block-media-text:not(.has-media-on-the-right) {
    grid-template-columns: minmax(0, var(--bmp-media-text-media-track)) minmax(0, var(--bmp-media-text-content-track)) !important;
}
.wp-block-media-text.bmp-media-text-grid-aligned.has-media-on-the-right,
.editor-styles-wrapper [data-type="core/media-text"].bmp-media-text-grid-aligned .wp-block-media-text.has-media-on-the-right {
    grid-template-columns: minmax(0, var(--bmp-media-text-content-track)) minmax(0, var(--bmp-media-text-media-track)) !important;
}
.wp-block-media-text > .wp-block-media-text__content {
    padding-block: 0 !important;
    padding-inline: 0 !important;
    min-width: 0;
}

/* Un contenu aligné en haut doit réellement commencer au même niveau que le
 * média : le premier bloc ne conserve pas sa marge supérieure par défaut. */
.wp-block-media-text > .wp-block-media-text__content > :first-child {
    margin-block-start: 0 !important;
}
.wp-block-media-text > .wp-block-media-text__content > :last-child {
    margin-block-end: 0 !important;
}

.wp-block-button .wp-block-button__link {
    transition: background-color var(--bmp-transition), color var(--bmp-transition), border-color var(--bmp-transition), box-shadow var(--bmp-transition), transform var(--bmp-transition), filter var(--bmp-transition);
    box-shadow: var(--bmp-button-shadow, 0 3px 6px rgb(0 0 0 / 16%));
}
.wp-block-button .wp-block-button__link:hover {
    transform: var(--bmp-button-hover-transform, translateY(-1px));
    filter: var(--bmp-button-hover-filter, none);
    box-shadow: var(--bmp-button-hover-shadow, var(--bmp-button-shadow, 0 3px 6px rgb(0 0 0 / 16%)));
}

/* Styles sémantiques du design system. Le bloc reste le bouton natif de
 * WordPress ; seules les variantes visuelles sont fournies par le thème. */
.wp-block-button.is-style-bmp-button-primary-light .wp-block-button__link {
    background: var(--bmp-button-primary-light-bg);
    color: var(--bmp-button-primary-light-text);
    border-color: var(--bmp-button-primary-light-border);
}
.wp-block-button.is-style-bmp-button-secondary-light .wp-block-button__link {
    background: var(--bmp-button-secondary-light-bg);
    color: var(--bmp-button-secondary-light-text);
    border-color: var(--bmp-button-secondary-light-border);
}
.wp-block-button.is-style-bmp-button-primary-dark .wp-block-button__link {
    background: var(--bmp-button-primary-dark-bg);
    color: var(--bmp-button-primary-dark-text);
    border-color: var(--bmp-button-primary-dark-border);
}
.wp-block-button.is-style-bmp-button-secondary-dark .wp-block-button__link {
    background: var(--bmp-button-secondary-dark-bg);
    color: var(--bmp-button-secondary-dark-text);
    border-color: var(--bmp-button-secondary-dark-border);
}

/* Les variantes natives restent utiles et suivent le jeu « fond clair » tant
 * qu'aucune couleur Gutenberg explicite n'a été choisie sur le bouton. */
.wp-block-button:not(.is-style-outline):not([class*="is-style-bmp-button-"]) .wp-block-button__link:not(.has-background):not(.has-text-color) {
    background: var(--bmp-button-primary-light-bg);
    color: var(--bmp-button-primary-light-text);
    border-color: var(--bmp-button-primary-light-border);
}
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-background):not(.has-text-color) {
    background: var(--bmp-button-secondary-light-bg);
    color: var(--bmp-button-secondary-light-text);
    border-color: var(--bmp-button-secondary-light-border);
}

@media (prefers-reduced-motion: reduce) {
    .wp-block-button .wp-block-button__link:hover { transform: none; }
}

.wp-block-quote {
    width: 100%;
    max-inline-size: min(48ch, var(--bmp-content-width));
    padding: 1.5rem 2rem;
    border: 2px solid currentColor;
    border-radius: var(--bmp-radius);
}
.wp-block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.7em;
    font-style: normal;
}



/* --------------------------------------------------------------------------
   Décorations de titres H1 à H6
   -------------------------------------------------------------------------- */
.entry-content h1,
.bmp-page-header__title,
.editor-styles-wrapper h1.wp-block-heading,
.entry-content .wp-block-heading[class*="is-style-bmp-heading-"],
.editor-styles-wrapper .wp-block-heading[class*="is-style-bmp-heading-"] {
    position: relative;
}

/* Le H1 principal conserve sa couleur globale. Les styles de décoration ne
 * forcent plus la couleur du texte : seule la décoration utilise la couleur
 * globale dédiée, afin de fonctionner proprement sur H1, H2, H3, H4, H5 et H6. */
.entry-content h1:not(.has-text-color),
.bmp-page-header__title,
.editor-styles-wrapper h1.wp-block-heading:not(.has-text-color) {
    color: var(--wp--preset--color--primary-dark, #0072A3);
}

.is-style-bmp-heading-none { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
.is-style-bmp-heading-none::before,
.is-style-bmp-heading-none::after { display: none !important; }

/* Filet supérieur simple : il reste strictement dans la largeur Gutenberg du
 * bloc (content / wide / full) et ne déborde jamais vers le viewport. */
.is-style-bmp-heading-overline-block,
.bmp-h1-style-overline-block .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-overline-block .bmp-page-header__title {
    padding-top: calc(16px + var(--bmp-h1-decoration-thickness, 6px));
}
.is-style-bmp-heading-overline-block::before,
.bmp-h1-style-overline-block .entry-content h1:not([class*="is-style-bmp-heading-"])::before,
.bmp-h1-style-overline-block .bmp-page-header__title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}

/* Filet supérieur court : miroir du filet inférieur court. Sa longueur utilise
 * le même réglage global et suit l'alignement gauche / centre / droite. */
.is-style-bmp-heading-overline-short,
.bmp-h1-style-overline-short .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-overline-short .bmp-page-header__title {
    padding-top: calc(14px + var(--bmp-h1-decoration-thickness, 6px));
}
.is-style-bmp-heading-overline-short::before,
.bmp-h1-style-overline-short .entry-content h1:not([class*="is-style-bmp-heading-"])::before,
.bmp-h1-style-overline-short .bmp-page-header__title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--bmp-h1-underline-length, 96px);
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}
.is-style-bmp-heading-overline-short.has-text-align-center::before {
    left: 50%;
    transform: translateX(-50%);
}
.is-style-bmp-heading-overline-short.has-text-align-right::before {
    left: auto;
    right: 0;
    transform: none;
}

/* Filet supérieur jusqu'au bord de l'écran. Il respecte l'alignement du texte
 * sans modifier le rail Gutenberg du bloc. */
.is-style-bmp-heading-overline,
.bmp-h1-style-overline .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-overline .bmp-page-header__title {
    padding-top: calc(16px + var(--bmp-h1-decoration-thickness, 6px));
}
.is-style-bmp-heading-overline::before,
.bmp-h1-style-overline .entry-content h1:not([class*="is-style-bmp-heading-"])::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% - 50vw);
    width: calc(50vw - 50% + min(100%, 320px));
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}
.is-style-bmp-heading-overline.has-text-align-center::before,
.bmp-h1-style-overline .entry-content h1.has-text-align-center:not([class*="is-style-bmp-heading-"])::before {
    left: 50%;
    width: min(100%, 320px);
    transform: translateX(-50%);
}
.is-style-bmp-heading-overline.has-text-align-right::before,
.bmp-h1-style-overline .entry-content h1.has-text-align-right:not([class*="is-style-bmp-heading-"])::before {
    left: auto;
    right: calc(50% - 50vw);
    width: calc(50vw - 50% + min(100%, 320px));
    transform: none;
}

/* Filet supérieur au-delà du conteneur.
 * Sur ordinateur, le bord extérieur du filet se place à :
 *   bord du rail wide - dépassement configuré (64 px par défaut),
 * avec une garde de 24 px minimum par rapport à la fenêtre.
 * Exemple 1440 / rail 1200 : 120 px - 64 px = 56 px du bord écran,
 * ce qui correspond au principe de la maquette fournie.
 * Sur tablette et mobile, la règle responsive le laisse rejoindre le viewport. */
.is-style-bmp-heading-overline-container,
.bmp-h1-style-overline-container .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-overline-container .bmp-page-header__title {
    padding-top: calc(16px + var(--bmp-h1-decoration-thickness, 6px));
}
.is-style-bmp-heading-overline-container::before,
.bmp-h1-style-overline-container .entry-content h1:not([class*="is-style-bmp-heading-"])::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(max(24px, 50vw - var(--bmp-wide-half-width, 600px) - var(--bmp-heading-overline-overflow-desktop, 64px)) - 50vw + 50%);
    width: calc((50vw - 50%) - max(24px, 50vw - var(--bmp-wide-half-width, 600px) - var(--bmp-heading-overline-overflow-desktop, 64px)) + min(100%, 320px));
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}
.is-style-bmp-heading-overline-container.has-text-align-center::before,
.bmp-h1-style-overline-container .entry-content h1.has-text-align-center:not([class*="is-style-bmp-heading-"])::before {
    left: 50%;
    width: min(100%, 320px);
    transform: translateX(-50%);
}
.is-style-bmp-heading-overline-container.has-text-align-right::before,
.bmp-h1-style-overline-container .entry-content h1.has-text-align-right:not([class*="is-style-bmp-heading-"])::before {
    left: auto;
    right: calc(max(24px, 50vw - var(--bmp-wide-half-width, 600px) - var(--bmp-heading-overline-overflow-desktop, 64px)) - 50vw + 50%);
    width: calc((50vw - 50%) - max(24px, 50vw - var(--bmp-wide-half-width, 600px) - var(--bmp-heading-overline-overflow-desktop, 64px)) + min(100%, 320px));
    transform: none;
}

/* Titre automatique de l'entête de page : le span du libellé sert d'ancrage
 * afin que le filet accompagne réellement la largeur visuelle du titre. */
.bmp-h1-style-overline .bmp-page-header__title::before,
.bmp-h1-style-overline-container .bmp-page-header__title::before {
    display: none;
}
.bmp-h1-style-overline .bmp-page-header__title-text,
.bmp-h1-style-overline-container .bmp-page-header__title-text {
    display: inline-block;
    position: relative;
    max-width: 100%;
}
.bmp-h1-style-overline .bmp-page-header__title-text::before {
    content: "";
    position: absolute;
    top: calc(-16px - var(--bmp-h1-decoration-thickness, 6px));
    right: 0;
    width: 100vw;
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}
.bmp-h1-style-overline-container .bmp-page-header__title-text::before {
    content: "";
    position: absolute;
    top: calc(-16px - var(--bmp-h1-decoration-thickness, 6px));
    right: 0;
    width: calc(100% + var(--bmp-heading-overline-overflow-desktop, 64px));
    min-width: min(100%, 320px);
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}

/* Filet inférieur court. L'alignement horizontal suit celui du titre. */
.is-style-bmp-heading-underline,
.bmp-h1-style-underline .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-underline .bmp-page-header__title { padding-bottom: 18px; }
.is-style-bmp-heading-underline::after,
.bmp-h1-style-underline .entry-content h1:not([class*="is-style-bmp-heading-"])::after,
.bmp-h1-style-underline .bmp-page-header__title::after {
    content: "";
    display: block;
    width: var(--bmp-h1-underline-length, 96px);
    height: var(--bmp-h1-decoration-thickness, 6px);
    margin-top: 14px;
    background: var(--bmp-heading-decoration-color, #0072A3);
}
.is-style-bmp-heading-underline.has-text-align-center::after { margin-inline: auto; }
.is-style-bmp-heading-underline.has-text-align-right::after { margin-left: auto; margin-right: 0; }

.is-style-bmp-heading-leftbar,
.bmp-h1-style-leftbar .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-leftbar .bmp-page-header__title {
    border-left: var(--bmp-h1-decoration-thickness, 6px) solid var(--bmp-heading-decoration-color, #0072A3);
    padding-left: 20px;
}

.is-style-bmp-heading-highlight,
.bmp-h1-style-highlight .entry-content h1:not([class*="is-style-bmp-heading-"]),
.bmp-h1-style-highlight .bmp-page-header__title {
    display: table;
    padding-inline: .22em;
    background: linear-gradient(transparent 58%, var(--wp--preset--color--secondary, #90E0EF) 58%);
}

/* --------------------------------------------------------------------------
   Séparateurs de sections
   Les formes utilisent un masque : la couleur / le dégradé natif Gutenberg
   reste visible dans la forme, tandis que la zone hors forme est transparente.
   -------------------------------------------------------------------------- */
.wp-block-separator:is(
    .is-style-bmp-separator-line,
    .is-style-bmp-separator-wave,
    .is-style-bmp-separator-wave-inverse,
    .is-style-bmp-separator-curve,
    .is-style-bmp-separator-double-wave,
    .is-style-bmp-separator-organic
) {
    --bmp-separator-scale-x: 1;
    --bmp-separator-scale-y: 1;
    opacity: var(--bmp-separator-opacity, 1);
    transform: scale(var(--bmp-separator-scale-x), var(--bmp-separator-scale-y));
    transform-origin: center;
}

.wp-block-separator.bmp-separator-flip-x { --bmp-separator-scale-x: -1; }
.wp-block-separator.bmp-separator-flip-y { --bmp-separator-scale-y: -1; }

.wp-block-separator.is-style-bmp-separator-line {
    width: 100%;
    height: 2px;
    border: 0;
    margin-inline: 0;
}

.wp-block-separator:is(
    .is-style-bmp-separator-wave,
    .is-style-bmp-separator-wave-inverse,
    .is-style-bmp-separator-curve,
    .is-style-bmp-separator-double-wave,
    .is-style-bmp-separator-organic
) {
    width: 100%;
    max-width: none;
    height: 72px;
    border: 0;
    margin-block: 0;
    margin-inline: 0;
}

/* Couleur de repli uniquement si Gutenberg n'a pas déjà fourni un fond. */
.wp-block-separator:is(
    .is-style-bmp-separator-line,
    .is-style-bmp-separator-wave,
    .is-style-bmp-separator-wave-inverse,
    .is-style-bmp-separator-curve,
    .is-style-bmp-separator-double-wave,
    .is-style-bmp-separator-organic
):not(.has-background) {
    background-color: currentColor;
}

.wp-block-separator.is-style-bmp-separator-wave {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 38C220 8 420 16 610 25c190 9 380 14 590-2v77H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 38C220 8 420 16 610 25c190 9 380 14 590-2v77H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-separator.is-style-bmp-separator-wave-inverse {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0h1200v35c-220 28-430 18-620 8C390 33 190 20 0 48z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0h1200v35c-220 28-430 18-620 8C390 33 190 20 0 48z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-separator.is-style-bmp-separator-curve {
    height: 86px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 40Q600-5 1200 42v58H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 40Q600-5 1200 42v58H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-separator.is-style-bmp-separator-double-wave {
    height: 38px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 28c120-20 220 18 345 0s230-18 350 0 245 10 505-2M0 36c120-20 220 18 345 0s230-18 350 0 245 10 505-2' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 28c120-20 220 18 345 0s230-18 350 0 245 10 505-2M0 36c120-20 220 18 345 0s230-18 350 0 245 10 505-2' fill='none' stroke='white' stroke-width='3'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

/* Grande découpe asymétrique, pensée comme transition entre deux sections. */
.wp-block-separator.is-style-bmp-separator-organic {
    height: clamp(72px, 8vw, 132px);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 52C150 105 300 114 455 72C620 27 750 12 900 40C1030 65 1125 54 1200 20V140H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 52C150 105 300 114 455 72C620 27 750 12 900 40C1030 65 1125 54 1200 20V140H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}


/* Logo dynamique utilisable dans les zones Gutenberg du pied de page et les modèles libres. */
.bmp-theme-logo-block { color: var(--bmp-footer-logo-color, #0072A3); line-height: 0; }
.bmp-theme-logo-block__link { display: inline-flex; color: inherit; text-decoration: none; }
.bmp-theme-logo-block__image { display: block; width: min(100%, var(--bmp-theme-logo-width, 220px)); height: auto; max-height: none; object-fit: contain; }
.bmp-theme-logo-block svg.bmp-theme-logo-block__image { overflow: visible; }
.bmp-theme-logo-block__notice { line-height: 1.5; font-size: 14px; }

/* --------------------------------------------------------------------------
   Bannière / Cover : rails de contenu stables
   -------------------------------------------------------------------------- */
/*
 * La Bannière garde son outil natif de placement à 9 positions.
 * Sa zone de contenu possède toujours un gutter horizontal responsive et un
 * padding vertical par défaut défini dans theme.json. Les blocs internes sont
 * ensuite posés sur les mêmes rails que le reste du site : 840 / 1200 / full.
 *
 * Aucun calcul dépendant du viewport n’est appliqué au texte lui-même : un
 * paragraphe alignwide reste donc stable lorsque l’écran s’agrandit.
 */
.wp-block-cover__inner-container {
    width: 100%;
    min-width: 0;
}

.wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    width: 100%;
    max-width: var(--bmp-content-width);
    margin-inline: auto !important;
}

.wp-block-cover__inner-container > .alignwide {
    max-width: var(--bmp-wide-width);
}

.wp-block-cover__inner-container > .alignfull {
    width: 100%;
    max-width: none;
    margin-inline: 0 !important;
}

/* L’alignement du texte reste celui choisi sur le bloc Titre/Paragraphe. */
.wp-block-cover__inner-container :where(.wp-block-heading, p):not(.has-text-align-center):not(.has-text-align-right) {
    text-align: left;
}


/* --------------------------------------------------------------------------
   Séparateur de section BMP
   Bloc décoratif dédié. Contrairement à core/separator (<hr>), sa surface
   complète reçoit nativement les couleurs/dégradés Gutenberg puis un masque
   découpe la forme. La zone hors forme est réellement transparente.
   -------------------------------------------------------------------------- */
.wp-block-bmp-section-divider.bmp-section-divider {
    --bmp-divider-height-desktop: 120px;
    --bmp-divider-height-tablet: 96px;
    --bmp-divider-height-mobile: 72px;
    --bmp-divider-overlap-previous: 0px;
    --bmp-divider-overlap-next: 0px;
    --bmp-divider-opacity: 1;
    width: 100%;
    max-width: none;
    height: var(--bmp-divider-height-desktop);
    min-height: 1px;
    margin-top: calc(-1 * var(--bmp-divider-overlap-previous));
    margin-bottom: calc(-1 * var(--bmp-divider-overlap-next));
    border: 0;
    padding: 0;
    position: relative;
    z-index: 3;
    pointer-events: none;
    opacity: var(--bmp-divider-opacity);
    transform-origin: center;
}

/* Repli visuel seulement lorsqu'aucune couleur/dégradé n'a été choisi. */
.wp-block-bmp-section-divider.bmp-section-divider:not([class*="-background-color"]):not([class*="-gradient-background"]):not([style*="background"]) {
    background-color: var(--wp--preset--color--primary-dark, #0072A3);
}

.wp-block-bmp-section-divider.is-flipped-x { transform: scaleX(-1); }
.wp-block-bmp-section-divider.is-flipped-y { transform: scaleY(-1); }
.wp-block-bmp-section-divider.is-flipped-x.is-flipped-y { transform: scale(-1, -1); }

.wp-block-bmp-section-divider.is-shape-wave {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 54C210 13 420 18 610 34c190 16 385 18 590-9v115H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 54C210 13 420 18 610 34c190 16 385 18 590-9v115H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-bmp-section-divider.is-shape-wave-inverse {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0h1200v52c-205 38-405 27-598 8C409 41 211 26 0 66Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0h1200v52c-205 38-405 27-598 8C409 41 211 26 0 66Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-bmp-section-divider.is-shape-curve {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 78Q600-26 1200 66V160H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 78Q600-26 1200 66V160H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-bmp-section-divider.is-shape-organic {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 50C145 114 306 126 466 77C628 28 762 13 912 42C1038 66 1130 53 1200 18V160H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 50C145 114 306 126 466 77C628 28 762 13 912 42C1038 66 1130 53 1200 18V160H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

.wp-block-bmp-section-divider.is-shape-double-wave {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0 38c125-27 245 25 378 0s247-24 374 0 252 18 448-4M0 58c125-27 245 25 378 0s247-24 374 0 252 18 448-4' fill='none' stroke='white' stroke-width='5'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0 38c125-27 245 25 378 0s247-24 374 0 252 18 448-4M0 58c125-27 245 25 378 0s247-24 374 0 252 18 448-4' fill='none' stroke='white' stroke-width='5'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

.wp-block-bmp-section-divider.is-shape-diagonal {
    -webkit-clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%);
    clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%);
}
.wp-block-bmp-section-divider.is-shape-arc {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 108C170 35 370 0 600 0s430 35 600 108v72H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 108C170 35 370 0 600 0s430 35 600 108v72H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
/* Grand panneau courbe pouvant chevaucher un hero, inspiré des transitions latérales. */
.wp-block-bmp-section-divider.is-shape-side-arc-left {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H520C315 102 185 258 175 424c-8 137 65 236 176 276H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0H520C315 102 185 258 175 424c-8 137 65 236 176 276H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.wp-block-bmp-section-divider.is-shape-side-arc-right {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M1200 0H680c205 102 335 258 345 424 8 137-65 236-176 276h351Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M1200 0H680c205 102 335 258 345 424 8 137-65 236-176 276h351Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}


/* H1 multiligne : longueur du filet calée sur la première ligne réelle.
 *
 * Le span .bmp-heading-first-line est ajouté uniquement au rendu frontend par
 * inc/editor.php quand un H1 aligné à gauche contient un <br>. Le contenu
 * Gutenberg/WPML enregistré reste donc intact.
 *
 * Pour le filet jusqu'au bord de l'écran, le pseudo-élément mesure 100vw et son
 * bord droit est ancré sur la fin du span : le filet s'arrête exactement au
 * dernier caractère de la première ligne, quelle que soit la langue. */
.is-style-bmp-heading-overline.bmp-heading-first-line-anchor::before,
.bmp-h1-style-overline .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"])::before,
.is-style-bmp-heading-overline-container.bmp-heading-first-line-anchor::before,
.bmp-h1-style-overline-container .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"])::before {
    display: none;
}

.is-style-bmp-heading-overline.bmp-heading-first-line-anchor .bmp-heading-first-line,
.bmp-h1-style-overline .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"]) .bmp-heading-first-line,
.is-style-bmp-heading-overline-container.bmp-heading-first-line-anchor .bmp-heading-first-line,
.bmp-h1-style-overline-container .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"]) .bmp-heading-first-line {
    display: inline-block;
    position: relative;
    max-width: 100%;
}

.is-style-bmp-heading-overline.bmp-heading-first-line-anchor .bmp-heading-first-line::before,
.bmp-h1-style-overline .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"]) .bmp-heading-first-line::before {
    content: "";
    position: absolute;
    top: calc(-16px - var(--bmp-h1-decoration-thickness, 6px));
    right: 0;
    width: 100vw;
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}

/* Variante « au-delà du conteneur » : le filet part du dépassement configuré
 * à gauche du rail wide et finit lui aussi à la fin exacte de la première ligne. */
.is-style-bmp-heading-overline-container.bmp-heading-first-line-anchor .bmp-heading-first-line::before,
.bmp-h1-style-overline-container .entry-content h1.bmp-heading-first-line-anchor:not([class*="is-style-bmp-heading-"]) .bmp-heading-first-line::before {
    content: "";
    position: absolute;
    top: calc(-16px - var(--bmp-h1-decoration-thickness, 6px));
    right: 0;
    width: calc(100% + var(--bmp-heading-overline-overflow-desktop, 64px));
    min-width: 100%;
    height: var(--bmp-h1-decoration-thickness, 6px);
    background: var(--bmp-heading-decoration-color, #0072A3);
}

/* --------------------------------------------------------------------------
   Séparateurs supplémentaires 0.10.34
   Formes reprises du SVG de référence « Formes separateur.svg ».
   -------------------------------------------------------------------------- */
.wp-block-bmp-section-divider.is-shape-straight {
    -webkit-mask: none;
    mask: none;
}

/* Bande dont le bord supérieur forme une pointe centrale vers le bas. */
.wp-block-bmp-section-divider.is-shape-chevron {
    -webkit-clip-path: polygon(0 0, 50% 47%, 100% 0, 100% 100%, 0 100%);
    clip-path: polygon(0 0, 50% 47%, 100% 0, 100% 100%, 0 100%);
}

/* Fine bande à gauche qui remonte progressivement jusqu'en haut à droite.
 * Le miroir horizontal natif du bloc permet d'obtenir immédiatement la
 * variante symétrique sans dupliquer le dessin. */
.wp-block-bmp-section-divider.is-shape-swoop-right {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 160H650c292 0 495-77 495-160h55v180H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 180' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 160H650c292 0 495-77 495-160h55v180H0Z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}

/* --------------------------------------------------------------------------
   Filtres d’image BMP 0.10.36

   Préréglages non destructifs pour les blocs médias Gutenberg natifs.
   Le filtre cible uniquement le média, jamais le texte d’une Bannière/Cover
   ou du bloc Média & texte. Les mêmes règles servent dans Gutenberg et sur le
   frontend afin de conserver un rendu WYSIWYG.

   « Noir et blanc » est volontairement plus contrasté que « Niveaux de gris ».
   -------------------------------------------------------------------------- */
.has-bmp-image-filter-sepia,
[data-bmp-image-filter="sepia"] {
    --bmp-image-filter: sepia(1);
}

.has-bmp-image-filter-black-white,
[data-bmp-image-filter="black-white"] {
    --bmp-image-filter: grayscale(1) contrast(1.32) brightness(1.02);
}

.has-bmp-image-filter-grayscale,
[data-bmp-image-filter="grayscale"] {
    --bmp-image-filter: grayscale(1);
}

.has-bmp-image-filter-contrast,
[data-bmp-image-filter="contrast"] {
    --bmp-image-filter: contrast(1.25);
}

.has-bmp-image-filter-brightness,
[data-bmp-image-filter="brightness"] {
    --bmp-image-filter: brightness(1.15);
}

.has-bmp-image-filter-saturation,
[data-bmp-image-filter="saturation"] {
    --bmp-image-filter: saturate(1.4);
}

.has-bmp-image-filter-vintage,
[data-bmp-image-filter="vintage"] {
    --bmp-image-filter: sepia(.38) saturate(.78) contrast(1.08) brightness(.96);
}

.has-bmp-image-filter-blur,
[data-bmp-image-filter="blur"] {
    --bmp-image-filter: blur(2px);
}

/* Frontend : chaque bloc applique le filtre uniquement à son média direct ou
 * à ses médias de galerie. Les contenus imbriqués d’une Cover ne sont donc pas
 * altérés par le filtre de son image d’arrière-plan. */
.wp-block-image.has-bmp-image-filter :where(img),
.wp-block-gallery.has-bmp-image-filter .wp-block-image :where(img),
.wp-block-cover.has-bmp-image-filter > :where(.wp-block-cover__image-background, .wp-block-cover__video-background),
.wp-block-media-text.has-bmp-image-filter > .wp-block-media-text__media :where(img, video),
.wp-block-post-featured-image.has-bmp-image-filter :where(img) {
    -webkit-filter: var(--bmp-image-filter, none);
    filter: var(--bmp-image-filter, none);
}

/* Gutenberg iframé : le contrôle ajoute data-bmp-image-filter au wrapper du
 * bloc sélectionné. data-type garantit qu’une Cover ne filtre pas une image
 * insérée dans son contenu, mais uniquement son propre arrière-plan. */
.editor-styles-wrapper [data-type="core/image"][data-bmp-image-filter] :where(img),
.editor-styles-wrapper [data-type="core/gallery"][data-bmp-image-filter] :where(img),
.editor-styles-wrapper [data-type="core/cover"][data-bmp-image-filter] :where(.wp-block-cover__image-background, .wp-block-cover__video-background),
.editor-styles-wrapper [data-type="core/media-text"][data-bmp-image-filter] .wp-block-media-text__media :where(img, video),
.editor-styles-wrapper [data-type="core/post-featured-image"][data-bmp-image-filter] :where(img) {
    -webkit-filter: var(--bmp-image-filter, none);
    filter: var(--bmp-image-filter, none);
}


/* ==========================================================================
   Groupe Gutenberg : coins arrondis et contenu interne
   ========================================================================== */
/*
 * Le rayon de bordure natif de core/group ne rogne pas automatiquement ses
 * enfants. Le rendu PHP ajoute cette classe uniquement lorsqu'un rayon natif
 * Gutenberg non nul est configuré. L'image, le Cover ou tout autre enfant
 * épouse ainsi réellement la silhouette du Groupe parent.
 *
 * hidden sert de repli ; clip évite de créer un conteneur de défilement dans
 * les navigateurs modernes tout en conservant le rognage aux coins.
 */
.bmp-group-clips-rounded-content {
    overflow: hidden;
    overflow: clip;
}

/*
 * Gutenberg ne place pas toujours les classes ajoutées par une extension sur
 * le même nœud que le style natif border-radius. Le HOC JS applique désormais
 * la classe au rendu du bloc et au wrapper éditeur ; ces sélecteurs de repli
 * garantissent que le vrai Groupe visuel est rogné lui aussi. Cela évite le cas
 * où le frontend épouse les coins mais où l'image déborde encore dans l'éditeur.
 */
.editor-styles-wrapper [data-type="core/group"].bmp-group-clips-rounded-content {
    border-radius: var(--bmp-editor-group-radius, inherit);
}

.editor-styles-wrapper [data-type="core/group"].bmp-group-clips-rounded-content > .wp-block-group,
.editor-styles-wrapper [data-type="core/group"].bmp-group-clips-rounded-content > [class*="wp-block-group"],
.editor-styles-wrapper .wp-block-group.bmp-group-clips-rounded-content {
    overflow: hidden;
    overflow: clip;
    border-radius: var(--bmp-editor-group-radius, inherit);
}

/* ==========================================================================
   Groupe Gutenberg entièrement cliquable
   ========================================================================== */
.bmp-linked-group {
    position: relative;
    cursor: pointer;
    isolation: isolate;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.bmp-linked-group > .bmp-group-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: block;
    border-radius: inherit;
    color: transparent !important;
    text-decoration: none !important;
}

/* Les vrais contrôles/liens placés dans la carte restent utilisables au-dessus
 * du lien étendu. Les contenus non interactifs restent sous l'overlay afin
 * qu'un clic sur l'image, le titre ou le texte ouvre bien la destination. */
.bmp-linked-group :where(
    a:not(.bmp-group-link-overlay),
    button,
    input,
    select,
    textarea,
    summary,
    [role="button"],
    [tabindex]:not([tabindex="-1"])
) {
    position: relative;
    z-index: 30;
}

/* Certains contrôles Gutenberg créent leur propre contexte d’empilement.
 * On remonte aussi leurs enveloppes afin que boutons, formulaires, fichiers,
 * navigation et icônes sociales restent toujours cliquables dans une carte. */
.bmp-linked-group :where(
    .wp-block-buttons,
    .wp-block-button,
    .wp-block-navigation,
    .wp-block-social-links,
    .wp-block-file,
    form
) {
    position: relative;
    z-index: 30;
}

.bmp-linked-group > .bmp-group-link-overlay:focus-visible {
    outline: 3px solid var(--bmp-context-link-color, var(--wp--preset--color--primary-dark, #0072A3));
    outline-offset: 4px;
}

.bmp-linked-group :where(img, .wp-block-cover__image-background) {
    transition: transform 320ms cubic-bezier(.2,.75,.25,1);
}

.bmp-linked-group :where(h1, h2, h3, h4, h5, h6, p) {
    transition: color 220ms ease;
}

/* Le zoom est contenu par les blocs médias. Les images avec légende sont
 * laissées intactes afin que l'agrandissement ne vienne pas recouvrir la
 * légende. */
.bmp-linked-group--image-zoom :where(.wp-block-image:not(:has(figcaption)), .wp-block-media-text__media, .wp-block-cover),
.bmp-linked-group--image-zoom-title :where(.wp-block-image:not(:has(figcaption)), .wp-block-media-text__media, .wp-block-cover),
.bmp-linked-group--image-zoom-lift :where(.wp-block-image:not(:has(figcaption)), .wp-block-media-text__media, .wp-block-cover) {
    overflow: hidden;
}

.bmp-linked-group--image-zoom:hover :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background),
.bmp-linked-group--image-zoom:focus-within :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background),
.bmp-linked-group--image-zoom-title:hover :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background),
.bmp-linked-group--image-zoom-title:focus-within :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background),
.bmp-linked-group--image-zoom-lift:hover :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background),
.bmp-linked-group--image-zoom-lift:focus-within :where(.wp-block-image:not(:has(figcaption)) img, .wp-block-media-text__media img, .wp-block-cover__image-background) {
    transform: scale(1.045);
}

/*
 * « Accentuer le texte / titre » doit fonctionner quel que soit le bloc texte
 * choisi pour la carte : Titre H1-H6 ou Paragraphe. La priorité forte est
 * volontaire uniquement pendant le survol/focus afin que l'effet reste visible
 * même si une couleur locale Gutenberg a été définie sur ce texte.
 */
.bmp-linked-group--title-accent:hover :where(h1, h2, h3, h4, h5, h6, p),
.bmp-linked-group--title-accent:focus-within :where(h1, h2, h3, h4, h5, h6, p),
.bmp-linked-group--image-zoom-title:hover :where(h1, h2, h3, h4, h5, h6, p),
.bmp-linked-group--image-zoom-title:focus-within :where(h1, h2, h3, h4, h5, h6, p) {
    color: var(--bmp-context-link-hover-color, var(--bmp-link-on-light-hover, var(--wp--preset--color--primary, #009ADE))) !important;
}

.bmp-linked-group--lift:hover,
.bmp-linked-group--lift:focus-within,
.bmp-linked-group--image-zoom-lift:hover,
.bmp-linked-group--image-zoom-lift:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgb(0 0 0 / 14%);
}

@media (prefers-reduced-motion: reduce) {
    .bmp-linked-group,
    .bmp-linked-group :where(img, .wp-block-cover__image-background),
    .bmp-linked-group :where(h1, h2, h3, h4, h5, h6, p) {
        transition: none;
    }
    .bmp-linked-group--image-zoom:hover :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--image-zoom:focus-within :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--image-zoom-title:hover :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--image-zoom-title:focus-within :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--image-zoom-lift:hover :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--image-zoom-lift:focus-within :where(img, .wp-block-cover__image-background),
    .bmp-linked-group--lift:hover,
    .bmp-linked-group--lift:focus-within,
    .bmp-linked-group--image-zoom-lift:hover,
    .bmp-linked-group--image-zoom-lift:focus-within {
        transform: none;
    }
}

/* Dans Gutenberg l'overlay n'est pas injecté : les classes servent uniquement
 * à prévisualiser les effets sans rendre le bloc difficile à sélectionner. */
.editor-styles-wrapper .block-editor-block-list__block.bmp-linked-group {
    cursor: pointer;
}
