/* Stack « Hero accueil » — template-parts/stacks/hero_accueil.php */

.hero-accueil {
	margin-bottom: 0;
	overflow-x: clip;
}

.hero-accueil__grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	align-items: end;
	column-gap: var(--wp--preset--spacing--l);
	padding-top: var(--wp--preset--spacing--6-xl);
	padding-right: 0;
	padding-bottom: 0;

	@media (max-width: 1024px) {
		grid-template-columns: 1fr;
		max-width: 650px;
		padding: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--l);
	}
}

.hero-accueil__col-left {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-self: start;
	gap: 0 var(--wp--preset--spacing--l);
	min-width: 0;
	max-width: 1000px;
	margin-bottom: var(--wp--preset--spacing--3-xl);
	margin-left: auto;

	@media (max-width: 1024px) {
		margin-bottom: var(--wp--preset--spacing--l);
		margin-left: unset;
		margin-right: unset;
		padding-left: 0;
	}
}

.hero-accueil__col-right {
	position: relative;
	z-index: 0;
	width: 150%;
	min-width: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;

	@media (max-width: 1024px) {
		align-self: stretch;
		justify-self: stretch;
		width: 100%;
		max-width: 600px;
		aspect-ratio: 16 / 7;
		border-radius: 0;
	}
}

.hero-accueil__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center;
	border-radius: 100%;

	@media (max-width: 1024px) {
		height: 100%;
		aspect-ratio: unset;
		border-radius: 20px;
	}
}

.hero-accueil__credit {
	position: absolute;
	bottom: var(--wp--preset--spacing--s);
	left: var(--wp--preset--spacing--2-xl);
	z-index: 1;
	margin-top: 0;
	margin-bottom: 0;
	color: var(--wp--preset--color--beige-2);
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--step-minus-1);
	font-weight: 700;
	line-height: 1.1;

	@media (max-width: 1024px) {
		left: var(--wp--preset--spacing--l);
	}
}

.hero-accueil__title {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--m);
	color: var(--wp--preset--color--cafe);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--step-6);
	font-weight: 600;
	line-height: 1.1;

	@media (max-width: 1024px) {
		margin-bottom: var(--wp--preset--spacing--s);
		font-size: var(--wp--preset--font-size--step-4);
	}
}

.hero-accueil__text {
	max-width: 690px;
	margin-top: 0;
	margin-bottom: 0;
	color: var(--wp--preset--color--administration);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--step-2);
	font-weight: 600;
	line-height: 1.1;

	@media (max-width: 1024px) {
		font-size: var(--wp--preset--font-size--step-1);
	}
}

/* Bord gauche aligné sur .wrapper */

@media (width > 1024px) {
	/* Même bord gauche que .wrapper ; l'image garde le bord droit de l'écran */
	.hero-accueil .hero-accueil__grid {
		padding-inline-start: max(
			var(--wp--preset--spacing--gutter),
			(100% - var(--wp--style--global--content-size, 88.75rem)) / 2
		);
	}

	.hero-accueil .hero-accueil__col-left {
		margin-inline-start: 0;
	}
}
