/* ==========================================================================
   Cerf à Lunettes – neutralisation of Elementor structural markup (front end)
   Documented exception (see LISTE-CSS-CODE-SPECIFIQUE.md).

   Elementor wraps every widget in one or two <div> (and sections/columns in several more).
   On Cerf pages:
   1. structural wrappers are transparent (display:contents, always wins);
   2. elements that carry reference classes (containers, sections, columns, heading tags,
      button links, images, videos) are reset to the browser defaults with a low specificity
      (0,2,1) so the reference stylesheet cerf-site.css – scoped as body.cerf-suisse.cs,
      i.e. (0,2,1) or more and loaded afterwards – always takes precedence, exactly as on the
      reference site, while Elementor/kit/theme defaults (≤ 0,2,0) never leak in.
   ========================================================================== */

/* 1. Structural wrappers -------------------------------------------------- */
body.cerf-suisse:not(.elementor-editor-active) .cerf-w.cerf-w.cerf-w,
body.cerf-suisse:not(.elementor-editor-active) .cerf-w.cerf-w > .elementor-widget-container,
body.cerf-suisse:not(.elementor-editor-active) .cerf-w.cerf-w .elementor-button-wrapper,
body.cerf-suisse:not(.elementor-editor-active) .cerf-w.cerf-w .elementor-button-content-wrapper,
body.cerf-suisse:not(.elementor-editor-active) .cerf-w.cerf-w .elementor-button-text,
body.cerf-suisse:not(.elementor-editor-active) .cerf-s.cerf-s > .elementor-container,
body.cerf-suisse:not(.elementor-editor-active) .cerf-s.cerf-s > .elementor-container > .elementor-row,
body.cerf-suisse:not(.elementor-editor-active) .cerf-col.cerf-col-flat.cerf-col-flat,
body.cerf-suisse:not(.elementor-editor-active) .cerf-col.cerf-col > .elementor-widget-wrap,
body.cerf-suisse:not(.elementor-editor-active) .cerf-col.cerf-col > .elementor-column-wrap,
body.cerf-suisse:not(.elementor-editor-active) .cerf-col.cerf-col > .elementor-column-wrap > .elementor-widget-wrap,
body.cerf-suisse:not(.elementor-editor-active) .elementor-location-header.elementor-location-header,
body.cerf-suisse:not(.elementor-editor-active) .elementor-location-footer.elementor-location-footer,
body.cerf-suisse:not(.elementor-editor-active) [data-elementor-type="wp-page"][data-elementor-type],
body.cerf-suisse:not(.elementor-editor-active) [data-elementor-type="error-404"][data-elementor-type],
body.cerf-suisse:not(.elementor-editor-active) .cerf-acc-body.cerf-acc-body.cerf-acc-body {
	all: revert;
	display: contents !important;
}

/* 2. Elements carrying reference classes: browser defaults, low specificity */
body.cerf-suisse.cs :where(.cerf-c, .cerf-s, .cerf-col:not(.cerf-col-flat)) { all: revert; }
body.cerf-suisse.cs :where(.cerf-acc .e-n-accordion, .cerf-acc details, .cerf-acc summary) { all: revert; }
body.cerf-suisse.cs :where(.cerf-w .elementor-heading-title, .cerf-w .elementor-button, .cerf-w img, .cerf-w video, .cerf-w.elementor-widget-text-editor *, .cerf-acc summary *) { all: revert; }
body.cerf-suisse .cerf-w .elementor-button-icon { display: none; }
/* "all: revert" also drops the width/height attribute hints of images: restored from the
   variables written by the plugin (same values as the attributes), still at (0,2,1). */
body.cerf-suisse.cs :where(.cerf-w img[style*="--cerf-w"]) { width: var(--cerf-w); height: var(--cerf-h); aspect-ratio: auto var(--cerf-ar); }
/* Elementor Pro form (quote): browser defaults, then reference rules */
body.cerf-suisse.cs :where(.quote-form, .quote-form *:not(svg, svg *)) { all: revert; }

/* The hidden attribute always wins (menu dialog, form steps...) */
body.cerf-suisse [hidden] { display: none !important; }
