/* ==========================================================================
   Global polish layer
   Harmonisation visuelle chargee apres les styles historiques.
   ========================================================================== */

:root {
    /* Le site est clair par defaut. Declarer color-scheme empeche les
       navigateurs (ex. Chrome en navigation privee) d'appliquer un
       assombrissement automatique qui casse les fonds blancs codes en dur.
       Le mode sombre volontaire (bouton accessibilite) repasse en dark via
       html[data-theme='dark'] { color-scheme: dark } dans theme-dark.css. */
    color-scheme: light;
    --color-page: #f7f5f1;
    --color-panel: rgba(255, 255, 255, 0.9);
    --color-panel-solid: #ffffff;
    --color-line: rgba(10, 69, 72, 0.12);
    --color-line-strong: rgba(10, 69, 72, 0.2);
    --focus-ring: 0 0 0 3px rgba(232, 185, 35, 0.42);
    --shadow-soft: 0 14px 36px rgba(16, 42, 44, 0.1);
    --shadow-lift: 0 24px 54px rgba(16, 42, 44, 0.16);
    --surface-blur: blur(18px);
}

html {
    background: var(--color-page);
}

body {
    background:
        linear-gradient(180deg, #fbfaf7 0%, var(--color-page) 42%, #f1ebe3 100%);
    color: var(--color-text-main);
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(232, 185, 35, 0.35);
    color: var(--color-primary-dark);
}

:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

main {
    isolation: isolate;
}

section:not(.hero):not(.subpage-hero):not(.page-hero) {
    position: relative;
}

.container {
    max-width: min(var(--container-max), 100% - 1.5rem);
}

.section-header,
.program-intro-grid,
.section-intro,
.faq-header,
.agenda-header,
.articles-header {
    gap: clamp(0.85rem, 2vw, 1.35rem);
}

/* Titraille : plus grasse, plus grande, plus moderne (site entier) */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-title,
.page-hero__title,
.subpage-hero__title,
.hero-title {
    font-weight: 800;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.hero-title {
    font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}

.section-title {
    font-size: clamp(2rem, 1.55rem + 2.1vw, 2.85rem);
    max-width: 18ch;
}

.subpage-hero__title {
    font-size: clamp(2.15rem, 4.6vw, 3.6rem);
}

.section-title + p,
.section-text,
.section-subtitle,
.page-hero__desc,
.subpage-hero__desc,
.hero-description {
    color: var(--color-text-muted);
    text-wrap: pretty;
}

.hero-description,
.subpage-hero__desc,
.page-hero__desc {
    color: rgba(255, 255, 255, 0.9);
}

.badge,
.badge-blue,
.subpage-hero__badge,
.page-hero__eyebrow,
.card-category,
.event-card__category,
.article-card__category {
    border: 1px solid rgba(10, 69, 72, 0.12);
    border-radius: 999px;
    letter-spacing: 0.09em;
}

.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.header.scrolled,
html.hide-top-bar .header,
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--color-line);
    box-shadow: 0 14px 34px rgba(16, 42, 44, 0.08);
    backdrop-filter: var(--surface-blur);
    -webkit-backdrop-filter: var(--surface-blur);
}

html:not(.header-over-hero) .header .logo-white,
.header.scrolled .logo-white,
html.hide-top-bar .header .logo-white,
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header .logo-white {
    display: none !important;
}

html:not(.header-over-hero) .header .logo-color,
.header.scrolled .logo-color,
html.hide-top-bar .header .logo-color,
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header .logo-color {
    display: block !important;
}

html:not(.header-over-hero) .header .logo-title,
.header.scrolled .logo-title,
html.hide-top-bar .header .logo-title,
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header .logo-title {
    color: var(--color-primary-dark) !important;
}

html:not(.header-over-hero) .header .logo-subtitle,
.header.scrolled .logo-subtitle,
html.hide-top-bar .header .logo-subtitle,
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header .logo-subtitle {
    color: var(--color-text-muted) !important;
}

.nav-links a {
    border-radius: 999px;
    padding: 0.52rem 0.6rem;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.14);
}

.header.scrolled .nav-links a:hover,
.header.scrolled .nav-links a:focus-visible,
.header.scrolled .nav-links a[aria-current="page"],
html.hide-top-bar .header .nav-links a[aria-current="page"],
body:not(:has(main .hero, section.hero, section.page-hero, section.ra-hero)) .header .nav-links a[aria-current="page"] {
    background: rgba(10, 69, 72, 0.08);
    color: var(--color-primary-dark);
}

.nav-links a::after {
    display: none;
}

.btn,
button,
input,
select,
textarea {
    font: inherit;
}

.btn {
    min-height: 44px;
    border-radius: 0.75rem;
    box-shadow: none;
}

.btn-primary {
    background: var(--color-secondary-hover);
    border: 1px solid rgba(159, 77, 47, 0.28);
    box-shadow: 0 12px 28px rgba(184, 93, 56, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 18px 34px rgba(184, 93, 56, 0.26);
}

.btn-secondary,
.btn-nav-secondary {
    border-color: rgba(255, 255, 255, 0.42);
}

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    box-shadow: var(--focus-ring);
}

.service-card,
.pole-card,
.event-card,
.article-card,
.benefit-card,
.feature-card,
.faq-item,
.form-card,
.contact-card,
.permanence-card,
.governance-card,
.value-card,
.fp-info-card,
.ias-clean-card,
.ias-format-card,
.ias-step-clean {
    border: 1px solid var(--color-line);
    background: var(--color-panel);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.service-card:hover,
.pole-card:hover,
.event-card:hover,
.article-card:hover,
.benefit-card:hover,
.feature-card:hover,
.permanence-card:hover,
.governance-card:hover,
.value-card:hover {
    border-color: var(--color-line-strong);
    box-shadow: var(--shadow-lift);
    transform: translateY(-4px);
}

.card-image,
.article-card__image,
.event-card__date,
.service-card img,
.pole-card img {
    overflow: hidden;
}

.card-content h3,
.article-card__title,
.event-card__title,
.footer-title {
    text-wrap: balance;
}

.hero,
.subpage-hero,
.page-hero {
    background-color: var(--color-primary-dark);
}

.hero::after,
.subpage-hero::after,
.page-hero::after {
    background:
        linear-gradient(135deg, rgba(16, 42, 44, 0.94) 0%, rgba(10, 69, 72, 0.74) 46%, rgba(211, 107, 66, 0.18) 100%);
}

.glass-panel,
.hero-practical__inner,
.adhesion-hero-facts li,
.page-hero__panel {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

input,
select,
textarea {
    border-color: var(--color-line);
    border-radius: 0.75rem;
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--color-line-strong);
}

.footer {
    background:
        linear-gradient(180deg, #123638 0%, #0c292b 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    align-items: start;
}

.footer-links a,
.footer-contact a,
.footer-legal a {
    border-radius: 0.45rem;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-legal a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.page-agenda .agenda-theme-block {
    overflow: hidden;
}

.page-agenda .filters-bar {
    scroll-padding-inline: 0.25rem;
}

/* Actualites: clarifier les annonces et eviter l'effet grille trop dense. */
.page-actualites--modern {
    --actu-ink: var(--color-primary-dark);
    --actu-line: rgba(10, 69, 72, 0.12);
    --actu-mist: var(--color-bg-soft);
}

.page-actualites--modern .hero-content .fade-up,
.page-actualites--modern .hero-content.fade-up {
    opacity: 1;
    transform: none;
}

.page-actualites--modern .hero-description {
    max-width: 720px;
}

.page-actualites--modern .section.bg-light {
    background: var(--actu-mist);
}

.page-actualites--modern .article-card {
    border: 1px solid var(--actu-line);
    box-shadow: 0 10px 28px rgba(10, 69, 72, 0.07);
}

.page-actualites--modern .newsletter-band {
    border: 1px solid var(--actu-line);
    box-shadow: 0 12px 32px rgba(10, 69, 72, 0.08);
}

.page-actualites .articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(1rem, 2.4vw, 1.6rem);
}

.page-actualites .actualites-groups {
    display: grid;
    gap: clamp(1.2rem, 2.8vw, 2rem);
}

.page-actualites .actualites-group {
    display: grid;
    gap: 1rem;
}

.page-actualites .actualites-group__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--color-line);
}

.page-actualites .actualites-group__header h3 {
    margin: 0;
    font-size: clamp(1.1rem, 1.02rem + 0.38vw, 1.3rem);
    color: var(--color-primary-dark);
}

.page-actualites .actualites-group__header p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.page-actualites .article-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(10, 69, 72, 0.1);
}

.page-actualites .article-card__image::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(16, 42, 44, 0.42));
    pointer-events: none;
}

.page-actualites .article-card__category {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary-dark);
    box-shadow: 0 8px 18px rgba(16, 42, 44, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.page-actualites .article-card__category--future {
    background: var(--color-accent);
    color: var(--color-primary-dark);
}

.page-actualites .article-card__date {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
    line-height: 1.45;
}

.page-actualites .article-card__excerpt {
    max-width: 62ch;
    font-size: 1rem;
    line-height: 1.65;
}

.page-actualites .article-card__title {
    font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
    line-height: 1.3;
    text-wrap: balance;
}

.page-actualites .article-card__link {
    min-height: 44px;
    text-underline-offset: 0.22em;
}

.page-actualites .article-card__link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 0.35rem;
}

.page-actualites .article-card:focus-within {
    border-color: rgba(10, 69, 72, 0.28);
    box-shadow: 0 0 0 2px rgba(10, 69, 72, 0.08), var(--shadow-card-hover);
}

.page-actualites .article-card__image img {
    object-position: center;
}

.page-actualites .pagination-meta {
    max-width: 46rem;
    margin-inline: auto;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

/* Bandes et encarts: plus lisibles sur mobile et plus coherents entre pages. */
.lc-trust-band__list li,
.hero-practical-panel__item,
.proof-mini-card,
.acces-card {
    min-width: 0;
}

.lc-trust-band__list li {
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.72);
}

.hero-practical-panel {
    border-radius: var(--radius-xl);
}

.hero-practical-panel__list {
    gap: 0.85rem;
}

.hero-practical-panel__item {
    padding: 0.72rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-practical-panel__item:first-child {
    border-top: 0;
    padding-top: 0;
}

.home-proof-card,
.benefit-editorial-card,
.acces-card {
    border-color: rgba(10, 69, 72, 0.1);
}

.acces-card__desc,
.benefit-editorial-card p,
.home-proof-intro p {
    color: var(--color-text-muted);
}

@media (max-width: 720px) {
    .page-actualites .actualites-group__header {
        align-items: flex-start;
    }

    .page-actualites .actualites-group__header p {
        width: 100%;
    }

    .page-actualites .section-description {
        max-width: 65ch;
        margin-inline: auto;
    }

    .page-actualites .newsletter-form {
        flex-direction: column;
    }

    .page-actualites .newsletter-form input,
    .page-actualites .newsletter-form button {
        width: 100%;
    }

    .page-actualites .articles-grid {
        gap: 1rem;
    }

    .page-actualites .article-card__body {
        padding: 1rem;
        gap: 0.6rem;
    }

    .page-actualites .article-card__title {
        font-size: 1.12rem;
    }

    .page-actualites .article-card__date,
    .page-actualites .article-card__excerpt {
        font-size: 1rem;
    }

    .lc-trust-band__list {
        align-items: stretch;
    }

    .lc-trust-band__list li {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .nav-links {
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--color-line);
        box-shadow: var(--shadow-lift);
        backdrop-filter: var(--surface-blur);
        -webkit-backdrop-filter: var(--surface-blur);
    }

    .page-agenda .filters-bar {
        -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
        mask-image: linear-gradient(to right, black 88%, transparent 100%);
    }

    .nav-links a,
    html.header-over-hero:not(.hide-top-bar) .header .nav-links a,
    html:not(.hide-top-bar) .header:not(.scrolled) .nav-links a {
        color: var(--color-primary-dark);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: min(var(--container-max), 100% - 1rem);
    }

    .section-title {
        max-width: 100%;
    }

    .service-card:hover,
    .pole-card:hover,
    .event-card:hover,
    .article-card:hover,
    .benefit-card:hover,
    .feature-card:hover,
    .permanence-card:hover,
    .governance-card:hover,
    .value-card:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ==========================================================================
   Dropdown "Infos pratiques" — navigation desktop
   Visible uniquement ≥ 1025px. Sur mobile les items sont déjà dans le
   menu hamburger (nav-link--mobile-only), donc pas de doublon.
   ========================================================================== */

.nav-dropdown {
    position: relative;
    list-style: none;
}

/* Le bouton reprend exactement le style des <a> nav-links */
.nav-dropdown__toggle {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading, inherit);
    font-weight: 600;
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-sm, 0.5rem) 0;
    letter-spacing: 0.01em;
    position: relative;
    white-space: nowrap;
    line-height: 1;
}

.header.scrolled .nav-dropdown__toggle {
    color: var(--color-text-main);
}

/* Soulignement au survol — cohérent avec les autres liens */
.nav-dropdown__toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: width 0.22s ease;
}

.nav-dropdown:hover .nav-dropdown__toggle::after,
.nav-dropdown:focus-within .nav-dropdown__toggle::after,
.nav-dropdown__toggle[aria-expanded="true"]::after {
    width: 100%;
}

.header.scrolled .nav-dropdown__toggle:hover,
.header.scrolled .nav-dropdown__toggle:focus-visible {
    color: var(--color-secondary);
}

.nav-dropdown__caret {
    font-size: 0.6rem;
    margin-top: 1px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown__caret,
.nav-dropdown:focus-within .nav-dropdown__caret,
.nav-dropdown__toggle[aria-expanded="true"] .nav-dropdown__caret {
    transform: rotate(180deg);
}

/* ─── Pill hover sur le bouton (cohérence avec les autres liens nav) ─ */
.nav-dropdown__toggle {
    border-radius: 999px;
    padding: 0.52rem 0.6rem !important;
}

.nav-dropdown:hover .nav-dropdown__toggle,
.nav-dropdown:focus-within .nav-dropdown__toggle,
.nav-dropdown__toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.14);
}

.header.scrolled .nav-dropdown:hover .nav-dropdown__toggle,
.header.scrolled .nav-dropdown:focus-within .nav-dropdown__toggle,
.header.scrolled .nav-dropdown__toggle[aria-expanded="true"] {
    background: rgba(10, 69, 72, 0.08);
}

/* ─── Menu déroulant — aligné à droite du bouton ─────────────── */
/* Le bouton "Services" étant en fin de nav, le menu s'ancre à droite
   pour rester dans le viewport sur toutes les largeurs d'écran.      */
.nav-dropdown__menu {
    position: absolute;
    /* top: 100% (sans marge) volontaire : un espace ici créerait une
       zone morte entre le bouton et le menu où le survol ne "tient" ni
       sur l'un ni sur l'autre, ce qui referme le menu quand la souris
       descend du bouton vers le panneau. Le décalage visuel est recréé
       par translateY, qui n'affecte pas la zone survolable une fois le
       menu ouvert (translateY(0)). */
    top: 100%;
    right: 0;          /* aligné bord droit du bouton */
    left: auto;
    transform: translateY(-6px);
    min-width: 220px;
    background: var(--color-panel-solid, #fff);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(10, 27, 29, 0.16), 0 1px 4px rgba(10, 27, 29, 0.06);
    padding: 0.4rem;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 1100;
}

/* Triangle pointant vers le bouton, aligné à droite */
.nav-dropdown__menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 1.2rem;     /* aligné sous le centre du bouton */
    left: auto;
    transform: none;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--color-panel-solid, #fff);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown:has(.nav-dropdown__toggle[aria-expanded="true"]) .nav-dropdown__menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* `none` (et non translateY(0)) : supprime la couche de composition qui
       rendait le texte flou/ombré sur les positions en demi-pixels. */
    transform: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}

/* Soulignement persistant quand une page du dropdown est active */
.nav-dropdown__toggle[data-active="true"]::after {
    width: 100%;
}

.nav-dropdown__menu li {
    list-style: none;
}

.nav-dropdown__menu a {
    display: flex;
    align-items: center;
    gap: 0.55rem;

    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-family: var(--font-heading, inherit);
    font-size: 0.925rem;
    font-weight: 600;
    /* !important necessaire : main.css impose couleur blanche sur .nav-links a
       en mode hero (selecteur haute-specificite). Le dropdown etant toujours
       sur fond blanc, on force le texte sombre quel que soit l'etat du header. */
    color: #0a1b1d !important;
    white-space: nowrap;
    transition: background 0.14s, color 0.14s;
    text-decoration: none;
}

.nav-dropdown__menu a:hover,
.nav-dropdown__menu a:focus-visible {
    background: var(--color-surface-hover, #f0ebe6);
    color: #0a4548 !important;
    outline: none;
}

.nav-dropdown__menu a:focus-visible {
    box-shadow: var(--focus-ring);
}

.nav-dropdown__menu .nd-icon {
    width: 1.1rem;
    text-align: center;
    color: var(--color-primary-light, #147a7f);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.nav-dropdown__menu a[aria-current="page"] {
    background: rgba(10, 69, 72, 0.07);
    color: #0a4548 !important;
}

.nav-dropdown__divider {
    height: 1px;
    background: var(--color-line, rgba(10, 69, 72, 0.12));
    margin: 0.3rem 0.5rem;
}

@media (max-width: 1024px) {
    .nav-dropdown {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-dropdown__menu,
    .nav-dropdown__caret,
    .nav-dropdown__toggle::after,
    .nav-mega-menu__link,
    .nav-mega-menu__link::after,
    .nav-mega-menu__link > i,
    .nav-mega-menu__cta i {
        transition-duration: 0.01ms !important;
    }

    .nav-mega-menu__link:hover,
    .nav-mega-menu__link:focus-visible {
        transform: none !important;
    }
}

/* ==========================================================================
   Organigramme — section Gouvernance (lecentre.astro)
   ========================================================================== */

.org-chart-wrap {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* ── Tiers ── */
.org-tier {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
}

/* ── Nœud générique ── */
.org-node {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    border: 1px solid var(--color-line);
    background: var(--color-panel-solid, #fff);
    box-shadow: var(--shadow-soft);
    min-width: 220px;
}

.org-node__icon {
    flex-shrink: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.org-node__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

.org-node__sub {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.1rem;
}

/* Niveau 1 : Gouvernance */
.org-node--gouvernance {
    border-color: rgba(10, 69, 72, 0.3);
    background: linear-gradient(135deg, #f0f9f8 0%, #fff 100%);
    min-width: 280px;
}
.org-node--gouvernance .org-node__icon {
    background: var(--color-primary);
    color: white;
    font-size: 1.15rem;
    width: 3rem;
    height: 3rem;
}

/* Niveau 2 : Directeur */
.org-node--dir {
    border-color: rgba(10, 69, 72, 0.2);
    background: white;
}
.org-node--dir .org-node__icon {
    background: rgba(10, 69, 72, 0.1);
    color: var(--color-primary);
}

/* Niveau 2 : Directeur Adjoint */
.org-node--dir-adj {
    border-color: rgba(184, 93, 56, 0.2);
    background: white;
}
.org-node--dir-adj .org-node__icon {
    background: rgba(184, 93, 56, 0.1);
    color: var(--color-secondary);
}

/* ── Connecteurs ── */
.org-connector {
    width: 2px;
    height: 2rem;
    background: linear-gradient(to bottom, var(--color-primary), rgba(10,69,72,0.3));
    margin: 0 auto;
    flex-shrink: 0;
}

.org-connector--branch {
    width: 100%;
    height: auto;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-connector__vert {
    width: 2px;
    height: 1.5rem;
    background: rgba(10, 69, 72, 0.25);
}

.org-connector__horiz {
    width: 80%;
    height: 2px;
    background: rgba(10, 69, 72, 0.2);
    border-radius: 2px;
}

/* ── Niveau 3 : Pôles ── */
.org-tier--poles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.75rem;
}

.org-pole-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--color-line);
    background: var(--color-panel-solid, #fff);
    text-decoration: none;
    text-align: center;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    box-shadow: var(--shadow-soft);
}

.org-pole-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: var(--color-primary);
}

.org-pole-card__icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.org-pole-card__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.3;
}

.org-pole-card__sub {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--color-text-secondary, #5f6b73);
    line-height: 1.25;
}

/* Couleurs pôles */
.org-pole-card--pe   .org-pole-card__icon { background: rgba(255,182,193,0.25); color: #b05070; }
.org-pole-card--ej   .org-pole-card__icon { background: rgba(211,107,66,0.15);  color: var(--color-secondary); }
.org-pole-card--insertion .org-pole-card__icon { background: rgba(10,69,72,0.1); color: var(--color-primary); }
.org-pole-card--famille .org-pole-card__icon { background: rgba(232,185,35,0.15); color: #9a7a00; }

/* ── Pôles support ── */
.org-support-band {
    margin-top: 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-bg-soft, #efe8df);
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    flex-wrap: wrap;
}

.org-support-band__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    white-space: nowrap;
    padding-right: 0.75rem;
    border-right: 1px solid var(--color-line);
}

.org-support-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-main);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--color-line);
    background: white;
    transition: color 0.15s, border-color 0.15s;
}

.org-support-item i { color: var(--color-text-muted); font-size: 0.8rem; }
.org-support-item:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* ── Agréments ── */
.gouv-agrements-band {
    background: linear-gradient(135deg, rgba(10,69,72,0.04) 0%, rgba(232,185,35,0.06) 100%);
    border: 1px solid var(--color-line);
    border-radius: 14px;
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.gouv-agrements-band__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    white-space: nowrap;
    padding-right: 1rem;
    border-right: 1px solid var(--color-line);
}

.gouv-agrements-band__header i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.gouv-agrements-band__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.gouv-agrement-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(10, 69, 72, 0.08);
    border: 1px solid rgba(10, 69, 72, 0.16);
    color: var(--color-primary-dark);
}

.gouv-agrement-badge i {
    color: var(--color-primary);
    font-size: 0.7rem;
}

/* ── Mobile ─────────────────────────────────────── */
@media (max-width: 640px) {
    .org-node { min-width: 0; width: 100%; }
    .org-tier--direction { flex-direction: column; align-items: center; }
    .org-connector__horiz { width: 60%; }
    .org-tier--poles { grid-template-columns: repeat(2, 1fr); }
    .gouv-agrements-band { flex-direction: column; align-items: flex-start; }
    .gouv-agrements-band__header { border-right: none; border-bottom: 1px solid var(--color-line); padding-right: 0; padding-bottom: 0.5rem; }
}

/* ── Correctifs organigramme ────────────────────────────── */

/* Connecteur horizontal entre les deux nœuds direction */
.org-tier--direction {
    /* Grid 2 colonnes égales : garantit un centre parfaitement aligné
       sur la ligne verticale venant de Gouvernance */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 560px;
    width: 100%;
    position: relative;
}

/* Ligne horizontale entre les deux nœuds — pseudo-élément hors flow */
.org-tier--direction::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 25%;       /* depuis le centre de la colonne gauche */
    right: 25%;      /* jusqu'au centre de la colonne droite */
    height: 2px;
    background: linear-gradient(to right,
        rgba(10,69,72,0.2),
        rgba(10,69,72,0.35),
        rgba(184,93,56,0.35),
        rgba(184,93,56,0.2));
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
}

.org-tier--direction .org-node {
    position: relative;
    z-index: 1;
    min-width: 0;  /* laisse le grid contrôler la largeur */
}

@media (max-width: 640px) {
    .org-tier--direction {
        grid-template-columns: 1fr;
        max-width: 280px;
    }
    .org-tier--direction::before { display: none; }
}

/* Pôles : 4 colonnes exactes (PE, EJ, Insertion, Famille) */
.org-tier--poles {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .org-tier--poles {
        grid-template-columns: repeat(2, 1fr);
    }
    .org-direction-connector {
        display: none;
    }
}

/* Labels pôles : plus lisibles */
.org-pole-card__label {
    font-size: 0.75rem;
    line-height: 1.25;
    color: var(--color-text-main);
    text-align: center;
}

/* Icône pôle légèrement plus grande */
.org-pole-card__icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
}

/* Connecteur branche : centré sur les 4 pôles opérationnels */
.org-connector--branch .org-connector__horiz {
    width: 65%;
}

/* ==========================================================================
   Scroll-driven animations — header (Chrome 115+, FF 110+, Safari 17.2+)
   Fond / couleurs nav liés au scroll. La topbar est gérée par main.js
   (classe html.hide-top-bar) pour réapparaître instantanément en remontée.
   ========================================================================== */
@supports (animation-timeline: scroll()) {

    /* Topbar : masquée via html.hide-top-bar (main.js) — pas d’animation scroll
       pour éviter un bandeau vide au-dessus du menu en remontée. */

    /* ── Header : fond solide au scroll (position top = hide-top-bar uniquement) ── */
    @keyframes csh-header-solid {
        from {
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            box-shadow: none;
            padding: var(--spacing-md, 1rem) 0;
        }
        to {
            background: rgba(255, 255, 255, 0.97);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            box-shadow: 0 14px 34px rgba(16, 42, 44, 0.08);
            padding: var(--spacing-sm, 0.5rem) 0;
        }
    }

    /* Pages avec hero : header commence transparent puis se solidifie */
    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header {
        animation: csh-header-solid linear both;
        animation-timeline: scroll(root block);
        animation-range: 20px 80px;
    }

    /* Pages sans hero : header toujours solide, pas d'animation */
    body:not(:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero)) .header {
        animation: none;
    }

    /* ── Liens nav : blanc → sombre en même temps que le fond ─── */
    @keyframes csh-nav-color {
        from { color: rgba(255, 255, 255, 0.95); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
        to   { color: var(--color-primary-dark); text-shadow: 0 0 0 rgba(0, 0, 0, 0); }
    }

    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .nav-links a,
    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .nav-dropdown__toggle {
        animation: csh-nav-color linear both;
        animation-timeline: scroll(root block);
        animation-range: 20px 80px;
    }

    @keyframes csh-logo-title-color {
        from { color: var(--color-text-light); }
        to   { color: var(--color-primary-dark); }
    }

    @keyframes csh-logo-subtitle-color {
        from { color: rgba(255, 255, 255, 0.8); }
        to   { color: var(--color-text-muted); }
    }

    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-title {
        animation: csh-logo-title-color linear both;
        animation-timeline: scroll(root block);
        animation-range: 20px 80px;
    }

    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-subtitle {
        animation: csh-logo-subtitle-color linear both;
        animation-timeline: scroll(root block);
        animation-range: 20px 80px;
    }

    html:not(.header-over-hero) body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-title,
    html.hide-top-bar body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-title {
        animation: none;
        color: var(--color-primary-dark) !important;
    }

    html:not(.header-over-hero) body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-subtitle,
    html.hide-top-bar body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-subtitle {
        animation: none;
        color: var(--color-text-muted) !important;
    }

    html:not(.header-over-hero) body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-white,
    html.hide-top-bar body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-white {
        display: none !important;
    }

    html:not(.header-over-hero) body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-color,
    html.hide-top-bar body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .logo-color {
        display: block !important;
    }

    /* ── Hamburger (mobile) : blanc → sombre ──────────────────── */
    @keyframes csh-burger-color {
        from { background-color: var(--color-text-light);  }
        to   { background-color: var(--color-primary-dark); }
    }

    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .hamburger,
    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .hamburger::before,
    body:has(section.hero, main .hero, section.page-hero, section.ra-hero, #hero) .header .hamburger::after {
        animation: csh-burger-color linear both;
        animation-timeline: scroll(root block);
        animation-range: 20px 80px;
    }
}

/* ==========================================================================
   Variante dropdown ancré à gauche — menus « Nos pôles » / « Vie du centre »
   (le dropdown historique s'ancrait à droite, adapté à un bouton en fin de nav)
   ========================================================================== */

.nav-dropdown--left .nav-dropdown__menu {
    left: 0;
    right: auto;
}

.nav-dropdown--left .nav-dropdown__menu::before {
    left: 1.2rem;
    right: auto;
}

/* Sur mobile, les dropdowns sont remplacés par les listes à plat du menu
   hamburger (.nav-link--mobile-only) — on les masque pour éviter le doublon. */
@media (max-width: 1024px) {
    .nav-dropdown {
        display: none;
    }
}

/* ==========================================================================
   Méga-menu « Insertion Adultes, Familles & Seniors »
   Cartes photos déclarées dans cette feuille (compatibles CSP) + voile
   dégradé garantissant la lisibilité : fond teal foncé de secours si
   l'image manque, texte blanc sur dégradé sombre (contraste AA).
   Étend .nav-dropdown ; masqué ≤ 1024px (le hamburger reprend ces liens).
   ========================================================================== */

@media (min-width: 1025px) {
    /* ── Panneau ─────────────────────────────────────────────────────── */
    .nav-dropdown--mega .nav-dropdown__menu {
        width: min(700px, calc(100vw - 2rem));
        padding: 0;
        border: 1px solid var(--color-border, rgba(16, 42, 44, 0.12));
        border-radius: 16px;
        overflow-x: hidden;
        overflow-y: auto;
        max-height: calc(100vh - var(--current-header-bottom, 6rem) - 1rem);
        background: #fff;
        box-shadow: 0 24px 60px rgba(16, 42, 44, 0.18);
    }

    .nav-dropdown--mega .nav-dropdown__menu::before {
        display: none;
    }

    .nav-mega-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .nav-mega-menu__shell {
        display: grid;
        grid-template-columns: 235px minmax(0, 1fr);
        align-items: stretch;
        width: 100%;
    }

    /* ── Voile commun : dégradé sombre pour la lisibilité du texte ───── */
    .nav-mega-menu__link-veil {
        position: absolute;
        inset: 0;
        z-index: 0;
        background: linear-gradient(
            180deg,
            rgba(16, 42, 44, 0.08) 0%,
            rgba(16, 42, 44, 0.45) 45%,
            rgba(16, 42, 44, 0.9) 100%
        );
        pointer-events: none;
    }

    /* ── Carte « Présentation du pôle » ──────────────────────────────── */
    .header .nav-links .nav-dropdown--mega a.nav-mega-menu__featured,
    .header .nav-links .nav-dropdown--mega a.nav-mega-menu__featured:hover,
    .header .nav-links .nav-dropdown--mega a.nav-mega-menu__featured:focus-visible {
        color: #fff !important;
    }

    .nav-dropdown--mega .nav-mega-menu__featured {
        position: relative;
        isolation: isolate;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 0.55rem;
        min-height: 270px;
        padding: 1.15rem;
        border-radius: 0;
        white-space: normal;
        text-shadow: none;
        overflow: hidden;
        /* Fond de secours lisible si l'image ne charge pas */
        background-color: var(--color-dark, #102a2c);
        background-image: var(--card-img);
        background-size: cover;
        background-position: center;
    }

    .nav-mega-menu__featured-bg {
        position: absolute !important;
        inset: 0;
        z-index: 0 !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        pointer-events: none;
    }
    .nav-dropdown--mega .nav-mega-menu__featured > *:not(.nav-mega-menu__link-veil):not(.nav-mega-menu__featured-bg) {
        position: relative;
        z-index: 1;
    }

    .nav-dropdown--mega .nav-mega-menu__featured .nav-mega-menu__link-veil {
        background: linear-gradient(
            180deg,
            rgba(16, 42, 44, 0.04) 0%
            rgba(16, 42, 44, 0.5) 42%,
            rgba(16, 42, 44, 0.93) 100%
        );
    }

    .nav-dropdown--mega .nav-mega-menu__featured:hover .nav-mega-menu__link-veil,
    .nav-dropdown--mega .nav-mega-menu__featured:focus-visible .nav-mega-menu__link-veil {
        background: linear-gradient(
            180deg,
            rgba(16, 42, 44, 0.25) 0%,
            rgba(16, 42, 44, 0.58) 42%,
            rgba(16, 42, 44, 0.95) 100%
        );
    }

    .nav-mega-menu__kicker {
        display: inline-flex;
        align-items: center;
        width: fit-content;
        padding: 0.32rem 0.6rem;
        border-radius: 999px;
        background: var(--color-accent, #e8b923);
        color: var(--color-dark, #102a2c);
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.66rem;
        font-weight: 700;
        letter-spacing: 0.09em;
        line-height: 1;
        text-transform: uppercase;
    }

    .header .nav-links .nav-dropdown--mega a.nav-mega-menu__featured > .nav-mega-menu__featured-title {
        display: block;
        color: #fff !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
        max-width: 15rem;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 1.22rem;
        font-weight: 650;
        line-height: 1.25;
        letter-spacing: 0.005em;
    }

    .nav-mega-menu__featured > span:not(.nav-mega-menu__kicker):not(.nav-mega-menu__cta):not(.nav-mega-menu__link-veil) {
        display: block;
        max-width: 24ch;
        color: rgba(255, 255, 255, 0.9);
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.84rem;
        font-weight: 450;
        line-height: 1.5;
    }

    .nav-mega-menu__cta {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        margin-top: 0.3rem;
        padding: 0.6rem 0.95rem;
        border-radius: 999px;
        background: #fff;
        color: var(--color-primary-dark, #053333);
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.79rem;
        font-weight: 700;
        line-height: 1;
    }

    .nav-mega-menu__cta i {
        font-size: 0.72rem;
    }

    /* ── Colonne « accès rapides » ────────────────────────────────────── */
    .nav-mega-menu__content {
        display: flex;
        flex-direction: column;
        padding: 1rem 1.1rem;
        background: #fff;
    }

    .nav-mega-menu__head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 0.7rem;
        padding-bottom: 0.6rem;
        border-bottom: 1px solid var(--color-border, rgba(16, 42, 44, 0.12));
    }

    .nav-mega-menu__head span {
        color: var(--color-primary, #0a4548);
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }

    .nav-mega-menu__head p {
        max-width: 26ch;
        margin: 0;
        color: var(--color-muted, #5f6b73);
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.8rem;
        font-weight: 450;
        line-height: 1.45;
        text-align: right;
    }

    .nav-mega-menu__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-mega-menu__list li {
        min-width: 0;
    }

    .nav-mega-menu__list li:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    /* ── Cartes photos ───────────────────────────────────────────────── */
    .nav-dropdown--mega .nav-mega-menu__link {
        position: relative;
        isolation: isolate;
        display: flex;
        align-items: flex-end;
        min-height: 118px;
        padding: 0.75rem 2.1rem 0.75rem 0.85rem;
        border: none;
        border-radius: 12px;
        overflow: hidden;
        white-space: normal;
        /* Fond de secours lisible si l'image ne charge pas */
        background-color: var(--color-primary-dark, #053333);
        background-image: var(--card-img);
        background-size: cover;
        background-position: center;
    }

    /* Images déclarées en feuille externe : compatible avec style-src 'self'. */
    .nav-dropdown--insertion .nav-mega-menu__featured {
        background-image: url('/images/poles/famille-parentalite/pic-2026/photo-03-pic.webp');
    }

    .nav-dropdown--insertion .nav-mega-menu__list li:nth-child(1) .nav-mega-menu__link {
        background-image: url('/images/poles/famille-parentalite/carte-rencontre.webp');
    }

    .nav-dropdown--insertion .nav-mega-menu__list li:nth-child(2) .nav-mega-menu__link {
        background-image: url('/images/poles/adultes-seniors/couture2.webp');
        background-position: center 35%;
    }

    .nav-dropdown--insertion .nav-mega-menu__list li:nth-child(3) .nav-mega-menu__link {
        background-image: url('/images/poles/numerique/accueil-individuel-emploi.webp');
        background-position: 62% center;
    }

    .nav-dropdown--insertion .nav-mega-menu__list li:nth-child(4) .nav-mega-menu__link {
        background-image: url('/images/poles/numerique/atelier-numerique.webp');
    }

    .nav-dropdown--insertion .nav-mega-menu__list li:nth-child(5) .nav-mega-menu__link {
        background-image: url('/images/poles/famille-parentalite/carte-sortie.webp');
    }

    .nav-dropdown--vie-centre .nav-mega-menu__featured {
        background-image: url('/images/poles/actualites-agenda/hero-actualites-agenda.webp');
    }

    .nav-dropdown--vie-centre .nav-mega-menu__list li:nth-child(1) .nav-mega-menu__link {
        background-image: url('/images/poles/inscription/hero-inscription.webp');
    }

    .nav-dropdown--vie-centre .nav-mega-menu__list li:nth-child(2) .nav-mega-menu__link {
        background-image: url('/images/poles/benevolat/hero-engagement.webp');
    }

    .nav-dropdown--vie-centre .nav-mega-menu__list li:nth-child(3) .nav-mega-menu__link {
        background-image: url('/images/poles/actualites-agenda/article-vie-quartier.webp');
    }

    .nav-dropdown--vie-centre .nav-mega-menu__list li:nth-child(4) .nav-mega-menu__link {
        background-image: url('/images/poles/le-centre/mission-solidarite.webp');
    }
    .nav-mega-menu__list li:last-child:nth-child(odd) .nav-mega-menu__link {
        min-height: 92px;
    }

    .nav-dropdown--mega .nav-mega-menu__link:hover .nav-mega-menu__link-veil,
    .nav-dropdown--mega .nav-mega-menu__link:focus-visible .nav-mega-menu__link-veil {
        background: linear-gradient(
            180deg,
            rgba(16, 42, 44, 0.22) 0%,
            rgba(16, 42, 44, 0.55) 45%,
            rgba(16, 42, 44, 0.93) 100%
        );
    }

    /* Liseré accent au survol / focus / page active */
    .nav-dropdown--mega .nav-mega-menu__link:hover,
    .nav-dropdown--mega .nav-mega-menu__link:focus-visible,
    .nav-dropdown--mega .nav-mega-menu__link:active,
    .nav-dropdown--mega .nav-mega-menu__link[aria-current="page"] {
        background-color: var(--color-primary-dark, #053333);
        box-shadow: inset 0 0 0 3px var(--color-accent, #e8b923);
    }
    .nav-mega-menu__arrow {
        position: absolute !important;
        right: 0.85rem;
        bottom: 0.78rem;
        z-index: 2 !important;
        display: grid !important;
        place-items: center;
        width: 1.45rem;
        height: 1.45rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.92);
        color: var(--color-primary-dark, #053333);
        font-size: 0.9rem;
        font-weight: 700;
        line-height: 1;
        opacity: 0.92;
    }

    .nav-mega-menu__link:hover .nav-mega-menu__arrow,
    .nav-mega-menu__link:focus-visible .nav-mega-menu__arrow {
        background: var(--color-accent, #e8b923);
        transform: translateX(2px);
    }
    .nav-mega-menu__link > span:not(.nav-mega-menu__link-veil) {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .nav-mega-menu__link strong {
        color: #fff;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.94rem;
        font-weight: 650;
        letter-spacing: 0.005em;
        line-height: 1.28;
    }

    .nav-mega-menu__link small {
        margin-top: 0.15rem;
        color: rgba(255, 255, 255, 0.92);
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.78rem;
        font-weight: 450;
        line-height: 1.35;
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    /* ── Bandeau d'orientation ───────────────────────────────────────── */
    .nav-mega-menu__footer {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        margin: 0;
        padding: 0.7rem 1.3rem;
        border-top: 1px solid var(--color-border, rgba(16, 42, 44, 0.12));
        background: var(--color-light, #f7f3ee);
        color: var(--color-muted, #5f6b73);
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.8rem;
        font-weight: 450;
        white-space: normal;
    }

    .nav-mega-menu__footer i {
        color: var(--color-primary, #0a4548);
        flex-shrink: 0;
    }

    .nav-dropdown--mega .nav-mega-menu__footer a {
        display: inline;
        padding: 0;
        border-radius: 0;
        color: var(--color-primary-dark, #053333) !important;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-weight: 700;
        white-space: nowrap;
        text-decoration: underline;
        text-decoration-color: var(--color-secondary, #d36b42);
        text-underline-offset: 3px;
    }

    .nav-dropdown--mega .nav-mega-menu__footer a:hover,
    .nav-dropdown--mega .nav-mega-menu__footer a:focus-visible {
        background: none;
        color: var(--color-secondary, #d36b42) !important;
    }
}

/* Écrans 1025–1180px : panneau plus étroit, liste en une colonne */
@media (min-width: 1025px) and (max-width: 1180px) {
    .nav-dropdown--mega .nav-dropdown__menu {
        width: min(580px, calc(100vw - 2rem));
    }

    .nav-mega-menu__shell {
        grid-template-columns: 216px minmax(0, 1fr);
    }

    .nav-mega-menu__list {
        grid-template-columns: 1fr;
    }

    .nav-mega-menu__list li:last-child:nth-child(odd) .nav-mega-menu__link {
        min-height: 118px;
    }

    .nav-dropdown--mega .nav-mega-menu__featured {
        min-height: 0;
    }
}

/* ==========================================================================
   Méga-menus éditoriaux — orientation simple et accessible
   ========================================================================== */
@media (min-width: 1025px) {
    .nav-dropdown--editorial .nav-dropdown__menu {
        width: min(780px, calc(100vw - 2rem));
        max-height: calc(100vh - var(--current-header-bottom, 6rem) - 1rem);
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border: 1px solid rgba(16, 42, 44, 0.14);
        border-radius: 18px;
        background: #f7f3ee;
        box-shadow: 0 24px 60px rgba(16, 42, 44, 0.18);
    }
    .nav-dropdown--centre .nav-dropdown__menu,
    .nav-dropdown--creche .nav-dropdown__menu { right: auto; left: 0; }
    .nav-dropdown--enfance .nav-dropdown__menu,
    .nav-dropdown--insertion .nav-dropdown__menu { right: 0; left: auto; }

    .nav-editorial-menu {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        width: 100%;
    }
    .nav-editorial-menu__intro {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
        padding: 1.65rem 1.5rem;
        background: #f7f3ee;
        border-right: 1px solid rgba(16, 42, 44, 0.12);
    }
    .nav-editorial-menu__eyebrow {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        margin: 0 0 1rem;
        color: #4a545a;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.69rem;
        font-weight: 700;
        letter-spacing: 0.13em;
        line-height: 1.2;
        text-transform: uppercase;
    }
    .nav-editorial-menu__eyebrow::before {
        content: '';
        width: 1.5rem;
        height: 2px;
        background: #4a545a;
    }
    .nav-editorial-menu__title {
        margin: 0;
        color: #102a2c;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: clamp(1.55rem, 2.3vw, 2rem);
        font-weight: 800;
        letter-spacing: -0.035em;
        line-height: 1.08;
        text-wrap: balance;
    }
    .nav-editorial-menu__title span { color: #d36b42; }
    .nav-editorial-menu__description {
        margin: 1rem 0 1.25rem;
        color: #4a545a;
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.88rem;
        line-height: 1.55;
    }
    .header .nav-links .nav-dropdown--editorial a.nav-editorial-menu__cta {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        min-height: 2.7rem;
        margin-top: auto;
        padding: 0.7rem 1rem;
        border: 1px solid #102a2c;
        border-radius: 999px;
        background: #102a2c;
        color: #fff !important;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.82rem;
        font-weight: 700;
        text-decoration: none;
    }
    .header .nav-links .nav-dropdown--editorial a.nav-editorial-menu__cta:hover,
    .header .nav-links .nav-dropdown--editorial a.nav-editorial-menu__cta:focus-visible {
        background: #d36b42;
        border-color: #d36b42;
        color: #fff !important;
    }
    .nav-editorial-menu__content {
        min-width: 0;
        padding: 1.35rem 1.4rem 1.2rem;
        background: #fff;
    }
    .nav-editorial-menu__prompt {
        margin: 0 0 0.85rem;
        padding-bottom: 0.7rem;
        border-bottom: 1px solid rgba(16, 42, 44, 0.12);
        color: #102a2c;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }
    .nav-editorial-menu__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    .nav-editorial-menu__list li {
        min-width: 0;
        border-bottom: 1px solid rgba(16, 42, 44, 0.1);
    }
    .nav-editorial-menu__list li:nth-child(odd) { border-right: 1px solid rgba(16, 42, 44, 0.1); }
    .nav-editorial-menu__list li:nth-last-child(-n + 2) { border-bottom: 0; }

    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__list a {
        position: relative;
        display: grid;
        grid-template-columns: 2.1rem minmax(0, 1fr) 1.25rem;
        align-items: center;
        gap: 0.65rem;
        min-height: 5.15rem;
        padding: 0.75rem;
        border-radius: 10px;
        color: #102a2c !important;
        white-space: normal;
        text-decoration: none;
    }
    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__list a:hover,
    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__list a:focus-visible {
        background: #f7f3ee;
        color: #102a2c !important;
    }
    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__list a[aria-current='page'] {
        background: rgba(211, 107, 66, 0.1);
        box-shadow: inset 3px 0 0 #d36b42;
    }
    .nav-editorial-menu__number {
        align-self: start;
        padding-top: 0.08rem;
        color: #d36b42;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.04em;
    }
    .nav-editorial-menu__text {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .nav-editorial-menu__text strong {
        color: #102a2c !important;
        font-family: var(--font-heading, 'Outfit', sans-serif);
        font-size: 0.9rem;
        font-weight: 750;
        line-height: 1.2;
    }
    .nav-editorial-menu__text small {
        margin-top: 0.22rem;
        color: #4a545a;
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.74rem;
        line-height: 1.35;
    }
    .nav-editorial-menu__arrow {
        color: #d36b42;
        font-size: 0.75rem;
        transition: transform 0.16s ease;
    }
    .nav-editorial-menu__list a:hover .nav-editorial-menu__arrow,
    .nav-editorial-menu__list a:focus-visible .nav-editorial-menu__arrow { transform: translateX(3px); }

    .nav-editorial-menu__help {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin: 0;
        padding: 0.78rem 1.4rem;
        border-top: 1px solid rgba(16, 42, 44, 0.12);
        background: #f2ede7;
        color: #4a545a;
        font-family: var(--font-body, 'Inter', sans-serif);
        font-size: 0.82rem;
        line-height: 1.4;
    }
    .nav-editorial-menu__help > i { color: #d36b42; }
    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__help a {
        display: inline;
        padding: 0;
        color: #102a2c !important;
        font-weight: 800;
        text-decoration: underline;
        text-decoration-color: #d36b42;
        text-underline-offset: 3px;
    }
}
@media (min-width: 1025px) and (max-width: 1180px) {
    .nav-dropdown--editorial .nav-dropdown__menu { width: min(700px, calc(100vw - 1rem)); }
    .nav-editorial-menu { grid-template-columns: 240px minmax(0, 1fr); }
    .nav-editorial-menu__intro { padding: 1.35rem 1.2rem; }
    .header .nav-links .nav-dropdown--editorial .nav-editorial-menu__list a {
        min-height: 4.9rem;
        padding-inline: 0.6rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .nav-editorial-menu__arrow { transition: none; }
}