:root {
  /* Identité */
  --werun-primary: #13aff0;
  --werun-primary-hover: #087fae;
  --werun-accent: #fbc42c;

  /* Pages et surfaces */
  --werun-page-bg: #ffffff;
  --werun-surface: #ffffff;
  --werun-surface-soft: #f4f7f9;
  --werun-surface-raised: #ffffff;
  --werun-surface-hover: #eef9fd;

  /* Typographie */
  --werun-text: #434445;
  --werun-text-strong: #2f3d45;
  --werun-text-soft: #68757d;
  --werun-text-faint: #89959c;
  --werun-link: #087fae;
  --werun-link-hover: #066f98;
  --werun-text-on-primary: #ffffff;

  /* Traits, champs et états */
  --werun-border: rgba(19, 175, 240, 0.14);
  --werun-border-strong: rgba(19, 175, 240, 0.28);
  --werun-field-bg: #ffffff;
  --werun-field-placeholder: #7b8991;
  --werun-focus-ring: 0 0 0 3px rgba(19, 175, 240, 0.14);

  /* Élévation et géométrie */
  --werun-shadow: 0 10px 28px rgba(47, 87, 108, 0.055);
  --werun-shadow-raised: 0 16px 38px rgba(47, 87, 108, 0.10);
  --werun-radius-sm: 8px;
  --werun-radius-md: 12px;
  --werun-radius-lg: 16px;

  /* Compatibilité avec les futurs composants nommés en anglais. */
  --werun-color-bg: var(--werun-page-bg);
  --werun-color-surface: var(--werun-surface);
  --werun-color-surface-soft: var(--werun-surface-soft);
  --werun-color-text: var(--werun-text);
  --werun-color-muted: var(--werun-text-soft);
  --werun-color-border: var(--werun-border);
}

html.werun-theme-dark {
  --werun-page-bg: #0d151a;
  --werun-surface: #121d23;
  --werun-surface-soft: #17242b;
  --werun-surface-raised: #1a2931;
  --werun-surface-hover: #1b303a;

  --werun-text: #edf4f7;
  --werun-text-strong: #f5f9fa;
  --werun-text-soft: #a9b8c0;
  --werun-text-faint: #80939d;
  --werun-link: #70cff4;
  --werun-link-hover: #9be2fb;
  --werun-text-on-primary: #ffffff;

  --werun-border: rgba(91, 194, 235, 0.18);
  --werun-border-strong: rgba(91, 194, 235, 0.34);
  --werun-field-bg: #111c22;
  --werun-field-placeholder: #7f929c;
  --werun-focus-ring: 0 0 0 3px rgba(91, 194, 235, 0.12);

  --werun-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  --werun-shadow-raised: 0 18px 42px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

html.werun-theme-dark,
html.werun-theme-dark body {
  background: var(--werun-page-bg) !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark body,
html.werun-theme-dark #wrap,
html.werun-theme-dark #main,
html.werun-theme-dark #content-wrap,
html.werun-theme-dark .site-main,
html.werun-theme-dark .content-area,
html.werun-theme-dark .elementor-location-single,
html.werun-theme-dark .elementor-location-archive {
  background-color: var(--werun-page-bg) !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark body:not(.elementor-editor-active) .elementor-widget-text-editor,
html.werun-theme-dark body:not(.elementor-editor-active) .elementor-widget-theme-post-content,
html.werun-theme-dark body:not(.elementor-editor-active) .entry-content,
html.werun-theme-dark body:not(.elementor-editor-active) .entry-content p,
html.werun-theme-dark body:not(.elementor-editor-active) .entry-content li {
  color: var(--werun-text-soft);
}

html.werun-theme-dark input,
html.werun-theme-dark select,
html.werun-theme-dark textarea {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: #111c22 !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark input::placeholder,
html.werun-theme-dark textarea::placeholder {
  color: #7f929c !important;
}

html.werun-theme-dark .elementor-location-header,
html.werun-theme-dark .werun-header,
html.werun-theme-dark .werun-site-header,
html.werun-theme-dark .werun-global-header {
  background: rgba(13, 21, 26, 0.96) !important;
  color: var(--werun-text) !important;
  border-color: rgba(91, 194, 235, 0.13) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

html.werun-theme-dark .elementor-location-header a,
html.werun-theme-dark .werun-header a,
html.werun-theme-dark .werun-site-header a,
html.werun-theme-dark .werun-global-header a {
  color: #dbe8ed !important;
}

html.werun-theme-dark .elementor-location-header input[type="search"],
html.werun-theme-dark .werun-header input[type="search"],
html.werun-theme-dark .werun-site-header input[type="search"] {
  background: #17242b !important;
}

html.werun-theme-dark .werun-event-hero {
  --werun-ink: #edf4f7;
  --werun-line: rgba(91, 194, 235, 0.18);
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-event-hero__visual,
html.werun-theme-dark .werun-event-hero__prestige-card,
html.werun-theme-dark .werun-event-hero__formats,
html.werun-theme-dark .werun-event-hero__format-card,
html.werun-theme-dark .werun-event-hero__badge,
html.werun-theme-dark .werun-event-hero__feature,
html.werun-theme-dark .werun-event-hero__interest,
html.werun-theme-dark .werun-event-hero__service,
html.werun-theme-dark .werun-event-hero__favorite-action {
  border-color: rgba(91, 194, 235, 0.18) !important;
  background: rgba(23, 36, 43, 0.94) !important;
  color: #dce8ed !important;
  box-shadow: var(--werun-shadow) !important;
}

html.werun-theme-dark .werun-event-hero__prestige-card--edition {
  border-color: rgba(251, 196, 44, 0.32) !important;
  background: linear-gradient(135deg, rgba(62, 51, 17, 0.9), rgba(42, 37, 20, 0.88)) !important;
}

html.werun-theme-dark .werun-event-hero__prestige-card--championship {
  border-color: rgba(82, 190, 129, 0.26) !important;
  background: linear-gradient(135deg, rgba(23, 55, 39, 0.92), rgba(20, 42, 33, 0.9)) !important;
}

html.werun-theme-dark .werun-event-hero__title,
html.werun-theme-dark .werun-event-hero__prestige-copy strong,
html.werun-theme-dark .werun-event-hero__formats-heading strong,
html.werun-theme-dark .werun-event-hero__format-card h2 {
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-event-hero__essential,
html.werun-theme-dark .werun-event-hero__taxonomy-label,
html.werun-theme-dark .werun-event-hero__format-data span,
html.werun-theme-dark .werun-event-hero__formats-hint {
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .werun-event-hero__notice {
  background: var(--werun-surface-soft) !important;
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .werun-event-formats,
html.werun-theme-dark .werun-event-simulator,
html.werun-theme-dark .werun-event-registration-results,
html.werun-theme-dark .werun-event-organizer,
html.werun-theme-dark .werun-event-weather {
  --wr-text: #edf4f7;
  --wr-muted: #a9b8c0;
  --wr-line: rgba(91, 194, 235, 0.18);
  --wr-shadow: var(--werun-shadow);
  --wr-weather-text: #edf4f7;
  --wr-weather-muted: #a9b8c0;
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-format-card,
html.werun-theme-dark .werun-simulator-card,
html.werun-theme-dark .werun-simulator-block,
html.werun-theme-dark .werun-registration-card,
html.werun-theme-dark .werun-organizer-card,
html.werun-theme-dark .werun-event-contact-link {
  border-color: rgba(91, 194, 235, 0.17) !important;
  background: var(--werun-surface) !important;
  color: var(--werun-text) !important;
  box-shadow: var(--werun-shadow) !important;
}

html.werun-theme-dark .werun-format-card__panel,
html.werun-theme-dark .werun-format-details__item,
html.werun-theme-dark .werun-format-performance,
html.werun-theme-dark .werun-format-route,
html.werun-theme-dark .werun-simulator-card__body,
html.werun-theme-dark .werun-simulator-readonly,
html.werun-theme-dark .werun-simulator-output,
html.werun-theme-dark .werun-registration-card__facts > div {
  border-color: rgba(91, 194, 235, 0.14) !important;
  background: var(--werun-surface-soft) !important;
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .werun-format-card__name,
html.werun-theme-dark .werun-format-details__item strong,
html.werun-theme-dark .werun-format-route__heading,
html.werun-theme-dark .werun-simulator-block__head h3,
html.werun-theme-dark .werun-simulator-field label,
html.werun-theme-dark .werun-simulator-output strong,
html.werun-theme-dark .werun-registration-card__head h3,
html.werun-theme-dark .werun-organizer-card > h3,
html.werun-theme-dark .werun-organizer-entry__content h3,
html.werun-theme-dark .werun-event-contact-link__value {
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-format-card__metric,
html.werun-theme-dark .werun-format-details__item,
html.werun-theme-dark .werun-format-tags__title,
html.werun-theme-dark .werun-simulator-note,
html.werun-theme-dark .werun-simulator-field small,
html.werun-theme-dark .werun-registration-card__facts,
html.werun-theme-dark .werun-event-contact-link__label {
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .werun-format-card__summary:hover,
html.werun-theme-dark .werun-event-contact-link:hover {
  background: #1a2a32 !important;
}

html.werun-theme-dark .werun-format-action--secondary,
html.werun-theme-dark .werun-organizer-actions a,
html.werun-theme-dark .werun-event-contact-link--facebook,
html.werun-theme-dark .werun-event-contact-link--instagram,
html.werun-theme-dark .werun-simulator-reset,
html.werun-theme-dark .werun-simulator-remove {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: #172831 !important;
  color: #70cff4 !important;
}

html.werun-theme-dark .werun-format-route__map,
html.werun-theme-dark .werun-format-route__profile,
html.werun-theme-dark .werun-simulator-table-wrap {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: #0f191e !important;
}

html.werun-theme-dark .werun-simulator-table-wrap table,
html.werun-theme-dark .werun-simulator-table-wrap th,
html.werun-theme-dark .werun-simulator-table-wrap td {
  border-color: rgba(91, 194, 235, 0.13) !important;
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .werun-simulator-table-wrap th {
  background: #17242b !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-weather-panel {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: linear-gradient(125deg, #132c38 0%, #17262e 48%, #332f1e 100%) !important;
  box-shadow: var(--werun-shadow) !important;
}

html.werun-theme-dark .werun-weather-current__place,
html.werun-theme-dark .werun-weather-current__main strong,
html.werun-theme-dark .werun-weather-current__temperature,
html.werun-theme-dark .werun-weather-current__details strong,
html.werun-theme-dark .werun-weather-day__name,
html.werun-theme-dark .werun-weather-day strong {
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-weather-current__details div,
html.werun-theme-dark .werun-weather-day {
  border-color: rgba(91, 194, 235, 0.15) !important;
  background: rgba(19, 31, 38, 0.72) !important;
}

html.werun-theme-dark .werun-weather-current__details span,
html.werun-theme-dark .werun-weather-day__min,
html.werun-theme-dark .werun-weather-day__rain,
html.werun-theme-dark .werun-weather-panel__loading,
html.werun-theme-dark .werun-weather-panel__error {
  color: var(--werun-text-soft) !important;
}

html.werun-theme-dark .leaflet-control-zoom a,
html.werun-theme-dark .leaflet-control-layers,
html.werun-theme-dark .leaflet-popup-content-wrapper,
html.werun-theme-dark .leaflet-popup-tip,
html.werun-theme-dark .werun-map-popup {
  border-color: rgba(91, 194, 235, 0.18) !important;
  background: #17242b !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-footer {
  --werun-footer-text: #edf4f7 !important;
  --werun-footer-muted: #a9b8c0 !important;
  background: linear-gradient(135deg, #101b21 0%, #121e24 48%, #0e181d 100%) !important;
  color: var(--werun-text) !important;
}

html.werun-theme-dark .werun-footer__description,
html.werun-theme-dark .werun-footer__column a,
html.werun-theme-dark .werun-footer__pending-link,
html.werun-theme-dark .werun-footer__service,
html.werun-theme-dark .werun-footer__copyright,
html.werun-theme-dark .werun-footer__legal a {
  color: #a9b8c0 !important;
}

html.werun-theme-dark .werun-footer__column h2,
html.werun-theme-dark .werun-footer__languages h2,
html.werun-theme-dark .werun-footer__service-content strong {
  color: #edf4f7 !important;
}

html.werun-theme-dark .werun-footer__heading-icon,
html.werun-theme-dark .werun-flags button {
  border-color: rgba(91, 194, 235, 0.18) !important;
  background: rgba(26, 41, 49, 0.82) !important;
}

html.werun-theme-dark .werun-footer__service,
html.werun-theme-dark .werun-footer__service:first-child,
html.werun-theme-dark .werun-footer__languages,
html.werun-theme-dark .werun-footer__bottom {
  border-color: rgba(91, 194, 235, 0.13) !important;
}

html.werun-theme-dark .werun-footer__service:hover,
html.werun-theme-dark .werun-footer__service:focus-visible {
  color: #70cff4 !important;
  background: transparent !important;
}

html.werun-theme-dark .werun-footer__bottom {
  background: rgba(6, 12, 15, 0.28) !important;
}

html.werun-theme-dark .werun-footer__baseline img {
  filter: brightness(1.25) saturate(0.9);
}

html.werun-theme-dark .werun-footer__logo img,
html.werun-theme-dark .elementor-location-header img,
html.werun-theme-dark .werun-event-hero__image,
html.werun-theme-dark .leaflet-container img {
  filter: none !important;
}

html.werun-theme-dark [data-werun-theme-toggle] {
  cursor: pointer !important;
}

@media (prefers-reduced-motion: reduce) {
  html.werun-theme-dark *,
  html.werun-theme-light * {
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
 * Mode sombre 0.4.79 — finition des zones structurantes
 * Header global, navigation sticky et Hero de la page événement.
 * -------------------------------------------------------------------------- */

/* Header global Elementor : surface réellement sombre, sans toucher aux logos. */
html.werun-theme-dark .elementor-location-header,
html.werun-theme-dark .elementor-location-header > .elementor-element,
html.werun-theme-dark .elementor-location-header .e-con,
html.werun-theme-dark .elementor-location-header .e-con-inner,
html.werun-theme-dark .elementor-location-header .elementor-widget-wrap,
html.werun-theme-dark .elementor-location-header .elementor-widget-container {
  border-color: rgba(91, 194, 235, 0.12) !important;
  background-color: transparent !important;
  background-image: none !important;
}

html.werun-theme-dark .elementor-location-header {
  background: rgba(12, 20, 25, 0.965) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html.werun-theme-dark .elementor-location-header :is(
  a,
  button,
  .elementor-item,
  .elementor-nav-menu--main .elementor-item
) {
  color: #dce8ed !important;
}

html.werun-theme-dark .elementor-location-header :is(
  a:hover,
  a:focus-visible,
  button:hover,
  button:focus-visible,
  .elementor-item:hover,
  .elementor-item:focus,
  .elementor-item.elementor-item-active
) {
  color: #70cff4 !important;
}

html.werun-theme-dark .elementor-location-header :is(
  .elementor-button,
  button,
  [role="button"]
) {
  border-color: rgba(91, 194, 235, 0.18) !important;
  background: rgba(23, 36, 43, 0.78) !important;
  box-shadow: none !important;
}

html.werun-theme-dark .elementor-location-header :is(
  .elementor-button:hover,
  .elementor-button:focus-visible,
  button:hover,
  button:focus-visible,
  [role="button"]:hover,
  [role="button"]:focus-visible
) {
  border-color: rgba(112, 207, 244, 0.36) !important;
  background: rgba(27, 44, 53, 0.94) !important;
  box-shadow: none !important;
}

html.werun-theme-dark .elementor-location-header :is(input[type="search"], input[type="text"]) {
  border-color: rgba(91, 194, 235, 0.18) !important;
  background: #152229 !important;
  color: #edf4f7 !important;
  box-shadow: none !important;
}

html.werun-theme-dark .elementor-location-header svg {
  color: inherit;
}

/* Navigation sticky de la page événement. */
html.werun-theme-dark .werun-event-nav-wrap {
  background: linear-gradient(
    180deg,
    rgba(13, 21, 26, 0.99) 0%,
    rgba(13, 21, 26, 0.97) 72%,
    rgba(13, 21, 26, 0.94) 100%
  ) !important;
}

html.werun-theme-dark .werun-section-separator span {
  background: linear-gradient(
    90deg,
    rgba(91, 194, 235, 0) 0%,
    rgba(91, 194, 235, 0.12) 18%,
    rgba(91, 194, 235, 0.34) 50%,
    rgba(91, 194, 235, 0.12) 82%,
    rgba(91, 194, 235, 0) 100%
  ) !important;
}

html.werun-theme-dark .werun-event-nav__scroll {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: rgba(18, 29, 35, 0.86) !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.025) !important;
}

html.werun-theme-dark .werun-event-nav__link {
  color: #aebec6 !important;
}

html.werun-theme-dark .werun-event-nav__link:hover,
html.werun-theme-dark .werun-event-nav__link:focus-visible {
  border-color: rgba(91, 194, 235, 0.12) !important;
  background: rgba(91, 194, 235, 0.075) !important;
  color: #dff5fd !important;
}

html.werun-theme-dark .werun-event-nav__link.is-active {
  border-color: rgba(91, 194, 235, 0.28) !important;
  background: linear-gradient(
    180deg,
    rgba(24, 57, 70, 0.96) 0%,
    rgba(20, 47, 58, 0.96) 100%
  ) !important;
  color: #7ed8f8 !important;
  box-shadow:
    0 5px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

html.werun-theme-dark .werun-event-nav-wrap.is-stuck {
  background: rgba(11, 19, 24, 0.955) !important;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.26) !important;
}

html.werun-theme-dark .werun-event-nav-wrap.is-stuck .werun-event-nav__scroll {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: rgba(18, 29, 35, 0.94) !important;
}

/* Hero : un vrai niveau de surface sombre, sans assombrir l'affiche. */
html.werun-theme-dark .werun-event-hero {
  --werun-muted: #a9b8c0;
  --werun-soft: #17242b;
  background:
    radial-gradient(circle at 82% 6%, rgba(19, 175, 240, 0.12), transparent 35%),
    radial-gradient(circle at 12% 88%, rgba(19, 175, 240, 0.055), transparent 31%),
    linear-gradient(135deg, #101a20 0%, #0c151a 100%) !important;
}

html.werun-theme-dark .werun-event-hero__visual {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: #162229 !important;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3) !important;
}

html.werun-theme-dark .werun-event-hero__image {
  background: transparent !important;
  filter: none !important;
}

html.werun-theme-dark .werun-event-hero__content {
  color: #edf4f7 !important;
}

html.werun-theme-dark .werun-event-hero__quick-action {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: rgba(20, 34, 41, 0.9) !important;
  color: #78d4f7 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18) !important;
}

html.werun-theme-dark .werun-event-hero__quick-action:hover,
html.werun-theme-dark .werun-event-hero__quick-action:focus-visible {
  border-color: rgba(112, 207, 244, 0.4) !important;
  background: #1a2b33 !important;
  color: #a5e4fb !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

html.werun-theme-dark .werun-event-hero__favorite-action[aria-pressed="true"] {
  border-color: rgba(251, 196, 44, 0.42) !important;
  background: rgba(65, 53, 19, 0.88) !important;
  color: #fbc42c !important;
}

html.werun-theme-dark .werun-event-hero__status {
  background: rgba(113, 36, 40, 0.42) !important;
  color: #ffb9bd !important;
}

html.werun-theme-dark .werun-event-hero__badge,
html.werun-theme-dark .werun-event-hero__feature,
html.werun-theme-dark .werun-event-hero__interest,
html.werun-theme-dark .werun-event-hero__service {
  border-color: rgba(91, 194, 235, 0.15) !important;
  background: rgba(23, 36, 43, 0.78) !important;
  color: #c3d1d7 !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-event-hero__badge {
  border-color: rgba(91, 194, 235, 0.24) !important;
  color: #77d2f5 !important;
}

html.werun-theme-dark .werun-event-hero__essential {
  color: #bdcbd1 !important;
}

html.werun-theme-dark .werun-event-hero__prestige {
  border-top-color: rgba(91, 194, 235, 0.13) !important;
}

html.werun-theme-dark .werun-event-hero__prestige-card {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: rgba(20, 33, 40, 0.86) !important;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.16) !important;
}

html.werun-theme-dark .werun-event-hero__prestige-card--edition {
  border-color: rgba(251, 196, 44, 0.3) !important;
  background: linear-gradient(135deg, rgba(62, 51, 17, 0.82), rgba(39, 34, 20, 0.86)) !important;
}

html.werun-theme-dark .werun-event-hero__prestige-card--championship {
  border-color: rgba(82, 190, 129, 0.24) !important;
  background: linear-gradient(135deg, rgba(23, 55, 39, 0.84), rgba(18, 39, 30, 0.88)) !important;
}

html.werun-theme-dark .werun-event-hero__formats {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: rgba(17, 29, 35, 0.92) !important;
  box-shadow: 0 13px 32px rgba(0, 0, 0, 0.24) !important;
}

html.werun-theme-dark .werun-event-hero__formats-heading {
  border-color: rgba(91, 194, 235, 0.13) !important;
}

html.werun-theme-dark .werun-event-hero__format-card {
  border-color: rgba(91, 194, 235, 0.15) !important;
  background: linear-gradient(180deg, rgba(25, 40, 48, 0.98), rgba(21, 34, 41, 0.98)) !important;
  color: #edf4f7 !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-event-hero__format-card:hover {
  border-color: rgba(91, 194, 235, 0.26) !important;
  background: linear-gradient(180deg, rgba(29, 47, 56, 0.98), rgba(23, 39, 47, 0.98)) !important;
}

html.werun-theme-dark .werun-event-hero__format-data span,
html.werun-theme-dark .werun-event-hero__formats-hint,
html.werun-theme-dark .werun-event-hero__taxonomy-label {
  color: #9fb0b8 !important;
}

html.werun-theme-dark .werun-event-hero__service::after {
  border: 1px solid rgba(91, 194, 235, 0.14);
  background: #1a2931 !important;
  color: #edf4f7 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
}

/* --------------------------------------------------------------------------
 * Mode sombre 0.4.80 — présentation et contenu détaillé des formats
 * Harmonise les dernières surfaces claires internes sans altérer les cartes,
 * affiches, logos ni contenus tiers.
 * -------------------------------------------------------------------------- */

/* Présentation : prise en charge des wrappers Elementor et des classes WeRun
 * utilisées ou prévues pour cette section. Les sélecteurs restent strictement
 * limités aux pages événement TEC. */
html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  .werun-event-presentation__card,
  .werun-presentation__card,
  .elementor-widget-text-editor > .elementor-widget-container,
  .elementor-widget-theme-post-content > .elementor-widget-container
) {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: linear-gradient(
    180deg,
    rgba(20, 33, 40, 0.96) 0%,
    rgba(17, 29, 35, 0.98) 100%
  ) !important;
  color: var(--werun-text-soft) !important;
  box-shadow: var(--werun-shadow) !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(p, li, blockquote) {
  color: #b8c6cc !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(h2, h3, h4, strong) {
  color: #edf4f7 !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button,
  .elementor-button,
  .werun-presentation__toggle,
  .werun-event-presentation__toggle
) {
  border-color: rgba(91, 194, 235, 0.24) !important;
  background: #172831 !important;
  color: #70cff4 !important;
  box-shadow: none !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button:hover,
  button:focus-visible,
  .elementor-button:hover,
  .elementor-button:focus-visible,
  .werun-presentation__toggle:hover,
  .werun-presentation__toggle:focus-visible,
  .werun-event-presentation__toggle:hover,
  .werun-event-presentation__toggle:focus-visible
) {
  border-color: rgba(112, 207, 244, 0.42) !important;
  background: #1b303a !important;
  color: #a5e4fb !important;
}

/* Intérieur des formats ouverts : surfaces sombres cohérentes. */
html.werun-theme-dark .werun-format-card__panel-inner {
  background: linear-gradient(
    180deg,
    rgba(19, 32, 39, 0.98) 0%,
    rgba(15, 26, 32, 0.99) 100%
  ) !important;
}

html.werun-theme-dark .werun-format-card.is-open {
  border-color: rgba(91, 194, 235, 0.28) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.27) !important;
}

html.werun-theme-dark .werun-format-card.is-open .werun-format-card__panel {
  border-top-color: rgba(91, 194, 235, 0.15) !important;
}

html.werun-theme-dark .werun-format-details__item,
html.werun-theme-dark .werun-format-tags__group,
html.werun-theme-dark .werun-format-performance,
html.werun-theme-dark .werun-format-route {
  border-color: rgba(91, 194, 235, 0.15) !important;
  background: rgba(23, 36, 43, 0.88) !important;
  color: var(--werun-text-soft) !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-format-details__item dt,
html.werun-theme-dark .werun-format-tags__title {
  color: #8fa2ac !important;
}

html.werun-theme-dark .werun-format-details__item dd,
html.werun-theme-dark .werun-format-route__heading strong {
  color: #dce8ed !important;
}

html.werun-theme-dark .werun-format-tags__group > div span {
  border: 1px solid rgba(91, 194, 235, 0.13) !important;
  background: rgba(26, 45, 54, 0.92) !important;
  color: #79d2f4 !important;
}

/* Les badges de marque conservent leurs couleurs, mais les cartes de score
 * utilisent une surface sombre pour leur partie neutre. */
html.werun-theme-dark .werun-format-performance__pill {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: #17242b !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16) !important;
}

html.werun-theme-dark .werun-format-performance__pill[class*="--itra-"] strong,
html.werun-theme-dark .werun-format-performance__pill--stones strong {
  background: #17242b !important;
}

html.werun-theme-dark .werun-format-performance__pill[class*="--utmb-"] small {
  background: #111c49 !important;
  color: #fff !important;
}

html.werun-theme-dark .werun-format-route__heading {
  border-bottom-color: rgba(91, 194, 235, 0.14) !important;
  background: rgba(20, 33, 40, 0.96) !important;
}

html.werun-theme-dark .werun-format-route__profile-control {
  border-top-color: rgba(91, 194, 235, 0.14) !important;
  background: #121f26 !important;
}

html.werun-theme-dark .werun-format-route__profile-toggle {
  border-color: rgba(91, 194, 235, 0.24) !important;
  background: #172831 !important;
  color: #70cff4 !important;
}

html.werun-theme-dark .werun-format-route__profile-toggle:hover,
html.werun-theme-dark .werun-format-route__profile-toggle:focus-visible {
  border-color: rgba(112, 207, 244, 0.42) !important;
  background: #1b303a !important;
  color: #a5e4fb !important;
}

/* Le fond cartographique demeure volontairement clair et intact. */
html.werun-theme-dark .werun-format-route__map,
html.werun-theme-dark .werun-format-route__map .leaflet-container,
html.werun-theme-dark .werun-format-route__map .leaflet-tile-pane {
  filter: none !important;
}

/* Le profil est un composant natif : il suit le thème sombre. */
html.werun-theme-dark .werun-format-route__profile {
  border-color: rgba(91, 194, 235, 0.14) !important;
  background: linear-gradient(180deg, #111d23, #16252c) !important;
}

html.werun-theme-dark .werun-format-route__profile svg text,
html.werun-theme-dark .werun-format-route__profile .werun-profile-label {
  fill: #9fb0b8 !important;
  color: #9fb0b8 !important;
}

html.werun-theme-dark .werun-format-route__profile-tooltip {
  border-color: rgba(91, 194, 235, 0.2) !important;
  background: #17242b !important;
  color: #dce8ed !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28) !important;
}

html.werun-theme-dark .werun-format-route__profile-tooltip strong {
  color: #70cff4 !important;
}

html.werun-theme-dark .werun-format-route__profile-tooltip span,
html.werun-theme-dark .werun-format-route__profile-tooltip .werun-profile-tooltip__separator {
  color: #a9b8c0 !important;
}

/* Actions secondaires des formats. Les CTA de marque conservent leurs couleurs. */
html.werun-theme-dark .werun-format-actions {
  border-top-color: rgba(91, 194, 235, 0.14) !important;
}

html.werun-theme-dark .werun-format-action:not(.werun-format-action--gpx):not(.werun-format-action--runmotion) {
  border-color: rgba(91, 194, 235, 0.2) !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-format-action--simulator,
html.werun-theme-dark .werun-format-action--lodging,
html.werun-theme-dark .werun-format-action--weather,
html.werun-theme-dark .werun-format-action--secondary {
  background: #172831 !important;
  color: #70cff4 !important;
}

html.werun-theme-dark .werun-format-action--simulator:hover,
html.werun-theme-dark .werun-format-action--simulator:focus-visible,
html.werun-theme-dark .werun-format-action--lodging:hover,
html.werun-theme-dark .werun-format-action--lodging:focus-visible,
html.werun-theme-dark .werun-format-action--weather:hover,
html.werun-theme-dark .werun-format-action--weather:focus-visible,
html.werun-theme-dark .werun-format-action--secondary:hover,
html.werun-theme-dark .werun-format-action--secondary:focus-visible {
  border-color: rgba(112, 207, 244, 0.4) !important;
  background: #1b303a !important;
  color: #a5e4fb !important;
}


/* --------------------------------------------------------------------------
 * Mode sombre 0.4.81 — contraste Présentation et logos du footer
 * -------------------------------------------------------------------------- */

/* Le panneau Présentation reste volontairement clair afin de créer une
 * respiration dans la page sombre. Son texte retrouve donc un contraste
 * anthracite conforme à cette surface. */
html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(p, li, blockquote) {
  color: #40515a !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(h2, h3, h4, strong, b) {
  color: #2f414a !important;
}

/* Les variantes sombres du footer sont déjà préparées graphiquement : aucun
 * filtre CSS supplémentaire ne doit en altérer les couleurs. */
html.werun-theme-dark .werun-footer__logo img,
html.werun-theme-dark .werun-footer__baseline img {
  filter: none !important;
}

/* --------------------------------------------------------------------------
 * Mode sombre 0.4.82 — fondu Présentation repliée
 * -------------------------------------------------------------------------- */

/* Correction ciblée du masque de réduction de la Présentation en mode sombre :
 * le panneau reste clair, mais le fondu n'utilise plus de blanc pur afin
 * d'éviter l'effet de bande opaque lorsque le texte est replié. */
html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  .is-collapsed,
  .collapsed,
  .werun-is-collapsed,
  [data-collapsed="true"],
  [data-expanded="false"],
  .werun-event-presentation__card,
  .werun-presentation__card,
  .werun-event-presentation__content,
  .werun-presentation__content,
  .werun-event-presentation__text,
  .werun-presentation__text,
  .elementor-widget-text-editor > .elementor-widget-container,
  .elementor-widget-theme-post-content > .elementor-widget-container
)::after {
  height: 46px !important;
  background: linear-gradient(
    180deg,
    rgba(226, 230, 233, 0) 0%,
    rgba(226, 230, 233, 0.68) 58%,
    rgba(226, 230, 233, 0.94) 100%
  ) !important;
  box-shadow: none !important;
}



/* --------------------------------------------------------------------------
 * Mode sombre 0.4.83 — Présentation grisée en état replié
 * -------------------------------------------------------------------------- */

/* Le panneau Présentation passe sur une surface grise en mode sombre.
 * Le masque de réduction utilise exactement la même teinte afin de supprimer
 * l'effet de plaque blanche visible lorsque le texte est replié. */
html.werun-theme-dark :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  .werun-event-presentation__card,
  .werun-presentation__card,
  .werun-event-presentation__content,
  .werun-presentation__content,
  .werun-event-presentation__text,
  .werun-presentation__text,
  .elementor-widget-text-editor > .elementor-widget-container,
  .elementor-widget-theme-post-content > .elementor-widget-container,
  .elementor-widget-container
),
html.werun-theme-dark :is(
  #presentation.werun-event-presentation__card,
  #presentation.werun-presentation__card,
  #presentation.elementor-widget-text-editor > .elementor-widget-container,
  #presentation.elementor-widget-theme-post-content > .elementor-widget-container
) {
  border-color: rgba(91, 194, 235, 0.16) !important;
  background: #d8dee2 !important;
  color: #30424b !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22) !important;
}

html.werun-theme-dark :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(p, li, blockquote, span) {
  color: #30424b !important;
}

html.werun-theme-dark :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(h2, h3, h4, strong, b) {
  color: #22343d !important;
}

html.werun-theme-dark :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  .is-collapsed,
  .collapsed,
  .werun-is-collapsed,
  [data-collapsed="true"],
  [data-expanded="false"],
  .werun-event-presentation__card,
  .werun-presentation__card,
  .werun-event-presentation__content,
  .werun-presentation__content,
  .werun-event-presentation__text,
  .werun-presentation__text,
  .elementor-widget-text-editor > .elementor-widget-container,
  .elementor-widget-theme-post-content > .elementor-widget-container,
  .elementor-widget-container
)::after,
html.werun-theme-dark :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) *::after {
  background: linear-gradient(
    180deg,
    rgba(216, 222, 226, 0) 0%,
    rgba(216, 222, 226, 0.82) 50%,
    rgba(216, 222, 226, 1) 100%
  ) !important;
  box-shadow: none !important;
}


/* --------------------------------------------------------------------------
 * Mode sombre 0.4.84 — bouton Présentation
 * -------------------------------------------------------------------------- */

/* La surface grise de Présentation reste inchangée, mais le bouton
 * Voir plus / Réduire conserve son bleu WeRun en mode sombre. */
html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button,
  .elementor-button,
  .werun-presentation__toggle,
  .werun-event-presentation__toggle,
  [aria-expanded]
) {
  border-color: rgba(91, 194, 235, 0.38) !important;
  background: #172831 !important;
  color: #70cff4 !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button,
  .elementor-button,
  .werun-presentation__toggle,
  .werun-event-presentation__toggle,
  [aria-expanded]
) :is(span, svg, i) {
  color: #70cff4 !important;
  fill: none !important;
  stroke: currentColor !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button:hover,
  button:focus-visible,
  .elementor-button:hover,
  .elementor-button:focus-visible,
  .werun-presentation__toggle:hover,
  .werun-presentation__toggle:focus-visible,
  .werun-event-presentation__toggle:hover,
  .werun-event-presentation__toggle:focus-visible,
  [aria-expanded]:hover,
  [aria-expanded]:focus-visible
) {
  border-color: rgba(112, 207, 244, 0.5) !important;
  background: #1b303a !important;
  color: #a5e4fb !important;
}

html.werun-theme-dark body.single-tribe_events :is(
  #presentation,
  .werun-event-presentation,
  .werun-presentation,
  [data-werun-presentation],
  [data-werun-section="presentation"]
) :is(
  button:hover,
  button:focus-visible,
  .elementor-button:hover,
  .elementor-button:focus-visible,
  .werun-presentation__toggle:hover,
  .werun-presentation__toggle:focus-visible,
  .werun-event-presentation__toggle:hover,
  .werun-event-presentation__toggle:focus-visible,
  [aria-expanded]:hover,
  [aria-expanded]:focus-visible
) :is(span, svg, i) {
  color: #a5e4fb !important;
  stroke: currentColor !important;
}

/* Favoris événement — WeRun Core 0.5.5 */
html.werun-theme-dark .werun-event-hero__favorite-action[data-werun-favorite-message]::before {
  background: #203039;
  color: #eaf3f6;
  border: 1px solid rgba(91, 194, 235, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

html.werun-theme-dark .werun-event-hero__favorite-action.has-error[data-werun-favorite-message]::before {
  background: #5c211f;
  border-color: rgba(255, 120, 110, 0.24);
}


/* WeRun Core 0.5.10 — remplacement du header par la navigation sticky événement. */
body.single-tribe_events .werun-event-nav-wrap.is-stuck {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10050 !important;
}

body.admin-bar.single-tribe_events .werun-event-nav-wrap.is-stuck {
  top: 32px !important;
}

body.single-tribe_events .werun-event-nav-wrap.is-stuck .werun-event-nav,
body.single-tribe_events .werun-event-nav-wrap.is-stuck .werun-event-nav__scroll {
  position: relative !important;
  z-index: 10051 !important;
}

body.single-tribe_events.werun-event-nav-is-stuck .werun-global-header-shell,
body.single-tribe_events.werun-event-nav-is-stuck .elementor-location-header {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-110%) !important;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease !important;
}

body.single-tribe_events:not(.werun-event-nav-is-stuck) .werun-global-header-shell,
body.single-tribe_events:not(.werun-event-nav-is-stuck) .elementor-location-header {
  transition:
    opacity 0.18s ease,
    transform 0.18s ease !important;
}

@media (max-width: 782px) {
  body.admin-bar.single-tribe_events .werun-event-nav-wrap.is-stuck {
    top: 46px !important;
  }
}


/* WeRun Core 0.5.22 — préservation des couleurs ITRA / UTMB en mode sombre */
html.werun-theme-dark .werun-format-performance__pill[class*="--itra-"] {
  border-color: transparent !important;
  background: var(--brand) !important;
  color: var(--brand-text, #fff) !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-format-performance__pill[class*="--utmb-"] {
  border-color: transparent !important;
  background: var(--utmb-accent) !important;
  color: #fff !important;
  box-shadow: none !important;
}

html.werun-theme-dark .werun-format-performance__pill[class*="--itra-"] small,
html.werun-theme-dark .werun-format-performance__pill[class*="--itra-"] strong,
html.werun-theme-dark .werun-format-performance__pill[class*="--utmb-"] small,
html.werun-theme-dark .werun-format-performance__pill[class*="--utmb-"] strong {
  background: transparent !important;
  color: inherit !important;
}

html.werun-theme-dark .werun-format-card__badge[class*="--itra-"] {
  background: var(--brand) !important;
  color: var(--brand-text, #fff) !important;
}

html.werun-theme-dark .werun-format-card__badge[class*="--utmb-"] {
  background: var(--utmb-accent) !important;
  color: #fff !important;
}
