/*
 * tdn-page-hero-dark — dark variant of page hero
 * Spec: Figma node 8115:3735 ("Layout - 1") + audit Phase C.4
 *
 * Required HTML structure (cf. tdn/data/patterns/non-synced/tdn-page-hero-dark.json):
 *
 *   <section class="tdn-page-hero-dark">
 *     <div class="tdn-page-hero-dark__gradient" aria-hidden="true"></div>
 *     <div class="tdn-page-hero-dark__noise" aria-hidden="true"></div>
 *     <div class="tdn-page-hero-dark__inner">
 *       <h1 class="tdn-page-hero-dark__title">
 *         <span class="tdn-page-hero-dark__title-line --accent">…line 1 pink…</span>
 *         <span class="tdn-page-hero-dark__title-line">
 *           <span class="tdn-page-hero-dark__title-dash">— </span>
 *           <em class="tdn-page-hero-dark__title-italic">…line 2 italic white…</em>
 *         </span>
 *       </h1>
 *       <p class="tdn-page-hero-dark__subtitle">…<strong class="--accent">…</strong></p>
 *     </div>
 *   </section>
 */

.tdn-page-hero-dark {
	position: relative;
	width: 100%;
	min-height: 900px;
	background: var(--tdn-color-midnight, #1a1a2e);
	color: #fff;
	overflow: hidden;
	isolation: isolate;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Decor 1 : radial gradient pink ------------------------------ */
/* CSS recreation of the Figma vector (rotate -125° pink radial bloom).
 * Fidelity ~95% vs Figma raster — 0KB asset, animatable, design-system
 * native. Two layered radials for depth and asymmetry. */

.tdn-page-hero-dark__gradient {
	position: absolute;
	inset: -10%;
	z-index: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 60% 50% at 50% 55%, rgba(192, 109, 128, 0.55) 0%, rgba(192, 109, 128, 0) 65%),
		radial-gradient(ellipse 80% 70% at 35% 60%, rgba(151, 60, 100, 0.35) 0%, rgba(151, 60, 100, 0) 70%);
	transform: rotate(-15deg);
	transform-origin: center;
}

/* --- Decor 2 : noise overlay ------------------------------------- */
/* Tiled noise grain PNG, mix-blend-mode overlay opacity 0.5 — adds
 * texture and "film grain" feel to the dark gradient. */

.tdn-page-hero-dark__noise {
	position: absolute;
	top: -29px;
	left: -47px;
	width: calc(100% + 94px);
	height: calc(100% + 58px);
	z-index: 1;
	pointer-events: none;
	background-image: image-set(url("../../images/textures/noise.webp") type("image/webp"), url("../../images/textures/noise.png") type("image/png"));
	background-size: 220px 220px;
	background-repeat: repeat;
	background-position: top left;
	mix-blend-mode: overlay;
	opacity: 0.5;
}

/* --- Inner content (text) ---------------------------------------- */

.tdn-page-hero-dark__inner {
	position: relative;
	z-index: 2;
	max-width: 1121px;
	width: calc(100% - 48px);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
	text-align: center;
	padding: 0 24px;
}

/* --- Title -------------------------------------------------------- */

.tdn-page-hero-dark__title {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-font-weight-regular, 400);
	font-size: clamp(40px, 5.7vw, 82px);
	line-height: 1;
	letter-spacing: -0.073em; /* ≈ -6px at 82px */
	color: #fff;
}

.tdn-page-hero-dark__title-line {
	display: block;
	white-space: nowrap; /* Force respect des sauts de span (Figma whitespace-nowrap) */
}

@media (max-width: 768px) {
	.tdn-page-hero-dark__title-line {
		white-space: normal; /* mobile : autorise wrap pour éviter overflow viewport étroit */
	}
}

/* Page Réalisations (post 29) : ligne 2 "événements corporate conçus et produits par TDN."
   trop longue pour nowrap desktop → wrap autorisé */
.page-id-29 .tdn-page-hero-dark__title-line {
	white-space: normal;
}

.tdn-page-hero-dark__title-line--accent {
	color: var(--tdn-color-pink-100, #F6C9D0);
}

.tdn-page-hero-dark__title-dash {
	font-style: normal;
	font-weight: inherit;
}

.tdn-page-hero-dark__title-italic {
	font-style: italic;
	color: #fff;
}

/* --- Subtitle ---------------------------------------------------- */

.tdn-page-hero-dark__subtitle {
	margin: 0;
	max-width: 1200px;
	width: 100%;
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-font-weight-regular, 400);
	font-size: clamp(16px, 1.4vw, 20px);
	line-height: 1.4;
	color: #fff;
}

.tdn-page-hero-dark__subtitle-accent {
	display: block;
	margin-top: 8px;
	font-weight: var(--tdn-font-weight-bold);
	color: var(--tdn-color-pink-100, #F6C9D0);
}

/* --- Responsive -------------------------------------------------- */

@media (max-width: 1024px) {
	.tdn-page-hero-dark {
		min-height: 720px;
	}

	.tdn-page-hero-dark__inner {
		gap: 40px;
	}
}

@media (max-width: 768px) {
	/* min-height 80vh (= 100vh -20%) : titre H1 4-5 lignes tient sans être sous
	 * le nav sticky, mais hero moins envahissant qu'un full viewport.
	 * padding-top 80px : passe sous le nav burger (h~70-80px). */
	.tdn-page-hero-dark {
		min-height: 80vh;
	}

	/* Gradient : neutraliser rotation -15deg desktop. En mobile (viewport étroit)
	 * les coins du rectangle tourné laissent apparaître le bg midnight pur en
	 * triangle visible (bas-gauche). inset: 0 + transform none → couverture full. */
	.tdn-page-hero-dark__gradient {
		inset: 0;
		transform: none;
	}

	.tdn-page-hero-dark__inner {
		gap: 24px;
		padding: 80px 16px 48px;
	}

	/* gap 0 + line-height 1.15 = espacement uniforme entre TOUTES les lignes
	 * (intra-span wrappé et inter-span flex column). Évite l'inégalité visuelle
	 * gap 12px flex vs line-height 1.0 intra. font-size clamp(32→40) au lieu
	 * du desktop clamp(40→82) pour éviter overflow sur titres longs (Entreprises,
	 * Réalisations) et aligner sur hero-light. */
	.tdn-page-hero-dark__title {
		gap: 0;
		line-height: 1.15;
		letter-spacing: -0.05em;
		font-size: clamp(32px, 8vw, 40px);
	}

	/* nowrap sur l'italic UNIQUEMENT pour Expertises (post 26 = "de A à Z" court,
	 * 7 chars). Sur L'Agence et Réalisations, l'italic est une phrase longue
	 * (15+ mots) → nowrap = overflow horizontal du H1. Scope par page-id. */
	.page-id-26 .tdn-page-hero-dark__title-italic {
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdn-page-hero-dark__gradient {
		transform: none;
	}

	.tdn-page-hero-dark__cta:hover,
	.tdn-page-hero-dark__cta:focus-visible {
		transform: none;
	}

	.tdn-page-hero-dark__cta-icon {
		transition: none;
	}

	.tdn-page-hero-dark__cta:hover .tdn-page-hero-dark__cta-icon,
	.tdn-page-hero-dark__cta:focus-visible .tdn-page-hero-dark__cta-icon {
		transform: none;
	}
}

/* --- CTA inline (Entreprises hero + futurs heros avec CTA) ------- */
/* Réutilise le pattern bouton primary : pink-500 + icon container midnight + arrow SVG.
 * SVG arrow-up-right.svg partagé avec tdn-nav__cta::after. */

.tdn-page-hero-dark__cta {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	padding: 12px 16px 12px 32px;
	margin: 0 auto;
	background: var(--tdn-color-pink-500, #C06D80);
	border-radius: 40px;
	text-decoration: none;
	transition: filter 200ms ease, transform 200ms ease;
	font-style: normal;
}

.tdn-page-hero-dark__cta:hover,
.tdn-page-hero-dark__cta:focus-visible {
	filter: brightness(0.9);
	transform: scale(1.02);
}

.tdn-page-hero-dark__cta:hover .tdn-page-hero-dark__cta-icon,
.tdn-page-hero-dark__cta:focus-visible .tdn-page-hero-dark__cta-icon {
	transform: translateX(2px);
}

.tdn-page-hero-dark__cta-text {
	font-family: var(--tdn-font-family-brand, 'Nunito Sans', sans-serif);
	font-weight: var(--tdn-button-weight);
	font-size: 20px;
	line-height: 24px;
	color: #fff;
	font-style: normal;
	text-transform: none;
}

.tdn-page-hero-dark__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	background-color: var(--tdn-color-midnight-900, #1A1A2E);
	background-image: url("../../images/icons/arrow-up-right.svg");
	background-position: 50% 50%;
	background-repeat: no-repeat;
	background-size: 16px 16px;
	border-radius: 40px;
	transition: transform 200ms ease;
}
