/* Feuille de section « hero » : chargée uniquement avec la section (SECTION_STYLES, inc/assets.php). */

/* ==========================================================================
   Hero (section nuit : wl-night + wl-dark)
   ========================================================================== */

.wl-hero {
	display: grid;
	align-items: center;
	min-height: min(56rem, calc(100svh - var(--wl-header-h)));
	box-sizing: border-box;
}

/* Hero hors écran ou onglet masqué (hero.js) : toutes les animations en pause. */
.wl-hero.is-paused,
.wl-hero.is-paused * {
	animation-play-state: paused !important;
}

/*
 * Décor : halos qui dérivent et réseau neuronal (canvas, assets/js/hero.js).
 * max-width: none : sinon la mise en page « constrained » de WordPress le
 * limite à la largeur de contenu (44 rem) et le décor apparaît découpé.
 */
.wl-hero > .wl-hero__fx {
	position: absolute;
	z-index: -1;
	inset: 0;
	max-width: none;
	pointer-events: none;
}

.wl-hero__network {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 1.2s ease;
}

.wl-hero__network.is-on {
	opacity: 1;
}

.wl-hero__blob {
	position: absolute;
	width: 46rem;
	height: 46rem;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgb(79 124 255 / 0.32), transparent);
}

/*
 * Dérive des halos : ordinateurs uniquement. Sur mobile et tablette, ces grands
 * calques animés représentaient la moitié de la charge CPU du hero ; fixes, ils
 * gardent le même rendu.
 */
@media (hover: hover) and (pointer: fine) {
	.wl-hero__blob {
		animation: wl-drift 22s ease-in-out infinite alternate;
	}
}

.wl-hero__blob:nth-of-type(2) {
	top: -12rem;
	right: -14rem;
	background: radial-gradient(closest-side, rgb(139 92 246 / 0.34), transparent);
	animation-duration: 26s;
	animation-direction: alternate-reverse;
}

.wl-hero__blob:nth-of-type(3) {
	bottom: -22rem;
	left: 20%;
	width: 38rem;
	height: 38rem;
	background: radial-gradient(closest-side, rgb(94 230 255 / 0.16), transparent);
	animation-duration: 30s;
}

.wl-hero__blob:nth-of-type(1) {
	top: 10%;
	left: -18rem;
}

@keyframes wl-drift {
	to {
		transform: translate3d(8rem, 4rem, 0) scale(1.15);
	}
}

.wl-hero__grid {
	display: grid;
	gap: var(--wp--preset--spacing--70);
	align-items: center;
}

@media (min-width: 60rem) {
	.wl-hero__grid {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	}
}

.wl-hero h1 {
	font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.25rem);
	letter-spacing: -0.045em;
	line-height: 1.02;
}

.wl-hero__lead {
	max-width: 36rem;
	color: var(--wp--preset--color--ink-muted);
}

/* Pastille d'accroche avec point lumineux qui pulse. */
.wl-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	width: fit-content;
	padding: 0.45em 1em 0.45em 0.8em;
	border: 1px solid rgb(255 255 255 / 0.14);
	border-radius: var(--wp--custom--radius--pill);
	background: rgb(255 255 255 / 0.04);
	color: var(--wp--preset--color--base);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.wl-pill {
	position: relative;
}

.wl-pill::before,
.wl-pill::after {
	content: "";
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: var(--wp--preset--color--brand-cyan);
}

/* Onde du point : transform + opacity, animés par le compositeur (aucun repeint). */
.wl-pill::after {
	position: absolute;
	top: calc(50% - 0.25em);
	left: 0.8em;
	animation: wl-ping 2.4s ease-out infinite;
}

@keyframes wl-ping {
	from {
		opacity: 0.7;
	}

	70%,
	100% {
		opacity: 0;
		transform: scale(3.4);
	}
}

.wl-hero .is-style-check li::before {
	background: var(--wl-icon-check) center / 0.75em no-repeat, var(--wp--preset--gradient--aurore);
}

/* Console « assistant IA » : verre dépoli, inclinaison 3D au survol (hero.js). */
.wl-hero__visual {
	position: relative;
	perspective: 1200px;
}

.wl-console {
	--rx: 0deg;
	--ry: 0deg;
	position: relative;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: var(--wp--custom--radius--large);
	background: linear-gradient(160deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.02));
	box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.1);
	transform: rotateX(var(--rx)) rotateY(var(--ry));
	transform-style: preserve-3d;
	transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
}

/* Bordure lumineuse en dégradé (masque : seul le contour est peint). */
.wl-console::before {
	content: "";
	position: absolute;
	inset: -1px;
	padding: 1px;
	border-radius: inherit;
	background: linear-gradient(140deg, rgb(123 155 255 / 0.8), transparent 40%, transparent 60%, rgb(94 230 255 / 0.7));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	pointer-events: none;
}

.wl-console__bar {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.875rem 1.125rem;
	border-bottom: 1px solid rgb(255 255 255 / 0.08);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
}

.wl-console__bar i {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background: rgb(255 255 255 / 0.18);
}

.wl-console__bar span {
	margin-left: auto;
	color: rgb(255 255 255 / 0.45);
}

.wl-console__body {
	/* La frappe ne recalcule que la console, pas le reste de la page. */
	contain: layout style;
	display: grid;
	gap: 1.25rem;
	padding: clamp(1.25rem, 3vw, 2rem);
}

.wl-console__prompt {
	min-height: 3.2em;
	margin: 0;
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.4;
}

.wl-console__caret {
	color: var(--wp--preset--color--brand-cyan);
}

/* Curseur clignotant pendant la frappe. */
.wl-console__query::after {
	content: "";
	display: inline-block;
	width: 2px;
	height: 1.1em;
	margin-left: 2px;
	vertical-align: -0.15em;
	background: var(--wp--preset--color--brand-cyan);
	animation: wl-blink 1s steps(1) infinite;
}

@keyframes wl-blink {
	50% {
		opacity: 0;
	}
}

.wl-console__answer {
	display: grid;
	gap: 0.6rem;
	padding: 1.125rem;
	border: 1px solid rgb(255 255 255 / 0.08);
	border-radius: var(--wp--custom--radius--medium);
	background: rgb(5 6 15 / 0.55);
}

.wl-console__label {
	margin: 0 0 0.25rem;
	background: var(--wp--preset--gradient--aurore);
	-webkit-background-clip: text;
	background-clip: text;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	-webkit-text-fill-color: transparent;
}

/*
 * Étoile dessinée, pas le glyphe « ✦ » : absent d'Inter, il forçait le navigateur
 * à chercher une police système à chaque mise en page (~100 ms à CPU ×4).
 */
.wl-console__label::before {
	content: "";
	display: inline-block;
	width: 0.85em;
	height: 0.85em;
	margin-right: 0.35em;
	vertical-align: -0.1em;
	background: #7b9bff;
	clip-path: polygon(50% 0, 56% 31%, 63% 37%, 100% 50%, 63% 63%, 56% 69%, 50% 100%, 44% 69%, 37% 63%, 0 50%, 37% 37%, 44% 31%);
}

.wl-console__line {
	display: block;
	height: 0.5rem;
	border-radius: 0.25rem;
	background: linear-gradient(90deg, rgb(255 255 255 / 0.16), rgb(255 255 255 / 0.06));
}

.wl-console__line:nth-of-type(2) {
	width: 86%;
}

.wl-console__line:nth-of-type(3) {
	width: 64%;
}

.wl-console__source {
	justify-self: start;
	margin: 0.5rem 0 0;
	padding: 0.35em 0.9em;
	border: 1px solid rgb(94 230 255 / 0.45);
	border-radius: var(--wp--custom--radius--pill);
	background: rgb(94 230 255 / 0.08);
	color: #bdf4ff;
	font-size: 0.75rem;
	font-weight: 600;
	box-shadow: 0 0 24px -6px rgb(94 230 255 / 0.6);
}

/* Réponse : apparition échelonnée pilotée par hero.js (classe is-answering). */
.wl-console.is-typing .wl-console__answer > * {
	opacity: 0;
	transform: translateY(6px);
}

.wl-console .wl-console__answer > * {
	transition: opacity 400ms ease, transform 400ms ease;
}

.wl-console__answer > :nth-child(2) { transition-delay: 120ms; }
.wl-console__answer > :nth-child(3) { transition-delay: 240ms; }
.wl-console__answer > :nth-child(4) { transition-delay: 360ms; }
.wl-console__answer > :nth-child(5) { transition-delay: 600ms; }

/* Pastilles flottantes autour de la console. */
.wl-chip {
	position: absolute;
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 0.7em 1em;
	border: 1px solid rgb(255 255 255 / 0.12);
	border-radius: var(--wp--custom--radius--medium);
	background: rgb(18 23 46 / 0.92);
	color: var(--wp--preset--color--ink-muted);
	font-size: 0.8125rem;
	box-shadow: 0 20px 40px -20px rgb(0 0 0 / 0.9);
	animation: wl-float 7s ease-in-out infinite;
}

.wl-chip strong {
	color: var(--wp--preset--color--base);
}

.wl-chip--rank {
	top: -2.5rem;
	right: -0.5rem;
	/* Phrase continue : la mise en flex du chip écarterait les mots autour du dégradé. */
	display: block;
}

.wl-chip--rank strong {
	background: var(--wp--preset--gradient--aurore);
	-webkit-background-clip: text;
	background-clip: text;
	font-weight: 800;
	-webkit-text-fill-color: transparent;
}

.wl-chip--llm {
	bottom: -2rem;
	left: -1.5rem;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1em;
	animation-delay: -3.5s;
}

.wl-chip--llm::before {
	content: "";
	position: absolute;
	top: 0.85em;
	right: 0.85em;
	width: 0.5em;
	height: 0.5em;
	border-radius: 50%;
	background: #4ade80;
	box-shadow: 0 0 10px #4ade80;
}

@keyframes wl-float {
	50% {
		transform: translateY(-10px);
	}
}

@media (max-width: 40rem) {
	.wl-chip--rank {
		right: 0.5rem;
	}

	.wl-chip--llm {
		left: 0.5rem;
	}
}
