/*
 * Correctifs de mise en page limités aux pages générées par le kit.
 * Les réglages de contenu Elementor existants ne sont jamais réécrits ici.
 */
body.cck-compagnons-page {
	margin: 0;
	overflow-x: hidden;
}

/*
 * Elementor's "hide_title" page setting is honoured by Astra, but some block
 * themes ignore it. Hide only the native WordPress page title; the H1 inside
 * the Compagnons hero remains untouched.
 */
body.cck-compagnons-page.cck-site-shell .wp-block-post-title,
body.cck-compagnons-page.cck-site-shell #primary > #main > article.page > .entry-header,
body.cck-compagnons-page.cck-site-shell #primary > .site-main > article.page > .entry-header {
	display: none !important;
}

body.cck-compagnons-page .elementor[data-elementor-type="wp-page"] > :is(
	.elementor-section,
	.e-con,
	.e-flex,
	.e-container
),
body.cck-compagnons-page .elementor[data-elementor-type="wp-page"] > .elementor-section-wrap > :is(
	.elementor-section,
	.e-con,
	.e-flex,
	.e-container
) {
	margin-block: 0 !important;
	padding-block: 0 !important;
}

body.cck-compagnons-page .cc-hero__form-slot .nf-form-cont,
body.cck-compagnons-page .cc-hero__form-slot .nf-form-wrap,
body.cck-compagnons-page .cc-hero__form-slot .nf-form-layout {
	margin: 0;
}

body.cck-compagnons-page .cc-hero__form-slot .nf-after-form-content {
	margin-top: 8px;
}

/*
 * The Ninja Forms "Opinions" stylesheet appends a decorative <div for="…">
 * after every select. The real select is already styled by the Hero widget;
 * keeping both controls visible creates a second border shifted by four
 * pixels. Hide only that decorative sibling and restore the native arrow.
 */
body.cck-compagnons-page .cc-hero__form-slot .list-select-wrap .nf-field-element > select.nf-element + div[for],
body.cck-compagnons-page .cc-hero__form-slot .listselect-wrap .nf-field-element > select.nf-element + div[for] {
	display: none !important;
}

body.cck-compagnons-page .cc-hero__form-slot .list-select-wrap select.ninja-forms-field,
body.cck-compagnons-page .cc-hero__form-slot .listselect-wrap select.ninja-forms-field {
	-webkit-appearance: menulist !important;
	-moz-appearance: auto !important;
	appearance: auto !important;
	position: static !important;
	z-index: auto !important;
}

body.cck-compagnons-page .cc-reviews .cc-review__stars {
	color: #ffd700 !important;
}

/*
 * Elementor wraps every widget in its own section/container. Making only the
 * header widget sticky would therefore constrain it to a 80px-high parent.
 * The runtime adds this class to the first Elementor host that contains the
 * Compagnons header.
 */
body.cck-compagnons-page .cck-sticky-header-host {
	position: sticky !important;
	top: 0;
	z-index: 999 !important;
	overflow: visible !important;
}

body.admin-bar.cck-compagnons-page .cck-sticky-header-host {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.cck-compagnons-page .cck-sticky-header-host {
		top: 46px;
	}
}

@media (max-width: 767px) {
	body.cck-compagnons-page:not(.cck-site-shell) {
		padding-bottom: 80px;
	}
}
