/*
 * Pages saisonnières : /tuque-personnalisee/ et /vetements-hiver-personnalises/.
 * Héros avec collage photo, bande défilante, explorateur de couleurs, vidéo
 * d'atelier, carrousel de produits, photos dans les cartes de combos.
 * Chargée par inc/enqueue.php sur ces deux pages seulement.
 */

/* ---- Héros : texte + collage de photos produit ---- */
.h12-sx-hero { position: relative; overflow: hidden; background: var(--h12-ink); color: #fff; padding: 72px 40px 84px; }
.h12-sx-hero__glow { position: absolute; top: -120px; right: -80px; width: 640px; height: 640px; opacity: .32; background-image: var(--h12-halftone-red); background-size: 14px 14px; -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%); mask-image: radial-gradient(circle, #000 30%, transparent 68%); pointer-events: none; }
.h12-sx-hero__inner { position: relative; max-width: var(--h12-maxw-content); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.h12-sx-hero h1 { font-size: clamp(48px, 6.4vw, 92px); line-height: .92; margin: 14px 0 0; }
.h12-sx-hero__p { font-size: 17px; line-height: 1.65; color: var(--h12-hero-sub); max-width: 520px; margin: 22px 0 0; }
.h12-sx-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.h12-sx-hero__faits { display: flex; flex-wrap: wrap; gap: 14px 34px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }
.h12-sx-hero__faits div { min-width: 0; }
.h12-sx-hero__faits dt { font-family: var(--h12-font-display); font-size: 34px; line-height: 1; color: #fff; }
.h12-sx-hero__faits dd { margin: 6px 0 0; font-family: var(--h12-font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--h12-hero-sub); }

.h12-sx-hero__art { position: relative; height: 470px; }
.h12-sx-card { position: absolute; margin: 0; padding: 14px 14px 12px; background: #fff; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06); animation: h12-sx-flotte 7s ease-in-out infinite; }
.h12-sx-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; }
.h12-sx-card figcaption { margin-top: 8px; padding-top: 8px; border-top: 1px solid #ececea; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--h12-ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h12-sx-card--1 { z-index: 3; width: 46%; left: 27%; top: 6%; --r: -1.5deg; transform: rotate(var(--r)); }
.h12-sx-card--2 { z-index: 2; width: 36%; left: 0; top: 24%; --r: -9deg; transform: rotate(var(--r)); animation-delay: -2.4s; }
.h12-sx-card--3 { z-index: 1; width: 36%; right: 0; top: 30%; --r: 8deg; transform: rotate(var(--r)); animation-delay: -4.6s; }
.h12-sx-card--1::before { content: ''; position: absolute; z-index: -1; top: -14px; left: -14px; width: 64px; height: 64px; background: var(--h12-red); border-radius: 4px; }
@keyframes h12-sx-flotte {
	0%, 100% { transform: rotate(var(--r)) translateY(0); }
	50% { transform: rotate(var(--r)) translateY(-10px); }
}

/* ---- Bande défilante ---- */
.h12-sx-band { position: relative; overflow: hidden; background: #fff; border-bottom: var(--h12-bd); padding: 22px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.h12-sx-band__track { display: flex; width: max-content; animation: h12-sx-defile calc(var(--h12-sx-n, 20) * 2.6s) linear infinite; }
.h12-sx-band:hover .h12-sx-band__track, .h12-sx-band:focus-within .h12-sx-band__track { animation-play-state: paused; }
.h12-sx-band__list { display: flex; gap: 14px; margin: 0; padding: 0 7px; list-style: none; }
.h12-sx-band__item { display: block; width: 132px; color: var(--h12-ink); text-decoration: none; text-align: center; }
.h12-sx-band__item img { display: block; width: 100%; height: 150px; object-fit: contain; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.h12-sx-band__item:hover img { transform: translateY(-6px) scale(1.04); }
.h12-sx-band__item span { display: block; margin-top: 6px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--h12-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes h12-sx-defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---- Explorateur de couleurs ---- */
.h12-sx-ex { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: start; margin-top: 30px; }
.h12-sx-ex__stage { position: relative; background: #fff; border: var(--h12-bd); border-radius: var(--h12-radius); padding: 22px; scroll-margin-top: 90px; }
.h12-sx-ex__photo { display: grid; place-items: center; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 55%, #f4f4f2 0%, #fff 70%); border-radius: 4px; overflow: hidden; }
.h12-sx-ex__photo img { display: block; width: 86%; height: 86%; object-fit: contain; }
.h12-sx-ex__photo img.is-swap { animation: h12-sx-pop .45s cubic-bezier(.16,1,.3,1); }
@keyframes h12-sx-pop { from { opacity: .2; transform: scale(.96); } to { opacity: 1; transform: none; } }
.h12-sx-ex__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0 14px; padding-top: 14px; border-top: 1px solid var(--h12-border); }
.h12-sx-ex__modele { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--h12-text-2); }
.h12-sx-ex__couleur { display: block; margin-top: 4px; font-family: var(--h12-font-display); font-weight: 400; font-size: 30px; line-height: 1; text-transform: uppercase; }
.h12-sx-ex__swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.h12-sx-ex__swatches[hidden] { display: none; }
.h12-sx-ex__swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px #cfcfcb; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.h12-sx-ex__swatch:hover { transform: scale(1.12); }
.h12-sx-ex__swatch.is-on { box-shadow: 0 0 0 2px var(--h12-red); transform: scale(1.12); }
.h12-sx-ex__swatch:focus-visible { outline: 2px solid var(--h12-ink); outline-offset: 3px; }
.h12-sx-ex__modeles { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.h12-sx-ex__choix { display: flex; gap: 16px; padding: 18px 20px; border: var(--h12-bd); border-radius: var(--h12-radius); background: #fff; color: inherit; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.h12-sx-ex__choix:hover { transform: translateX(4px); }
.h12-sx-ex__choix.is-on { border-color: var(--h12-red); box-shadow: inset 4px 0 0 var(--h12-red); }
.h12-sx-ex__num { font-family: var(--h12-font-display); font-size: 22px; line-height: 1; color: var(--h12-red); min-width: 30px; }
.h12-sx-ex__txt strong { display: block; font-size: 16px; font-weight: 800; }
.h12-sx-ex__txt > span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.55; color: var(--h12-text-2); }
.h12-sx-ex__txt em { display: block; margin-top: 8px; font-style: normal; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--h12-ink); }

/* ---- Bloc texte + vidéo d'atelier ---- */
.h12-sx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 52px; align-items: center; }
.h12-sx-video { position: relative; margin: 0; border-radius: var(--h12-radius); overflow: hidden; background: #111; box-shadow: 0 30px 60px -28px rgba(0,0,0,.45); }
.h12-sx-video video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.h12-sx-video figcaption { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 2px; background: rgba(10,10,10,.78); color: #fff; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.h12-sx-videos { display: grid; gap: 18px; }
.h12-sx-video figcaption::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--h12-red); box-shadow: 0 0 0 4px rgba(225,29,46,.25); }

/* ---- Carrousel de produits ---- */
.h12-sx-rail__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.h12-sx-rail__nav { display: flex; gap: 8px; flex: none; }
.h12-sx-rail__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #cbcbc7; border-radius: 50%; background: #fff; color: var(--h12-ink); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.h12-sx-rail__btn:hover { background: var(--h12-ink); color: #fff; transform: translateY(-2px); }
.h12-sx-rail__btn:disabled { opacity: .3; pointer-events: none; }
.h12-sx-rail__btn svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.h12-sx-rail__track { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
.h12-sx-rail__track::-webkit-scrollbar { display: none; }
.h12-sx-rail__item { flex: 0 0 calc((100% - 54px) / 4); scroll-snap-align: start; min-width: 0; }

/* ---- Photos dans les cartes de combos d'hiver ---- */
.h12-wcombo__pics { display: flex; justify-content: center; margin: -6px 0 2px; }
.h12-wcombo__pics img { width: 92px; height: 92px; object-fit: contain; background: #fff; border: 1px solid var(--h12-border); border-radius: 50%; padding: 8px; margin-left: -16px; box-shadow: 0 8px 18px -10px rgba(0,0,0,.35); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.h12-wcombo__pics a { display: block; position: relative; margin-left: -16px; border-radius: 50%; }
.h12-wcombo__pics a:first-child { margin-left: 0; }
.h12-wcombo__pics a img { display: block; margin-left: 0; transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .2s; }
.h12-wcombo:hover .h12-wcombo__pics img { transform: translateY(-4px); }
.h12-wcombo:hover .h12-wcombo__pics a:nth-child(2) img { transform: translateY(-7px); }
.h12-wcombo__pics a:hover { z-index: 2; }
.h12-wcombo .h12-wcombo__pics a:hover img { border-color: var(--h12-red); transform: translateY(-9px) scale(1.06); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
	.h12-sx-rail__item { flex-basis: calc((100% - 36px) / 3); }
}
@media (max-width: 900px) {
	.h12-sx-hero { padding: 56px 24px 64px; }
	.h12-sx-hero__inner { grid-template-columns: 1fr; gap: 26px; }
	.h12-sx-hero__art { height: 360px; max-width: 520px; width: 100%; margin: 0 auto; }
	.h12-sx-ex { grid-template-columns: 1fr; gap: 22px; }
	.h12-sx-split { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
	.h12-sx-hero { padding: 44px 20px 52px; }
	.h12-sx-hero__faits { gap: 12px 22px; }
	.h12-sx-hero__faits dt { font-size: 28px; }
	.h12-sx-hero__art { height: 270px; order: -1; margin-bottom: 6px; }
	.h12-sx-card { padding: 9px 9px 8px; }
	.h12-sx-card figcaption { font-size: 8.5px; }
	/* En bas, la légende cachait le logo brodé de la tuque */
	.h12-sx-videos .h12-sx-video figcaption { top: 10px; bottom: auto; left: 10px; padding: 6px 10px; font-size: 9.5px; }
	.h12-sx-band__item { width: 104px; }
	.h12-sx-band__item img { height: 118px; }
	.h12-sx-ex__stage { padding: 14px; }
	.h12-sx-ex__couleur { font-size: 24px; }
	.h12-sx-ex__meta { flex-wrap: wrap; }
	.h12-sx-rail__item { flex-basis: 74%; }
	.h12-sx-rail__head { align-items: start; flex-direction: column; }
	.h12-wcombo__pics img { width: 78px; height: 78px; }
}
@media (prefers-reduced-motion: reduce) {
	.h12-sx-card, .h12-sx-band__track, .h12-sx-ex__photo img.is-swap { animation: none; }
	.h12-sx-band { overflow-x: auto; }
	.h12-sx-ex__choix:hover, .h12-sx-rail__btn:hover { transform: none; }
}
