/*
 * LUCZAK-ARCHITECTE : page d'accueil (ouverture et diaporama).
 * Chargé seulement sur l'accueil (et dans l'éditeur). Les autres sections de l'accueil
 * utilisent les composants partagés de composants.css.
 * Maquette de référence : docs-refonte/05-maquette-accueil/.
 */

/* ============================================================
   A. Ouverture : diaporama, voile, deux colonnes
   ============================================================ */
.la-hero {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--grey-dark);
	min-height: 760px;
	box-sizing: border-box;
	padding: 176px 24px 96px !important;
	display: flex;
	align-items: flex-end;
	margin-block: 0 !important;
}

.la-hero__slides {
	position: absolute;
	inset: 0;
	margin: 0 !important;
}

.la-hero__slide {
	position: absolute !important;
	inset: 0;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 900ms ease;
}

.la-hero__slide:first-child,
.la-hero.is-js .la-hero__slide {
	opacity: 0;
}

.la-hero__slide:first-child,
.la-hero.is-js .la-hero__slide.is-active {
	opacity: 1;
}

.la-hero.is-js .la-hero__slide:first-child:not(.is-active) {
	opacity: 0;
}

.la-hero__slide img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.la-op-40 img { object-position: center 40%; }
.la-op-45 img { object-position: center 45%; }
.la-op-55 img { object-position: center 55%; }
.la-op-60 img { object-position: center 60%; }

/* Légende de la photo affichée : en bas à droite, à gauche du bouton pause */
.la-hero__slide figcaption {
	position: absolute;
	right: 80px;
	bottom: 27px;
	left: auto;
	z-index: 3;
	margin: 0;
	max-width: calc(100% - 104px);
	font-size: 14px;
	line-height: 21px;
	color: var(--wp--preset--color--white);
	text-align: right;
}

/* Voile : du bas vers le haut, sur 70 % de la hauteur, sous le texte seulement */
.la-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 70%;
	background: linear-gradient(0deg, rgba(17, 17, 17, 0.85) 0%, rgba(17, 17, 17, 0.6) 40%, rgba(17, 17, 17, 0) 100%);
	pointer-events: none;
	z-index: 1;
}

.la-hero__slide figcaption {
	z-index: 3;
}

/* Pas de contexte d'empilement sur le conteneur des photos :
   la légende (z-index 3) passe ainsi au-dessus du voile (z-index 1). */
.la-hero__slides {
	z-index: auto;
}

/* Bouton pause / lecture (ajouté par accueil.js) */
.la-hero__pause {
	position: absolute;
	right: 24px;
	bottom: 16px;
	z-index: 4;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 0;
	color: var(--wp--preset--color--white);
	cursor: pointer;
}

.la-hero__pause:hover {
	background: rgba(17, 17, 17, 0.4);
}

.la-hero__pause svg {
	width: 16px;
	height: 16px;
}

/* Texte : deux colonnes alignées en bas, conteneur 1 200 px */
.la-hero__contenu {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto !important;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 40px 64px;
}

.la-hero__gauche {
	flex: 1 1 520px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.la-hero__droite {
	flex: 1 1 340px;
	max-width: 440px;
	min-width: 0;
	box-sizing: border-box;
	padding-left: 32px;
	border-left: 1px solid rgba(255, 255, 255, 0.6);
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.la-hero__contenu > *,
.la-hero__gauche > *,
.la-hero__droite > * {
	margin: 0 !important;
}

.la-hero .is-style-surtitre {
	font-size: 14px;
	line-height: 20px;
}

.la-hero__titre {
	font-size: clamp(30px, 4vw, 44px) !important;
	line-height: 1.14 !important;
}

.la-hero__note {
	font-size: 14px;
	line-height: 21px;
}

.la-hero__accroche {
	font-size: 22px;
	line-height: 30px;
	font-weight: 600;
}

.la-hero__zone {
	font-size: 15px;
	line-height: 22px;
}

.la-hero__bouton {
	padding-top: 8px;
}

@media (max-width: 767px) {
	.la-hero {
		min-height: 600px;
		padding: 136px 16px 88px !important;
	}

	.la-hero__gauche {
		gap: 16px;
	}

	.la-hero__droite {
		flex-basis: 100%;
		max-width: none;
		padding-left: 0;
		padding-top: 24px;
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.6);
	}

	.la-hero__contenu {
		gap: 24px;
	}

	.la-hero__bouton .wp-block-button,
	.la-hero__bouton .wp-block-button__link {
		width: 100%;
	}

	.la-hero__slide figcaption {
		right: 76px;
		left: 16px;
		bottom: 16px;
		max-width: none;
		min-height: 44px;
		display: flex;
		align-items: center;
		justify-content: flex-end;
	}

	.la-hero__pause {
		right: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.la-hero__slide {
		transition: none;
	}
}

/* ============================================================
   Éditeur seulement : les 5 photos du diaporama côte à côte,
   légende dessous, pour les choisir et les légender facilement.
   ============================================================ */
.editor-styles-wrapper .la-hero {
	flex-direction: column;
	align-items: stretch;
	padding-top: 24px !important;
}

.editor-styles-wrapper .la-hero::after {
	display: none;
}

.editor-styles-wrapper .la-hero__slides {
	position: relative;
	inset: auto;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	margin-bottom: 48px !important;
}

.editor-styles-wrapper .la-hero__slide {
	position: relative !important;
	inset: auto;
	opacity: 1 !important;
}

.editor-styles-wrapper .la-hero__slide img {
	height: 160px !important;
}

.editor-styles-wrapper .la-hero__slide figcaption {
	position: static;
	max-width: none;
	margin-top: 6px;
	text-align: left;
}
