/* ==========================================================================
   Cerf à Lunettes – Elementor-specific adjustments (documented exceptions)
   Loaded after cerf-site.css. Only rules that cannot be expressed by the reference
   stylesheet because the markup is produced by an Elementor widget.
   ========================================================================== */

/* --- Quote form (Elementor Pro Form widget) ------------------------------
   The form markup is re-shaped by the plugin (fieldset-like steps, label cards,
   field pairs, Retour buttons); Elementor's own form styles are neutralised so
   the reference rules (.quote-panel …, .choice-grid …, .button …) apply. */
body.cerf-suisse.cs .quote-form .elementor-form-fields-wrapper,
body.cerf-suisse.cs .quote-form .elementor-select-wrapper,
body.cerf-suisse.cs .quote-form .e-form__buttons__wrapper,
body.cerf-suisse.cs .quote-form .elementor-field-subgroup:not(.choice-grid) { display: contents; }
body.cerf-suisse.cs .quote-form .elementor-hidden,
body.cerf-suisse.cs .quote-form .elementor-field-type-hidden,
body.cerf-suisse.cs .quote-form .elementor-field-type-honeypot,
body.cerf-suisse.cs .quote-form .select-caret-down-wrapper,
body.cerf-suisse.cs .quote-form .e-field-step,
body.cerf-suisse.cs .quote-form .e-form__indicators { display: none !important; }
body.cerf-suisse.cs .quote-form .elementor-field-group { display: block; margin: 0; padding: 0; }
body.cerf-suisse.cs .quote-form .field-pair > .elementor-field-group { min-width: 0; }
body.cerf-suisse.cs .quote-form .elementor-field-type-html { display: block; }
/* reference: .quote-panel fieldset > p */
body.cerf-suisse.cs .quote-form .form-hint { display: block; font-size: 12px !important; font-weight: 400; margin: 0 0 12px; line-height: 1.7; clear: both; }
/* reference: legend (Montserrat 26px/1.25, weight 600) */
body.cerf-suisse.cs .quote-form .x-legend { width: 100%; }
/* Label cards: the whole card is the <label>; checked state as .choice-grid label:has(input:checked) */
body.cerf-suisse.cs .quote-form .choice-grid label > span { display: block; }
body.cerf-suisse.cs .quote-form .field-pair .field-label { margin-top: 22px; }
body.cerf-suisse.cs .quote-form .e-form__buttons { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; clear: both; }
body.cerf-suisse.cs .quote-form .e-form__buttons .button:only-child,
body.cerf-suisse.cs .quote-form .e-form__buttons > :only-child .button { margin-right: auto; }
body.cerf-suisse.cs .quote-form .elementor-field-type-submit { display: flex; justify-content: flex-end; margin-top: 20px; }
body.cerf-suisse.cs .quote-form .elementor-button-content-wrapper,
body.cerf-suisse.cs .quote-form .elementor-button-text,
body.cerf-suisse.cs .quote-form button > span { display: contents; }
body.cerf-suisse.cs .quote-form .elementor-button-icon { display: none; }
/* Messages (success / error), in the reference quote-result style */
body.cerf-suisse.cs .quote-form .elementor-message { display: block; margin: 25px 0 0; padding: 16px 18px; font-size: 14px; line-height: 1.7; border-left: 3px solid #8d2451; background: #fd669814; color: #061e28; }
body.cerf-suisse.cs .quote-form .elementor-message-danger { border-color: #a12a56; background: #a12a5610; }
body.cerf-suisse.cs .quote-form .elementor-error .elementor-field { border-color: #a12a56; }
body.cerf-suisse.cs .quote-form .elementor-error .elementor-message,
body.cerf-suisse.cs .quote-form .elementor-field-group .elementor-message { margin: 8px 0 0; padding: 0; border: 0; background: none; color: #a12a56; font-size: 13px; }
body.cerf-suisse.cs .quote-form .form-honesty a { text-decoration: underline; text-underline-offset: 4px; }
body.cerf-suisse.cs .quote-form button[disabled] { opacity: .6; cursor: progress; }

/* --- Nested accordion (FAQ / values): reference <details>/<summary> -------- */
body.cerf-suisse.cs .cerf-acc summary { list-style: none; }
body.cerf-suisse.cs .cerf-acc summary::-webkit-details-marker { display: none; }

/* --- Video widget: keep the reference video box (no Elementor aspect-ratio box) */
body.cerf-suisse.cs .cerf-w .e-hosted-video { display: contents; }
body.cerf-suisse.cs .cerf-w .elementor-video { width: 100%; height: auto; display: block; }
body.cerf-suisse.cs .cerf-acc { --n-accordion-title-normal-color: inherit; --n-accordion-title-hover-color: inherit; --n-accordion-title-active-color: inherit; }

/* Elementor writes default values of the Form widget in the page CSS (field gaps, white button
   texts). Re-state the reference values with a higher specificity (0,5,1). */
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .elementor-form-fields-wrapper,
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .elementor-field-group { margin: 0; padding: 0; }
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .button,
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .button:hover { color: var(--ink, #061e28); }
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .back-button,
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form .back-button:hover { color: var(--ink, #061e28); }
body.cerf-suisse.cs .cerf-quote-form.cerf-quote-form :is(input, textarea, select, option, label, button) { font-family: inherit !important; }

/* Pages of the former site kept as is (legal notices, articles…): the reference header is
   positioned over the page, so their content starts below it. */
body.cerf-suisse.cs.cerf-legacy { padding-top: 110px; }
