/**
 * Atelier — styles du bloc Hero.
 *
 * Chaque valeur pointe d'abord vers un token WordPress natif
 * (--wp--preset--color--at-*), avec une valeur de repli en dur.
 * Conséquence : le rendu reste correct même si le plugin est désactivé.
 */

.at-hero {
	/* Mapping des tokens vers des variables locales courtes, avec fallback. */
	--bg:      var(--wp--preset--color--at-bg,      #F7F6F3);
	--surface: var(--wp--preset--color--at-surface, #FFFFFF);
	--ink:     var(--wp--preset--color--at-ink,     #171614);
	--muted:   var(--wp--preset--color--at-muted,   #66625B);
	--primary: var(--wp--preset--color--at-primary, #2D4A3E);
	--accent:  var(--wp--preset--color--at-accent,  #C08552);
	--line:    var(--wp--preset--color--at-line,    #E4E1DB);

	--display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--space: clamp(3.5rem, 7vw, 7rem);
	--radius: 2px;

	position: relative;
	box-sizing: border-box;
	background-color: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	overflow: clip;
}

.at-hero *,
.at-hero *::before,
.at-hero *::after {
	box-sizing: border-box;
}

.at-hero__inner {
	max-width: 1200px;
	margin-inline: auto;
	padding-block: var(--space);
	padding-inline: clamp(1.25rem, 5vw, 4rem);
}

/* --- Typographie commune --- */

.at-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.25rem;
	font-family: var(--body);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

/* La signature : un court filet accent après le sur-titre. */
.at-hero__eyebrow::after {
	content: '';
	width: 2.5rem;
	height: 1px;
	background-color: var(--accent);
	opacity: 0.7;
}

.at-hero__heading {
	margin: 0;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(2.5rem, 5.5vw, 4.5rem);
	line-height: 1.04;
	letter-spacing: -0.015em;
	color: var(--ink);
	text-wrap: balance;
}

.at-hero__heading em {
	font-style: italic;
	color: var(--primary);
}

.at-hero__subheading {
	margin: 1.5rem 0 0;
	max-width: 46ch;
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.6;
	color: var(--muted);
}

/* --- Bouton --- */

.at-hero__button {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin-top: 2.25rem;
	padding: 0.95rem 1.6rem;
	background-color: var(--primary);
	color: var(--surface);
	font-family: var(--body);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	border-radius: var(--radius);
	transition: background-color 0.25s ease, transform 0.25s ease;
}

.at-hero__button:hover {
	background-color: var(--ink);
}

.at-hero__button-arrow {
	display: inline-block;
	transition: transform 0.25s ease;
}

.at-hero__button:hover .at-hero__button-arrow {
	transform: translateX(4px);
}

/* --- Variante : Centré --- */

.at-hero--centered .at-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-block: calc(var(--space) * 1.15);
}

.at-hero--centered .at-hero__subheading {
	margin-inline: auto;
}

/* --- Variante : Texte + image --- */

.at-hero--split .at-hero__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp(2rem, 5vw, 5rem);
}

.at-hero--split .at-hero__media {
	position: relative;
}

.at-hero--split .at-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 34rem;
	object-fit: cover;
	border-radius: var(--radius);
}

/* --- Variante : Image plein cadre --- */

.at-hero--imagefull {
	color: var(--surface);
}

.at-hero--imagefull .at-hero__inner {
	position: relative;
	min-height: min(80vh, 44rem);
	display: flex;
	align-items: flex-end;
}

.at-hero--imagefull .at-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

/* Voile dégradé pour la lisibilité du texte. */
.at-hero--imagefull .at-hero__bg::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba(23, 22, 20, 0.82) 0%, rgba(23, 22, 20, 0.35) 45%, rgba(23, 22, 20, 0.1) 100% );
}

.at-hero--imagefull .at-hero__overlay {
	position: relative;
	z-index: 1;
	max-width: 42rem;
}

.at-hero--imagefull .at-hero__heading {
	color: var(--surface);
}

.at-hero--imagefull .at-hero__heading em {
	color: #E8D3BD;
}

.at-hero--imagefull .at-hero__subheading {
	color: rgba(255, 255, 255, 0.82);
}

/* --- Responsive --- */

@media ( max-width: 782px ) {
	.at-hero--split .at-hero__inner {
		grid-template-columns: 1fr;
	}

	.at-hero--split .at-hero__media {
		order: -1;
	}

	.at-hero--split .at-hero__image {
		max-height: 22rem;
	}
}

/* --- Accessibilité : mouvement réduit --- */

@media ( prefers-reduced-motion: reduce ) {
	.at-hero__button,
	.at-hero__button-arrow {
		transition: none;
	}
}
