/* HOME XMAS 2026 - tout est prefixe .xh / .xv : aucun impact sur le reste du site */

/* Variables */
.xh { --brown: #76402D; --cream: #F3EADD; --navy: #1B2440; --gap: 10px; --w: 87%; --inset: clamp(12px, 1.2vw, 20px); --space: clamp(40px, 4.5vw, 72px); --rib: 24px;
  background: var(--cream); color: var(--brown); font-family: var(--font-primary, "Montserrat", Arial, sans-serif); line-height: 1.5; }

/* Remise a zero */
.xh * { box-sizing: border-box; }
.xh h1, .xh h2, .xh h3, .xh p { margin: 0; font-family: inherit; }
.xh a { color: inherit; text-decoration: none; }
.xh img { display: block; width: 100%; height: auto; }
.xh ul { margin: 0; padding: 0; list-style: none; }
.xh li { min-width: 0; margin: 0; padding: 0; }
.xh li::before { content: none; }
.xh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tuile photo + libelle */
.xh-tile { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--navy); cursor: pointer; }
.xh-tile img { position: absolute; inset: 0; height: 100%; object-fit: cover; transition: transform 1s ease; }
.xh-tile::after { content: ""; position: absolute; inset: 60% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .45)); }
.xh .xh-tile h2, .xh .xh-tile h3 { position: absolute; z-index: 1; left: var(--inset); right: var(--inset); bottom: var(--inset);
  font-size: clamp(16px, 1.1vw, 20px); font-weight: 500; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.xh .xh-right h2 { text-align: right; }
@media (hover: hover) { .xh-tile:hover img { transform: scale(1.015); } }

/* Mosaique : rangees large / etroite */
.xh-grid { display: grid; gap: var(--gap); width: var(--w); margin: var(--space) auto 0; }
.xh-row { display: grid; grid-template-columns: 2.25fr 1fr; gap: var(--gap); }
.xh-row--rev { grid-template-columns: 1fr 2.25fr; }
.xh-wide { aspect-ratio: auto; }

/* Blocs texte */
.xh-text { max-width: 60ch; margin: 0 auto; padding: var(--space) 20px 0; text-align: center; }
.xh .xh-text h2 { font-size: clamp(20px, 1.5vw, 24px); font-weight: 500; letter-spacing: .05em; line-height: 1.3; text-transform: uppercase; }
.xh .xh-text p { margin-top: 12px; font-size: 16px; }
.xh .xh-more { display: inline-block; margin-top: 8px; font-size: 16px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; text-decoration: underline 1px; text-underline-offset: 1px; }
.xh .xh-more:hover { opacity: .6; }

/* A mettre sous le sapin : autant de colonnes que de tuiles */
.xh-carousel { width: var(--w); margin: clamp(20px, 2.2vw, 32px) auto 0; padding-bottom: var(--space); }
.xh .xh-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--gap); }
.xh .xh-tiles h3 { text-align: center; }

/* Coulisses de Noel : cartes video */
.xh .xv-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); width: var(--w); margin: 28px auto 0; }
.xv-card { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; padding: 0; border: 0; overflow: hidden; background: #EFE6D8; font: inherit; cursor: pointer; }
.xv-card[aria-disabled="true"] { cursor: not-allowed; }
.xh .xv-card img { position: absolute; inset: 0; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 2.2s cubic-bezier(.22, 1, .36, 1) .45s; }
.xv-play { position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(243, 234, 221, .95); box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  opacity: 0; transform: scale(.9); transition: opacity .8s ease 1.35s, transform .9s cubic-bezier(.22, 1, .36, 1) 1.35s; }
.xv-play::before { content: ""; position: absolute; top: 50%; left: 55%; transform: translate(-50%, -50%); border: solid transparent; border-width: 9px 0 9px 14px; border-left-color: var(--brown); }

/* Emballage : papier, rubans, etiquette (s'ouvrent en ~2 s) */
.xv-wrap { position: absolute; inset: 0; pointer-events: none; }
.xv-paper { position: absolute; inset: -2px; background: #EFE6D8 url("../papier.jpg") center / cover; opacity: .94; transition: opacity 1.3s cubic-bezier(.4, 0, .2, 1) .55s, transform 1.6s cubic-bezier(.22, 1, .36, 1) .55s; }
.xv-rv, .xv-rh { position: absolute; background: #F8F3EB url("../papier.jpg") center / 400px; box-shadow: 0 1px 4px rgba(118, 64, 45, .15); transition: transform 1.1s cubic-bezier(.45, 0, .2, 1) .15s, opacity .45s ease .8s; }
.xv-rv { top: 0; bottom: 0; left: 46%; width: var(--rib); margin-left: calc(var(--rib) / -2); transform-origin: 50% 0; }
.xv-rh { left: 0; right: 0; top: 52%; height: var(--rib); margin-top: calc(var(--rib) / -2); transform-origin: 100% 50%; transition-delay: .25s, .9s; }
.xv-tag { position: absolute; top: 52%; left: 46%; transform: translate(-50%, -50%); transform-origin: 50% 0; padding: 6px 12px; background: #FBF8F3; box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  color: var(--brown); font-size: 14px; letter-spacing: .06em; line-height: 1.2; text-align: center; white-space: nowrap; transition: opacity .6s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.22, 1, .36, 1); }
.xv-tag b { display: block; font-size: 16px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.is-open .xv-tag { opacity: 0; transform: translate(-50%, -50%) translateY(-8px) scale(.96); }
.is-open .xv-rv { opacity: 0; transform: scaleY(0); }
.is-open .xv-rh { opacity: 0; transform: scaleX(0); }
.is-open .xv-paper { opacity: 0; transform: scale(1.04); }
.xh .is-open img { transform: none; }
.is-open .xv-play { opacity: 1; transform: none; }
@media (hover: hover) { .is-open:hover .xv-play { transform: scale(1.06); transition-delay: 0s; } }

/* Video pas encore sortie : l'etiquette se balance au clic (--d sens, --a force) */
.nope .xv-tag { animation: xv-nope .65s cubic-bezier(.3, .7, .4, 1); }
.nope .xv-rv, .nope .xv-rh { animation: xv-soft .55s ease; }
@keyframes xv-nope { 18% { translate: calc(var(--d) * var(--a) * -8px) 0; rotate: calc(var(--d) * var(--a) * 4deg); } 40% { translate: calc(var(--d) * var(--a) * 6px) 0; rotate: calc(var(--d) * var(--a) * -3deg); }
  62% { translate: calc(var(--d) * var(--a) * -3px) 0; rotate: calc(var(--d) * var(--a) * 1.5deg); } 82% { translate: calc(var(--d) * var(--a) * 1px) 0; rotate: calc(var(--d) * var(--a) * -.5deg); } }
@keyframes xv-soft { 20% { translate: calc(var(--d) * var(--a) * -2px) 0; } 45% { translate: calc(var(--d) * var(--a) * 1.5px) 0; } 70% { translate: calc(var(--d) * var(--a) * -.5px) 0; } }

/* Lecteur : la carte s'agrandit, fond floute beige, boutons au-dessus de la video */
.xv { position: relative; }
.xv-vids { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }   /* videos chargees par le site, invisibles */
.xv-dlg { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; overflow: hidden; }
.xv-dlg::backdrop { background: none; }
.xv-in { position: absolute; inset: 0; }
.xv-dlg.full .xv-veil { background: #000; }   /* agrandi : fond noir */
.xv-out { position: absolute; z-index: 2; right: 24px; bottom: 24px; display: none; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--cream); color: var(--brown);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25); font: inherit; font-size: 14px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.xv-out svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.xv-dlg.full .xv-out { display: flex; }   /* bouton « Reduire » visible en plein ecran */
.xv-dlg.full .xv-big { display: none; }
.xv-veil { position: absolute; inset: 0; background: rgba(234, 220, 198, .68); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transition: opacity .6s ease; }
.xv-frame { position: absolute; overflow: hidden; background: #000; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.xv-frame img, .xh .xv-frame .videoContainer, .xh .xv-frame video { margin: 0; padding: 0; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xv-bar { position: absolute; z-index: 2; display: flex; gap: 8px; opacity: 0; transition: opacity .3s ease; }
.xv-bar button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border: 0; border-radius: 22px; background: var(--cream); color: var(--brown);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); font: inherit; font-size: 14px; font-weight: 500; line-height: 1; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.xv-bar svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.xv-bar .xv-x { margin-left: auto; }
.xv-dlg:not(.touch) .xv-rot { display: none; }
.xv-bar [hidden] { display: none; }
.xv-bar svg[fill="none"] { fill: none; }
.xv-dlg.on .xv-veil, .xv-dlg.on .xv-bar { opacity: 1; transition-delay: .3s; }

/* Fleches des videos (mobile) */
.xv-nav { display: none; }
.xv-nav button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--brown); cursor: pointer; }
.xv-nav button:disabled { opacity: .25; cursor: default; }
.xv-nav svg { width: 10px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* Accessibilite */
.xh a:focus-visible, .xv-card:focus-visible, .xv-bar button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .xh *, .xv-dlg * { transition: none !important; animation: none !important; } }

/* Tablette */
@media (max-width: 1024px) { .xh { --w: 94%; } }

/* Mobile */
@media (max-width: 767px) {
  .xh { --gap: 6px; --w: calc(100% - 12px); --inset: 10px; --space: 32px; --rib: 18px; }
  .xh-grid { grid-template-columns: 1fr 1fr; margin-top: var(--gap); }
  .xh-row { display: contents; }
  .xh-wide { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
  .xh-m-half { grid-column: auto; aspect-ratio: 2 / 3; }
  .xh-m-first { order: -1; }
  .xh .xh-right h2 { text-align: left; }
  .xh .xh-grid h2, .xh .xh-tiles h3 { font-size: 14px; }
  .xh .xh-text h2 { font-size: 18px; }
  .xh .xh-text p { font-size: 14px; }
  .xh-carousel { margin-top: 20px; }
  .xh .xh-tiles { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .xh .xh-tiles li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .xh .xh-tiles li:last-child:nth-child(odd) .xh-tile { aspect-ratio: 3 / 2; }
  .xh .xv-list { display: flex; width: 100%; gap: 8px; margin-top: 20px; padding: 0 6px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .xv-list::-webkit-scrollbar { display: none; }
  .xv-list li { flex: 0 0 84%; scroll-snap-align: center; }
  .xv-nav { display: flex; justify-content: center; gap: 24px; margin-top: 10px; }
  .xv-bar .xv-big, .xv-dlg .xv-out { display: none; }   /* mobile : pas de plein ecran, seulement Pivoter */
}