/**
 * INFOMARTIX — Mascotte 04E en calques (inc/mascotte.php, assets/js/mascotte.js).
 * État par défaut = état final (visage, lumières, écrans). Animation : transform et opacity,
 * une seule lecture de 5 s au plus (lecture, délai et éléments synchronisés compris) sous .is-playing,
 * uniquement si prefers-reduced-motion: no-preference, puis image fixe (WCAG 2.2.2, décision client du
 * 15 nov. 2026 : plus de respiration). Ni bouton ni légende.
 * Courbes reprises des animation.js livrés ; amplitudes dans les limites de chaque pivots.json.
 * Translations exprimées en % de la toile (px / 1254).
 */

.imx-masc {
	margin: 0;
	display: grid;
	justify-items: center;
}

.imx-masc__stage {
	position: relative;
	width: 100%;
	max-width: 380px;
}

/* Ombre au sol discrète (palette du site). */
.imx-masc__stage::before {
	content: "";
	position: absolute;
	left: 14%;
	right: 14%;
	bottom: 2.5%;
	height: 7%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(6, 26, 54, 0.18), rgba(6, 26, 54, 0));
}

.imx-v3-section--dark .imx-masc__stage::before,
.imx-masc-dark .imx-masc__stage::before {
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
}

.imx-masc__rig {
	position: relative;
	aspect-ratio: 1;
	isolation: isolate;
}

.imx-masc__group,
.imx-masc__layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	user-select: none;
}

.imx-masc__layer {
	display: block;
	max-width: none;
	object-fit: contain;
}

.imx-masc__svg {
	overflow: visible;
}

.imx-masc__svg g,
.imx-masc__svg path {
	transform-box: view-box;
}

.imx-masc__eyes {
	transform-origin: 49.203% 17.544%;
}

/* ---------- Introduction de section : le robot se tient debout sur le bloc qui suit ----------
   Il n'ajoute aucune hauteur : sur ordinateur il est placé en absolu à droite du texte, les pieds
   sur le bord haut du bloc suivant, ou sur le fond de la boîte s'il n'y a rien après
   (--imx-masc-floor, mesuré par mascotte.js ; repli = marge) ; sa taille suit la hauteur du texte
   (--imx-masc-size, entre --imx-masc-min et --imx-masc-max). Sur téléphone, petit (--imx-masc-mw),
   en bas à droite, habillé par le dernier paragraphe.
   Variantes : --box (dans un encadré), --duo (deux robots, À propos).
   Le bas de la toile est vide sur 6,86 % (sous les pieds) : voir --imx-masc-lift ci-dessous. */
.imx-masc-intro {
	--imx-masc-min: 210px;
	--imx-masc-max: 300px;
	--imx-masc-span: 1;
	--imx-masc-gutter: 3rem;
	--imx-masc-mw: clamp(108px, 31vw, 136px);
	position: relative;
	margin-bottom: 2rem;
}

.imx-masc-intro--box {
	--imx-masc-min: 150px;
	--imx-masc-max: 210px;
	--imx-masc-gutter: 2rem;
	--imx-masc-mw: clamp(96px, 27vw, 120px);
}

.imx-masc-intro--duo {
	--imx-masc-max: 240px;
	--imx-masc-span: 1.56;
	--imx-masc-mw: clamp(84px, 23vw, 104px);
}

.imx-masc-intro--box {
	margin-bottom: 0 !important;
}

/* Posé au-dessus, jamais dessus : les pieds (6,86 % de toile vide dessous, identique sur les 10 poses)
   s'arrêtent --imx-masc-lift au-dessus du bord du bloc ; une ombre de contact, comprise entre les pieds et ce
   bord, donne l'impression que le robot se tient sur l'élément sans le recouvrir. */
.imx-masc-intro {
	--imx-masc-lift: 10px;
	--imx-masc-shadow: rgba(6, 26, 54, 0.3);
}

.imx-masc-intro .imx-masc__stage {
	max-width: none;
	transform: translateY(calc(6.86% - var(--imx-masc-lift)));
}

.imx-masc-intro .imx-masc__stage::before {
	content: none;
}

.imx-masc-intro .imx-masc::before {
	content: "";
	position: absolute;
	left: 22%;
	right: 22%;
	bottom: 0;
	height: calc(var(--imx-masc-lift) * 1.8);
	border-radius: 50%;
	background: radial-gradient(closest-side, var(--imx-masc-shadow), transparent);
	pointer-events: none;
}

.imx-masc-duo > .imx-masc {
	position: relative;
}

/* Fonds sombres : ombre plus dense. */
.imx-v3-section--dark .imx-masc-intro,
.imx-masc-dark .imx-masc-intro,
.imx-p-rep-mat .imx-masc-intro,
.imx-mt-atelier .imx-masc-intro {
	--imx-masc-shadow: rgba(0, 0, 0, 0.6);
}

@media (max-width: 959px) {
	.imx-masc-intro {
		--imx-masc-lift: 6px;
	}
}

.imx-masc-intro > .imx-masc,
.imx-masc-intro > .imx-masc-duo {
	position: relative;
	z-index: 1;
}

/* Duo : deux robots qui se chevauchent légèrement (chacun 78 % de la taille). */
.imx-masc-duo {
	display: flex;
	align-items: flex-end;
}

.imx-masc-duo > .imx-masc {
	width: 50%;
}

/* Téléphone : flottant vide sur toute la hauteur du dernier paragraphe, dont seule la partie basse
   repousse le texte (shape-outside). --imx-masc-ph et --imx-masc-hole mesurés par mascotte.js ;
   sans JS, pas d'habillage et robot en bas à droite. */
@media (max-width: 959px) {
	.imx-masc-intro {
		margin-bottom: 1.75rem;
	}

	.imx-masc-intro__text > :last-child {
		margin-bottom: 0;
		min-height: max(var(--imx-masc-hole, 0px), var(--imx-masc-ph, 0px));
	}

	.imx-masc-intro__text > :last-child::before {
		content: "";
		float: right;
		width: calc(var(--imx-masc-mw) * var(--imx-masc-span) * 1.28 + 0.5rem);
		height: var(--imx-masc-ph, 0px);
		shape-outside: inset(calc(100% - var(--imx-masc-hole, 0px)) 0 0 0);
	}

	.imx-masc-intro > .imx-masc,
	.imx-masc-intro > .imx-masc-duo {
		position: absolute;
		right: 0;
		bottom: calc(-1 * var(--imx-masc-floor, 1.75rem));
		width: calc(var(--imx-masc-mw) * var(--imx-masc-span) * 1.28);
	}

	.imx-masc-intro:not(.imx-masc-intro--duo) > .imx-masc {
		width: var(--imx-masc-mw);
	}

	.imx-masc-intro:not(.imx-masc-intro--duo) .imx-masc-intro__text > :last-child::before {
		width: calc(var(--imx-masc-mw) + 0.5rem);
	}
}

@media (min-width: 960px) {
	.imx-masc-intro {
		margin-bottom: 2.25rem;
	}

	.imx-masc-intro__text {
		max-width: calc(100% - var(--imx-masc-max) * var(--imx-masc-span) - var(--imx-masc-gutter));
	}

	.imx-masc-intro__text > :last-child {
		margin-bottom: 0;
	}

	.imx-masc-intro > .imx-masc,
	.imx-masc-intro > .imx-masc-duo {
		position: absolute;
		right: 0;
		bottom: calc(-1 * var(--imx-masc-floor, 2.25rem));
		width: calc(var(--imx-masc-size, 280px) * var(--imx-masc-span));
	}
}

/* --wrap (encadré étroit, Montage « Avant la remise ») : même habillage que sur téléphone à toutes les
   largeurs, robot petit (--imx-masc-mw). */
.imx-masc-intro--wrap {
	--imx-masc-mw: clamp(96px, 26vw, 128px);
}

@media (min-width: 960px) {
	.imx-masc-intro--wrap .imx-masc-intro__text {
		max-width: none;
	}

	.imx-masc-intro--wrap .imx-masc-intro__text > :last-child {
		min-height: max(var(--imx-masc-hole, 0px), var(--imx-masc-ph, 0px));
	}

	.imx-masc-intro--wrap .imx-masc-intro__text > :last-child::before {
		content: "";
		float: right;
		width: calc(var(--imx-masc-mw) + 0.5rem);
		height: var(--imx-masc-ph, 0px);
		shape-outside: inset(calc(100% - var(--imx-masc-hole, 0px)) 0 0 0);
	}

	.imx-masc-intro--wrap > .imx-masc {
		width: var(--imx-masc-mw);
	}
}

/* --stack (posé par mascotte.js) : colonne de texte trop étroite pour l'habiller (petit écran, texte
   agrandi) ; le robot passe sous le paragraphe, aligné à droite, et ne recouvre jamais le texte. */
.imx-masc-intro.imx-masc-intro--stack .imx-masc-intro__text > :last-child {
	min-height: 0;
}

.imx-masc-intro.imx-masc-intro--stack .imx-masc-intro__text > :last-child::before {
	content: none;
}

.imx-masc-intro.imx-masc-intro--stack > .imx-masc,
.imx-masc-intro.imx-masc-intro--stack > .imx-masc-duo {
	position: relative;
	bottom: auto;
	right: auto;
	display: block;
	margin: 0.75rem 0 calc(-1 * var(--imx-masc-floor, 1.75rem)) auto;
}

/* Duo sous le texte (téléphone) : les deux robots restent côte à côte (le display: block ci-dessus les
   empilait), un peu plus grands, centrés sous le titre (seul duo : À propos, titre centré). */
.imx-masc-intro.imx-masc-intro--stack > .imx-masc-duo {
	display: flex;
	width: min(260px, 70vw);
	margin-left: auto;
	margin-right: auto;
}

/* ---------- États finaux propres à certaines scènes ---------- */
.imx-masc--p05 .imx-masc__arrow,
.imx-masc--p05 .imx-masc__file,
.imx-masc--reparation .imx-masc__scr--1,
.imx-masc--reparation .imx-masc__scr--2 {
	opacity: 0;
}

.imx-masc--p05 .imx-masc__arrow {
	transform-origin: 81.26% 35.247%;
}

/* 08 : impulsions de circulation masquées au repos ; le liquide du réservoir baisse depuis son fond (y 569). */
.imx-masc--p08 .imx-masc__l--flux-1,
.imx-masc--p08 .imx-masc__l--flux-2,
.imx-masc--p08 .imx-masc__l--flux-3,
.imx-masc--p08 .imx-masc__l--flux-4 {
	opacity: 0;
}

.imx-masc--p08 .imx-masc__group--liquide-reservoir {
	transform-origin: 44.498% 45.375% !important;
}

/* ==========================================================================
   Lectures (une fois, sous .is-playing, mouvement non réduit)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
	/* Commun : clignement et tête (sauf 05, qui a sa propre courbe). */
	.imx-masc.is-playing .imx-masc__eyes {
		animation: imx-masc-blink var(--imx-masc-d, 4.5s) ease-in-out both;
	}

	.imx-masc.is-playing:not(.imx-masc--p05):not(.imx-masc--p02) .imx-masc__group--tete {
		animation: imx-masc-nod var(--imx-masc-d, 4.5s) ease-in-out both;
	}

	.imx-masc.is-playing .imx-masc__light {
		animation: imx-masc-light var(--imx-masc-d, 4.5s) ease-out both;
	}

	/* 01 accueil : salut de la main (deux balancements), bras qui accompagnent. */
	.imx-masc--p01.is-playing .imx-masc__group--bras-droit { animation: imx-masc-p01-arm 4.5s ease-in-out both; }
	.imx-masc--p01.is-playing .imx-masc__group--avant-bras-droit { animation: imx-masc-p01-fore 4.5s ease-in-out both; }
	.imx-masc--p01.is-playing .imx-masc__group--main-droite { animation: imx-masc-p01-wave 4.5s ease-in-out both; }
	.imx-masc--p01.is-playing .imx-masc__group--bras-gauche { animation: imx-masc-p01-left 4.5s ease-in-out both; }

	/* 01 horaires (Contact) : pas de salut ; la main tendue présente les deux horaires, la paume s'allume. */
	.imx-masc--horaires.is-playing .imx-masc__group--bras-droit,
	.imx-masc--horaires.is-playing .imx-masc__group--avant-bras-droit,
	.imx-masc--horaires.is-playing .imx-masc__group--main-droite { animation: none; }
	.imx-masc--horaires.is-playing .imx-masc__group--bras-gauche { animation: imx-masc-present 4.5s ease-in-out both; }
	.imx-masc--horaires.is-playing .imx-masc__l--lumieres-bras-gauche { animation: imx-masc-present-glow 4.5s ease-in-out both; }

	/* 02 conseil : regard vers la tablette, liste qui se coche. */
	.imx-masc--p02.is-playing .imx-masc__group--tete { animation: imx-masc-p02-head 4.5s ease-in-out both; }
	.imx-masc--p02.is-playing .imx-masc__row { animation: imx-masc-row 4.5s ease-out both; }
	.imx-masc--p02.is-playing .imx-masc__row--2 { animation-name: imx-masc-row-2; }
	.imx-masc--p02.is-playing .imx-masc__row--3 { animation-name: imx-masc-row-3; }
	.imx-masc--p02.is-playing .imx-masc__row--4 { animation-name: imx-masc-row-4; }

	/* 03 support : main au casque, micro qui s'allume « en écoute ». */
	.imx-masc--p03.is-playing .imx-masc__group--bras-gauche { animation: imx-masc-p03-left 4.5s ease-in-out both; }
	.imx-masc--p03.is-playing .imx-masc__l--lumieres-casque-micro { animation: imx-masc-p03-mic 4.5s ease-in-out both; }

	/* 04 sécurité : bouclier qui se lève, cadenas qui se ferme. */
	.imx-masc--p04.is-playing .imx-masc__group--bouclier { animation: imx-masc-p04-shield 4.5s ease-in-out both; }
	.imx-masc--p04.is-playing .imx-masc__group--anse-cadenas { animation: imx-masc-p04-lock 4.5s ease-in-out both; }
	.imx-masc--p04.is-playing .imx-masc__l--lumieres-bouclier { animation: imx-masc-p04-glow 4.5s ease-out both; }

	/* 04 segmentation (Réseau) : le cadenas ne se ferme qu'à la fin, sur « Accès distants » ; le liseré s'allume
	   progressivement. Jamais un bouclier « qui couvre tout ». */
	.imx-masc--segmentation.is-playing .imx-masc__group--anse-cadenas { animation: imx-masc-seg-lock 4.5s ease-in-out both; }
	.imx-masc--segmentation.is-playing .imx-masc__l--lumieres-bouclier { animation: imx-masc-seg-glow 4.5s ease-out both; }

	/* 03 accompagnement (kSuite) : main au casque, micro allumé fixe (aucun clignotement « conseiller en ligne »). */
	.imx-masc--accompagnement.is-playing .imx-masc__l--lumieres-casque-micro { animation: imx-masc-acc-mic 4.5s ease-out both; }

	/* 05 sauvegarde : test de restauration (4,4 s). */
	.imx-masc--p05.is-playing .imx-masc__group--tete { animation: imx-masc-p05-head 4.4s ease-in-out both; }
	.imx-masc--p05.is-playing .imx-masc__group--bras-droit { animation: imx-masc-p05-palm 4.4s ease-in-out both; }
	.imx-masc--p05.is-playing .imx-masc__group--bras-gauche { animation: imx-masc-p05-device 4.4s ease-in-out both; }
	.imx-masc--p05.is-playing .imx-masc__arrow { animation: imx-masc-p05-restore 4.4s ease-in-out both; }
	.imx-masc--p05.is-playing .imx-masc__file { animation: imx-masc-p05-file 4.4s ease-in-out both; }
	.imx-masc--p05.is-playing .imx-masc__check { animation: imx-masc-p05-check 4.4s ease-in-out both; }

	/* 06 réseau : la prise et le câble se lèvent puis se reposent. */
	.imx-masc--p06.is-playing .imx-masc__group--prise-rj45,
	.imx-masc--p06.is-playing .imx-masc__group--cable { animation: imx-masc-p06-plug 4.5s ease-in-out both; }

	/* 07 atelier : le tournevis s'allume et tourne. */
	.imx-masc--p07.is-playing .imx-masc__group--tournevis { animation: imx-masc-p07-tool 4.5s ease-in-out both; }
	.imx-masc--p07.is-playing .imx-masc__l--lumieres-tournevis { animation: imx-masc-p07-toolglow 4.5s ease-out both; }

	/* 07 réparation (4,8 s) : diagnostic, devis, accord, puis seulement l'outil. */
	.imx-masc--reparation.is-playing .imx-masc__scr--1 { animation: imx-masc-rep-1 4.8s ease-in-out both; }
	.imx-masc--reparation.is-playing .imx-masc__scr--2 { animation: imx-masc-rep-2 4.8s ease-in-out both; }
	.imx-masc--reparation.is-playing .imx-masc__scr--3 { animation: imx-masc-rep-3 4.8s ease-in-out both; }
	.imx-masc--reparation.is-playing .imx-masc__group--tournevis { animation: imx-masc-rep-tool 4.8s ease-in-out both; }
	.imx-masc--reparation.is-playing .imx-masc__l--lumieres-tournevis { animation: imx-masc-rep-toolglow 4.8s ease-out both; }

	/* 08 watercooling : vidange (le niveau baisse), circulation (4 impulsions), remplissage. */
	.imx-masc--p08.is-playing .imx-masc__group--liquide-reservoir { animation: imx-masc-p08-level 4.5s ease-in-out both; }
	.imx-masc--p08.is-playing .imx-masc__l--liquide-tubes { animation: imx-masc-p08-tubes 4.5s ease-out both; }
	.imx-masc--p08.is-playing .imx-masc__l--flux-1 { animation: imx-masc-p08-f1 4.5s linear both; }
	.imx-masc--p08.is-playing .imx-masc__l--flux-2 { animation: imx-masc-p08-f2 4.5s linear both; }
	.imx-masc--p08.is-playing .imx-masc__l--flux-3 { animation: imx-masc-p08-f3 4.5s linear both; }
	.imx-masc--p08.is-playing .imx-masc__l--flux-4 { animation: imx-masc-p08-f4 4.5s linear both; }

	/* 09 migration : les trois dossiers partent du centre et se rangent. */
	.imx-masc--p09.is-playing .imx-masc__group--dossier-1 { animation: imx-masc-p09-d1 4.5s ease-in-out both; }
	.imx-masc--p09.is-playing .imx-masc__group--dossier-2 { animation: imx-masc-p09-d2 4.5s ease-in-out both; }
	.imx-masc--p09.is-playing .imx-masc__group--dossier-3 { animation: imx-masc-p09-d3 4.5s ease-in-out both; }

	/* 10 montage : composants contrôlés un par un, hélice lancée une fois. */
	.imx-masc--p10.is-playing .imx-masc__group--helice { animation: imx-masc-p10-fan 4.5s ease-in-out both; }
	.imx-masc--p10.is-playing .imx-masc__l--lumieres-processeur { animation: imx-masc-p10-c1 4.5s ease-out both; }
	.imx-masc--p10.is-playing .imx-masc__l--lumieres-memoire { animation: imx-masc-p10-c2 4.5s ease-out both; }
	.imx-masc--p10.is-playing .imx-masc__l--lumieres-carte-graphique { animation: imx-masc-p10-c3 4.5s ease-out both; }
	.imx-masc--p10.is-playing .imx-masc__l--lumieres-ventirad { animation: imx-masc-p10-c4 4.5s ease-out both; }
}

/* ---------- Communes ---------- */
@keyframes imx-masc-blink {
	0%, 8%, 14%, 100% { transform: scaleY(1); }
	11% { transform: scaleY(0.1); }
}

@keyframes imx-masc-nod {
	0%, 100% { transform: rotate(0); }
	50% { transform: rotate(-2.2deg); }
}

@keyframes imx-masc-light {
	0% { opacity: 0.35; }
	24%, 100% { opacity: 1; }
}

/* ---------- 01 ---------- */
@keyframes imx-masc-p01-arm { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.2deg); } }
@keyframes imx-masc-p01-fore { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-3deg); } }
@keyframes imx-masc-p01-left { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.5deg); } }
@keyframes imx-masc-p01-wave {
	0%, 20.5%, 41%, 61.5%, 82%, 100% { transform: rotate(0); }
	10.25% { transform: rotate(3.1deg); }
	30.75% { transform: rotate(-7.4deg); }
	51.25% { transform: rotate(7.4deg); }
	71.75% { transform: rotate(-3.1deg); }
}

@keyframes imx-masc-present {
	0%, 100% { transform: rotate(0); }
	18%, 40% { transform: rotate(2.6deg); }
	58%, 80% { transform: rotate(-1.2deg); }
}
@keyframes imx-masc-present-glow {
	0% { opacity: 0.3; }
	18%, 40% { opacity: 1; }
	50% { opacity: 0.55; }
	58%, 100% { opacity: 1; }
}

/* ---------- 02 ---------- */
@keyframes imx-masc-p02-head { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(2.5deg); } }
@keyframes imx-masc-row { 0%, 8% { opacity: 0.15; } 18%, 100% { opacity: 1; } }
@keyframes imx-masc-row-2 { 0%, 28% { opacity: 0.15; } 38%, 100% { opacity: 1; } }
@keyframes imx-masc-row-3 { 0%, 48% { opacity: 0.15; } 58%, 100% { opacity: 1; } }
@keyframes imx-masc-row-4 { 0%, 68% { opacity: 0.15; } 78%, 100% { opacity: 1; } }

/* ---------- 03 ---------- */
@keyframes imx-masc-p03-left { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-1.5deg); } }
@keyframes imx-masc-p03-mic { 0% { opacity: 0.25; } 35% { opacity: 1; } 70% { opacity: 0.4; } 100% { opacity: 1; } }

/* ---------- 04 ---------- */
@keyframes imx-masc-p04-shield { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2.5deg); } }
@keyframes imx-masc-p04-lock { 0%, 12% { transform: translateY(-1.435%); } 55%, 100% { transform: none; } }
@keyframes imx-masc-p04-glow { 0% { opacity: 0.2; } 65%, 100% { opacity: 1; } }

@keyframes imx-masc-seg-lock { 0%, 70% { transform: translateY(-1.435%); } 88%, 100% { transform: none; } }
@keyframes imx-masc-seg-glow { 0% { opacity: 0.2; } 20% { opacity: 0.4; } 40% { opacity: 0.6; } 60% { opacity: 0.8; } 88%, 100% { opacity: 1; } }
@keyframes imx-masc-acc-mic { 0% { opacity: 0.25; } 30%, 100% { opacity: 1; } }

/* ---------- 05 ---------- */
@keyframes imx-masc-p05-head { 0%, 12%, 78%, 100% { transform: rotate(0); } 30%, 60% { transform: rotate(3deg); } }
@keyframes imx-masc-p05-palm { 0%, 8%, 88%, 100% { transform: rotate(0); } 30%, 65% { transform: rotate(-4deg); } }
@keyframes imx-masc-p05-device { 0%, 15%, 90%, 100% { transform: rotate(0); } 34%, 65% { transform: rotate(2deg); } }
@keyframes imx-masc-p05-restore {
	0%, 30% { opacity: 0; transform: rotate(0); }
	35% { opacity: 1; transform: rotate(0); }
	69% { opacity: 1; transform: rotate(360deg); }
	76%, 100% { opacity: 0; transform: rotate(360deg); }
}
@keyframes imx-masc-p05-file {
	0%, 14% { opacity: 0; transform: translate(0, 0); }
	20% { opacity: 1; transform: translate(0, 0); }
	38%, 56% { opacity: 1; transform: translate(45%, -10%); }
	74% { opacity: 1; transform: translate(0, 0); }
	82%, 100% { opacity: 0; transform: translate(0, 0); }
}
@keyframes imx-masc-p05-check { 0%, 76% { opacity: 0; } 88%, 100% { opacity: 1; } }

/* ---------- 06 ---------- */
@keyframes imx-masc-p06-plug { 0%, 100% { transform: none; } 50% { transform: translateY(-0.957%); } }

/* ---------- 07 ---------- */
@keyframes imx-masc-p07-tool {
	0%, 50%, 100% { transform: rotate(0); }
	25% { transform: rotate(2.8deg); }
	75% { transform: rotate(-2.8deg); }
}
@keyframes imx-masc-p07-toolglow { 0% { opacity: 0; } 35%, 100% { opacity: 1; } }

@keyframes imx-masc-rep-1 { 0%, 4% { opacity: 0; } 10%, 28% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes imx-masc-rep-2 { 0%, 33% { opacity: 0; } 38%, 52% { opacity: 1; } 57%, 100% { opacity: 0; } }
@keyframes imx-masc-rep-3 { 0%, 57% { opacity: 0; } 64%, 100% { opacity: 1; } }
@keyframes imx-masc-rep-tool {
	0%, 66%, 100% { transform: rotate(0); }
	76% { transform: rotate(4deg); }
	86% { transform: rotate(-4deg); }
}
@keyframes imx-masc-rep-toolglow { 0%, 62% { opacity: 0; } 72%, 100% { opacity: 1; } }

/* ---------- 08 ---------- */
@keyframes imx-masc-p08-level { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.4); } }
@keyframes imx-masc-p08-tubes { 0% { opacity: 0.35; } 40%, 100% { opacity: 1; } }
@keyframes imx-masc-p08-f1 { 0%, 10% { opacity: 0; } 20% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes imx-masc-p08-f2 { 0%, 27% { opacity: 0; } 37% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes imx-masc-p08-f3 { 0%, 44% { opacity: 0; } 54% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes imx-masc-p08-f4 { 0%, 61% { opacity: 0; } 71% { opacity: 1; } 81%, 100% { opacity: 0; } }

/* ---------- 09 ---------- */
@keyframes imx-masc-p09-d1 { 0% { transform: translate(16.667%, -2.791%); } 55%, 100% { transform: none; } }
@keyframes imx-masc-p09-d2 { 0%, 13% { transform: translate(0, -2.791%); } 68%, 100% { transform: none; } }
@keyframes imx-masc-p09-d3 { 0%, 26% { transform: translate(-16.826%, -2.791%); } 81%, 100% { transform: none; } }

/* ---------- 10 ---------- */
@keyframes imx-masc-p10-fan { 0% { transform: rotate(0); } 85%, 100% { transform: rotate(360deg); } }
@keyframes imx-masc-p10-c1 { 0% { opacity: 0.18; } 30%, 100% { opacity: 1; } }
@keyframes imx-masc-p10-c2 { 0%, 15% { opacity: 0.18; } 45%, 100% { opacity: 1; } }
@keyframes imx-masc-p10-c3 { 0%, 30% { opacity: 0.18; } 60%, 100% { opacity: 1; } }
@keyframes imx-masc-p10-c4 { 0%, 45% { opacity: 0.18; } 75%, 100% { opacity: 1; } }

/* ==========================================================================
   Synchronisation des pages : pendant la lecture, la section reçoit .is-mascot-playing
   (assets/js/mascotte.js) et ses éléments s'avancent ou s'allument au rythme du robot.
   Transform et opacity seulement (les pseudo-éléments des pages restent intacts).
   Sauvegarde : pages/sauvegarde-continuite.css § 5 bis.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
	/* Accueil : les quatre besoins, pendant le salut. */
	section.is-mascot-playing .imx-v3-grid--4 > .imx-v3-card,
	/* Infogérance : les quatre étapes de reprise, au rythme de la liste cochée sur la tablette. */
	section.is-mascot-playing .imx-p-ig-pipe > .imx-p-ig-step,
	/* Cybersécurité : les trois signaux, pendant que le cadenas se ferme. */
	section.is-mascot-playing .imx-p-cy-pairs > .imx-p-cy-pair,
	/* Réparation : les étapes, l'outil seulement après l'accord. */
	section.is-mascot-playing .imx-p-rep-steps > li {
		animation: imx-masc-sync-lift 1.1s ease-in-out both;
	}

	section.is-mascot-playing .imx-v3-grid--4 > .imx-v3-card:nth-child(1) { animation-delay: 0.3s; }
	section.is-mascot-playing .imx-v3-grid--4 > .imx-v3-card:nth-child(2) { animation-delay: 1.3s; }
	section.is-mascot-playing .imx-v3-grid--4 > .imx-v3-card:nth-child(3) { animation-delay: 2.3s; }
	section.is-mascot-playing .imx-v3-grid--4 > .imx-v3-card:nth-child(4) { animation-delay: 3.3s; }

	section.is-mascot-playing .imx-p-ig-pipe > .imx-p-ig-step:nth-child(1) { animation-delay: 0.36s; }
	section.is-mascot-playing .imx-p-ig-pipe > .imx-p-ig-step:nth-child(2) { animation-delay: 1.26s; }
	section.is-mascot-playing .imx-p-ig-pipe > .imx-p-ig-step:nth-child(3) { animation-delay: 2.16s; }
	section.is-mascot-playing .imx-p-ig-pipe > .imx-p-ig-step:nth-child(4) { animation-delay: 3.06s; }

	section.is-mascot-playing .imx-p-cy-pairs > .imx-p-cy-pair:nth-child(1) { animation-delay: 0.5s; }
	section.is-mascot-playing .imx-p-cy-pairs > .imx-p-cy-pair:nth-child(2) { animation-delay: 1.7s; }
	section.is-mascot-playing .imx-p-cy-pairs > .imx-p-cy-pair:nth-child(3) { animation-delay: 2.9s; }

	section.is-mascot-playing .imx-p-rep-steps > li:nth-child(2) { animation-delay: 0.53s; }
	section.is-mascot-playing .imx-p-rep-steps > li:nth-child(3) { animation-delay: 0.89s; }
	section.is-mascot-playing .imx-p-rep-steps > li:nth-child(4) { animation-delay: 1.87s; }
	section.is-mascot-playing .imx-p-rep-steps > li:nth-child(5) { animation-delay: 3.11s; }
	section.is-mascot-playing .imx-p-rep-steps > li:nth-child(6) { animation-delay: 3.9s; }

	/* Réseau et kSuite : les lignes du tableau s'allument une à une (maillon par maillon, élément par élément). */
	section.is-mascot-playing .imx-p-wf-table tbody tr,
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr,
	section.is-mascot-playing .imx-v3-ks-table tbody tr {
		animation: imx-masc-sync-row 0.8s ease-out both;
	}

	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(2),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(2),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(2) { animation-delay: 0.6s; }
	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(3),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(3),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(3) { animation-delay: 1.2s; }
	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(4),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(4),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(4) { animation-delay: 1.8s; }
	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(5),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(5),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(5) { animation-delay: 2.4s; }
	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(6),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(6),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(6) { animation-delay: 3s; }
	section.is-mascot-playing .imx-p-wf-table tbody tr:nth-child(n+7),
	section.is-mascot-playing .imx-p-sc-table--roles tbody tr:nth-child(n+7),
	section.is-mascot-playing .imx-v3-ks-table tbody tr:nth-child(n+7) { animation-delay: 3.6s; }

	/* Réseau « Sécuriser et relier » : les quatre zones, une à une ; « Accès distants » avec le cadenas.
	   kSuite « Le jour J et ensuite » : Avant, Le jour J, Ensuite. */
	section.is-mascot-playing .imx-p-wf-ducts > .imx-p-wf-duct,
	section.is-mascot-playing .imx-v3-ks-prog > .imx-v3-ks-prog__col {
		animation: imx-masc-sync-lift 1.1s ease-in-out both;
	}

	section.is-mascot-playing .imx-p-wf-ducts > .imx-p-wf-duct:nth-child(1) { animation-delay: 0.3s; }
	section.is-mascot-playing .imx-p-wf-ducts > .imx-p-wf-duct:nth-child(2) { animation-delay: 1.2s; }
	section.is-mascot-playing .imx-p-wf-ducts > .imx-p-wf-duct:nth-child(3) { animation-delay: 2.1s; }
	section.is-mascot-playing .imx-p-wf-ducts > .imx-p-wf-duct:nth-child(4) { animation-delay: 3.1s; }
	section.is-mascot-playing .imx-v3-ks-prog > .imx-v3-ks-prog__col:nth-child(1) { animation-delay: 0.4s; }
	section.is-mascot-playing .imx-v3-ks-prog > .imx-v3-ks-prog__col:nth-child(2) { animation-delay: 1.6s; }
	section.is-mascot-playing .imx-v3-ks-prog > .imx-v3-ks-prog__col:nth-child(3) { animation-delay: 2.8s; }

	/* Watercooling : vidange, nettoyage, remplissage au rythme du niveau et des impulsions. */
	section.is-mascot-playing .imx-wc-looks > .imx-wc-look {
		animation: imx-masc-sync-lift 1.1s ease-in-out both;
	}

	section.is-mascot-playing .imx-wc-looks > .imx-wc-look:nth-child(1) { animation-delay: 0.4s; }
	section.is-mascot-playing .imx-wc-looks > .imx-wc-look:nth-child(2) { animation-delay: 1.5s; }
	section.is-mascot-playing .imx-wc-looks > .imx-wc-look:nth-child(3) { animation-delay: 2.9s; }

	/* Contact : les deux horaires, pendant le salut. Wi-Fi maison : les vérifications une à une.
	   À propos : la colonne entreprises (robot 02), puis particuliers (robot 07). */
	section.is-mascot-playing .imx-ct-bands > .imx-ct-band,
	section.is-mascot-playing .imx-p-drp-checklist > li,
	section.is-mascot-playing .imx-p-ap-cols > .imx-p-ap-col {
		animation: imx-masc-sync-lift 1.1s ease-in-out both;
	}

	section.is-mascot-playing .imx-ct-bands > .imx-ct-band:nth-child(1) { animation-delay: 0.6s; }
	section.is-mascot-playing .imx-ct-bands > .imx-ct-band:nth-child(2) { animation-delay: 2s; }
	section.is-mascot-playing .imx-p-drp-checklist > li:nth-child(1) { animation-delay: 0.3s; }
	section.is-mascot-playing .imx-p-drp-checklist > li:nth-child(2) { animation-delay: 1.2s; }
	section.is-mascot-playing .imx-p-drp-checklist > li:nth-child(3) { animation-delay: 2.1s; }
	section.is-mascot-playing .imx-p-drp-checklist > li:nth-child(4) { animation-delay: 3s; }
	section.is-mascot-playing .imx-p-ap-cols > .imx-p-ap-col:nth-child(1) { animation-delay: 0.6s; }
	section.is-mascot-playing .imx-p-ap-cols > .imx-p-ap-col:nth-child(2) { animation-delay: 1.9s; }

	/* Montage : l'encadré « Avant la remise » s'avance pendant les contrôles. */
	section.is-mascot-playing .imx-mt-boxes > .imx-mt-box:first-child {
		animation: imx-masc-sync-hold 3.6s ease-in-out 0.5s both;
	}
}

@keyframes imx-masc-sync-lift {
	0%, 100% { transform: none; }
	20%, 70% { transform: translateY(-6px); }
}

@keyframes imx-masc-sync-row {
	0% { opacity: 0.35; }
	40%, 100% { opacity: 1; }
}

@keyframes imx-masc-sync-hold {
	0%, 100% { transform: none; }
	10%, 90% { transform: translateY(-6px); }
}

/* Support : les deux robots remplacent les photos des cartes « à distance » / « sur site » ; marge haute
   pour que l'étiquette « Oui : à distance » / « Non : sur site » ne touche pas la tête. */
.imx-p-sup-branch .imx-masc__stage {
	max-width: 240px;
}

.imx-p-sup-branch .imx-masc {
	padding-top: 1.1rem;
}

/* Habillage téléphone : un dernier élément en flex n'habille pas un flottant ; le passer en bloc. */
@media (max-width: 959px) {
	.imx-masc-intro__text > .imx-v3-links:last-child {
		display: block;
	}
}

/* ==========================================================================
   Personnages Laurent Marti et Lucas Frene, poses V2 (scènes « laurent » et « lucas », 4,2 s puis arrêt ;
   courbes des livraisons V2 pivots.json › motion, interpolation douce entre les clés ; pivots dans rig.json).
   Laurent « dossier » : tête −1,4° (1,1 s à 2,3 s), bras gauche et dossier +0,5° (1,2 s → 2,5 s), bras droit
   immobile. Lucas « accueil » : tête +1,6° (1,2 s à 2,5 s), bras droit tendu −2,3° (1,4 s à 2,6 s), bras gauche
   immobile. Clignement vers 0,95 s pour les deux.
   ========================================================================== */
.imx-masc--laurent .imx-masc__eyes,
.imx-masc--lucas .imx-masc__eyes {
	transform-origin: 50.3% 21.5%;
}

@media (prefers-reduced-motion: no-preference) {
	.imx-masc.imx-masc--laurent.imx-masc--laurent.is-playing .imx-masc__group--tete { animation: imx-masc-lau-head 4.2s linear both; }
	.imx-masc--laurent.is-playing .imx-masc__group--bras-gauche { animation: imx-masc-lau-folder 4.2s linear both; }
	.imx-masc.imx-masc--lucas.imx-masc--lucas.is-playing .imx-masc__group--tete { animation: imx-masc-luc-head 4.2s linear both; }
	.imx-masc--lucas.is-playing .imx-masc__group--bras-droit { animation: imx-masc-luc-hand 4.2s linear both; }
	.imx-masc--laurent.is-playing .imx-masc__eyes,
	.imx-masc--lucas.is-playing .imx-masc__eyes { animation: imx-masc-lau-blink 4.2s linear both; }
}

@keyframes imx-masc-lau-head {
	0% { transform: rotate(0); animation-timing-function: ease-in-out; }
	26.2% { transform: rotate(-1.4deg); }
	54.8% { transform: rotate(-1.4deg); animation-timing-function: ease-in-out; }
	100% { transform: rotate(0); }
}

@keyframes imx-masc-lau-folder {
	0%, 28.6% { transform: rotate(0); animation-timing-function: ease-in-out; }
	59.5% { transform: rotate(0.5deg); animation-timing-function: ease-in-out; }
	100% { transform: rotate(0); }
}

@keyframes imx-masc-luc-head {
	0% { transform: rotate(0); animation-timing-function: ease-in-out; }
	28.6% { transform: rotate(1.6deg); }
	59.5% { transform: rotate(1.6deg); animation-timing-function: ease-in-out; }
	100% { transform: rotate(0); }
}

@keyframes imx-masc-luc-hand {
	0% { transform: rotate(0); animation-timing-function: ease-in-out; }
	33.3% { transform: rotate(-2.3deg); }
	61.9% { transform: rotate(-2.3deg); animation-timing-function: ease-in-out; }
	100% { transform: rotate(0); }
}

@keyframes imx-masc-lau-blink {
	0%, 20.2%, 25%, 100% { transform: scaleY(1); }
	22.6% { transform: scaleY(0.08); }
}
