/* Pages du parachèvement : ouverture « un geste par métier » et pièce à points de la page Parachèvement. */
.vtr-mt, .vtr-pa {
	--mt-encre: var(--pa-encre, #1c211d);
	--mt-doux: var(--pa-doux, #6c7168);
	--mt-gris: #3c4038;
	--mt-filet: #e3e1da;
	--mt-terre: var(--pa-terre, #9a5f47);
	--mt-jaune: #ffe200;
	--mt-fond: #f3f1ec;
}
.vtr-mt *, .vtr-mt *::before, .vtr-mt *::after, .vtr-pa *, .vtr-pa *::before { box-sizing: border-box; }

/* Le fil d'Ariane du thème est remplacé par celui de l'ouverture. */
.wooh-main:has(.vtr-mt) .wooh-ariane-barre { display: none !important; }
.wooh-contenu > .vtr-mt:first-child, .wooh-contenu > .wp-block-shortcode:first-child .vtr-mt { margin-top: 0 !important; }

.vtr-mt {
	--vtr-l: calc(100vw - var(--vtr-sb, 0px));
	position: relative;
	width: var(--vtr-l) !important;
	max-width: none !important;
	margin-left: calc(50% - var(--vtr-l) / 2) !important;
	margin-right: calc(50% - var(--vtr-l) / 2) !important;
	margin-bottom: 0 !important;
	color: var(--mt-encre);
	background: #fff;
}
.vtr-mt__cadre {
	display: grid;
	grid-template-columns: clamp(440px, 37vw, 640px) minmax(0, 1fr);
	/* Plein écran sous le menu : --mt-haut est mesuré en JavaScript (position réelle de l'ouverture). */
	height: calc(100svh - var(--mt-haut, var(--nu-tete, 120px)));
	min-height: 560px;
}
.vtr-mt__texte { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 32px clamp(24px, 3vw, 48px) 32px clamp(24px, 4vw, 80px); }
.vtr-mt__ariane { margin: 0 0 18px; font-size: 13px; color: var(--mt-gris); }
.vtr-mt__ariane a { color: inherit; text-decoration: none; }
.vtr-mt__ariane a:hover { color: var(--mt-terre); }
.vtr-mt .vtr-mt__h1 { margin: 0; font-size: clamp(40px, min(4.4vw, 8vh), 78px); font-weight: 300; line-height: .98; letter-spacing: -.03em; color: var(--mt-encre); text-wrap: balance; }
.vtr-mt__chapo { margin: 18px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.65; color: var(--mt-gris); }
.vtr-mt__boutons { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.vtr-mt .vtr-mt__bouton { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; text-decoration: none; background: var(--mt-encre); color: #fff; border: 1px solid var(--mt-encre); transition: background .25s, color .25s; }
.vtr-mt .vtr-mt__bouton.is-contour { background: transparent; color: var(--mt-encre); }
.vtr-mt .vtr-mt__bouton:hover { background: var(--mt-terre); border-color: var(--mt-terre); color: #fff; }

/* Commande du geste (choix, interrupteur, nuancier...) */
.vtr-mt__commande { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.vtr-mt__sur { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--mt-terre); }
.vtr-mt__options { display: flex; flex-wrap: wrap; gap: 8px; }
.vtr-mt__commande--boutons .vtr-mt__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vtr-mt--stickers .vtr-mt__options { display: flex; }
.vtr-mt__options button { font-family: inherit; cursor: pointer; }
.vtr-mt__choix { min-height: 44px; padding: 0 14px; font-size: 12px; font-weight: 500; letter-spacing: .06em; border: 1px solid var(--mt-encre); background: #fff; color: var(--mt-encre); transition: background .2s, color .2s; }
.vtr-mt__choix[aria-pressed="true"] { background: var(--mt-encre); color: #fff; }
.vtr-mt__legendes { display: grid; min-height: 3em; }
.vtr-mt__legende { grid-area: 1 / 1; font-size: 14px; line-height: 1.55; color: var(--mt-gris); opacity: 0; visibility: hidden; transition: opacity .3s; }
.vtr-mt__legende.is-on { opacity: 1; visibility: visible; }

/* Interrupteur (électricité) */
.vtr-mt__commande--interrupteur { flex-direction: row; align-items: center; gap: 22px; }
.vtr-mt__commande--interrupteur .vtr-mt__options { flex-direction: column; gap: 6px; padding: 10px; background: var(--mt-fond); border: 1px solid #d9d6cc; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); flex: none; }
.vtr-mt__commande--interrupteur .vtr-mt__choix { display: flex; align-items: center; gap: 10px; min-width: 160px; border-radius: 4px; border-color: #d9d6cc; font-size: 13px; letter-spacing: .04em; text-align: left; }
.vtr-mt__commande--interrupteur .vtr-mt__choix[aria-pressed="true"] { border-color: var(--mt-encre); }
.vtr-mt__choix i { width: 8px; height: 8px; border-radius: 50%; background: #c9c6bc; flex: none; }
.vtr-mt__choix[aria-pressed="true"] i { background: var(--mt-jaune); box-shadow: 0 0 8px var(--mt-jaune); }
.vtr-mt__commande--interrupteur .vtr-mt__legendes { max-width: 240px; }

/* Nuancier (peinture) */
.vtr-mt__options .vtr-mt__pastille { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(20, 23, 31, .25); transition: box-shadow .2s; }
.vtr-mt__pastille[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mt-encre); }
.vtr-mt__commande--pastilles .vtr-mt__options { gap: 14px; }
.vtr-mt__commande--pastilles .vtr-mt__legendes { min-height: 1.6em; }

/* Matières (sol) */
.vtr-mt__commande--matieres .vtr-mt__options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vtr-mt__matiere { all: unset; display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.3; color: var(--mt-doux); cursor: pointer; }
.vtr-mt__ech { display: block; height: 52px; outline: 1px solid rgba(20, 23, 31, .18); transition: outline-offset .2s; }
.vtr-mt__matiere[aria-pressed="true"] { color: var(--mt-encre); font-weight: 500; }
.vtr-mt__matiere[aria-pressed="true"] .vtr-mt__ech { outline: 2px solid var(--mt-encre); outline-offset: 3px; }
.vtr-mt__matiere:focus-visible .vtr-mt__ech, .vtr-mt__moment:focus-visible { outline: 2px solid var(--mt-terre); }

/* Moments (cuisine) */
.vtr-mt__commande--moments .vtr-mt__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vtr-mt__moment { all: unset; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 2px solid var(--mt-filet); font-size: 12px; line-height: 1.35; color: var(--mt-doux); cursor: pointer; min-height: 44px; }
.vtr-mt__heure { font-size: 20px; font-weight: 300; }
.vtr-mt__moment[aria-pressed="true"] { border-top-color: var(--mt-encre); color: var(--mt-gris); }
.vtr-mt__moment[aria-pressed="true"] .vtr-mt__heure { color: var(--mt-encre); font-weight: 400; }
.vtr-mt__commande--moments .vtr-mt__legendes { display: none; }
.vtr-mt__badge { position: absolute; left: 24px; top: 20px; z-index: 3; font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: #fff; padding: 8px 12px; opacity: 0; transition: opacity .3s; }
.vtr-mt__badge.is-on { opacity: 1; }

/* Écoute (acoustique) : l'écho dessiné */
.vtr-mt__commande--ecoute { padding: 20px; background: rgba(255, 255, 255, .9); border: 1px solid var(--mt-filet); }
.vtr-mt__commande--ecoute .vtr-mt__options { display: flex; }
.vtr-mt__onde { position: relative; display: grid; height: 54px; }
/* Pendant l'écoute, l'onde se remplit au rythme de l'extrait. */
.vtr-mt__onde::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--avance, 0) * 100%); background: rgba(255, 226, 0, .35); mix-blend-mode: multiply; pointer-events: none; }
.vtr-mt__choix svg { flex: none; }
.vtr-mt__commande--ecoute .vtr-mt__choix { display: inline-flex; align-items: center; gap: 8px; }
.vtr-mt__arret, .vtr-mt__choix.is-joue .vtr-mt__lire { display: none; }
.vtr-mt__choix.is-joue .vtr-mt__arret { display: block; }
.vtr-mt__onde { overflow: hidden; }
.vtr-mt__ondes { grid-area: 1 / 1; display: flex; align-items: center; gap: 3px; min-width: 0; opacity: 0; transition: opacity .35s; }
.vtr-mt__ondes.is-on { opacity: 1; }
.vtr-mt__ondes span { display: block; flex: 1 1 0; min-width: 2px; max-width: 6px; border-radius: 2px; background: #9aa07a; }
.vtr-mt__ondes span.is-voix { background: var(--mt-encre); }

/* Défilement (stores) */
.vtr-mt--defilement { height: 240vh; }
.vtr-mt__collant { position: sticky; top: var(--mt-haut, var(--nu-tete, 120px)); }
.vtr-mt--defilement .vtr-mt__cadre { height: calc(100svh - var(--mt-haut, var(--nu-tete, 120px))); min-height: 560px; }
.vtr-mt__etapes { list-style: none; margin: 0; padding: 0; display: grid; }
.vtr-mt__etape { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 6px; opacity: 0; visibility: hidden; transition: opacity .3s; }
.vtr-mt__etape.is-on { opacity: 1; visibility: visible; }
.vtr-mt__etape strong { font-size: 20px; font-weight: 400; }
.vtr-mt__etape span:last-child { font-size: 14px; line-height: 1.5; color: var(--mt-gris); }
.vtr-mt__num { font-size: 11px; font-weight: 500; letter-spacing: .2em; color: var(--mt-doux); }
.vtr-mt__barre { display: block; height: 2px; background: rgba(20, 23, 31, .14); }
.vtr-mt__barre span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--mt-encre); }

/* Panneau image : la toile garde le ratio de l'image et la recadre comme object-fit: cover,
   pour que les annotations restent posées au bon endroit quelle que soit la taille. */
.vtr-mt__panneau { position: relative; overflow: hidden; background: var(--mt-fond); container-type: size; min-width: 0; }
.vtr-mt__toile { --w: max(100cqw, calc(100cqh * 1.791)); position: absolute; top: 50%; left: calc((100cqw - var(--w)) * var(--cadrage, .5)); width: var(--w); aspect-ratio: 2400 / 1340; transform: translateY(-50%); }
.vtr-mt__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none !important; object-fit: cover; opacity: 0; z-index: 0; transition: opacity .6s ease; }
.vtr-mt__img.is-dessous { opacity: 1; z-index: 1; transition: none; }
.vtr-mt__img.is-on { opacity: 1; z-index: 2; }
.vtr-mt--electricite .vtr-mt__img { transition-duration: .8s; }
.vtr-mt__lecteur { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Mention « Image IA » en bas à gauche : le coin bas droit est pris par le bouton « remonter » du thème. */
.vtr-mt__ia { position: absolute; left: 16px; bottom: 14px; z-index: 4; font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #5a5f55; background: rgba(255, 255, 255, .85); padding: 4px 7px; pointer-events: none; }

/* Curseur avant / après (mur végétal, menuiserie) */
.vtr-mt__dessus { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 calc(100% - var(--v, 55) * 1%) 0 0); }
.vtr-mt__ligne { position: absolute; top: 0; bottom: 0; z-index: 2; left: calc(var(--v, 55) * 1%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.vtr-mt--menuiserie .vtr-mt__ligne { background: var(--mt-encre); }
.vtr-mt__ligne span { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(20, 23, 31, .3); }
.vtr-mt__ligne span::before { content: "‹ ›"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; letter-spacing: .1em; color: var(--mt-encre); }
.vtr-mt__glisse { position: absolute; inset: 0; z-index: 3; cursor: ew-resize; margin: 0; }
.vtr-mt__glisse input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.vtr-mt__glisse:focus-within + .vtr-mt__ia, .vtr-mt__glisse input:focus-visible { outline: none; }
.vtr-mt__panneau:has(input:focus-visible) .vtr-mt__ligne span { box-shadow: 0 0 0 3px var(--mt-terre); }
.vtr-mt__etiquette { position: absolute; top: 20px; z-index: 3; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; background: #fff; padding: 6px 10px; pointer-events: none; }
.vtr-mt__etiquette.is-gauche { left: 20px; }
.vtr-mt__etiquette.is-droite { right: 20px; }
.vtr-mt--menuiserie .vtr-mt__etiquette.is-gauche { background: var(--mt-encre); color: #fff; }
.vtr-mt__consigne { margin: 32px 0 0; font-size: 13px; line-height: 1.55; color: var(--mt-doux); }
.vtr-mt__note { position: absolute; display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--mt-encre); background: #fff; border: 1px solid var(--mt-encre); padding: 5px 9px 5px 7px; }
.vtr-mt__note i { width: 7px; height: 7px; border-radius: 50%; background: var(--mt-encre); flex: none; }

@media (max-width: 900px) {
	.vtr-mt__cadre { display: flex; flex-direction: column; height: auto; min-height: 0; }
	/* Mobile : l'image en haut, puis le titre, et la commande du geste tout de suite après,
	   pour voir l'image et les boutons sur le même écran. Le chapeau et les boutons d'action
	   passent dessous (l'ordre du code, lu par Google, ne change pas). */
	.vtr-mt__panneau { order: -1; height: 36svh; min-height: 240px; flex: none; }
	.vtr-mt__ariane { display: none; }
	.vtr-mt__texte > .vtr-mt__commande, .vtr-mt__texte > .vtr-mt__consigne { order: 1; margin-top: 18px; }
	.vtr-mt__texte > .vtr-mt__chapo { order: 2; margin-top: 22px; }
	.vtr-mt__texte > .vtr-mt__boutons { order: 3; }
	.vtr-mt__texte { padding: 18px 20px 36px; }
	.vtr-mt__ariane { margin-bottom: 12px; font-size: 12px; }
	.vtr-mt .vtr-mt__h1 { font-size: clamp(32px, 9vw, 44px); }
	.vtr-mt__chapo { font-size: 14px; }
	.vtr-mt__commande { margin-top: 24px; }
	.vtr-mt__commande--interrupteur { flex-direction: column; align-items: stretch; }
	.vtr-mt__commande--interrupteur .vtr-mt__options { flex-direction: row; }
	.vtr-mt__commande--interrupteur .vtr-mt__choix { min-width: 0; flex: 1 1 0; padding: 0 10px; }
	.vtr-mt__commande--matieres .vtr-mt__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vtr-mt__options .vtr-mt__pastille { width: 40px; height: 40px; }
	.vtr-mt__commande--pastilles .vtr-mt__options { gap: 12px; }
	.vtr-mt__note { font-size: 10px; padding: 3px 6px 3px 5px; }
	.vtr-mt__badge { left: 12px; top: 12px; font-size: 11px; }
	.vtr-mt--defilement { height: 220vh; }
	.vtr-mt--defilement .vtr-mt__cadre { height: calc(100svh - var(--mt-haut, var(--nu-tete, 80px))); min-height: 0; }
	.vtr-mt--defilement .vtr-mt__panneau { height: 44%; }
	.vtr-mt--defilement .vtr-mt__chapo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.vtr-mt__img, .vtr-mt__legende, .vtr-mt__ondes, .vtr-mt__etape, .vtr-mt__badge { transition: none; }
}

/* ---------- Page Parachèvement : la pièce en grand, un point par métier ---------- */
.vtr-pa { position: relative; color: var(--mt-encre); margin-bottom: clamp(48px, 6vw, 96px) !important; }
.vtr-pa__piece { position: relative; aspect-ratio: 2400 / 1340; overflow: hidden; background: var(--mt-fond); }
.vtr-pa__piece img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: fill; }
.vtr-pa .vtr-mt__ia { left: auto; right: 16px; bottom: 16px; }
.vtr-pa__point { position: absolute; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; color: var(--mt-encre); border: 2px solid #fff; box-shadow: 0 4px 14px rgba(20, 23, 31, .3); transition: transform .2s, background .2s, box-shadow .2s; }
.vtr-pa__point:hover { transform: scale(1.08); }
.vtr-pa__point[aria-pressed="true"] { background: var(--mt-encre); color: var(--mt-jaune); border-color: var(--mt-jaune); box-shadow: 0 0 0 8px rgba(255, 226, 0, .35); transform: scale(1.1); }
.vtr-pa__point:focus-visible { outline: 2px solid var(--mt-terre); outline-offset: 4px; }
.vtr-pa__point::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #fff; opacity: 0; animation: vtrPaOnde 2.6s ease-out infinite; pointer-events: none; }
.vtr-pa__point[aria-pressed="true"]::after { display: none; }
@keyframes vtrPaOnde { 0% { opacity: .8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.7); } }
.vtr-pa__fiche { position: absolute; z-index: 3; left: 24px; bottom: 24px; width: min(400px, calc(100% - 48px)); padding: 28px 30px; background: #fff; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 18px 40px rgba(20, 23, 31, .18); }
.vtr-pa__famille { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--mt-terre); }
.vtr-pa__nom { font-size: 30px; font-weight: 300; line-height: 1.1; }
.vtr-pa__desc { font-size: 15px; line-height: 1.6; color: var(--mt-gris); }
.vtr-pa .vtr-pa__lien { align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--mt-encre); text-decoration: underline; text-underline-offset: 5px; }
.vtr-pa .vtr-pa__lien:hover { color: var(--mt-terre); }
@media (max-width: 900px) {
	.vtr-pa__point { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
	.vtr-pa__point svg { width: 13px; height: 13px; }
	.vtr-pa__point[aria-pressed="true"] { box-shadow: 0 0 0 5px rgba(255, 226, 0, .35); }
	.vtr-pa__fiche { position: static; width: auto; padding: 20px 0 0; box-shadow: none; }
	.vtr-pa__nom { font-size: 26px; }
	.vtr-pa .vtr-mt__ia { bottom: auto; top: 10px; right: 10px; }
}
@media (prefers-reduced-motion: reduce) { .vtr-pa__point::after { animation: none; } }

/* Liste des métiers sous la pièce, en mobile : le thème réserve une colonne de 72 px aux vignettes,
   alimentées par l'ancien bloc d'images (remplacé par la pièce à points). Sans vignette, le nom
   tombait dans cette colonne et se coupait mot par mot : il reprend toute la largeur. */
@media (max-width: 860px) {
	.wooh-contenu:has(.vtr-pa) .wooh-pa-metiers a:not(:has(.wooh-pa-vignette)) { grid-template-columns: minmax(0, 1fr) 24px; font-size: 32px; }
	.wooh-contenu:has(.vtr-pa) .wooh-pa-metiers a:not(:has(.wooh-pa-vignette))::after { grid-column: 2; }
}
