/**
 * Isolation landing CDM vs styles du thème WordPress.
 */
body.cdm-landing {
  margin: 0;
  background: var(--bg-base, #f5efe3);
}

body.cdm-landing .site-content,
body.cdm-landing #content,
body.cdm-landing .content-area,
body.cdm-landing main.site-main,
body.cdm-landing .elementor {
  max-width: none;
  width: 100%;
  padding: 0;
  margin: 0;
}

body.cdm-landing .entry-header,
body.cdm-landing .page-header,
body.cdm-landing .entry-title,
body.cdm-landing h1.entry-title {
  display: none !important;
}

body.cdm-landing .elementor-widget-container {
  max-width: none;
}

body.cdm-landing
  .elementor-section-wrap
  > .elementor-section
  > .elementor-container {
  max-width: none;
}

/* Header fixe : éviter overflow/transform Elementor qui bloquent sticky */
body.cdm-landing .elementor-widget-cdm-header,
body.cdm-landing .elementor-widget-cdm-header > .elementor-widget-container,
body.cdm-landing .elementor-element:has(.site-header),
body.cdm-landing .elementor-column:has(.site-header),
body.cdm-landing .elementor-section:has(.site-header) {
  overflow: visible !important;
}

body.cdm-landing .elementor-section:has(.site-header) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  z-index: 40;
}

/* Réserve la hauteur du header dans le flux (le <header> est en position fixed) */
body.cdm-landing .site-header__spacer {
  display: block;
  height: var(--header-h, 68px);
  width: 100%;
  pointer-events: none;
}

/* Gras WYSIWYG : le thème / Elementor imposent souvent font-weight: inherit sur strong */
body.cdm-landing :is(strong, b),
body.cdm-landing
  .elementor-widget[class*="elementor-widget-cdm-"]
  :is(strong, b) {
  font-weight: 700;
}

body.cdm-landing :is(.hero__title, .h2, .lead, .hero__subtitle) :is(strong, b) {
  font-weight: 800;
}

/*
 * Iframe Elementor (classe body + scope par widget) : pas de JS reveal → contenu visible.
 * Ne s’applique pas à la page publiée (sans ces classes).
 */
body.cdm-elementor-edit [data-reveal],
.cdm-elementor-edit-scope [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.cdm-elementor-edit .site-header,
.cdm-elementor-edit-scope .site-header {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
}

body.cdm-elementor-edit .site-header__spacer,
.cdm-elementor-edit-scope .site-header__spacer {
  display: none !important;
}

body.cdm-elementor-edit .hero,
.cdm-elementor-edit-scope .hero {
  min-height: 420px !important;
  margin-top: 0 !important;
  padding-top: var(--space-8, 4rem) !important;
}

body.cdm-elementor-edit .sticky-cta,
.cdm-elementor-edit-scope .sticky-cta {
  position: relative !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
}

body.cdm-elementor-edit .course__map,
.cdm-elementor-edit-scope .course__map {
  min-height: 240px !important;
  height: auto !important;
}

/* Mobile : éviter débordement horizontal (Elementor + fixed sticky) */
@media (max-width: 767px) {
  body.cdm-landing {
    overflow-x: clip;
  }

  body.cdm-landing .elementor-widget-cdm-contact,
  body.cdm-landing .elementor-widget-cdm-sticky-cta,
  body.cdm-landing .elementor-widget-cdm-contact .elementor-widget-container,
  body.cdm-landing
    .elementor-widget-cdm-sticky-cta
    .elementor-widget-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  body.cdm-landing
    .elementor-widget-cdm-sticky-cta
    .elementor-widget-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: clip;
  }

  body.cdm-landing .elementor-section .elementor-container {
    max-width: 100% !important;
    padding-inline: var(--gutter-mobile, 1.25rem) !important;
    box-sizing: border-box;
  }
}
