/**
 * Règles responsive transversales (images, médias, débordements).
 *
 * IMPORTANT — menu sticky : ne pas mettre overflow-x:hidden sur body (crée un
 * conteneur de scroll qui casse position:sticky sur #bmf-main-menu-root).
 * Le débordement horizontal est contenu sur html via overflow-x:clip (ne crée
 * pas de zone de scroll programmatique, contrairement à hidden).
 *
 * html overflow-y: scroll stabilise la barre verticale sur le viewport.
 */
html {
	overflow-y: scroll;
	overflow-x: clip;
}

@supports not (overflow: clip) {
	html {
		overflow-x: hidden;
	}
}

body.bmf-site {
	overflow-x: visible;
	max-width: 100%;
}

body.bmf-site.bmf-menu-open,
body.bmf-site.bmf-intro-menu-open {
	overflow: hidden;
}

body.bmf-site img:not(.bmf-footer__logo):not(.custom-logo):not(.projet-card__cta-arrow):not(.bmf-home-intro__logo),
body.bmf-site video,
body.bmf-site iframe,
body.bmf-site embed {
	max-width: 100%;
	height: auto;
}

body.bmf-site .bmf-main-menu__logo-item img.custom-logo {
	height: auto;
	max-width: none;
}

/* Vignettes archive : ne pas forcer height:auto (sinon bande vide sous l’image). */
body.bmf-site .projets-galerie .projet-card__image img:not(.projet-card__cta-arrow),
body.bmf-site .projets-galerie .projet-card__image .wp-post-image,
body.bmf-site .projets-similaires__grid .projet-card__image img:not(.projet-card__cta-arrow),
body.bmf-site .projets-similaires__grid .projet-card__image .wp-post-image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	min-width: 100%;
	min-height: 100%;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
}

/* Encarts métiers accueil (desktop overlay) : image plein cadre. */
@media (min-width: 1024px) {
	body.bmf-site .bmf-home-jobs-card > img {
		width: 100% !important;
		height: 100% !important;
		min-width: 100%;
		min-height: 100%;
		max-width: none !important;
		max-height: none !important;
		object-fit: cover !important;
		object-position: center;
	}
}

/* Fiche projet : annule height:auto global pour remplir le slide (bureau + mobile). */
body.bmf-site .projet-hero__slide img.projet-hero__img {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
}

body.bmf-site .projet-hero__slide--landscape img.projet-hero__img {
	object-fit: cover !important;
	object-position: center;
}

body.bmf-site .projet-hero__slide--portrait img.projet-hero__img {
	object-fit: contain !important;
	object-position: center;
}

/* Pages métier (Économie, Management, etc.) : hero + encarts métiers plein cadre. */
body.bmf-site .bmf-economie-hero__media img,
body.bmf-site .bmf-economie-card__media-img img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	min-width: 100%;
	min-height: 100%;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
}

/* Nos engagements — picto encart clients : hauteur en px (JS), largeur proportionnelle. */
body.bmf-site .bmf-engagements-clients__highlight-picto img {
	width: auto !important;
	max-width: none !important;
}

/* Carrousel accueil : cover plein cadre (height:auto global sinon bandes vides). */
body.bmf-site .bmf-home-intro__slide img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	min-width: 100%;
	min-height: 100%;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
}

/* Flèche CTA survol : reste dans le flex à côté du libellé (pas en plein encart). */
body.bmf-site .projet-card__image .projet-card__cta-arrow {
	position: static;
	inset: auto;
	width: 9px !important;
	height: 15px !important;
	min-width: 9px;
	min-height: 15px;
	max-width: none !important;
	max-height: none !important;
	transform: none;
	object-fit: contain;
	flex-shrink: 0;
}
