/**
 * Block: Bandeau d'accueil (hero-block)
 *
 * Full-width section : image (ou carrousel) en background + overlay dégradé
 * bleu marine pour lisibilité du texte. Contenu aligné à gauche dans une
 * colonne contrainte (col-lg-9 / col-xl-8). Surtitre uppercase, titre h1,
 * sous-titre, et CTA doré contrasté.
 */

.hero-block {
	position: relative;
	overflow: hidden;
	background-color: #0a2540;
	color: #ffffff;
	padding: 5rem 0 4rem;
}

.hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

/* ---------- Carousel (background-only, decorative) ---------- */
.hero-carousel,
.hero-carousel .carousel-inner {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
}

.hero-carousel .carousel-item {
	height: 100%;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	transition: transform 0.8s ease-in-out;
}

.hero-carousel.carousel-fade .carousel-item {
	transition: opacity 1.2s ease-in-out;
}

.hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(135deg, rgba(10, 37, 64, 0.75) 0%, rgba(26, 43, 92, 0.45) 100%);
	pointer-events: none;
	/* opacity is applied inline via the ACF overlay_opacity field */
}

/* When the hero has a background image, anchor a strong navy scrim that
   covers the left half almost solid, then fades quickly so the right side
   of the image stays clearly visible. */
.hero-block.has-image .hero-overlay {
	background: linear-gradient(95deg, rgba(10, 37, 64, 0.95) 0%, rgba(10, 37, 64, 0.88) 40%, rgba(10, 37, 64, 0.55) 70%, rgba(26, 43, 92, 0.20) 100%);
}

.hero-content {
	position: relative;
	z-index: 3;
}

.hero-surtitre {
	display: block;
	margin: 0 0 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.92);
}

.hero-titre {
	margin: 0 0 1.5rem;
	font-size: clamp(2.25rem, 4vw + 1rem, 4rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.015em;
}

.hero-sous-titre {
	margin: 0 0 2rem;
	font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	max-width: 36rem;
}

.hero-sous-titre > :last-child {
	margin-bottom: 0;
}

.hero-block.has-image .hero-titre,
.hero-block.has-image .hero-sous-titre,
.hero-block.has-image .hero-surtitre {
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-ctas {
	margin-top: 1.75rem;
}

/* ---------- CTA primaire — doré ---------- */
.btn-hero-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 12rem;
	padding: 0.9rem 2.25rem;
	background-color: #d4a247;
	border: 1px solid #d4a247;
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.01em;
	border-radius: 0.375rem;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-hero-cta:hover,
.btn-hero-cta:focus-visible {
	background-color: #b88a35;
	border-color: #b88a35;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* ---------- CTA secondaire — contour clair ---------- */
.btn-hero-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 12rem;
	padding: 0.9rem 2.25rem;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.5);
	color: #ffffff;
	font-weight: 600;
	font-size: 1rem;
	border-radius: 0.375rem;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-hero-secondary:hover,
.btn-hero-secondary:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	border-color: #ffffff;
	color: #ffffff;
	transform: translateY(-1px);
}

@media (min-width: 992px) {
	.hero-block {
		padding: 8rem 0 7rem;
		min-height: 70vh;
		display: flex;
		align-items: center;
	}

	.hero-block > .container {
		width: 100%;
	}
}

/* Respect user motion preferences — freeze carousel for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
	.hero-carousel .carousel-item {
		transition: none !important;
	}
	.btn-hero-cta,
	.btn-hero-secondary {
		transition: none !important;
	}
}

/* Editor canvas — ensure the block has a clickable surface even when fields are empty. */
.wp-block .hero-block {
	min-height: 12rem;
}
