/* Mise en scène : états utilisés par assets/js/animations.js (inactifs sans JavaScript). */

/* Mots découpés pour les révélations de titres : chaque mot glisse derrière un masque.
   Marges négatives : le masque déborde assez pour ne rogner ni accents, ni jambages, ni italiques. */
.split-w {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding: 0.14em 0.06em 0.2em 0;
	margin: -0.14em -0.06em -0.2em 0;
}
.split-w__i { display: inline-block; will-change: transform; }

/* Intro du premier écran : CSS seul, pour démarrer dès le premier rendu sans attendre les scripts.
   Remplissage « backwards » : l'état final reste celui de la maquette. */
.motion-ok { --t0: 0s; }

.motion-ok h1 .split-w__i { animation: sj-word 1.5s calc(var(--t0) + 0.1s + var(--i) * 0.06s) var(--ease-out) backwards; }

.motion-ok :is(.home-hero__kicker, .exp-hero__kicker, .exp-hero__lead, .not-hero__role, .not-hero__lead, .lnk-head > p, .tar-head > p, .news-head > :not(h1), .rdv-top__intro > :not(h1)) {
	animation: sj-rise 1.2s calc(var(--t0) + 0.45s) var(--ease-out) backwards;
}
.motion-ok :is(.exp-hero__lead, .not-hero__lead) { animation-delay: calc(var(--t0) + 0.55s); }

/* Photos : un volet couleur de fond se retire (l'image est peinte dès le départ, sans retarder le LCP). */
.not-hero__photo { position: relative; }
.exp-hero__letter { z-index: 6; }
.motion-ok :is(.exp-hero__banner, .not-hero__photo, .article__hero)::after {
	content: "";
	position: absolute;
	inset: -1px;
	z-index: 5;
	background: var(--color-bg);
	transform-origin: top;
	pointer-events: none;
	animation: sj-uncover 1.6s var(--t0) var(--ease-io) both;
}
.motion-ok .rdv-top__tool { animation: sj-rise 1.2s calc(var(--t0) + 0.3s) var(--ease-out) backwards; }
.motion-ok .not-hero__seal { animation: sj-circle 1.2s calc(var(--t0) + 0.9s) var(--ease-out) backwards; }
.motion-ok .not-hero__seal img { animation: sj-spin-in 1.6s calc(var(--t0) + 0.9s) var(--ease-out) backwards; }
.motion-ok :is(.home-hero__actions > *, .not-hero__linkedin, .not-hero__rdv, .not-hero__actions > *) {
	animation: sj-rise 1.1s calc(var(--t0) + 0.9s) var(--ease-out) backwards;
}
.motion-ok :is(.home-hero__rdv, .not-hero__rdv) { animation-delay: calc(var(--t0) + 1s); }

@keyframes sj-word { from { transform: translateY(115%) rotate(4deg); } }
@keyframes sj-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes sj-uncover { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes sj-circle { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(50% at 50% 50%); } }
@keyframes sj-spin-in { from { transform: rotate(-120deg) scale(0.6); } }

.site-header {
	position: sticky;
	top: 0;
	transition: box-shadow 0.4s ease;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 rgba(31, 78, 17, 0.12); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Pastille des expertises : apparition sans masque (l'étoile déborde du cercle). */
.exp-badge__text,
.exp-badge__star { scale: var(--pop, 1); }

/* Survols des cartes : la flèche avance. */
.expertise__link::before { transition: translate 0.4s var(--ease-out); }
.expertise:hover .expertise__link::before { translate: 4px 0; }
.lnk-card { transition: background-color 0.4s ease; }
.lnk-card__icon { transition: transform 0.4s var(--ease-out); }
a.lnk-card:hover .lnk-card__icon { transform: translate(3px, -3px); }

@media (prefers-reduced-motion: reduce) {
	.site-header { transition: none; }
}
