/* HOME XMAS 2026 - FR
   Tout est prefixe .xh : aucun impact sur le reste du site. */

/* ---------- Couleurs, espacements ---------- */
.xh {
  --brown: #76402D;
  --cream: #F3EADD;
  --navy: #1B2440;
  --gap: 10px;                          /* espace entre les tuiles */
  --w: 87%;                             /* largeur des blocs d'images */
  --inset: clamp(12px, 1.2vw, 20px);    /* marge des libelles dans les tuiles */
  --space: clamp(40px, 4.5vw, 72px);    /* espace avant les blocs texte */
  background: var(--cream);
  color: var(--brown);
  font-family: var(--font-primary, "Montserrat", Arial, sans-serif);
  line-height: 1.5;
}

/* ---------- Remise a zero (contre les styles globaux du site) ---------- */
.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-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); }
.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); } }

/* ---------- Grille 6 tuiles : large / etroite alternees ---------- */
.xh-grid { display: grid; gap: var(--gap); width: var(--w); margin: var(--space) auto 0; }   /* espace header / mosaique */
.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; }   /* la tuile large prend la hauteur de l'etroite */

/* ---------- 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;   /* trait colle au texte */
}
.xh .xh-more:hover { opacity: .6; }

/* ---------- A mettre sous le sapin : 4 tuiles alignees sur la grille ---------- */
.xh-carousel { width: var(--w); margin: clamp(20px, 2.2vw, 32px) auto 0; padding-bottom: var(--space); }
.xh .xh-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.xh .xh-tiles li { min-width: 0; margin: 0; padding: 0; }
.xh .xh-tiles li::before { content: none; }
.xh .xh-tiles h3 { text-align: center; }
.xh-btn { display: none; }   /* fleches : mobile uniquement */

/* ---------- Accessibilite ---------- */
.xh a:focus-visible, .xh-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .xh-tile img { transition: none; } }

/* ---------- Tablette ---------- */
@media (max-width: 1024px) { .xh { --w: 94%; } }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .xh { --gap: 6px; --w: calc(100% - 12px); --inset: 10px; --space: 32px; }

  /* Grille : Tenues de fetes / Accessoires + Mailles / Incontournables / Cartes + Perso */
  .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 { font-size: 14px; }
  .xh .xh-text h2 { font-size: 18px; }
  .xh .xh-text p { font-size: 14px; }

  /* Carrousel : une grande tuile + fleches de chaque cote */
  .xh-carousel { display: grid; grid-template-columns: 1fr 76% 1fr; align-items: center; width: 100%; }
  .xh .xh-tiles { grid-area: 1 / 2; display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .xh-tiles::-webkit-scrollbar { display: none; }
  .xh .xh-tiles li { flex: 0 0 100%; scroll-snap-align: center; }
  .xh-btn:not([hidden]) { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--brown); justify-self: center; }
  .xh-prev { grid-area: 1 / 1; }
  .xh-next { grid-area: 1 / 3; }
  .xh-btn svg { width: 10px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
  .xh-btn:disabled { opacity: .25; }
}