/* =========================================================
   Cerefcœur - général : couleurs, typographie, en-tête, menus, pied de page, filigrane
   Les couleurs suivent la palette réglée dans Neve (Personnaliser > Couleurs) :
   framboise = Accent principal, vert d'eau = Accent secondaire.
   ========================================================= */

:root {
  --framboise: var(--nv-primary-accent, #c82c49);
  --framboise-fonce: #a51f3b;
  --framboise-pale: #fdf0f2;
  --rose: #f6d3da;
  --vert: var(--nv-secondary-accent, #38d3b7);
  --vert-fonce: #1f7a6d;   /* version lisible du vert pour du texte */
  --vert-pale: #eaf9f6;
  --encre: var(--nv-text-color, #14171c);
  --texte: #3a3a3f;
  --gris: #6e6e73;
  --ligne: rgba(0, 0, 0, .08);
  --fond: #fbfbfd;
  --blanc: #ffffff;

  --rayon: 22px;
  --rayon-s: 14px;
  /* Pas d'ombre sous les cartes : un filet suffit. L'ombre ne reste que sur ce qui flotte (sous-menus, panneaux) */
  --bord: 1px solid rgba(0, 0, 0, .07);
  --vert-titre: #1c9c85; /* menthe assez soutenu pour un titre sur fond blanc */
  --ombre-flottante: 0 16px 40px -16px rgba(20, 23, 28, .22);

  /* Ressort sans rebond (amorti critique) et ressort léger */
  --ressort: cubic-bezier(.22, 1, .36, 1);

  --police-titre: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --largeur: 1180px;
  --gouttiere: clamp(16px, 4vw, 40px);
  --haut-barre: 84px;     /* rangée du haut (logo + liens +) */
  --haut-menu: 58px;      /* rangée des rubriques */
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--haut-menu) + 24px); }
html, body { overflow-x: clip; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); box-sizing: border-box; }

/* Titres : interlignage serré et approche négative quand ils grandissent */
.cerefcoeur-rubrique h1, .cerefcoeur-article h1 { font-family: var(--police-titre); font-weight: 500; color: var(--encre); font-size: clamp(1.85rem, 1.25rem + 2.1vw, 2.75rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
.cerefcoeur-article h2, .cerefcoeur-article .elementor-heading-title { font-family: var(--police-titre); font-weight: 500; color: var(--encre); letter-spacing: -0.018em; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--framboise) 60%, white); outline-offset: 2px; border-radius: 8px; }

/* =========================================================
   EN-TÊTE (constructeur de Neve)
   Rangée du haut : logo + liens « + ». Rangée principale : les 7 rubriques, qui reste en haut de l'écran.
   ========================================================= */
header.header { position: sticky; top: calc(-1 * var(--haut-barre)); z-index: 100; }
body.admin-bar header.header { top: calc(32px - var(--haut-barre)); }

/* Rangée du haut : blanche et sobre */
.header-top { background: var(--blanc) !important; }
.header-top .header--row-inner, .header-top .header--row-inner .container { background: transparent !important; }
.header-top .header--row-inner { min-height: var(--haut-barre); display: flex; align-items: center; }
.header-top .header--row-inner .container, .header-main .container { max-width: 1320px; }

/* Logo : le personnage + le nom et le sous-titre du site */
.site-logo .title-with-logo { display: flex; align-items: center; gap: 12px; }
.site-logo .neve-site-logo { width: auto !important; max-width: none !important; height: 54px; aspect-ratio: 400 / 1000; }
.site-logo .site-title { font-family: var(--police-titre); font-weight: 500; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1; color: var(--framboise); margin: 0; }
.site-logo .nv-title-tagline-wrap small { display: block; font-family: var(--police); font-size: .72rem; font-weight: 500; line-height: 1.3; color: var(--vert-fonce); margin-top: 5px; max-width: 230px; }

/* Liens rapides : texte avec un pictogramme (reconnu à l'adresse du lien) ; « Nous contacter » est un bouton framboise, placé en dernier */
.nav-menu-secondary .nav-ul { display: flex; align-items: center; gap: 4px; }
.nav-menu-secondary .nav-ul li a {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; box-sizing: border-box; padding: 0 14px; line-height: 1; border-radius: 999px; border: 0; background: none;
  color: var(--texte); font-family: var(--police); font-size: .875rem; font-weight: 500; text-decoration: none;
  transition: background .2s var(--ressort), border-color .2s, transform .1s ease-out;
}
.nav-menu-secondary .nav-ul li a::before {
  content: ""; width: 16px; height: 16px; flex: none; background: var(--framboise);
  -webkit-mask: var(--ico, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")) center / contain no-repeat;
  mask: var(--ico, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E")) center / contain no-repeat;
}
.nav-menu-secondary .nav-ul li a:hover { background: var(--framboise-pale); color: var(--framboise); }
.nav-menu-secondary .nav-ul li a:active { transform: scale(.97); }
.nav-menu-secondary .nav-ul li a[href*="contacter"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); background: var(--framboise); color: #fff; font-weight: 600; padding: 0 20px; }
.nav-menu-secondary .nav-ul li:has(a[href*="contacter"]) { order: 9; margin-left: 10px; }
.nav-menu-secondary .nav-ul li a[href*="contacter"]::before { background: #fff; }
.nav-menu-secondary .nav-ul li a[href*="contacter"]:hover { background: var(--framboise-fonce); color: #fff; }
.nav-menu-secondary .nav-ul li a[href*="actualites"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h13v14H6a2 2 0 0 1-2-2Z'/%3E%3Cpath d='M17 9h3v8a2 2 0 0 1-2 2M8 9h5M8 13h5'/%3E%3C/svg%3E"); }
.nav-menu-secondary .nav-ul li a[href*="annuaire"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-5.6-7-11a7 7 0 0 1 14 0c0 5.4-7 11-7 11Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }

/* Rangée des rubriques : bande framboise, comme les bandeaux des pages (portée par un calque à part : le menu mobile peut ainsi couvrir l'écran) */
.header-main { position: relative; background: transparent !important; transition: box-shadow .3s var(--ressort); }
.header-main::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--framboise-fonce), var(--framboise) 60%, #d63a57);
}
.header-main .header--row-inner { background: transparent !important; min-height: var(--haut-menu); display: flex; align-items: center; }
header.header.defile .header-main { box-shadow: 0 1px 0 var(--ligne), 0 10px 30px -18px rgba(0,0,0,.25); }
/* Au défilement, sur ordinateur : en-tête translucide, la page se devine dessous */
header.header.defile .header-top[data-show-on="desktop"] { background: rgba(255,255,255,.55) !important; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
header.header.defile .header-main[data-show-on="desktop"] { -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
header.header.defile .header-main[data-show-on="desktop"]::before { opacity: .82; }
.header-main::before { transition: opacity .3s var(--ressort); }
.header-main[data-show-on="desktop"] .hfg-slot.left, .header-main[data-show-on="desktop"] .builder-item, .header-main[data-show-on="desktop"] .item--inner, .header-main[data-show-on="desktop"] .nv-nav-wrap, .header-main[data-show-on="desktop"] .nav-menu-primary { width: 100%; flex: 1; }
.header-main[data-show-on="mobile"] .row--wrapper { display: flex; align-items: center; justify-content: space-between; }

.header-main .builder-item--primary-menu { --spacing: 0px !important; }
.header-main .primary-menu-ul { display: flex; flex-wrap: nowrap !important; justify-content: space-between; width: 100%; gap: 2px; }
.header-main .primary-menu-ul > li { margin: 0 !important; }
.header-main .primary-menu-ul > li > .wrap { display: flex; align-items: center; }
.header-main .primary-menu-ul > li > .wrap > a {
  font-family: var(--police); font-size: .8125rem; font-weight: 500; white-space: nowrap; color: #fff;
  padding: 9px 10px !important; border-radius: 999px; transition: background .2s var(--ressort), color .2s, transform .1s ease-out;
}
.header-main .primary-menu-ul > li:hover > .wrap > a,
.header-main .primary-menu-ul > li:focus-within > .wrap > a { background: rgba(255,255,255,.16); color: #fff; }
.header-main .primary-menu-ul > li > .wrap > a:active { transform: scale(.97); }
.header-main .primary-menu-ul > li.nv-active > .wrap > a,
.header-main .primary-menu-ul > li.current-menu-ancestor > .wrap > a,
.header-main .primary-menu-ul > li.current-menu-parent > .wrap > a { background: #fff; color: var(--framboise-fonce); }
.header-main .primary-menu-ul > li > .wrap > .caret-wrap { display: none; } /* le survol suffit, la rubrique reste cliquable */
.header-main .primary-menu-ul > li > .wrap > a::after { display: none; }

/* Sous-menus : ils sortent de la rubrique qui les ouvre */
.header-main .primary-menu-ul > li { position: relative; }
.header-main .primary-menu-ul > li > .sub-menu {
  position: absolute; top: calc(100% + 8px); left: 50% !important; right: auto !important;
  width: max-content; min-width: 280px; max-width: 360px; padding: 10px; margin: 0;
  background: #fff !important; /* blanc plein, comme le grand menu */
  border: 1px solid var(--ligne); border-radius: var(--rayon-s); box-shadow: var(--ombre-flottante);
  transform-origin: top center; transform: translateX(-50%) translateY(-6px) scale(.96);
  opacity: 0; visibility: hidden; display: block !important;
  transition: transform .35s var(--ressort), opacity .2s var(--ressort), visibility 0s .35s;
}
.header-main .primary-menu-ul > li:first-child > .sub-menu { left: 0 !important; transform: translateY(-6px) scale(.96); transform-origin: top left; }
.header-main .primary-menu-ul > li:last-child > .sub-menu { left: auto !important; right: 0 !important; transform: translateY(-6px) scale(.96); transform-origin: top right; }
.header-main .primary-menu-ul > li > .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* pont pour la souris */
.header-main .primary-menu-ul > li:hover > .sub-menu,
.header-main .primary-menu-ul > li:focus-within > .sub-menu,
.header-main .primary-menu-ul > li.dropdown-open > .sub-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1);
  transition: transform .35s var(--ressort), opacity .2s var(--ressort), visibility 0s;
}
.header-main .primary-menu-ul > li:first-child:hover > .sub-menu,
.header-main .primary-menu-ul > li:first-child:focus-within > .sub-menu,
.header-main .primary-menu-ul > li:last-child:hover > .sub-menu,
.header-main .primary-menu-ul > li:last-child:focus-within > .sub-menu { transform: none; }
.header-main .sub-menu li { border: 0 !important; }
.header-main .sub-menu li .wrap { display: block; }
.header-main .sub-menu li a {
  display: block !important; padding: 9px 12px !important; border-radius: 10px; white-space: normal;
  font-size: .9rem; line-height: 1.35; color: var(--encre) !important; text-decoration: none;
  transition: background .15s var(--ressort);
}
.header-main .sub-menu li a:hover, .header-main .sub-menu li a:focus-visible { background: var(--framboise-pale); color: var(--framboise-fonce) !important; }
.header-main .sub-menu li.current-menu-item > .wrap > a { color: var(--framboise) !important; font-weight: 600; }

/* Petite taille d'écran d'ordinateur */
@media (max-width: 1319px) and (min-width: 1180px) {
  .header-main .primary-menu-ul > li > .wrap > a { font-size: .75rem; padding: 9px 7px !important; }
}

/* =========================================================
   TÉLÉPHONE ET TABLETTE : barre du logo + bouton menu, panneau latéral de Neve
   ========================================================= */
/* Neve passe en version mobile sous 960 px ; avec 7 rubriques, on le fait dès 1180 px */
@media (min-width: 960px) and (max-width: 1179px) {
  .header--row[data-show-on="desktop"] { display: none !important; }
  .header--row[data-show-on="mobile"] { display: block !important; }
}
@media (max-width: 1179px) {
  header.header, body.admin-bar header.header { top: 0; }
  .header-main .site-logo .neve-site-logo { height: 42px; }
  .header-main .site-logo .site-title { font-size: 1.2rem; }
  .header-main .site-logo .nv-title-tagline-wrap small { display: none; }
  .header-main .header--row-inner { min-height: 64px; }
  .navbar-toggle { border-radius: 50% !important; width: 44px; height: 44px; padding: 0 !important; display: grid !important; place-items: center; background: rgba(0,0,0,.05) !important; border: 0 !important; transition: transform .1s ease-out; }
  .navbar-toggle:active { transform: scale(.94); }

  .header-menu-sidebar { background: rgba(251,251,253,.96) !important; -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: -20px 0 60px rgba(0,0,0,.18); }
  .header-menu-sidebar-bg { background: transparent !important; }
  .header-menu-sidebar .primary-menu-ul > li { border-bottom: 1px solid var(--ligne); }
  .header-menu-sidebar .primary-menu-ul > li > .wrap > a { font-size: 1.05rem; font-weight: 500; color: var(--encre); padding: 14px 4px !important; }
  .header-menu-sidebar .primary-menu-ul > li.nv-active > .wrap > a { color: var(--framboise); }
  .header-menu-sidebar .caret-wrap { color: var(--framboise); }
  .header-menu-sidebar .sub-menu li a { font-size: .98rem; padding: 10px 4px 10px 14px !important; color: var(--texte); }
  .header-menu-sidebar .nav-menu-secondary .nav-ul { flex-direction: column; gap: 4px; margin-top: 18px; }
  .header-menu-sidebar .nav-menu-secondary .nav-ul li a { border: 0; padding: 12px 4px; font-size: 1rem; }
  /* La barre du logo reste blanche ; dans le panneau, les rubriques sont en encre sur fond clair */
  .header-main::before { background: var(--blanc); }
  .header-menu-sidebar .primary-menu-ul > li:hover > .wrap > a,
  .header-menu-sidebar .primary-menu-ul > li:focus-within > .wrap > a { background: none; color: var(--framboise); }
  .header-menu-sidebar .primary-menu-ul > li.current-menu-ancestor > .wrap > a,
  .header-menu-sidebar .primary-menu-ul > li.current-menu-parent > .wrap > a { background: none; color: var(--framboise); }
  .header-menu-sidebar .nav-menu-secondary .nav-ul li:has(a[href*="contacter"]) { order: 9; margin: 8px 0 0; }
  .header-menu-sidebar .nav-menu-secondary .nav-ul li a[href*="contacter"] { padding: 12px 20px; }
}

/* =========================================================
   PIED DE PAGE
   La partie riche (modèle Elementor « Pied de page Cerefcœur ») sur un dégradé menthe très doux,
   puis le pied de Neve (liens légaux, icônes, copyright) sur une seule bande framboise.
   ========================================================= */
.pied { position: relative; overflow: hidden; isolation: isolate; padding: 72px 0 40px; font-size: .9rem; color: var(--gris);
  background: radial-gradient(circle at 92% 85%, rgba(56,211,183,.16), transparent 40%), radial-gradient(circle at 5% 0%, rgba(200,44,73,.06), transparent 35%), linear-gradient(180deg, #fff 0%, var(--vert-pale) 100%); }
.pied::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--framboise), #e2425f 50%, var(--vert)); }
.pied .elementor-widget-heading .elementor-heading-title { position: relative; padding-top: 14px; font-family: var(--police); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--encre); margin-bottom: 4px; }
.pied .elementor-widget-heading .elementor-heading-title::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 3px; border-radius: 3px; background: var(--framboise); }
.pied a { color: var(--texte); text-decoration: none; }
.pied a:hover { color: var(--framboise); }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: 0 0 6px; }
.pied .partenaires a { display: block; }
/* Logos en gris ; leur fond blanc se fond dans le dégradé */
.pied .partenaires img { height: 46px !important; width: auto !important; filter: grayscale(1); opacity: .65; mix-blend-mode: multiply; transition: filter .3s, opacity .3s; }
.pied .partenaires img:hover { filter: none; opacity: 1; }
.pied .partenaires .elementor-widget-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 48px; border-top: 1px solid rgba(31,122,109,.14); padding-top: 36px !important; }
.pied .partenaires .elementor-widget { width: auto !important; margin: 0 !important; }
.pied .marque-pied img { height: 52px; width: auto; }

.site-footer .footer-main, .site-footer .footer-bottom { background: linear-gradient(90deg, var(--framboise-fonce), var(--framboise)) !important; }
.site-footer .footer-main .footer--row-inner, .site-footer .footer-bottom .footer--row-inner { background: transparent !important; }
.site-footer, .site-footer a { font-family: var(--police) !important; }
.site-footer .footer-main a { color: #fff !important; font-weight: 500; }
/* « Intranet » (lien vers l'administration) : petit bouton avec un cadenas */
.site-footer .footer-main a[href*="wp-admin"] { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.16); line-height: 1; }
.site-footer .footer-main a[href*="wp-admin"]::before { content: ""; width: 14px; height: 14px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat; }
.site-footer .footer-main a[href*="wp-admin"]:hover { background: rgba(255,255,255,.26); }
/* Bande du bas, sur ordinateur : pages légales, réseaux sociaux, puis Intranet, le tout centré sur une ligne.
   Les conteneurs de Neve s'effacent (display: contents) pour que chaque lien devienne un élément de la même ligne. */
.site-footer .footer-main .footer-menu, .site-footer .footer-main .nav-ul { align-items: center; }
@media (min-width: 960px) {
  .site-footer .footer-main[data-show-on="desktop"] .hfg-grid-main { display: flex !important; justify-content: center; align-items: center; gap: 28px; }
  .site-footer .footer-main[data-show-on="desktop"] .hfg-slot.left, .site-footer .footer-main[data-show-on="desktop"] .hfg-slot.left :is(.builder-item, .item--inner, .component-wrap, .nav-menu-footer, .nav-ul) { display: contents !important; }
  .site-footer .footer-main[data-show-on="desktop"] .nav-ul > li { order: 1; margin: 0 !important; }
  .site-footer .footer-main[data-show-on="desktop"] .hfg-slot.c-left { order: 2; flex: none; width: auto; }
  .site-footer .footer-main[data-show-on="desktop"] .nav-ul > li:has(a[href*="wp-admin"]) { order: 3; }
}
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.15); }
.site-footer .footer-bottom, .site-footer .footer-bottom a { color: rgba(255,255,255,.75) !important; text-decoration: none !important; font-size: .82rem; }
.footer-main .nv-social-icons-list a { border-radius: 8px !important; background: rgba(255,255,255,.16) !important; transition: transform .1s ease-out; }
.footer-main .nv-social-icons-list svg { fill: #fff !important; }
.footer-main .nv-social-icons-list a:active { transform: scale(.94); }

/* =========================================================
   FILIGRANE : le personnage du logo, en grand et très transparent
   ========================================================= */
.filigrane { position: absolute; z-index: -1; pointer-events: none; user-select: none; height: auto; max-width: none; }
.bandeau .filigrane { right: max(2vw, calc((100vw - var(--largeur)) / 2 - 40px)); top: -6%; width: clamp(110px, 13vw, 190px); opacity: .13; filter: brightness(0) invert(1); }
.bandeau.clair .filigrane { opacity: .07; filter: none; top: -18%; width: clamp(90px, 10vw, 150px); }
.pied .filigrane { right: 2vw; bottom: -60px; width: 260px; opacity: .12; }
@media (max-width: 640px) {
  .bandeau .filigrane { width: 90px; right: -12px; top: -10px; }
  .bandeau.clair .filigrane { width: 80px; }
  .pied .filigrane { width: 150px; right: -20px; bottom: -40px; opacity: .08; }
}

/* Apparition douce au défilement */
.apparait { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ressort), transform .8s var(--ressort); }
.apparait.vu { opacity: 1; transform: none; }
.elementor-editor-active .apparait { opacity: 1; transform: none; }

/* =========================================================
   ACCESSIBILITÉ : moins d'animations, moins de transparence, plus de contraste
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cerefcoeur-rubrique *, .cerefcoeur-article *, header.header *, .pied * { transition-duration: .01ms !important; animation: none !important; }
  .apparait { opacity: 1; transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .header-main .sub-menu, .header-menu-sidebar, header.header.defile .header-top[data-show-on="desktop"] { background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  header.header.defile .header-main[data-show-on="desktop"] { -webkit-backdrop-filter: none; backdrop-filter: none; }
  header.header.defile .header-main[data-show-on="desktop"]::before { opacity: 1; }
}
@media (prefers-contrast: more) {
  :root { --gris: #3a3a3f; --ligne: rgba(0,0,0,.3); }
}

/* =========================================================
   VISIONNEUSE PDF (ordinateur) : le document s'ouvre par-dessus la page
   ========================================================= */
.visionneuse { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 3vh 3vw; background: rgba(20,23,28,0); transition: background .35s var(--ressort); }
.visionneuse.ouverte { background: rgba(20,23,28,.55); }
.visionneuse-cadre { width: min(1100px, 100%); height: 100%; display: flex; flex-direction: column; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); transform: translateY(16px) scale(.97); opacity: 0; transition: transform .45s var(--ressort), opacity .25s var(--ressort); }
.visionneuse.ouverte .visionneuse-cadre { transform: none; opacity: 1; }
.visionneuse-barre { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--ligne); }
.visionneuse-barre strong { flex: 1; font-weight: 600; color: var(--encre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visionneuse-bouton { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; background: var(--framboise-pale); color: var(--framboise-fonce) !important; font: 600 .9rem var(--police); text-decoration: none !important; transition: transform .1s ease-out, background .2s; }
.visionneuse-bouton svg { width: 18px; height: 18px; }
.visionneuse-bouton:hover { background: var(--rose); }
.visionneuse-bouton:active { transform: scale(.96); }
.visionneuse-bouton.fermer { width: 40px; padding: 0; justify-content: center; background: #f2f2f5; color: var(--encre) !important; }
.visionneuse iframe { flex: 1; width: 100%; border: 0; background: #f2f2f5; }

/* =========================================================
   TEXTES JUSTIFIÉS (avec coupure des mots, pour éviter les grands blancs)
   ========================================================= */
.contenu .elementor-widget-text-editor p,
.fiche-texte p, .cerefcoeur-centre .bloc > p,
.rubrique-texte p {
  text-align: justify; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 6 3 3;
}
.contenu .elementor-widget-text-editor li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.chapo-article p, .legende-plis, .elementor-tab-content :is(p, li), .liens-utiles a, .centre p { text-align: left !important; -webkit-hyphens: manual !important; hyphens: manual !important; }

/* =========================================================
   GRAND MENU (mega menu Neve Pro) : panneau large, sujets en colonnes avec pictogramme
   ========================================================= */
.header-main .primary-menu-ul > li.neve-mega-menu { position: static; }
.header-main .primary-menu-ul > li.neve-mega-menu > .sub-menu {
  left: 50% !important; right: auto !important; width: max-content; max-width: calc(100vw - 48px); min-width: 0;
  padding: 16px; grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(250px, 310px); gap: 0 16px; background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none;
  display: grid !important; transform: translateX(-50%) translateY(-6px) scale(.98); transform-origin: top center;
}
.header-main .primary-menu-ul > li.neve-mega-menu:hover > .sub-menu,
.header-main .primary-menu-ul > li.neve-mega-menu:focus-within > .sub-menu { transform: translateX(-50%) translateY(0) scale(1); }
.header-main .neve-mega-menu .neve-mm-col { display: flex; flex-direction: column; }
.header-main .neve-mega-menu .neve-mm-col + .neve-mm-col { border-left: 1px solid var(--ligne) !important; padding-left: 16px; }
.header-main .neve-mega-menu .neve-mm-col > .sub-menu {
  position: static !important; display: flex !important; flex-direction: column; gap: 2px; opacity: 1 !important; visibility: visible !important;
  transform: none !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; margin: 0 !important; width: auto !important; min-width: 0 !important;
  background: none !important; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.header-main .neve-mega-menu .neve-mm-col > .sub-menu a { display: flex !important; align-items: center; gap: 12px; padding: 7px 10px !important; font-weight: 500; line-height: 1.25; }
.header-main .mm-picto { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: var(--framboise-pale); color: var(--framboise); transition: background .3s var(--ressort), color .3s var(--ressort); }
.header-main .neve-mega-menu .neve-mm-col:nth-child(2) .mm-picto { background: var(--vert-pale); color: var(--vert-titre); }
.header-main .mm-picto svg { width: 20px; height: 20px; }
.header-main .sub-menu a:hover .mm-picto { background: var(--framboise); color: #fff; }
.header-main .sub-menu a:hover .mm-picto svg { stroke: #fff !important; color: #fff !important; } /* Neve colore le picto en vert au survol : on force le blanc */
.header-main .neve-mega-menu .neve-mm-col:nth-child(2) > .sub-menu a:hover .mm-picto { background: var(--vert); color: #fff; }
/* Menu du téléphone : pas de colonnes, les sujets à la suite comme avant */
.header-menu-sidebar .primary-menu-ul .neve-mega-menu > .sub-menu, .header-menu-sidebar .primary-menu-ul .neve-mega-menu > .sub-menu.dropdown-open { display: block !important; grid-template-columns: none !important; }
.header-menu-sidebar .primary-menu-ul .neve-mega-menu > .sub-menu:not(.dropdown-open) { display: none !important; }
.header-menu-sidebar .neve-mm-col > .sub-menu { display: block !important; padding: 0 !important; }
.header-menu-sidebar .neve-mm-col > .screen-reader-text + .sub-menu, .header-menu-sidebar .neve-mm-col { padding: 0 !important; }
.header-menu-sidebar .mm-picto { display: none; }
/* Petits menus (moins de 4 sujets) : mêmes pictogrammes */
.header-main .primary-menu-ul > li:not(.neve-mega-menu) > .sub-menu a { display: flex !important; align-items: center; gap: 12px; padding: 7px 10px !important; line-height: 1.25; font-weight: 500; }
.header-main .neve-mega-menu .neve-mm-col > .wrap > a { display: flex !important; align-items: center; gap: 12px; padding: 7px 10px !important; font-weight: 500; line-height: 1.25; }
