/* Compléments au thème d'origine : accessibilité (WCAG 2.1 AA), bandeau cookies,
   contenus tiers soumis au consentement et rendu statique des listes. */

/* --- Lien d'évitement --------------------------------------------------- */
.skip-link {
  position: absolute; left: 8px; top: -100px; z-index: 100000;
  padding: 12px 18px; background: #1d2327; color: #fff; font: 600 16px/1.2 sans-serif; text-decoration: none; border-radius: 3px;
}
.skip-link:focus { top: 8px; color: #fff; outline: 3px solid #ffbf47; outline-offset: 2px; }
#main:focus { outline: none; }

/* --- Focus clavier toujours visible (2.4.7) -------------------------------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, iframe:focus-visible {
  outline: 3px solid #1b5e7b !important; outline-offset: 2px !important; box-shadow: 0 0 0 5px rgba(255, 255, 255, .85) !important;
}

/* --- Texte réservé aux lecteurs d'écran ------------------------------------ */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }

/* --- Menu principal : sous-menus accessibles au clavier --------------------- */
@media (min-width: 980px) {
  #primary-menu.no-responsive > li.is-open > ul,
  #primary-menu.no-responsive > li:focus-within > ul { visibility: visible; opacity: 1; transform: none; display: block; }
}

/* --- Animations : respect de prefers-reduced-motion (2.3.3) ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .item-animations-not-inited, .lazy-loading-item, .wpb_animate_when_almost_visible { opacity: 1 !important; transform: none !important; }
}

/* --- Sans JavaScript : le contenu animé reste visible ------------------------ */
.no-js .item-animations-not-inited, .no-js .wpb_animate_when_almost_visible, .no-js .lazy-loading-item { opacity: 1 !important; visibility: visible !important; transform: none !important; }
.no-js .preloader { display: none !important; }

/* --- Bandeau cookies ------------------------------------------------------ */
.cookie-banner[hidden], .cookie-manage[hidden], .cookie-banner__settings[hidden], .cookie-banner__btn[hidden] { display: none !important; }
.cookie-banner { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .5); }
.cookie-banner__box { width: 100%; max-width: 500px; max-height: calc(100vh - 32px); overflow: auto; padding: 32px 45px; background: #1f6f8b; color: #fff; font-size: 15px; line-height: 1.45; box-shadow: 0 4px 24px rgba(0, 0, 0, .3); }
.cookie-banner__title { margin: 0 0 12px; color: #fff; font-size: 19px; line-height: 1.3; letter-spacing: 0; text-transform: none; }
.cookie-banner__box p { margin: 0 0 16px; color: #fff; }
.cookie-banner__box a { color: #fff; text-decoration: underline; }
.cookie-banner__box a:hover { color: #fff; text-decoration: none; }
.cookie-banner fieldset { margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .6); }
.cookie-banner legend { padding: 0 6px; font-weight: 700; color: #fff; }
.cookie-banner__option { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; color: #fff; font-weight: 400; }
.cookie-banner__option input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.cookie-banner__link { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; }
.cookie-banner__btn { min-height: 44px; padding: 10px 18px; border: 2px solid #fff; background: #fff; color: #17485a; font: 700 14px/1 inherit; text-transform: uppercase; cursor: pointer; }
.cookie-banner__btn--secondary { background: transparent; color: #fff; }
.cookie-banner__btn:hover, .cookie-banner__link:hover { opacity: .88; }
.cookie-banner button:focus-visible { outline: 3px solid #ffbf47 !important; outline-offset: 2px !important; box-shadow: none !important; }
.site-tools { position: fixed; right: 100px; bottom: 0; z-index: 9990; display: flex; gap: 8px; align-items: flex-end; }
.cookie-manage, .a11y-toggle { min-height: 40px; padding: 8px 16px; border: 0; border-radius: 3px 3px 0 0; background: #fff; color: #222; font: 400 14px/1.4 sans-serif; box-shadow: 0 0 6px rgba(0, 0, 0, .3); cursor: pointer; }
.a11y-toggle[aria-pressed="true"] { background: #1d2327; color: #fff; }
@media (max-width: 767px) { .site-tools { right: 8px; } .cookie-manage, .a11y-toggle { padding: 8px 10px; font-size: 13px; } }
@media print { .site-tools, .cookie-banner, .skip-link { display: none !important; } }

/* --- Mode contraste élevé : compléments au recalcul des couleurs fait par site.js ---- */
html.high-contrast .entry-content a:not(.gem-button):not(.socials-item), html.high-contrast .wpb_text_column a:not(.gem-button), html.high-contrast footer a:not(.gem-button), html.high-contrast .post-content a:not(.gem-button):not(.socials-item) { text-decoration: underline; }
html.high-contrast ::placeholder { color: #333 !important; opacity: 1; }

/* --- Contenus tiers en attente de consentement -------------------------------- */
iframe[data-consent-src]:not([src]) { display: none !important; }
.consent-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: 220px; padding: 24px; background: #f0f3f2; color: #3c3950; border: 1px solid #c9d2d6; text-align: center; font-size: 15px; line-height: 1.5; }
.consent-placeholder--fill { position: absolute; inset: 0; min-height: 0; }
.consent-placeholder p { margin: 0; max-width: 46em; color: #3c3950; }
.consent-placeholder button { min-height: 44px; padding: 10px 20px; border: 0; border-radius: 3px; background: #1b5e7b; color: #fff; font: 700 14px/1 inherit; text-transform: uppercase; cursor: pointer; }
.consent-placeholder button:hover { background: #17485a; }

/* --- Calendrier des événements (rendu statique de My Calendar) ---------------- */
.mc-main .mc-static-nav { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 0 0 16px; }
.mc-main .mc-static-nav a { display: inline-block; padding: 8px 14px; min-height: 24px; border: 1px solid #8a9aa3; border-radius: 3px; color: #17566f; text-decoration: none; }
.mc-main .category-key li { display: inline-flex; align-items: center; gap: 6px; margin: 0 14px 6px 0; padding: 0; list-style: none; }
.mc-main .category-key li::before { content: none !important; display: none !important; }
.mc-main .category-key .category-color-sample { display: inline-block; width: 14px; height: 14px; border-radius: 50%; font-size: 0; }
.mc-category-list { list-style: none; margin: 0 0 30px; padding: 0; }
.mc-category-list li { padding: 8px 0; border-bottom: 1px solid #e3e8ea; }
.mc-category-list li::before { content: none !important; }
.mc-main .mc-static-nav a:hover { background: #f0f3f2; }
.mc-main .my-calendar-table .calendar-event a.mc-static-event { display: block; text-decoration: none; font-weight: 400; }
.mc-main .my-calendar-table .calendar-event a.mc-static-event:hover { text-decoration: underline; }
.mc-main .category-key ul { list-style: none; margin: 0; padding: 0; }

/* --- Grilles WPBakery figées (plus d'AJAX) ------------------------------------ */
.vc_grid-static .vc_grid-item { opacity: 1 !important; }
.vc_grid-static .vc_grid-loading { display: none !important; }
