/**
 * Page de connexion, modèle « carte » (asmon-gate.js).
 * La mise en page de l'écran vitrail, sans le vitrail : grand logo construit en facettes, phrase,
 * cadre des lightbox du site, trait d'Asmon Studio. Fond : la carte fixe, ses lieux et trajets, les braises.
 * Ce qui bouge en continu passe par transform ou opacity : aucun repeint pendant l'animation.
 */

body.asmon-page-template--login {
	background: #0b0806;
}

body.asmon-page-template--login #main-container,
body.asmon-page-template--login .site-main {
	padding: 0;
	margin: 0;
	max-width: none;
	background: none;
}

/* Le fond d'ambiance du site est entièrement recouvert par la carte : inutile de l'animer. */
body.asmon-page-template--login .asmon-ambient,
body.asmon-page-template--login .asmon-ambient-veil,
body.asmon-page-template--login .asmon-breadcrumb,
body.asmon-page-template--login .asmon-progress,
body.asmon-page-template--login .asmon-back,
body.asmon-page-template--login .asmon-back-to-top {
	display: none !important;
}

/* Portail et pied de page partagent un seul écran : le portail prend la hauteur que le pied de page lui laisse. */
body.asmon-page-template--login #main-container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

body.asmon-page-template--login .site-main {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

body.asmon-page-template--login .asmon-gate {
	flex: 1 0 auto;
	min-height: 0;
}

/* Pied de page du site, tel quel (couleurs comprises), posé sur la carte : sans fond ni filet. */
body.asmon-page-template--login #footer {
	position: relative;
	z-index: 1;
	flex: none;
	padding: 0.4rem 16px calc(0.8rem + env(safe-area-inset-bottom, 0px));
	background: transparent !important;
	border: 0 !important;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

body.asmon-page-template--login #footer [data-row],
body.asmon-page-template--login #footer .ct-container,
body.asmon-page-template--login #footer [data-column] {
	display: block;
	padding: 0;
	margin: 0 auto;
	background: none;
}

body.asmon-page-template--login #footer .ct-footer-copyright {
	font-size: 0.78rem;
	line-height: 1.6;
}

body.asmon-page-template--login #footer .ct-footer-copyright p {
	margin: 0.15rem 0;
}

body.asmon-page-template--login #footer .asmon-social-icons {
	justify-content: center;
	filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.8));
}

html.asmon-gate-bar {
	--wp-admin--admin-bar--height: 32px;
}

html.asmon-gate-bar #wpadminbar {
	animation: asmon-gate-bar 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes asmon-gate-bar {
	from {
		transform: translate3d(0, -100%, 0);
	}
}

@media (max-width: 782px) {
	html.asmon-gate-bar {
		--wp-admin--admin-bar--height: 46px;
	}
}

/* Le décor tient compte de la barre lui-même : pas de marge sur la page, barre toujours en haut. */
html:has(body.asmon-page-template--login) {
	margin-top: 0 !important;
}

body.asmon-page-template--login #wpadminbar {
	position: fixed !important;
	top: 0;
}

/* ------------------------------------------------------------------ */
/* Scène                                                              */
/* ------------------------------------------------------------------ */

.asmon-gate {
	--gate-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--gate-edges: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%), linear-gradient(transparent 0%, #000 16%, #000 84%, transparent 100%);
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	color: #e8dec8;
	isolation: isolate;
	overflow: hidden;
}

/* Dégradé noir identique en haut et en bas de l'écran : la page est encadrée de la même façon des deux côtés. */
.asmon-gate::before,
.asmon-gate::after {
	content: "";
	position: fixed;
	z-index: 0;
	left: 0;
	right: 0;
	height: 30vh;
	pointer-events: none;
}

/* Un peu moins haut que celui du bas, pour laisser respirer le logo. */
.asmon-gate::before {
	top: 0;
	height: 26vh;
	background: linear-gradient(#080604, #080604 10%, rgba(8, 6, 4, 0.75) 38%, rgba(8, 6, 4, 0.35) 68%, transparent);
}

.asmon-gate::after {
	bottom: 0;
	background: linear-gradient(transparent, rgba(8, 6, 4, 0.4) 30%, rgba(8, 6, 4, 0.8) 58%, #080604 84%, #080604);
}

.asmon-gate__scene {
	position: fixed;
	z-index: -1;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	background: #0b0806;
}

/* Voile seulement derrière le cadre et le logo, pour la lisibilité : les bords de la carte restent nets. */
.asmon-gate__scene::after {
	content: "";
	position: absolute;
	z-index: 4;
	inset: 0;
	background:
		radial-gradient(ellipse 30% 42% at 50% 50%, rgba(8, 6, 4, 0.55), rgba(8, 6, 4, 0.18) 70%, transparent 100%),
		linear-gradient(90deg, rgba(8, 6, 4, 0.7), rgba(8, 6, 4, 0.35) 7%, transparent 18%, transparent 82%, rgba(8, 6, 4, 0.35) 93%, rgba(8, 6, 4, 0.7));
}

/* Le pourtour : la même carte, très floutée et au même ton, sans ligne ni changement de texture. */
.asmon-gate__fill {
	position: absolute;
	inset: -40px;
	background: var(--gate-map) center / cover no-repeat;
	filter: sepia(0.4) brightness(0.3) contrast(1.05) blur(40px);
	transform: scale(1.15);
}

/* La carte s'efface progressivement sur ses quatre bords et se fond dans le pourtour. */
.asmon-gate__map {
	position: absolute;
	z-index: 1;
	background: var(--gate-map) 0 0 / 100% 100% no-repeat;
	filter: sepia(0.4) brightness(0.42) contrast(1.1);
	-webkit-mask-image: var(--gate-edges);
	-webkit-mask-composite: source-in;
	mask-image: var(--gate-edges);
	mask-composite: intersect;
}

.asmon-gate__scene > .asmon-gate__map {
	opacity: 0;
	transition: opacity 1.8s ease;
}

.asmon-gate.is-mapped .asmon-gate__scene > .asmon-gate__map {
	opacity: 1;
}

/* Lieux et trajets : au-dessus de la carte. */
.asmon-gate__scene > .asmon-gate__marks {
	z-index: 3;
	background: none;
	filter: none;
	opacity: 1;
}

/* Sélecteur renforcé : la règle des icônes (.asmon-gate svg) ne doit pas réduire ce calque à 1 rem. */
.asmon-gate .asmon-gate__routes {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	fill: none;
}

/*
 * Apparence réglée dans l'admin (variables posées sur le portail par login-page.php) :
 * --gate-dot (couleur), --gate-dot-size, --gate-dot-opacity, --gate-name-color, --gate-name-size,
 * --gate-route, --gate-route-opacity ; forme : asmon-gate--dot-diamond | circle | square | ring.
 */
.asmon-gate__routes path {
	fill: none;
	stroke: var(--gate-route, #e8c56a);
	stroke-opacity: var(--gate-route-opacity, 0.55);
	stroke-linecap: round;
	transition: opacity 4s ease;
}

/*
 * Un lieu : un losange et son nom ; tiré au sort, relié par un trajet ou sous le pointeur.
 * Apparition et disparition : un fondu lent, rien d'autre.
 */
.asmon-gate__place {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
	transition: opacity 2.6s cubic-bezier(0.45, 0, 0.55, 1);
}

.asmon-gate__place.is-shown,
.asmon-gate__place.is-linked,
.asmon-gate__place.is-hovered {
	opacity: 1;
}

/* Sous le pointeur : tout de suite. */
.asmon-gate__place.is-hovered {
	transition-duration: 0.3s;
}

.asmon-gate__dot {
	--d: var(--gate-dot-size, 10px);
	position: absolute;
	left: calc(var(--d) / -2);
	top: calc(var(--d) / -2);
	width: var(--d);
	height: var(--d);
	box-sizing: border-box;
	border: 1px solid color-mix(in srgb, var(--gate-dot, #e8c56a) 75%, transparent);
	background: rgba(14, 11, 8, 0.6);
	opacity: var(--gate-dot-opacity, 1);
	transform: rotate(45deg);
	transition: background 1.6s ease, box-shadow 1.6s ease, border-color 1.6s ease;
}

.asmon-gate__dot::after {
	content: "";
	position: absolute;
	inset: max(2px, calc(var(--d) * 0.2));
	background: color-mix(in srgb, var(--gate-dot, #e8c56a) 55%, transparent);
}

/* Formes : losange par défaut, rond, carré, anneau (un rond sans cœur). */
.asmon-gate--dot-circle .asmon-gate__dot,
.asmon-gate--dot-ring .asmon-gate__dot {
	border-radius: 50%;
	transform: none;
}

.asmon-gate--dot-circle .asmon-gate__dot::after {
	border-radius: 50%;
}

.asmon-gate--dot-square .asmon-gate__dot {
	transform: none;
}

.asmon-gate--dot-ring .asmon-gate__dot {
	border-width: max(1.5px, calc(var(--d) * 0.15));
	background: none;
}

.asmon-gate--dot-ring .asmon-gate__dot::after {
	display: none;
}

/* Image importée (--gate-dot-image) : telle quelle, ou teintée de la couleur des points (sa silhouette sert de masque). */
.asmon-gate--dot-image .asmon-gate__dot {
	border: 0;
	transform: none;
	background: var(--gate-dot-image) center / contain no-repeat;
}

.asmon-gate--dot-image .asmon-gate__dot::after {
	display: none;
}

.asmon-gate--dot-image.asmon-gate--dot-tint .asmon-gate__dot {
	background: var(--gate-dot, #e8c56a);
	-webkit-mask: var(--gate-dot-image) center / contain no-repeat;
	mask: var(--gate-dot-image) center / contain no-repeat;
}

/* Une lueur qui suit la silhouette de l'image, pas son cadre carré. */
.asmon-gate--dot-image .asmon-gate__place.is-hovered .asmon-gate__dot {
	box-shadow: none;
	filter: drop-shadow(0 0 5px color-mix(in srgb, var(--gate-dot, #e8c56a) 60%, transparent)) brightness(1.2);
}

/* Sous le pointeur : une lueur discrète (l'arrivée d'un trajet n'a que son anneau). */
.asmon-gate__place.is-hovered .asmon-gate__dot {
	border-color: color-mix(in srgb, var(--gate-dot, #e8c56a) 60%, #fff);
	box-shadow: 0 0 8px color-mix(in srgb, var(--gate-dot, #e8c56a) 35%, transparent);
}

.asmon-gate__name {
	position: absolute;
	left: calc(var(--gate-dot-size, 10px) / 2 + 9px);
	top: -0.75em;
	font-family: "Cinzel", Georgia, serif;
	/* Taille réglée dans l'admin (--gate-name-size), sinon selon l'écran. */
	font-size: var(--gate-name-size, clamp(0.72rem, 1.1vw, 0.95rem));
	letter-spacing: 0.22em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--gate-name-color, #f3e3a4);
	text-shadow: 0 1px 10px #000, 0 0 2px #000;
	opacity: 0;
	transition: opacity 2s cubic-bezier(0.45, 0, 0.55, 1);
}

.asmon-gate__place.is-on .asmon-gate__name,
.asmon-gate__place.is-hovered .asmon-gate__name {
	opacity: 1;
}

.asmon-gate__place.is-hovered .asmon-gate__name {
	transition-duration: 0.3s;
}

/*
 * Survol : le soulignement du logo de l'accueil (asmon-accueil-immersif.css, .asmon-logo-underline),
 * un trait doré qui se déploie depuis le centre ; sans l'éclat final.
 */
.asmon-gate__name::after {
	content: "";
	position: absolute;
	left: 0;
	/* Le dernier espacement de lettres ne fait pas partie du mot. */
	right: 0.22em;
	bottom: -0.35em;
	height: 2px;
	background: linear-gradient(90deg, transparent 0%, #c9a84c 15%, #f3e3a4 50%, #c9a84c 85%, transparent 100%);
	box-shadow: 0 0 14px rgba(201, 168, 76, 0.2);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.5s ease;
}

.asmon-gate__place.is-hovered .asmon-gate__name::after {
	transform: scaleX(1);
	transition: transform 1.85s cubic-bezier(0.12, 1, 0.28, 1);
}

/* Onde à l'arrivée d'un trajet : un seul anneau fin, qui s'élargit et s'éteint ; pas de lueur ni d'éclat. */
.asmon-gate__ring {
	position: absolute;
	left: -75px;
	top: -75px;
	width: 150px;
	height: 150px;
	box-sizing: border-box;
	border: 1px solid color-mix(in srgb, var(--gate-dot, #e8c56a) 70%, #fff);
	border-radius: 50%;
	opacity: 0;
	transform: scale(0.06);
	/* Le premier anneau ne part pas de rien : il est déjà visible au contact du trajet (asmon-gate.js). */
	animation: asmon-gate-ring 3s cubic-bezier(0.2, 0.6, 0.35, 1) forwards;
}

@keyframes asmon-gate-ring {
	0% {
		opacity: 1;
	}

	to {
		opacity: 0;
		transform: scale(1);
	}
}

/* Braises du hero, au-dessus du voile. */
.asmon-gate__embers {
	position: absolute;
	z-index: 5;
	inset: 0;
	overflow: hidden;
}

.asmon-gate__ember {
	position: absolute;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: #c9a84c;
	box-shadow: 0 0 10px rgba(201, 168, 76, 0.65), 0 0 22px rgba(201, 168, 76, 0.25);
	opacity: 0;
	animation: asmon-gate-ember var(--gate-d, 7s) ease-out forwards;
}

.asmon-gate__ember--sm {
	width: 3px;
	height: 3px;
	box-shadow: 0 0 8px rgba(201, 168, 76, 0.5);
}

.asmon-gate__ember--lg {
	width: 6px;
	height: 6px;
	box-shadow: 0 0 14px rgba(201, 168, 76, 0.75), 0 0 32px rgba(201, 168, 76, 0.35);
}

@keyframes asmon-gate-ember {
	0% {
		opacity: 0;
		transform: translate3d(0, 0, 0) scale(0.4);
	}

	12% {
		opacity: 1;
	}

	70% {
		opacity: 0.75;
	}

	100% {
		opacity: 0;
		transform: translate3d(var(--gate-x, 0), -150px, 0) scale(1.1);
	}
}

.asmon-gate svg {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ------------------------------------------------------------------ */
/* Composition                                                        */
/* ------------------------------------------------------------------ */

.asmon-gate__stage {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: calc(var(--wp-admin--admin-bar--height, 0px) + 2.4rem) 16px 1.6rem;
	text-align: center;
	transition: padding-top 0.5s var(--gate-ease);
}

/* Apparition du hero : montée, fondu et défloutage. */
.asmon-gate__rise {
	animation: asmon-gate-rise 1.2s var(--gate-ease) backwards;
}

.asmon-gate__box.asmon-gate__rise {
	animation-delay: 0.5s;
}

.asmon-gate__phrase.asmon-gate__rise {
	animation-delay: 2s;
}

.asmon-gate[data-instant] .asmon-gate__rise {
	animation: none;
}

@keyframes asmon-gate-rise {
	from {
		opacity: 0;
		transform: translateY(24px);
		filter: blur(6px);
	}
}

/* ---------- Logo ---------- */
.asmon-gate__mark {
	position: relative;
	flex: none;
	isolation: isolate;
	/* 100vw - 9rem : sur mobile, le logo reste entre les marges du bouton de menu, sans passer dessous. */
	width: min(34rem, 86vw, 56vh, calc(100vw - 9rem));
}

.asmon-gate__mark img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
	filter: brightness(0) invert(0.94) sepia(0.32) saturate(0.8) hue-rotate(358deg);
	opacity: 0.97;
}

/* Pendant et après la construction, c'est le canevas qui porte le logo ; l'image garde la place. */
.asmon-gate__mark.is-forging img {
	visibility: hidden;
}

.asmon-gate__forge {
	position: absolute;
	z-index: 1;
	pointer-events: none;
}

.asmon-gate__forge--base {
	filter: brightness(0) invert(0.94) sepia(0.32) saturate(0.8) hue-rotate(358deg);
	opacity: 0.97;
}

.asmon-gate__forge--fx {
	z-index: 2;
}

.asmon-gate__wordmark {
	position: relative;
	display: block;
	font-family: "Cinzel", Georgia, serif;
	font-size: clamp(2.5rem, 8vw, 4.5rem);
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.1;
	color: #e8dec8;
}

/*
 * Halo de l'accueil, qui s'embrase quand le logo est complet, puis se pose et respire.
 * Centré sur le centre visuel des lettres (≈ 49 % de la hauteur de l'image, mesuré sur le logo).
 */
.asmon-gate__halo {
	position: absolute;
	z-index: -1;
	left: 50%;
	top: var(--gate-logo-y, 49%);
	width: 160%;
	height: 300%;
	border-radius: 50%;
	pointer-events: none;
	background: radial-gradient(ellipse at center, rgba(255, 236, 200, 0.3), rgba(255, 210, 140, 0.15) 26%, rgba(201, 168, 76, 0.07) 46%, transparent 72%);
	filter: blur(28px);
	transform: translate(-50%, -50%);
	opacity: 0;
	transition: opacity 0.9s ease;
}

.asmon-gate__mark.is-built .asmon-gate__halo {
	opacity: 0.8;
}

.asmon-gate__mark.is-burst .asmon-gate__halo {
	animation: asmon-gate-burst 1.4s cubic-bezier(0.2, 0.8, 0.3, 1) forwards, asmon-gate-glow 6.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) 1.4s infinite alternate;
}

@keyframes asmon-gate-burst {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.55);
	}

	30% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.18);
	}

	100% {
		opacity: 0.8;
		transform: translate(-50%, -50%) scale(1);
	}
}

@keyframes asmon-gate-glow {
	from {
		opacity: 0.8;
	}

	to {
		opacity: 0.55;
	}
}

/* Le logo réagit au survol, comme celui de l'accueil : le halo s'intensifie. */
.asmon-gate__mark:hover .asmon-gate__halo {
	animation: none;
	opacity: 1;
	transform: translate(-50%, -50%) scale(1.12);
	transition: opacity 0.6s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* Rayons doux : fins, flous, à mi-intensité. */
.asmon-gate__rays {
	position: absolute;
	z-index: -1;
	left: 50%;
	top: var(--gate-logo-y, 49%);
	width: min(170%, 96vw);
	aspect-ratio: 2;
	transform: translate(-50%, -50%) scale(0.85);
	pointer-events: none;
	opacity: 0;
	transition: opacity 1.2s ease, transform 1.4s var(--gate-ease);
}

.asmon-gate__rays::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-conic-gradient(from 3deg at 50% 50%, rgba(255, 226, 160, 0.15) 0deg 1.4deg, transparent 1.4deg 7deg, rgba(255, 226, 160, 0.06) 7deg 8.4deg, transparent 8.4deg 13deg);
	-webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, transparent 16%, #000 30%, rgba(0, 0, 0, 0.35) 56%, transparent 82%);
	mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, transparent 16%, #000 30%, rgba(0, 0, 0, 0.35) 56%, transparent 82%);
	filter: blur(1.4px);
}

.asmon-gate__mark.is-building .asmon-gate__rays {
	opacity: 0.35;
}

.asmon-gate__mark.is-built .asmon-gate__rays {
	opacity: 0.6;
	transform: translate(-50%, -50%) scale(1);
}

/* ---------- Phrase ---------- */
.asmon-gate__phrase {
	position: relative;
	min-height: 1.5em;
	max-width: 36rem;
	margin: clamp(0.4rem, 1.4vh, 0.9rem) 0 clamp(0.8rem, 2.4vh, 1.4rem);
	font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
	/* Taille et couleur réglables (Phrases sous le logo) : --gate-phrase-size / --gate-phrase-color, posées par le modèle. */
	font-size: var(--gate-phrase-size, clamp(1.05rem, 2.4vh, 1.25rem));
	font-style: italic;
	line-height: 1.4;
	color: var(--gate-phrase-color, #9a8a6e);
	text-shadow: 0 1px 8px #000;
	transition: opacity 0.52s ease, filter 0.52s ease;
}

.asmon-gate__phrase.is-fading {
	opacity: 0;
	filter: blur(5px);
}

/* ---------- Trait d'Asmon Studio : deux lames fines et le dé ---------- */
.asmon-gate__orn {
	display: block;
	flex: none;
	width: min(31rem, 80vw);
	height: clamp(1.15rem, 2.5vh, 1.55rem);
	margin-top: clamp(0.9rem, 2.6vh, 1.5rem);
	pointer-events: none;
	opacity: 0.8;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 60'%3E%3Cg fill='%23c9a84c'%3E%3Cpath d='M0 30 L610 29.4 L616 28.8 L626 30 L616 31.2 L610 30.6 Z'/%3E%3Cpath d='M1400 30 L790 29.4 L784 28.8 L774 30 L784 31.2 L790 30.6 Z'/%3E%3C/g%3E%3Cg fill='none' stroke='%23c9a84c' stroke-linejoin='round'%3E%3Cpath stroke-width='2' d='M700 12 L715.6 21 L715.6 39 L700 48 L684.4 39 L684.4 21 Z'/%3E%3Cpath stroke-width='1.4' d='M700 30 L684.4 21 M700 30 L715.6 21 M700 30 L700 48'/%3E%3C/g%3E%3Cpath fill='%23f3e3a4' d='M700 23.5 L701.3 28.7 L706.5 30 L701.3 31.3 L700 36.5 L698.7 31.3 L693.5 30 L698.7 28.7 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------ */
/* Cadre : le contour des lightbox du site                            */
/* ------------------------------------------------------------------ */

.asmon-gate__box {
	position: relative;
	flex: none;
	box-sizing: border-box;
	width: min(22rem, 100%);
	padding: 0.95rem 1.05rem;
	text-align: left;
	background: rgba(9, 7, 4, 0.9);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/*
 * Bord doré de 3 px et halo qui respirent (2,8 s), comme les lightbox.
 * Les ombres sont dessinées une fois : ::before porte l'état calme, ::after le surplus de lumière du pic,
 * dont seule l'opacité varie (animation composée par la carte graphique, sans repeint).
 */
.asmon-gate__box::before,
.asmon-gate__box::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}

.asmon-gate__box::before {
	box-shadow:
		inset 0 0 0 3px rgba(201, 168, 76, 0.36),
		0 0 12px 2px rgba(201, 168, 76, 0.1),
		0 0 20px rgba(201, 168, 76, 0.32),
		0 0 40px rgba(201, 168, 76, 0.16),
		0 0 64px rgba(90, 74, 36, 0.1);
}

/* Ajouté par-dessus l'état calme, il en fait le pic des lightbox (bord à ~0,58, halo plus large). */
.asmon-gate__box::after {
	box-shadow:
		inset 0 0 0 3px rgba(201, 168, 76, 0.35),
		0 0 20px 3px rgba(201, 168, 76, 0.12),
		0 0 28px rgba(201, 168, 76, 0.24),
		0 0 52px rgba(201, 168, 76, 0.14),
		0 0 80px rgba(120, 98, 48, 0.06);
	opacity: 0;
	animation: asmon-gate-breathe 2.8s ease-in-out infinite;
}

@keyframes asmon-gate-breathe {
	50% {
		opacity: 1;
	}
}

/* Reflet « chrome » : la classe commune asmon-chrome-flare (asmon-templates/assets/asmon-chrome.css). */
.asmon-gate__flare {
	--asmon-chrome-border: 3px;
}

.asmon-gate__busy {
	position: absolute;
	z-index: 5;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(14, 11, 8, 0.86);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
}

.asmon-gate__box.is-busy .asmon-gate__busy {
	opacity: 1;
	visibility: visible;
}

/* Le spinner caché ne tourne pas pour rien. */
.asmon-gate__box:not(.is-busy) .asmon-spinner {
	animation-play-state: paused;
}

.asmon-gate__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.asmon-gate__notice {
	margin-bottom: 0.6rem;
}

.asmon-gate .asmon-login__notice {
	text-align: center;
}

.asmon-gate__form,
.asmon-gate__welcome {
	display: grid;
	gap: 0.7rem;
}

.asmon-gate__form[hidden],
.asmon-gate__welcome[hidden] {
	display: none;
}

/* Champs et bouton aux mesures de la maquette 131 (le formulaire du site, un peu resserré). */
.asmon-gate .asmon-login__label {
	margin-bottom: 0.3rem;
	font-size: 0.72rem;
}

.asmon-gate .asmon-login__field input {
	min-height: 2.6rem;
	padding: 0.55rem 0.8rem;
	background-color: rgba(22, 18, 13, 0.92) !important;
	border-color: rgba(201, 168, 76, 0.3) !important;
}

.asmon-gate .asmon-login__field input:focus {
	border-color: #c9a84c !important;
}

.asmon-gate .asmon-login__secret input {
	padding-right: 2.6rem;
}

.asmon-gate .asmon-login__eye {
	width: 2.6rem;
}

.asmon-gate .asmon-login__eye::before {
	width: 1.2rem;
	height: 1.2rem;
}

.asmon-gate .asmon-login__eye[aria-pressed="true"] {
	color: #f3e3a4 !important;
}

.asmon-gate .asmon-login__go:not(.asmon-gate__door) {
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.6rem 1.2rem;
	font-size: 0.78rem;
	box-shadow: 0 0 16px rgba(201, 168, 76, 0.4), inset 0 1px 0 rgba(255, 248, 228, 0.5);
}

.asmon-gate .asmon-login__go:not(.asmon-gate__door):hover,
.asmon-gate .asmon-login__go:not(.asmon-gate__door):focus-visible {
	box-shadow: 0 0 24px rgba(232, 208, 122, 0.6), inset 0 1px 0 rgba(255, 248, 228, 0.6);
}

.asmon-gate__lead {
	margin: 0;
	font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
	font-size: 1.0625rem;
	line-height: 1.3;
	text-align: center;
	color: #d6cab1;
}

/* « Rester connecté » à gauche, « Mot de passe oublié ? » à droite, sous les champs. */
.asmon-gate__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.3rem 0.8rem;
}

.asmon-gate__forgot {
	font-size: 0.94rem;
}

.asmon-gate__code[hidden] {
	display: none;
}

.asmon-gate__code input {
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.3em;
	text-align: center;
}

.asmon-gate__remember {
	display: inline-flex;
	justify-self: start;
	align-items: center;
	gap: 0.45rem;
	font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
	font-size: 0.975rem;
	color: #b9ab8d;
	cursor: pointer;
}

.asmon-gate__remember input {
	width: 1rem;
	height: 1rem;
	margin: 0;
	accent-color: #c9a84c;
}

.asmon-gate__remember input:focus-visible {
	outline: 2px solid #f3e3a4;
	outline-offset: 2px;
}

/* Autres actions en tuiles, comme sur l'écran vitrail. */
.asmon-gate__tiles {
	display: flex;
	gap: 0.4rem;
	padding-top: 0.2rem;
}

.asmon-gate__tile svg {
	width: 1.1rem;
	height: 1.1rem;
}

.asmon-gate__tile {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.3rem;
	min-width: 0;
	padding: 0.5rem 0.25rem 0.45rem;
	font-family: "Cinzel", Georgia, serif;
	font-size: 0.68rem;
	line-height: 1.25;
	letter-spacing: 0.06em;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	color: #c9b57f;
	background: rgba(22, 18, 13, 0.7);
	border: 1px solid rgba(201, 168, 76, 0.22);
	border-radius: 2px;
	transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.asmon-gate__tile svg {
	color: #c9a84c;
}

.asmon-gate__tile:hover,
.asmon-gate__tile:focus-visible {
	color: #f3e3a4;
	background: #241a0e;
	border-color: rgba(232, 197, 106, 0.6);
}

.asmon-gate__tile:hover svg,
.asmon-gate__tile:focus-visible svg {
	color: #f3e3a4;
}

.asmon-gate__aside {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.2rem 1rem;
}

.asmon-gate__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
	font-size: 0.975rem;
	color: #d9bb62;
	text-decoration: none;
}

.asmon-gate__link:hover,
.asmon-gate__link:focus-visible {
	color: #f3e3a4;
	text-decoration: underline;
}

.asmon-gate__center {
	justify-self: center;
}

.asmon-gate__welcome h2 {
	margin: 0;
	font-family: "Cinzel", Georgia, serif;
	font-size: 1.45rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-align: center;
	color: #f3e3a4;
	overflow-wrap: anywhere;
}

.asmon-gate__rule {
	display: block;
	width: 72%;
	height: 2px;
	margin: 0 auto 0.2rem;
	background: linear-gradient(90deg, transparent, #c9a84c 15%, #fff6d8 50%, #c9a84c 85%, transparent);
	transform: scaleX(0);
	animation: asmon-gate-draw 1.2s var(--gate-ease) 0.1s forwards;
}

@keyframes asmon-gate-draw {
	to {
		transform: scaleX(1);
	}
}

.asmon-gate__door {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 2.6rem;
	box-sizing: border-box;
	padding: 0.5rem 0.9rem;
	font-family: "Cinzel", Georgia, serif;
	font-size: 0.74rem;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: #f3e3a4;
	background: rgba(22, 18, 13, 0.9);
	border: 1px solid rgba(201, 168, 76, 0.4);
	border-radius: 2px;
	text-decoration: none;
	transition: background 0.2s ease;
}

.asmon-gate__door:not(.asmon-login__go):hover,
.asmon-gate__door:not(.asmon-login__go):focus-visible {
	background: #2a1f11;
}

.asmon-gate__door.asmon-login__go {
	font-weight: 600;
	color: #1a140c !important;
	background: linear-gradient(180deg, #e8d07a 0%, #c9a84c 48%, #b08e3a 100%);
	border-color: #e6cc78;
}

.asmon-gate__door svg,
.asmon-gate__door span:last-child {
	position: relative;
	z-index: 2;
}

.asmon-gate__form.is-new {
	animation: asmon-gate-rise 0.7s var(--gate-ease) both;
}

/* Écran « Bonjour » : chaque élément monte à son tour, comme dans la maquette. */
.asmon-gate__welcome.is-new > * {
	animation: asmon-gate-rise 0.9s var(--gate-ease) backwards;
}

.asmon-gate__welcome.is-new > .asmon-gate__rule {
	animation: asmon-gate-draw 1.2s var(--gate-ease) 0.1s forwards;
}

/* ------------------------------------------------------------------ */
/* Option « connexion sur le côté »                                    */
/* Colonne noire à gauche (logo, phrase, cadre, pied de page),         */
/* halo respirant à la jointure, d'où montent les braises ;            */
/* la carte est centrée dans le reste de l'écran (asmon-gate.js).      */
/* Sous 900 px de large : disposition centrée habituelle.              */
/* ------------------------------------------------------------------ */

.asmon-gate__seam,
.asmon-gate__panel {
	display: none;
}

@media (min-width: 900px) {
	/* Sur body : le pied de page, hors du portail, en a besoin aussi. */
	body:has(.asmon-gate--side) {
		--gate-side: clamp(23rem, 31vw, 30rem);
		--gate-panel: linear-gradient(90deg, #030202, #060403 70%, #0a0705);
	}

	/* Dégradés haut et bas : seulement sur la carte. */
	.asmon-gate--side::before,
	.asmon-gate--side::after {
		left: var(--gate-side);
	}

	/* Voile de lisibilité inutile au centre (plus rien n'est posé sur la carte) ; on assombrit le bord droit et la jointure. */
	.asmon-gate--side .asmon-gate__scene::after {
		background:
			linear-gradient(90deg, rgba(8, 6, 4, 0.75) var(--gate-side), rgba(8, 6, 4, 0.3) calc(var(--gate-side) + 6%), transparent calc(var(--gate-side) + 16%), transparent 84%, rgba(8, 6, 4, 0.35) 93%, rgba(8, 6, 4, 0.7));
	}

	.asmon-gate--side .asmon-gate__stage {
		flex: 1 0 auto;
		align-self: flex-start;
		width: var(--gate-side);
		padding: calc(var(--wp-admin--admin-bar--height, 0px) + 2rem) clamp(1.5rem, 2.6vw, 2.5rem) 1.25rem;
		overflow-x: clip;
	}

	/*
	 * Fond de la colonne : un calque fixe, sous le contenu et sous le séparateur.
	 * Le pied de page, transparent, se pose dessus sans couper le trait ni son halo.
	 */
	.asmon-gate--side .asmon-gate__panel {
		position: fixed;
		z-index: 0;
		top: 0;
		bottom: 0;
		left: 0;
		display: block;
		width: var(--gate-side);
		background: var(--gate-panel);
		pointer-events: none;
	}

	.asmon-gate--side .asmon-gate__mark {
		width: min(100%, 24rem, 40vh);
	}

	.asmon-gate--side .asmon-gate__rays {
		width: 150%;
	}

	.asmon-gate--side .asmon-gate__phrase {
		max-width: 100%;
	}

	.asmon-gate--side .asmon-gate__orn {
		width: 100%;
	}

	/* Le pied de page du site, dans la colonne, sur son noir (transparent : le séparateur passe à côté, intact). */
	body:has(.asmon-gate--side) #footer {
		box-sizing: border-box;
		width: calc(var(--gate-side) - 12px);
		padding-left: 1rem;
		padding-right: 1rem;
		text-shadow: none;
	}

	body:has(.asmon-gate--side) #footer .ct-footer-copyright {
		font-size: 0.72rem;
	}

	/* ---------- Jointure : un trait d'or qui bat, un halo qui respire ---------- */
	.asmon-gate--side .asmon-gate__seam {
		position: fixed;
		z-index: 2;
		top: 0;
		bottom: 0;
		left: var(--gate-side);
		display: block;
		width: 0;
		pointer-events: none;
		animation: asmon-gate-seam-in 1.8s var(--gate-ease) 0.2s backwards;
	}

	@keyframes asmon-gate-seam-in {
		from {
			opacity: 0;
			transform: scaleY(0);
		}
	}

	/* Fondu en haut et en bas : le trait naît du noir et s'y perd. */
	.asmon-gate__seam-glow,
	.asmon-gate__seam-line {
		position: absolute;
		top: 0;
		bottom: 0;
		-webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
		mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
	}

	/*
	 * Respiration, d'un seul côté : le halo part du trait et s'étend vers la carte, jamais sur la colonne.
	 * Il s'allonge et s'avive (origine sur le trait), puis se rétracte presque entièrement ; pas de flou qui déborderait à gauche.
	 */
	.asmon-gate__seam-glow {
		left: 1px;
		width: 140px;
		background: linear-gradient(90deg, rgba(255, 232, 180, 0.2), rgba(232, 197, 106, 0.1) 18%, rgba(201, 168, 76, 0.035) 50%, transparent);
		transform: scaleX(0.35);
		transform-origin: left center;
		opacity: 0.3;
		animation: asmon-gate-seam-breathe 5.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
	}

	@keyframes asmon-gate-seam-breathe {
		to {
			transform: scaleX(1);
			opacity: 1;
		}
	}

	/* Pulsation : un double battement, au rythme du cadre (2,8 s). */
	.asmon-gate__seam-line {
		left: -1px;
		width: 2px;
		background: linear-gradient(transparent, #b08e3a 10%, #e8c56a 35%, #fff3cc 50%, #e8c56a 65%, #b08e3a 90%, transparent);
		/* Lueur décalée vers la droite seulement (ombres déplacées et rétrécies d'autant). */
		box-shadow: 3px 0 5px -2px rgba(232, 197, 106, 0.45), 8px 0 12px -6px rgba(201, 168, 76, 0.25);
		opacity: 0.6;
		animation: asmon-gate-seam-pulse 2.8s ease-in-out infinite;
	}

	@keyframes asmon-gate-seam-pulse {
		0%,
		60%,
		100% {
			opacity: 0.6;
		}

		12% {
			opacity: 1;
		}

		22% {
			opacity: 0.7;
		}

		32% {
			opacity: 0.95;
		}
	}

	/* Braises qui naissent sur la jointure (ajoutées par asmon-gate.js) : rares, petites, côté carte. */
	.asmon-gate__seam .asmon-gate__embers {
		inset: 0 auto 0 -60px;
		width: 240px;
		overflow: visible;
	}

	.asmon-gate__ember--seam {
		box-shadow: 0 0 6px rgba(201, 168, 76, 0.5);
		filter: opacity(0.75);
	}
}

/* Écrans bas (sous 640 px) : la phrase disparaît et le logo rétrécit. Un portable 1366 × 768 garde sa phrase. */
@media (max-height: 40rem) {
	.asmon-gate__phrase {
		display: none;
	}

	.asmon-gate__mark {
		width: min(22rem, 70vw, 40vh, calc(100vw - 9rem));
	}
}

@media (prefers-reduced-motion: reduce) {
	.asmon-gate *,
	.asmon-gate *::before,
	.asmon-gate *::after {
		animation-duration: 0.01s !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01s !important;
	}
}
