/* Accueil : une seule séquence d'ouverture, sans changer la mise en page. */
@media screen {
	/* Le visuel reste continu derrière le logo et les commandes de navigation. */
	body.isFrontPage #header.hm-site-header .hm-header-bar {
		background: transparent;
		border-color: transparent;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}

	body.isFrontPage #header.hm-site-header--hero .hm-home-hero__veil::before {
		display: none;
	}

	body.isFrontPage #header #trigger-menu-mobile.hm-menu-trigger,
	body.isFrontPage #header #trigger-menu-mobile.hm-menu-trigger:hover,
	body.isFrontPage #header #trigger-menu-mobile.hm-menu-trigger:focus-visible,
	body.isFrontPage #header .hm-header-tools .language-switcher a,
	body.isFrontPage #header #search-trigger.hm-search-trigger {
		background: transparent;
		border-color: transparent;
		box-shadow: none;
		color: var(--hm-background);
	}

	body.isFrontPage #header #trigger-menu-mobile.hm-menu-trigger:focus-visible,
	body.isFrontPage #header #search-trigger.hm-search-trigger:focus-visible,
	body.isFrontPage #header .hm-header-tools .language-switcher a:focus-visible {
		outline: 2px solid currentColor;
		outline-offset: 3px;
	}
}

@media screen and (prefers-reduced-motion: no-preference) {
	/* Le logo garde ses keyframes : seul son départ suit la fin du rideau. */
	body.isFrontPage #header.hm-site-header .hm-header-logo img {
		animation-delay: 1640ms;
	}
	body.isFrontPage #header.hm-site-header .hm-header-logo::after {
		animation-delay: 1720ms;
	}

	/* Un rideau translucide laisse le visuel apparaître dès la première image. */
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero::before {
		position: absolute;
		inset: 0;
		grid-area: 1 / 1 / 2 / 2;
		z-index: 0;
		background: var(--hm-primary);
		content: "";
		opacity: 0;
		pointer-events: none;
		animation: hm-home-open-stage 1500ms cubic-bezier(.76, 0, .24, 1) 100ms backwards;
	}

	body.isFrontPage:not(.hm-home-intro-complete) #header.hm-site-header--hero .hm-home-hero__inner {
		z-index: 2;
	}

	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__media > img,
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__media > video {
		animation: hm-home-open-camera 2000ms cubic-bezier(.16, 1, .3, 1) 100ms backwards;
	}

	/* Les deux lignes arrivent séparément ; les mots tournants restent intacts. */
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__city {
		animation: hm-home-open-line 1100ms cubic-bezier(.16, 1, .3, 1) 580ms backwards;
	}

	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__phrase {
		animation: hm-home-open-line 1100ms cubic-bezier(.16, 1, .3, 1) 820ms backwards;
	}

	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero h1 {
		animation: hm-home-open-detail 750ms cubic-bezier(.16, 1, .3, 1) 1150ms backwards;
	}

	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__anniversary {
		animation: hm-home-open-detail 750ms cubic-bezier(.16, 1, .3, 1) 1280ms backwards;
	}

	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action {
		animation: hm-home-open-action 850ms cubic-bezier(.16, 1, .3, 1) 1350ms backwards;
	}
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action:nth-child(2) { animation-delay: 1470ms; }
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action:nth-child(3) { animation-delay: 1590ms; }
	body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action:nth-child(n + 4) { animation-delay: 1710ms; }

	@keyframes hm-home-open-stage {
		0% {
			opacity: .45;
			clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0, 50% 100%, 50% 100%, 50% 0, 50% 0, 0 0);
		}
		32% { opacity: .3; }
		100% {
			opacity: 0;
			clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, 0 0, 0 100%, 100% 100%, 100% 0, 0 0, 0 0);
		}
	}

	/* L'échelle individuelle conserve le cadrage d'origine à la fin. */
	@keyframes hm-home-open-camera {
		from { scale: 1.24; }
		to { scale: 1; }
	}

	@keyframes hm-home-open-line {
		from { clip-path: inset(0 0 100%); translate: 0 95%; }
		to { clip-path: inset(0 0 0); translate: 0 0; }
	}

	@keyframes hm-home-open-detail {
		from { opacity: 0; translate: 0 24px; }
		to { opacity: 1; translate: 0 0; }
	}

	@keyframes hm-home-open-action {
		from { opacity: 0; translate: 0 54px; }
		to { opacity: 1; translate: 0 0; }
	}

	@media (max-width: 760px) {
		body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action:nth-child(3) { animation-delay: 1470ms; }
		body.isFrontPage:not(.hm-home-intro-complete) .hm-home-hero__action:nth-child(n + 4) { animation-delay: 1590ms; }
	}
}
