/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

#breadcrumbs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

body #breadcrumbs a,
body.ast-single-post .entry-content #breadcrumbs a {
    background-image: linear-gradient(var(--e-global-color-text), var(--e-global-color-text));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    padding-bottom: 1px;
    transition: background-size .3s ease-in-out;
}

/* body #breadcrumbs #breadcrumbs_last{
    background-image: linear-gradient(var(--e-global-color-text), var(--e-global-color-text));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 100% 1px;
    padding-bottom: 1px;
    transition: background-size .3s ease-in-out;
    line-height: 110%;
} */

body .elementor-widget-counter .elementor-counter-number-wrapper p{
    margin-bottom: 0px;
}


body .elementor-button-content-wrapper p.elementor-button-text, body .jet-color-image-list__item p.jet-color-image-list__label{
    margin-bottom: 0px!important;
}

/* Add smooth transitions for better UX */

div[data-filter-id="1493"] .jet-color-image-list__button .jet-color-image-list__label{
   
}

div[data-filter-id="1493"] .jet-color-image-list__button {
    transition: all 0.3s ease;
}

/* Checked state */
div[data-filter-id="1493"] .jet-color-image-list__input:checked + .jet-color-image-list__button {
    background: #0859A6;
    border-color: #0859A6;
    border-width: 0px!important;
    border-radius: 50px;
}

div[data-filter-id="1493"] .jet-color-image-list__input:checked + .jet-color-image-list__button .jet-color-image-list__label {
    color: #fff!important;
    background: #0859A6!important;
    
}

/* Style the color indicator */
div[data-filter-id="1493"] .jet-color-image-list__input:checked + .jet-color-image-list__button .jet-color-image-list__color {
    border: 2px solid #fff;
    box-sizing: border-box;
}

@media(max-width: 768px) {
    #breadcrumbs ul {
        display: block;
    }

    #breadcrumbs ul li {
        display: inline;
        margin-right: 5px;
    }
}

/* === FICHES PRATIQUES === */

/**
 * Fiches pratiques — blog styling for archive & single post views.
 *
 * Conventions :
 *  - selectors namespaced `.fp-*` to avoid clashing
 *  - high-specificity selectors used to defeat Elementor's per-widget colors
 *    and Astra's defaults; !important reserved for cases where Elementor
 *    writes inline-equivalent rules that can't otherwise be beaten.
 *
 * ===========================================================================
 *   RÉGLAGES RAPIDES — marges du bloc « Toutes nos fiches pratiques »
 *   Modifie les 5 valeurs ci-dessous pour ajuster chaque marge indépendamment.
 * ===========================================================================
 */

:root {
    /* ────────── ZONE LAVANDE (H2 + vagues) ────────── */

    /* 1) Marge AU-DESSUS du titre « Toutes nos fiches pratiques »
          (depuis le haut du bloc lavande) */
    --fp-h2-margin-top: 48px;

    /* 2) Marge APRÈS les vagues (purement cosmétique : la zone lavande
          est indépendante de la zone verte ci-dessous) */
    --fp-vagues-margin-bottom: 40px;

    /* 2b) Marge GAUCHE du titre « Toutes nos fiches pratiques »
           (par rapport au bord interne du elementor-container). */
    --fp-title-margin-left: -104px;

    /* 2c) Marge GAUCHE des vagues (indépendante du titre). */
    --fp-vagues-margin-left: -104px;

    /* ────────── ZONE VERTE (flèche + cartes) ────────── */

    /* 3) Position du haut de la zone verte (offset depuis le haut du bloc) */
    --fp-green-top-offset: 180px;

    /* 4) Marge AU-DESSUS de la flèche déco (depuis le haut de la zone verte).
          Valeur négative = la flèche remonte par-dessus la frontière vert/lavande. */
    --fp-arrow-margin-top: -32px;

    /* 5) Marge APRÈS la flèche déco (sous la flèche, avant les vignettes) */
    --fp-arrow-margin-bottom: 3px;

    /* 6) Décalage horizontal des cards (sans changement de taille).
          Valeur négative (ex: -84px) = décale vers la GAUCHE (déborde à gauche).
          Valeur positive = décale vers la DROITE. */
    --fp-cards-overhang-left: -84px;

    /* 7) Hauteur du bloc lavande "Toutes nos fiches pratiques". Utile surtout
          en mobile où le H2 peut prendre plus de place sur 2-3 lignes. */
    --fp-lavender-height: 200px;

    /* ────────── CARTES ACTUS ────────── */

    /* 8) Marge entre l'IMAGE et la ligne catégorie / date */
    --fp-card-img-to-meta: 6px;

    /* 9) Marge entre la catégorie / date et le SÉPARATEUR (trait sous la meta) */
    --fp-card-meta-to-separator: 6px;

    /* ────────── PAGE DÉTAIL — pictos autour du chapô ──────────
       Réglage indépendant de la position de chaque picto.
       X positif = vers l'intérieur du texte ; Y positif = vers le bas. */

    /* Picto GAUCHE */
    --fp-picto-gauche-x: -40px;  /* distance depuis le bord gauche du bloc */
    --fp-picto-gauche-y: 0px;    /* décalage vertical (0 = centré) */

    /* Picto DROITE */
    --fp-picto-droite-x: 0px;    /* distance depuis le bord droit du bloc */
    --fp-picto-droite-y: 0px;    /* décalage vertical (0 = centré) */

    /* Picto DESSOUS */
    --fp-picto-sous-x: 0px;      /* décalage horizontal (0 = centré) */
    --fp-picto-sous-y: 1px;      /* distance depuis le bas du bloc */

    /* Marge AU-DESSUS du bloc vert complet (« Les principales aides ») */
    --fp-green-block-margin-top: 32px;
}

/* ===========================================================================
 *   RESPONSIVE — surcharger les variables pour tablet et mobile
 *   Ajuste les valeurs dans chaque media query indépendamment.
 * ===========================================================================
 */

/* TABLET (≤ 1024px) ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root {
        --fp-h2-margin-top: 40px;
        --fp-vagues-margin-bottom: 32px;
        --fp-green-top-offset: 160px;
        --fp-arrow-margin-top: -24px;
        --fp-arrow-margin-bottom: 4px;
        --fp-cards-overhang-left: 0px;
        --fp-lavender-height: 180px;
    }
}

/* MOBILE (≤ 768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --fp-h2-margin-top: 32px;
        --fp-vagues-margin-bottom: 24px;
        --fp-green-top-offset: 178px;
        --fp-arrow-margin-top: 1px;
        --fp-arrow-margin-bottom: 0px;
        --fp-cards-overhang-left: 0px;
        --fp-lavender-height: 212px;
    }

    /*
     * Mobile alignment : H2, vagues, flèche et cards partagent le même
     * bord gauche.
     *  - H2 widget : left:10px (= offset naturel du widget grid dans la
     *    colonne Elementor), padding 0 pour éviter un double décalage.
     *  - Flèche : margin-left 0 (au lieu de 5%).
     *  - Container : padding latéral réduit à 16px.
     */
    .fp-archive-h2 {
        left: 10px !important;
        right: 10px !important;
        padding: 0;
    }

    .fp-archive-grid::before {
        margin-left: 0 !important;
    }

    .fp-archive-grid-wrap > .elementor-container,
    .fp-archive-grid-wrap > .e-con-inner {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ===========================================================================
 *   MENU PRINCIPAL — fit 4 items sur une seule ligne en desktop
 *   (le menu d'origine, prévu pour 3 items, faisait passer le 4e à la ligne)
 * ===========================================================================
 */
@media (min-width: 1025px) {
    body .elementor-widget-nav-menu .elementor-nav-menu__container {
        width: auto;
    }
    body ul.elementor-nav-menu {
        flex-wrap: nowrap !important;
        gap: 22px;
        white-space: nowrap;
        justify-content: center;
    }
    body ul.elementor-nav-menu > li {
        flex: 0 0 auto;
    }
    body ul.elementor-nav-menu > li > a {
        white-space: nowrap;
    }
}

/* ===== Tokens ============================================================ */

:root {
    --fp-color-blue:        #0859A6;
    --fp-color-blue-deep:   #0D2A6C;
    --fp-color-bordeaux:    #A93455;
    --fp-color-green-soft:  #D7E9CF;
    --fp-color-lavender:    #EFF2FF;
    --fp-color-peach:       #FCEFE3;
    --fp-color-card:        #FFFFFF;
    --fp-color-text:        #1A1A1A;
    --fp-radius-section:    32px;
    /* Bandeau titre « Les fiches pratiques » : retrait du texte par rapport au
       bord gauche de la zone de contenu (le fond file jusqu'au bord de l'écran). */
    --fp-title-bleed-indent: 28px;
    /* Décalage vertical de la petite flèche à gauche de « Lire la suite » sur les
       cartes (valeur négative = remonte). */
    --fp-card-readmore-arrow-up: -11px;
    /* Flèches du carrousel « Les autres articles » (page détail) : position de
       la flèche gauche (débordant dans le fond blanc, valeur négative) et droite
       (à l'intérieur du fond pêche), + nudge vertical par rapport au centre. */
    --fp-rel-arrow-left: -66px;
    --fp-rel-arrow-right: 18px;
    --fp-rel-arrow-y: 0px;
    /* Bloc « Trouvez l'aide adaptée » (bas des pages détail) : panneau bleu
       plein-largeur à gauche, derrière l'encadré orange. Hauteur 722px =
       688px (encadré orange) + 34px de débord en bas ; arrondi en bas à droite. */
    --fp-precise-blue-color: #EFF2FF;
    /* Décalage du HAUT du panneau lavande par rapport au haut de l'encadré
       orange (0 = aligné ; 32px = 32px plus bas). Ajustable. */
    --fp-precise-blue-top: 32px;
    /* Hauteur du panneau. 690 = 722 (encadré 688 + débord 34) − 32 de top,
       pour conserver un débord de 34px en bas malgré le décalage du haut. */
    --fp-precise-blue-height: 690px;
    --fp-precise-blue-radius: 40px;
    --fp-precise-text-color: #0859A6;
    /* Largeur de l'encadré orange, ancré au bord DROIT de l'écran. En %vw
       (et non en px) pour suivre l'encadré qui fait 48% de large : son bord
       gauche est donc toujours à `100vw − 48vw = 52vw`, à toute largeur de
       fenêtre. C'est ce qui garde le bord droit du panneau caché derrière
       l'orange en responsive (au lieu de ressortir avec un angle droit). */
    --fp-precise-orange-width: 48vw;
    /* Profondeur de pénétration du panneau lavande dans l'encadré orange (à
       droite) : le panneau part du bord gauche de l'écran et s'arrête à
       `pénétration` px à l'intérieur du bord gauche de l'encadré orange. */
    --fp-precise-blue-penetration: 400px;
    /* Marge au-dessus du footer sur les pages de détail d'article. */
    --fp-footer-margin-top: 46px;
    /* Bloc « Les autres articles » : demi-largeur de la zone contenue (1240/2)
       qui fixe le bord GAUCHE du bloc ; le bord DROIT file jusqu'au bord de
       l'écran. Augmenter cette valeur décale le bord gauche vers la gauche. */
    --fp-related-left-half: 620px;
    /* SVG wave kept here for the single-article lead decoration. The archive
       H2 uses the heavier vagues.png asset instead — see .fp-archive-h2. */
    --fp-wave: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' fill='none'><path d='M2 8c4-6 8-6 12 0s8 6 12 0 8-6 12 0 8 6 12 0 8-6 12 0 8 6 12 0 8-6 12 0 8 6 12 0' stroke='%23A93455' stroke-width='2' stroke-linecap='round'/></svg>");
}

/* ===== Generic accessibility helpers ===================================== */

.fp-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Archive: hero bandeau ============================================ */

.elementor-widget-image.fp-archive-hero-img img,
.fp-archive-hero-img img,
.fp-archive-hero .elementor-widget-image img {
    display: block !important;
    width: 100% !important;
    height: clamp(180px, 28vw, 360px) !important;
    max-height: 360px !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    position: relative !important;
}

/*
 * Stretch the hero section full-width but disable the broken Elementor
 * stretch transform that pushes the image off the canvas.
 */
.elementor-section.fp-archive-hero.elementor-section-stretched,
.fp-archive-hero.elementor-section-stretched {
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    position: relative !important;
}

/* ===== Breadcrumb top section (above the hero, per PSD) ================== */

.fp-archive-bc-section {
    margin-bottom: 0 !important;
}

.fp-archive-bc-section .elementor-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* ===== Breadcrumb (Elementor widget) ===================================== */

.fp-breadcrumb .elementor-widget-container > ul,
.fp-breadcrumb ul,
.elementor-widget-breadcrumbs .fp-breadcrumb ul {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Fil d'Ariane façon /les-aides/ : Poppins Normal 13,6px, texte quasi noir. */
    color: #050505;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-weight: 400 !important;
    font-size: 13.6px !important;
}

.fp-breadcrumb ul li {
    list-style: none !important;
    display: inline-flex;
    align-items: center;
}

/* Pages parentes : cliquables ET soulignées (comme /les-aides/). */
.fp-breadcrumb a,
.fp-breadcrumb a:link,
.fp-breadcrumb a:visited {
    color: #050505 !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-weight: 400 !important;
    font-size: 13.6px !important;
    text-decoration: underline !important;
}

.fp-breadcrumb a:hover,
.fp-breadcrumb a:focus {
    text-decoration: underline !important;
}

@media (max-width: 768px) {
    .fp-breadcrumb ul {
        display: block !important;
    }
    .fp-breadcrumb ul li {
        display: inline;
        margin-right: 5px;
    }
}

/* ===== Archive: title block (H1 + sub) =================================== */

/* Wrap inner container — same width as the wrap section below for alignment */
.fp-archive-head > .elementor-container,
.fp-archive-head > .e-con-inner {
    max-width: 1140px;
    margin: 0 auto;
}

/*
 * H1 wrapped in a rounded lavender pill (PSD: title sits on a light-purple
 * rounded block, not plain text). We apply the lavender background DIRECTLY
 * on the <h1> rather than the Elementor widget wrapper — the widget wrapper
 * is forced to 100% width by Elementor's flex column, and `display:inline-block`
 * on it doesn't always survive specificity wars. Styling the H1 element
 * itself with `display:inline-block` + `width:fit-content` lets the lavender
 * hug the title precisely.
 */
body .fp-archive-title.elementor-widget,
body .elementor-widget.fp-archive-title {
    background: transparent !important;
    padding: 0 !important;
    margin: 16px 0 12px !important;
    text-align: left;
}

body .fp-archive-title .elementor-heading-title,
body .fp-archive-title h1.elementor-heading-title,
.elementor-widget.fp-archive-title h1 {
    display: inline-block !important;
    width: -moz-fit-content;
    width: fit-content !important;
    max-width: none;
    /* Bandeau pleine-largeur à gauche, façon bloc « LES AIDES » de /les-aides/ :
       le fond lavande file jusqu'au bord gauche de l'écran (margin-left négatif),
       et le padding-left compense pour replacer le texte au bord de la zone de
       contenu. Coins droits arrondis (50px), coins gauches plats. */
    margin-left: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 18px 56px 18px calc(50vw - 50% + var(--fp-title-bleed-indent)) !important;
    background: var(--fp-color-lavender) !important;
    border-radius: 0 50px 50px 0;
    color: var(--fp-color-bordeaux) !important;
    text-transform: uppercase;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
}

@media (max-width: 640px) {
    body .fp-archive-title .elementor-heading-title,
    body .fp-archive-title h1.elementor-heading-title {
        --fp-title-bleed-indent: 20px;
        padding-top: 14px !important;
        padding-bottom: 14px !important;
        padding-right: 32px !important;
    }
}

body .fp-archive-subtitle-wrap .elementor-widget-container,
body .fp-archive-subtitle-wrap p,
body .fp-archive-subtitle-wrap .fp-archive-subtitle {
    color: #0859A6 !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 1.3 !important;
    margin: 16px 0 8px !important;
}

/* ===== Archive: dual-tone grid section (lavender + green pastel) ========= */

/*
 * The PSD shows two stacked rounded panels:
 *   - a lavender block at the TOP holding the H2 + decorative wave
 *   - a larger green-pastel block BEHIND containing the cards grid and the
 *     pagination, slightly overlapping the lavender so they appear to sit on
 *     top of each other.
 *
 * We render this with two pseudo-elements on the same Elementor section,
 * keeping the section semantics intact and the content stacking simple.
 */

.elementor-section.fp-archive-grid-wrap.elementor-section-stretched,
.fp-archive-grid-wrap.elementor-section-stretched {
    /* Centering + override of Elementor "stretched" transforms.
     * Width = 1140 to MATCH the head section (H1+subtitle) which is bounded
     * by Astra's default 1140 boxed width — both must share the same left
     * edge so the lavender block lines up with the H1 pill above it.
     */
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 1140px !important;
    margin: 32px auto !important;
    position: relative !important;

    /* No background on the section itself — the pseudo-elements paint it. */
    background: transparent !important;
    padding: 0 !important;
    overflow: visible !important;
}

/*
 * Hide Elementor's `shape_divider_top` curve — the wrap section was
 * created with a curve divider for an earlier iteration, but the PSD
 * shows the top edge of the lavender block as a clean rounded rectangle
 * (no organic curve). Removing it via CSS is safer than re-pushing
 * Elementor data again.
 */
.fp-archive-grid-wrap .elementor-shape,
.fp-archive-grid-wrap > .elementor-shape-top,
.fp-archive-grid-wrap > .elementor-shape-bottom {
    display: none !important;
}

/*
 * Pseudo-elements offset by 10px left/right to match Elementor's default
 * inner container padding of the head section above, so the lavender pill
 * around the H1 and the lavender block of the wrap share the exact same
 * left edge (pixel-perfect alignment).
 */

/*
 * Lavender block (top): full-bleed to the LEFT edge of the viewport.
 * `calc(50% - 50vw)` reaches the viewport's left edge from any centered
 * parent (50% of parent ≈ center of viewport when the parent is centered,
 * minus 50vw = viewport's left edge).
 * Left corners flat (since they touch the viewport edge), right corners
 * rounded (the inner edge in the layout).
 */
.fp-archive-grid-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: calc(50% - 50vw);
    right: 10px;
    /* Knob #7: hauteur du bloc lavande */
    height: var(--fp-lavender-height);
    background: var(--fp-color-lavender);
    border-radius: 0 var(--fp-radius-section) var(--fp-radius-section) 0;
    z-index: 0;
}

/*
 * Green pastel block: positioned so it overlaps the bottom of the lavender
 * (negative top offset from the lavender's bottom) and crucially with a
 * z-index ABOVE the lavender on the LEFT side. We use clip-path-friendly
 * stacking: green sits in front so its left edge cleanly overrides the
 * lavender's bottom-left corner.
 */
.fp-archive-grid-wrap::after {
    content: "";
    position: absolute;
    /* Knob #5: position du haut de la zone verte. Plus haute = green plus haut,
       plus basse = green plus bas. L'overlap avec la lavande garde l'effet
       "le vert passe par-dessus la lavande à gauche" du PSD. */
    top: var(--fp-green-top-offset);
    left: 10px;
    /* Full-bleed to the RIGHT edge of the viewport (same calc as the
       lavender's left-bleed, mirrored on the right side). */
    right: calc(50% - 50vw);
    bottom: 0;
    background: var(--fp-color-green-soft);
    /* Left corners rounded (the inner edge), right corners flat (they touch
       the viewport's right edge). */
    border-radius: var(--fp-radius-section) 0 0 var(--fp-radius-section);
    z-index: 1;          /* in front of the lavender (::before is 0) */
}

/*
 * The inner container holds content above both pseudo-element layers.
 * No `padding-top` here so the H2 zone and the cards zone can be controlled
 * independently — the H2 widget is absolutely positioned (anchored to the
 * top of the lavender block) and the cards widget gets its own margin-top
 * anchored to the green block. Changing the H2 spacing therefore does NOT
 * shift the cards, and vice versa.
 */
.fp-archive-grid-wrap > .elementor-container,
.fp-archive-grid-wrap > .e-con-inner {
    position: relative;
    z-index: 2;          /* above ::before (0) and ::after (1) */
    max-width: 100%;
    padding: 0 clamp(24px, 4vw, 56px) 64px;
    /* Ensures the lavender area always has space for the H2 even when it's
       absolutely positioned (no content collapse before the cards). */
    min-height: var(--fp-green-top-offset);
}

@media (max-width: 768px) {
    .elementor-section.fp-archive-grid-wrap.elementor-section-stretched,
    .fp-archive-grid-wrap.elementor-section-stretched {
        margin: 24px 16px !important;
        max-width: calc(100% - 32px) !important;
    }
    /*
     * NOTE : on NE redéfinit plus ici la hauteur de la lavande (::before)
     * ni le top du vert (::after) — ces valeurs sont pilotées uniquement par
     * les variables --fp-lavender-height et --fp-green-top-offset déclarées
     * dans le bloc `@media (max-width: 768px) { :root { ... } }` ci-dessus.
     * Mettre une valeur en dur ici les écraserait (bug corrigé).
     * Le padding-top du container reste à 0 pour préserver le découplage
     * H2 (absolu) / cartes (margin-top piloté par les knobs).
     */
    .fp-archive-grid-wrap > .elementor-container {
        padding: 0 16px 48px;
    }
}

/*
 * H2 widget is anchored to the lavender area via absolute positioning so
 * the title + vagues block is *visually* independent of the cards below.
 * Knob #1 (`--fp-h2-margin-top`) only moves the title — it never shifts
 * the green panel or the cards.
 */
.fp-archive-h2 {
    position: absolute !important;
    top: var(--fp-h2-margin-top) !important;
    left: clamp(24px, 4vw, 56px);
    right: clamp(24px, 4vw, 56px);
    z-index: 2;
}

/* H2 "Toutes nos fiches pratiques" + wave */
body .fp-archive-h2 .elementor-heading-title,
body .fp-archive-h2 h2.elementor-heading-title,
.elementor-widget.fp-archive-h2 h2 {
    color: #0859A6 !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    /* margin-left = knob #2b : décale le titre par rapport au container */
    margin: 0 0 6px var(--fp-title-margin-left);
    line-height: 1.15;
}

.fp-archive-h2::after {
    content: "";
    display: block;
    width: 260px;
    height: 22px;
    /* margin: haut | droite | bas (knob #2) | gauche (knob #2c) */
    margin: 12px 0 var(--fp-vagues-margin-bottom) var(--fp-vagues-margin-left);
    background-image: url("../img/vagues.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left top;
    position: relative;
    z-index: 2;
}

/*
 * Decorative arrow — uses the PSD reference asset `fleche.png` shipped
 * inside the plugin (img/ subfolder). The CSS file lives in `public/css/`
 * so the relative path goes up one level then into `img/`.
 */
/*
 * The Posts widget itself is anchored to the top of the green panel.
 * Knob #3 (`--fp-green-top-offset`) controls where the green starts;
 * Knob #4 (`--fp-arrow-margin-top`) controls the gap between the green
 * top and the arrow. The H2 zone above doesn't affect this anchor —
 * it lives in absolute-positioning land.
 *
 * Knob #6 (`--fp-cards-overhang-left`) décale le bloc des cartes
 * horizontalement SANS le redimensionner. On utilise `transform: translateX`
 * (et non margin+width) : translateX déplace l'élément en gardant exactement
 * la même taille et sans toucher au layout des colonnes.
 *   - valeur négative (ex: -40px) → décale vers la GAUCHE (déborde à gauche)
 *   - valeur positive (ex: 40px)  → décale vers la DROITE
 */
.fp-archive-grid {
    margin-top: calc(var(--fp-green-top-offset) + var(--fp-arrow-margin-top)) !important;
    transform: translateX(var(--fp-cards-overhang-left)) !important;
}

.fp-archive-grid::before {
    content: "";
    display: block;
    width: 64px;
    height: 80px;
    /* Knob #5 only: marge APRÈS la flèche déco (avant les cards) */
    margin: 0 0 var(--fp-arrow-margin-bottom) 5%;
    background-image: url("../img/fleche.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: left top;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .fp-archive-grid::before {
        width: 48px;
        height: 60px;
        margin: 8px 0 16px 4%;
    }
}

/* ===== Archive & related: cards grid ===================================== */

.fp-archive-grid .elementor-posts-container,
.fp-related-grid .elementor-posts-container {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .fp-archive-grid .elementor-posts-container,
    .fp-related-grid .elementor-posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .fp-archive-grid .elementor-posts-container,
    .fp-related-grid .elementor-posts-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.fp-archive-grid .elementor-post,
.fp-related-grid .elementor-post {
    background: var(--fp-color-card);
    border-radius: 18px;
    border: 1px solid #1A1A1A;
    box-shadow: none;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    margin: 0 !important;
}

.fp-archive-grid .elementor-post__thumbnail,
.fp-related-grid .elementor-post__thumbnail {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    margin: 0 !important;
}

/*
 * Elementor's Posts widget wraps the thumbnail in `.elementor-post__thumbnail__link`
 * (an <a> element). Issues to neutralise:
 *  - default `margin-bottom: 20px` bleeding into the image→meta gap;
 *  - the <a> stretches to its child image's intrinsic size, so different
 *    posts (different cropped thumbnails served by WP) end up with different
 *    heights — visible as inconsistent gaps between image and meta from
 *    card to card.
 * Apply the same 3:2 aspect-ratio + overflow:hidden on the <a> so every card
 * has the exact same image area regardless of the underlying file size.
 */
/*
 * Force the link box to a strict 3:2 ratio using the classic padding-bottom
 * hack (height=0 + padding-bottom=66.67%). `aspect-ratio` alone proved
 * unreliable here — for posts whose featured image was served at a different
 * cropped size by WP, the wrapper grew to match the image's intrinsic ratio.
 * Padding-bottom is governed by width only, so every card stays at exactly
 * 2/3 of its width regardless of the image inside.
 */
body .fp-archive-grid .elementor-post__thumbnail__link,
body .fp-related-grid .elementor-post__thumbnail__link {
    margin: 0 !important;
    padding: 0 0 66.667% 0 !important;
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    overflow: hidden !important;
    position: relative !important;
    font-size: 0;
    line-height: 0;
    /* Reset any aspect-ratio so the padding-bottom rule wins cleanly */
    aspect-ratio: auto !important;
}

body .fp-archive-grid .elementor-post__thumbnail__link > *,
body .fp-related-grid .elementor-post__thumbnail__link > * {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.fp-archive-grid .elementor-post__thumbnail__link,
.fp-related-grid .elementor-post__thumbnail__link {
    display: block;
    height: 100%;
}

.fp-archive-grid .elementor-post__thumbnail img,
.fp-related-grid .elementor-post__thumbnail img {
    /*
     * Elementor uses padding-bottom (computed at JS time) to fake an
     * aspect-ratio and positions the image absolutely on top. We keep
     * that absolute positioning (otherwise height:100% collapses to 0
     * because the content-box height is 0), but neutralize the broken
     * `transform: translate(...)` that pushes the image off-screen.
     */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: none !important;
    /* Effet de survol : fondu en opacité (au lieu d'un zoom).
       !important nécessaire : Elementor pose `transition: filter .3s` sur l'image. */
    opacity: 1;
    transition: opacity .45s ease !important;
}

.fp-archive-grid .elementor-post:hover .elementor-post__thumbnail img,
.fp-related-grid .elementor-post:hover .elementor-post__thumbnail img {
    /* Fondu doux au survol (l'image s'éclaircit légèrement) — plus de zoom. */
    opacity: 0.82 !important;
    transform: none !important;
}

body .fp-archive-grid .elementor-post__text,
body .fp-related-grid .elementor-post__text {
    /* padding-top = knob #8 : marge entre l'image et la ligne cat/date. */
    /* padding latéral 17px (réduit de 40%) ; padding-bas 24px.          */
    padding: var(--fp-card-img-to-meta) 17px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1;
}

/*
 * Reorder children of `.elementor-post__text` to match the PSD layout:
 * image → meta (Familles + date) → title → excerpt → read-more.
 * Elementor's Posts widget outputs the title BEFORE the meta-data and the
 * read-more is a direct <a> child (no wrapper div) — we swap them visually
 * via flex `order` without touching the DOM, so the source order stays
 * semantically correct.
 */
body .fp-archive-grid .elementor-post__text > .elementor-post__meta-data,
body .fp-related-grid .elementor-post__text > .elementor-post__meta-data {
    order: 1 !important;
}
body .fp-archive-grid .elementor-post__text > .elementor-post__title,
body .fp-related-grid .elementor-post__text > .elementor-post__title {
    order: 2 !important;
}
body .fp-archive-grid .elementor-post__text > .elementor-post__excerpt,
body .fp-related-grid .elementor-post__text > .elementor-post__excerpt {
    order: 3 !important;
}
body .fp-archive-grid .elementor-post__text > .elementor-post__read-more-wrapper,
body .fp-related-grid .elementor-post__text > .elementor-post__read-more-wrapper,
body .fp-archive-grid .elementor-post__text > a.elementor-post__read-more,
body .fp-related-grid .elementor-post__text > a.elementor-post__read-more {
    order: 4 !important;
    margin-top: auto;
    align-self: flex-end;
}

/* Meta row : category (left, italic bordeaux) + date (right) ============ */

.fp-archive-grid .elementor-post__meta-data,
.fp-related-grid .elementor-post__meta-data {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    /* PSD: only the bottom line of the meta row — no separator above.    */
    /* padding-bottom = knob #9 : marge entre cat/date et le séparateur.  */
    border-top: none;
    border-bottom: 1px solid #1A1A1A;
    padding: 0 0 var(--fp-card-meta-to-separator);
    margin: 0 0 20px;
    font-size: 1rem;
    color: var(--fp-color-blue-deep);
}

/*
 * Catégorie affichée sur la card. Elementor's Posts widget does not output
 * the category in the meta row, so we render it via a ::before pseudo-element.
 *
 * Le libellé est DYNAMIQUE : il provient du nom réel de la catégorie WordPress.
 * Le JS (portail-aides-public.js → initCategoryBadges) lit le slug depuis la
 * classe `category-{slug}` ajoutée par get_post_class, récupère le nom du terme
 * via l'API REST (/wp-json/wp/v2/categories) et le pose dans l'attribut
 * `data-fp-cat` sur `.elementor-post__meta-data`. Renommer une catégorie dans
 * l'admin WP se répercute donc automatiquement, sans toucher au CSS.
 */
.fp-archive-grid .elementor-post__meta-data::before,
.fp-related-grid .elementor-post__meta-data::before {
    content: attr(data-fp-cat);
    color: var(--fp-color-bordeaux);
    /* Catégorie : Poppins Bold Italic 14px */
    font-family: "Poppins", "Marianne", sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 14px;
    /* Match PSD: "Familles" (capitalized), not "FAMILLES" */
    text-transform: none;
}

/* Date on the right — Poppins Bold 13px */
.fp-archive-grid .elementor-post-date,
.fp-related-grid .elementor-post-date {
    color: var(--fp-color-blue-deep);
    font-family: "Poppins", "Marianne", sans-serif;
    font-weight: 700;
    font-size: 13px;
    margin-left: auto;
    white-space: nowrap;
}

/* Card titles (H3) — centered, Poppins Bold 16px, #0859A6 per PSD */
body .fp-archive-grid .elementor-post__title,
body .fp-related-grid .elementor-post__title,
body .fp-archive-grid .elementor-post__title a,
body .fp-related-grid .elementor-post__title a {
    color: #0859A6 !important;
    /* Titre carte : Poppins Bold 16px */
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 16px !important;
    line-height: 1.3;
    font-weight: 700 !important;
    text-transform: uppercase;
    text-align: center !important;
    margin: 0 0 20px;
    text-decoration: none;
}

.fp-archive-grid .elementor-post__title a:hover,
.fp-related-grid .elementor-post__title a:hover {
    text-decoration: underline;
}

/* Card excerpt — Poppins Medium 12px per PSD */
body .fp-archive-grid .elementor-post__excerpt p,
body .fp-related-grid .elementor-post__excerpt p,
body .fp-archive-grid .elementor-post__excerpt,
body .fp-related-grid .elementor-post__excerpt {
    color: var(--fp-color-text) !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.6;
    text-align: left;
    margin: 0 0 24px;
    padding: 0;
}

body .fp-archive-grid .elementor-post__excerpt p,
body .fp-related-grid .elementor-post__excerpt p {
    margin: 0;
}

/* Read-more link — aligned to the RIGHT of the card, no top separator */
.fp-archive-grid .elementor-post__read-more-wrapper,
.fp-related-grid .elementor-post__read-more-wrapper {
    margin-top: auto;
    text-align: right;
    border-top: none;
    padding-top: 0;
}

body .fp-archive-grid .elementor-post__read-more,
body .fp-related-grid .elementor-post__read-more,
body .fp-archive-grid a.elementor-post__read-more,
body .fp-related-grid a.elementor-post__read-more {
    color: var(--fp-color-blue) !important;
    text-decoration: underline !important;
    /* "Lire la suite" : Poppins Regular 14px */
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent !important;
}

/*
 * Small decorative arrow to the LEFT of "Lire la suite" — uses fleche2.png
 * (smaller dedicated asset for the card scale, 34×28) per PSD spec.
 */
.fp-archive-grid .elementor-post__read-more::before,
.fp-related-grid .elementor-post__read-more::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 22px;
    background-image: url("../img/fleche2.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transition: transform .2s ease;
    text-decoration: none;
    /* Remonte la flèche pour mieux l'aligner avec le texte « Lire la suite ». */
    position: relative;
    top: var(--fp-card-readmore-arrow-up);
}

.fp-archive-grid .elementor-post__read-more::after,
.fp-related-grid .elementor-post__read-more::after {
    content: none !important;
}

.fp-archive-grid .elementor-post:hover .elementor-post__read-more::before,
.fp-related-grid .elementor-post:hover .elementor-post__read-more::before {
    transform: translateX(2px);
}

/* ===== Archive: pagination =============================================== */

.fp-archive-grid .elementor-pagination {
    margin: 32px 0 0;
    /* Flex + gap pour un espacement net et constant de 7px entre les chiffres */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.fp-archive-grid .elementor-pagination .page-numbers {
    display: inline-block;
    /* Pagination : Poppins Medium 14px */
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    /* padding/margin neutralisés : l'espacement est géré par `gap: 7px` */
    padding: 0 !important;
    margin: 0 !important;
    color: var(--fp-color-blue-deep) !important;
    text-decoration: none;
    border-radius: 4px;
}

.fp-archive-grid .elementor-pagination .page-numbers.current {
    /* "current" reste en medium pour respecter la spec Poppins Medium 12px */
    font-weight: 500 !important;
}

.fp-archive-grid .elementor-pagination .page-numbers.next,
.fp-archive-grid .elementor-pagination .page-numbers.prev {
    text-decoration: underline !important;
}

/* ===== Single : breadcrumb top section (avant le hero) =================== */

.fp-single-bc-section {
    margin-bottom: 0 !important;
}

.fp-single-bc-section > .elementor-container,
.fp-single-bc-section > .e-con-inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* Breadcrumb : façon /les-aides/ — Poppins Normal 13,6px, #050505,
   pages parentes soulignées et cliquables. */
body .fp-single-bc-section .fp-breadcrumb,
body .fp-single-bc-section .fp-breadcrumb ul,
body .fp-single-bc-section .fp-breadcrumb a,
body .fp-single-bc-section .fp-breadcrumb li,
body .fp-single-bc-section .fp-breadcrumb span {
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 13.6px !important;
    font-weight: 400 !important;
    color: #050505 !important;
}

body .fp-single-bc-section .fp-breadcrumb a,
body .fp-single-bc-section .fp-breadcrumb a:link,
body .fp-single-bc-section .fp-breadcrumb a:visited {
    color: #050505 !important;
    text-decoration: underline !important;
}

body .fp-single-bc-section .fp-breadcrumb a:hover,
body .fp-single-bc-section .fp-breadcrumb a:focus {
    text-decoration: underline !important;
}

/* ===== Single post hero (full-width, hauteur réglable) =================== */

.fp-single-hero-img img,
.elementor-widget-image.fp-single-hero-img img,
.fp-single-hero .elementor-widget-image img {
    width: 100%;
    height: 254px !important;
    max-height: 254px !important;
    object-fit: cover;
    object-position: center;
}

/* Le hero est "stretched" (la SECTION fait toute la largeur) mais son
   .elementor-container interne reste plafonné (~1140px), ce qui limitait
   l'image. On force toute la chaîne (container → colonne → widget → img)
   à 100% pour une image réellement plein écran. */
.elementor-section.fp-single-hero.elementor-section-stretched,
.fp-single-hero.elementor-section-stretched {
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.fp-single-hero > .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

.fp-single-hero .elementor-column,
.fp-single-hero .elementor-widget-wrap,
.fp-single-hero .fp-single-hero-img,
.fp-single-hero .fp-single-hero-img .elementor-widget-container {
    width: 100% !important;
}

.fp-single-hero .fp-single-hero-img img {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}

/* ===== Single: title + lead ============================================== */

.fp-single-head > .elementor-container,
.fp-single-head > .e-con-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

/* Titre H1 : Poppins Bold 40px #0859a6 */
body .fp-single-title .elementor-heading-title,
body .fp-single-title h1.elementor-heading-title,
.elementor-widget.fp-single-title h1 {
    color: #0859A6 !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    margin: 16px 0 16px;
    text-align: center;
}

/* Excerpt sous le titre (theme-post-excerpt) : masqué sur demande. */
.fp-single-lead {
    display: none !important;
}

.fp-single-lead .elementor-widget-container::after {
    content: "";
    display: block;
    width: 200px;
    height: 14px;
    margin: 24px auto 0;
    background-image: var(--fp-wave);
    background-repeat: no-repeat;
    background-size: contain;
}

/* ===== Single body : post content typography ============================ */

.fp-single-body > .elementor-container,
.fp-single-body > .e-con-inner {
    max-width: 820px;
    margin: 0 auto;
}

.fp-single-content {
    color: var(--fp-color-text);
    line-height: 1.6;
}

/* H2 de section (« Les principales aides », etc.) : Poppins Bold 40px #0859a6 */
body .fp-single-content h2,
body .fp-single-content .fp-block h2 {
    color: #0859A6 !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    margin: 32px 0 16px;
}

/* Premier paragraphe de contenu (chapô "Public : …") : Poppins Medium 20px #35393e
   + pictos décoratifs : gauche (texte_gauche.png), droite (texte_droite.png),
   dessous (texte_sous.png). */
body .fp-single-content > .fp-lead,
body .fp-single-content p.fp-lead {
    color: #35393E !important;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    line-height: 1.5;
    position: relative;
    /* Réserve l'espace : 60px à g/d pour les pictos verticaux, 44px en bas
       pour le picto horizontal. */
    padding: 0 60px 44px;
    /* Picto du dessous — position réglable via --fp-picto-sous-x / -y. */
    background-image: url("../img/texte_sous.png");
    background-repeat: no-repeat;
    background-position:
        calc(50% + var(--fp-picto-sous-x))
        calc(100% - var(--fp-picto-sous-y));
    background-size: 234px 28px;
}

/* Picto gauche — centré verticalement, position réglable via les variables. */
body .fp-single-content > .fp-lead::before {
    content: "";
    position: absolute;
    left: var(--fp-picto-gauche-x);
    top: calc(50% + var(--fp-picto-gauche-y));
    transform: translateY(-50%);
    width: 41px;
    height: 85px;
    background: url("../img/texte_gauche.png") no-repeat center center;
    background-size: contain;
}

/* Picto droite — centré verticalement, position réglable via les variables. */
body .fp-single-content > .fp-lead::after {
    content: "";
    position: absolute;
    right: var(--fp-picto-droite-x);
    top: calc(50% + var(--fp-picto-droite-y));
    transform: translateY(-50%);
    width: 41px;
    height: 85px;
    background: url("../img/texte_droite.png") no-repeat center center;
    background-size: contain;
}

body .fp-single-content h3 {
    color: var(--fp-color-blue-deep) !important;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 24px 0 8px;
}

/* Paragraphes de corps : Poppins Medium 15px (sauf .fp-lead = 20px, géré
   par sa règle dédiée plus spécifique). */
body .fp-single-content p {
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.6;
    margin: 0 0 14px;
}

.fp-single-content a {
    color: var(--fp-color-blue);
    text-decoration: underline;
}

/* Green block "Les principales aides" */
.fp-single-content .fp-block {
    border-radius: var(--fp-radius-section);
    padding: 32px clamp(20px, 4vw, 56px);
    margin: 32px 0;
}

/*
 * Bloc vert : fond #ddefe2 qui COLLE le bord GAUCHE de l'écran (full-bleed
 * à gauche), sans toucher le bord droit (coin droit arrondi conservé).
 * Technique : margin-left négatif jusqu'au bord viewport + padding-left
 * compensatoire pour garder le texte à sa position d'origine.
 */
.fp-single-content .fp-block--green {
    background: #DDEFE2;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
    margin-top: var(--fp-green-block-margin-top);
    margin-bottom: 0;          /* le gap est porté par le bloc related (80px) */
    width: auto;
    padding: 32px 56px 32px calc(50vw - 50% + 56px);
    border-radius: 0 var(--fp-radius-section) var(--fp-radius-section) 0;
}

/* On annule le padding-bas de la section body pour que la marge de 80px
   sous le bloc vert soit exacte (portée uniquement par le bloc related). */
.fp-single-body {
    padding-bottom: 0 !important;
}

.fp-single-content .fp-block h2:first-child {
    margin-top: 0;
}

.fp-single-content .fp-aides-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

/* Description des items : Poppins Medium 15px */
.fp-single-content .fp-aides-list li {
    position: relative;
    padding-left: 18px;
    margin: 0 0 22px;
    font-family: "Poppins", "Marianne", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* Petit titre (strong) : Poppins Bold 15px #343a40 + retour à la ligne avant
   la description (display:block force le texte sur la ligne suivante). */
.fp-single-content .fp-aides-list li strong {
    display: block;
    font-family: "Poppins", "Marianne", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #343A40;
    margin-bottom: 4px;
}

.fp-single-content .fp-aides-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--fp-color-blue-deep);
    font-weight: 700;
}

.fp-single-content .fp-link-arrow {
    display: inline-block;
    margin-top: 4px;
    color: var(--fp-color-blue);
    text-decoration: underline;
    font-weight: 600;
}

/* CTA button */
.fp-single-content .fp-cta-wrap {
    text-align: center;
    /* 80px au-dessus : la flèche du CTA dépasse ~31px au-dessus du bouton,
       cette marge garantit un espace net au-dessus de la flèche. */
    margin: 80px 0 0;
}

/*
 * CTA « Consulter les aides… » :
 *  - texte #2b4b8c, Poppins Bold 15px
 *  - fond blanc
 *  - contour 2px #98143c
 */
.fp-single-content .fp-cta {
    display: inline-block;
    position: relative;
    background: #FFFFFF !important;
    color: #2B4B8C !important;
    border: 2px solid #98143C !important;
    padding: 12px 26px;
    border-radius: 999px;
    font-family: "Poppins", "Marianne", sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: background .2s, color .2s;
}

/*
 * Flèche déco (fleche.png 66×55) à GAUCHE du bouton.
 *  - 30px de marge entre la flèche et le bouton ;
 *  - le BAS de la flèche aligné sur le MILIEU vertical du bouton (bottom:50%).
 */
.fp-single-content .fp-cta::before {
    content: "";
    position: absolute;
    right: 100%;
    margin-right: 30px;
    bottom: 50%;
    width: 66px;
    height: 55px;
    background: url("../img/fleche.png") no-repeat center center;
    background-size: contain;
    pointer-events: none;
}

.fp-single-content .fp-cta:hover,
.fp-single-content .fp-cta:focus-visible {
    /* Survol : inversion (fond bordeaux, texte blanc). */
    background: #98143C !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    outline: none;
}

.fp-single-content .fp-cta:focus-visible {
    box-shadow: 0 0 0 3px rgba(152, 20, 60, 0.3);
}

/* ===== Single: related block (beige) ==================================== */

.elementor-section.fp-single-related.elementor-section-stretched,
.fp-single-related.elementor-section-stretched {
    left: auto !important;
    right: auto !important;
    /* Le bord gauche reste à la position « contenue » (centrée sur 1240px) et
       le bord DROIT file jusqu'au bord droit de l'écran (full-bleed droite).
       coins droits carrés puisqu'ils touchent le bord de l'écran. */
    max-width: none !important;
    width: calc(50vw + var(--fp-related-left-half)) !important;
    /* 80px de marge réelle entre le bas du bloc vert et ce bloc (10px de
       résiduel ailleurs dans le flux → on met 70px ici pour un gap net de 80). */
    margin: 70px 0 32px calc(50vw - var(--fp-related-left-half)) !important;
    position: relative !important;
    border-radius: var(--fp-radius-section) 0 0 var(--fp-radius-section);
    background: var(--fp-color-peach);
    padding: 48px clamp(24px, 4vw, 56px) !important;
}

/* Tablette : on revient à un bloc contenu (évite tout débord à gauche quand le
   demi-écran devient plus petit que le décalage gauche). */
@media (max-width: 1240px) {
    .elementor-section.fp-single-related.elementor-section-stretched,
    .fp-single-related.elementor-section-stretched {
        width: auto !important;
        margin: 70px 16px 32px !important;
        border-radius: var(--fp-radius-section) !important;
    }
}

@media (max-width: 768px) {
    .elementor-section.fp-single-related.elementor-section-stretched,
    .fp-single-related.elementor-section-stretched {
        margin: 32px 16px !important;
        max-width: calc(100% - 32px) !important;
        padding: 32px 16px !important;
    }
}

body .fp-related-title .elementor-heading-title,
body .fp-related-title h2.elementor-heading-title {
    color: var(--fp-color-bordeaux) !important;
    text-align: center;
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 24px;
}

/*
 * Carrousel des articles liés (page détail uniquement — `.fp-related-grid`
 * n'existe que dans le bloc « Les autres articles »).
 *
 * Le widget « Posts » d'Elementor bloque le scroll natif du conteneur
 * (scrollLeft non réactif). On utilise donc un carrousel par TRANSFORM :
 *  - le wrapper `.elementor-widget-container` sert de masque (overflow hidden)
 *  - le track `.elementor-posts-container` est une rangée flex qu'on translate
 *    horizontalement (via JS, variable --fp-rel-offset).
 */
.fp-related-grid .elementor-widget-container {
    overflow: hidden;
}

.fp-related-grid .elementor-posts-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px;
    grid-template-columns: none !important;   /* annule la grille héritée */
    transform: translateX(var(--fp-rel-offset, 0px));
    transition: transform .4s ease;
    will-change: transform;
}

.fp-related-grid .elementor-post {
    flex: 0 0 290px !important;
    width: 290px !important;
    max-width: 290px;
}

/*
 * Flèches du carrousel — flèches SVG rondes bleues (#0859a6), identiques à
 * celles de /les-aides/aide-au-transport/. Positionnées en absolu, centrées
 * verticalement sur le bloc pêche `.fp-single-related` (offset parent) :
 *  - flèche GAUCHE débordant à gauche, dans le fond blanc hors du bloc ;
 *  - flèche DROITE à l'intérieur du bloc, sur le fond pêche.
 * (Le conteneur `.fp-related-arrows` est injecté par JS dans `.fp-single-related`.)
 */
.fp-related-arrows {
    position: static;
    margin: 0;
}

.fp-related-arrows button {
    position: absolute;
    top: calc(50% + var(--fp-rel-arrow-y));
    transform: translateY(-50%);
    width: 41px;
    height: 41px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    z-index: 6;
    transition: opacity .15s ease;
}

.fp-related-arrows .fp-rel-prev { left: var(--fp-rel-arrow-left); }
.fp-related-arrows .fp-rel-next { right: var(--fp-rel-arrow-right); }

.fp-related-arrows button svg {
    display: block;
    width: 41px;
    height: 41px;
}
/* La flèche « suivant » réutilise le même SVG, simplement retourné. */
.fp-related-arrows .fp-rel-next svg { transform: scaleX(-1); }

.fp-related-arrows button:hover { opacity: .75; }
.fp-related-arrows button:disabled { opacity: .3; cursor: default; }

/* Mobile : le bloc est quasi pleine largeur → on ramène les deux flèches
   à l'intérieur pour éviter tout débordement hors écran. */
@media (max-width: 768px) {
    .fp-related-arrows .fp-rel-prev { left: 4px; }
    .fp-related-arrows .fp-rel-next { right: 4px; }
}

/* ===== Single : bloc « Trouvez l'aide adaptée » (filtres en bas) ========= */
/*
 * Le row « Trouvez l'aide adaptée… » copié depuis /les-aides/ (conteneur
 * Elementor 918e5e8 ; encadré blanc interne 4926fa1→b46f7ea) reçoit un panneau
 * bleu décoratif :
 *  - plein-largeur jusqu'au bord GAUCHE de l'écran ;
 *  - passe DERRIÈRE l'encadré orange (donc invisible à droite) ;
 *  - déborde de 34px en bas (hauteur 722 = 688 de l'encadré + 34) ;
 *  - arrondi en bas à droite.
 * Le `::before` est peint derrière les colonnes via l'ordre du DOM (il est
 * généré avant les enfants), sans z-index négatif.
 *
 * Portée : `body.single-post` (pages de détail d'article uniquement) → ne
 * touche PAS la page /les-aides/ qui contient le même conteneur 918e5e8.
 */
body.single-post .elementor-element-918e5e8 { position: relative; }

body.single-post .elementor-element-918e5e8::before {
    content: "";
    position: absolute;
    left: calc(50% - 50vw);
    /* Du bord gauche de l'écran jusqu'à `pénétration` px DANS l'encadré orange.
       Largeur exprimée en vw (cohérente avec les 48% de l'orange) : le bord
       droit du panneau reste donc TOUJOURS à `pénétration` px derrière le bord
       gauche de l'orange, quelle que soit la largeur de fenêtre → il ne ressort
       plus dans l'espace en responsive. */
    width: calc(100vw - var(--fp-precise-orange-width) + var(--fp-precise-blue-penetration));
    top: var(--fp-precise-blue-top);
    height: var(--fp-precise-blue-height);
    background: var(--fp-precise-blue-color);
    /* Les DEUX coins droits sont arrondis : si le bord droit venait à affleurer
       (transitions, réglages), c'est un chevauchement aux bords arrondis, pas
       un angle droit. */
    border-top-right-radius: var(--fp-precise-blue-radius);
    border-bottom-right-radius: var(--fp-precise-blue-radius);
}

/* L'encadré blanc interne (invisible sur fond blanc) masquait le panneau bleu :
   on le rend transparent pour laisser voir le bleu derrière le texte. */
body.single-post .elementor-element-918e5e8 .elementor-element-b46f7ea {
    background: transparent !important;
}

/* Titre en blanc pour rester lisible sur le fond bleu. */
body.single-post .elementor-element-918e5e8 .elementor-heading-title {
    color: var(--fp-precise-text-color) !important;
}

@media (max-width: 1024px) {
    /* À partir du breakpoint tablette, l'encadré orange passe en PLEINE largeur
       et se replace en dessous (il ne fait plus 48% à droite) : le panneau
       décoratif « passant derrière l'orange » n'a plus de sens et son bord
       droit ressortirait. On le masque donc et on remet un titre bleu lisible
       sur fond blanc. (Couvre aussi le mobile ≤768px.) */
    body.single-post .elementor-element-918e5e8::before { display: none; }
    body.single-post .elementor-element-918e5e8 .elementor-heading-title {
        color: var(--fp-color-blue) !important;
    }

    /* Bloc « Trouvez l'aide adaptée » (918e5e8), copié depuis /les-aides/.
       Tout le contenu (titre + filtres) vit dans l'encadré pêche `4926fa1`, qui
       est en `position:absolute` ; l'élément `a5219db` (> `b46f7ea` blanc) n'est
       qu'un ESPACEUR réservant la hauteur de cet encadré absolu. Deux problèmes
       en responsive, corrigés ici :

       (1) DÉBORDEMENT HORIZONTAL (≈768–1024px) : dans le CSS Elementor du
       template (post-5242.css), les règles ≤1024px (largeur 100%) sont écrasées
       par les règles ≤1366px (55%/72%) à cause de l'ordre des @media → l'encadré
       reste en disposition « côte-à-côte » desktop, trop étroite, et le titre +
       les boutons sortent de l'écran (+78px à 768px). → on force la pleine
       largeur.

       (2) FOOTER QUI CHEVAUCHE : comme l'encadré pêche est hors flux (absolu),
       et que ce bloc est le dernier avant le footer, son débordement vertical
       (l'encadré est plus haut que l'espaceur ne le réserve) fait passer le
       footer par-dessus. → on remet l'encadré DANS LE FLUX (position:relative)
       pour que la ligne l'englobe et pousse le footer dessous, et on masque
       l'espaceur devenu inutile.

       Sur /les-aides/ (page, pas single-post) rien n'est touché : ce bloc y est
       suivi d'autres sections qui absorbent le débordement, et le sélecteur est
       limité à body.single-post. */
    body.single-post .elementor-element-918e5e8 .elementor-element-4926fa1 {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        left: 0 !important;
        right: auto !important;
    }
    body.single-post .elementor-element-918e5e8 .elementor-element-a5219db {
        display: none !important;
    }
    /* (3) TITRE QUI CHEVAUCHE LE CARROUSEL : à l'intérieur de l'encadré pêche,
       le groupe titre + vaguelettes (`64ac419`) est en `position:absolute ;
       top:-319px` — un calage DESKTOP qui fait remonter le titre sur le panneau
       lavande. Une fois l'encadré remis en flux empilé (≤1024px), ce décalage
       négatif tire le titre HORS du bloc, par-dessus le carrousel « Les autres
       articles » au-dessus. → on remet aussi ce groupe dans le flux : le titre
       (et ses vaguelettes) se placent normalement en haut de l'encadré, devant
       les filtres. */
    body.single-post .elementor-element-918e5e8 .elementor-element-64ac419 {
        position: relative !important;
        top: 0 !important;
    }
}

/* Marge au-dessus du footer (pages de détail d'article uniquement). */
body.single-post .elementor-location-footer {
    margin-top: var(--fp-footer-margin-top) !important;
}

/* ===== Print ============================================================ */

@media print {
    .fp-archive-hero, .fp-single-hero, .fp-single-related { display: none; }
    .fp-single-content .fp-block { background: transparent !important; padding: 0 !important; }
}

/* === END FICHES PRATIQUES === */
