/**
 * Biotifull Category Hero — styles front-end.
 */

.bch-hero {
	position: relative;
	display: flex;
	align-items: var(--bch-align-v, center);
	box-sizing: border-box;
	width: 100%;
	margin-bottom: 2.5rem;
	border-radius: 20px;
	overflow: hidden;
	isolation: isolate;
	height: var(--bch-height-desktop, 520px);
	background-color: var(--bch-bg-color, transparent);
	color: var(--bch-text-color, #fff);
}

.bch-hero__media,
.bch-hero__overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.bch-hero__media {
	z-index: 0;
}

.bch-hero__overlay {
	z-index: 1;
	background: var(--bch-overlay, transparent);
}

.bch-hero__img,
.bch-hero__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.bch-hero__img--mobile {
	display: none;
}

.bch-hero__img--poster {
	position: absolute;
	inset: 0;
}

/* YouTube : recadrage « cover » d'un iframe 16/9. */
.bch-hero__yt {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.bch-hero__yt iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw; /* 100vw / (16/9) */
	min-height: 100%;
	min-width: 177.78vh; /* 100vh * (16/9) */
	transform: translate( -50%, -50% );
	border: 0;
	pointer-events: none;
}

.bch-hero__inner {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--bch-content-width, 1290px);
	margin: 0 auto;
	padding: 2.5rem 1.5rem;
	display: flex;
	justify-content: var(--bch-align-h, center);
}

.bch-hero__content {
	max-width: 42rem;
	text-align: var(--bch-text-align, center);
}

.bch-hero__title {
	margin: 0;
	font-size: var(--bch-title-desktop, 48px);
	line-height: 1.1;
	color: inherit;
}

.bch-hero__subtitle {
	margin: 0.75em 0 0;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: inherit;
}

.bch-hero__subtitle a {
	color: inherit;
	text-decoration: underline;
}

.bch-hero__cta {
	display: inline-block;
	margin-top: 1.5em;
	padding: 0.85em 2em;
	border: 1px solid currentColor;
	border-radius: 2px;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	color: inherit;
	background: transparent;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.bch-hero__cta:hover,
.bch-hero__cta:focus {
	background-color: currentColor;
	color: var(--bch-bg-color, #1d1d1b);
}

.bch-hero__cta:hover .bch-hero__cta-label {
	color: inherit;
}

.bch-hero__cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/*
 * Masquage du titre d'archive natif (WooCommerce + Blocksy + plugins de marques).
 * Ces règles ne s'appliquent que sur les pages portant la classe body ajoutée par
 * le plugin, elles ne peuvent donc pas déborder sur le reste du site.
 */
.bch-hide-native-title .woocommerce-products-header__title,
.bch-hide-native-title .page-title,
.bch-hide-native-title .archive-title,
.bch-hide-native-title .pwb-brand-title,
.bch-hide-native-title [data-prefix="product_archive"] .hero-section,
.bch-hide-native-title [data-prefix="categories"] .hero-section,
.bch-hide-native-title [data-prefix] > .hero-section {
	display: none !important;
}

/* Tablette */
@media ( max-width: 1024px ) {

	.bch-hero {
		height: var(--bch-height-tablet, 420px);
	}

	.bch-hero__title {
		font-size: var(--bch-title-tablet, 36px);
	}
}

/* Mobile */
@media ( max-width: 767px ) {

	.bch-hero {
		height: var(--bch-height-mobile, 340px);
	}

	.bch-hero__title {
		font-size: var(--bch-title-mobile, 28px);
	}

	.bch-hero__inner {
		padding: 1.75rem 1.25rem;
	}

	.bch-hero__img--mobile {
		display: block;
	}

	.bch-hero__img--desktop:not( :only-child ) {
		display: none;
	}

	/* La vidéo n'est jamais chargée sous ce point de rupture : le poster suffit. */
	.bch-hero__video {
		object-fit: cover;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.bch-hero__cta {
		transition: none;
	}
}
