* { box-sizing: border-box; }
:root {
  --bordeaux-noel: #78262e;
  --sapin-noel: #294c39;
  --or-noel: #d7b879;
  --ivoire-noel: #fbf3e6;
  --image-noel: url("/fond-noel-ivoire.jpg");
  --fond-dore:
    radial-gradient(ellipse at 40% 14%, #fffdf8, transparent 68%),
    linear-gradient(130deg, #fbf6ed, #e9d5b5);
  --fond-noel-ruban: url("/fond-noel-ruban.jpg");
  font-family: Lato, Arial, sans-serif;
  color: #392c23;
  background: var(--ivoire-noel);
}
body { margin: 0; background: var(--fond-dore); }
h1, h2, h3 { font-family: Ubuntu, Arial, sans-serif; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #cf9653; outline-offset: 4px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top { position: sticky; top: 0; z-index: 10; isolation: isolate; background: white; box-shadow: inset 0 -1px #e8d1a5; }
#calendrier { scroll-margin-top: 76px; }
.top::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 4px at 41% 32%, #dca64e 10%, #edd3a185 38%, transparent),
    radial-gradient(circle 5px at 48% 73%, #dca64e 10%, #edd3a185 38%, transparent),
    radial-gradient(circle 4px at 61% 41%, #dca64e 10%, #edd3a185 38%, transparent);
  animation: scintiller-noel 7.4s ease-in-out -1s infinite;
}
.top .wrap, footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.top .wrap { min-height: 76px; }
.top img { width: 136px; height: auto; display: block; }
.top a { color: var(--sapin-noel); font-weight: 700; text-underline-offset: 5px; }
.navigation-entete { display: flex; align-items: center; gap: 6px; }
.navigation-continue { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; }
.navigation-continue-active > :not(.navigation-continue) { display: none !important; }
.navigation-continue-active > .navigation-continue { visibility: visible; }
.commande-musique {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  color: var(--sapin-noel); background: transparent; cursor: pointer;
}
.commande-musique:hover { background: #f4eee7; }
.commande-musique:focus-visible { outline: 2px solid var(--sapin-noel); }
.commande-musique svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.commande-musique:not(.musique-en-cours) .son-actif,
.commande-musique.musique-en-cours .son-coupe { display: none; }
.accueil-noel, .indice-page, .puzzle-page {

  position: relative;
  isolation: isolate;
  background: #57070e;

}
.etoiles-noel {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  container-type: size;
}
.etoiles-noel > span {
  position: absolute;
  inset-block: 0;
  left: var(--position);
  width: var(--taille, 8px);
  animation: chute-etincelle var(--duree, 12s) linear var(--retard) infinite;
}
.etoiles-noel > span::before {
  content: "";
  display: block;
  aspect-ratio: 1;
  background: #fff3dd;
  clip-path: polygon(50% 0, 60% 39%, 100% 50%, 60% 61%, 50% 100%, 40% 61%, 0 50%, 40% 39%);
  animation: lueur-guirlande 2.8s ease-in-out var(--retard) infinite;
}
.etoiles-noel span:nth-child(1) { --position: 4%; --retard: -3s; }
.etoiles-noel span:nth-child(2) { --position: 14%; --retard: -8s; --taille: 5px; }
.etoiles-noel span:nth-child(3) { --position: 28%; --retard: -5s; --duree: 16s; }
.etoiles-noel span:nth-child(4) { --position: 43%; --retard: -9s; --taille: 11px; }
.etoiles-noel span:nth-child(5) { --position: 58%; --retard: -2s; --duree: 14s; }
.etoiles-noel span:nth-child(6) { --position: 73%; --retard: -11s; --taille: 6px; }
.etoiles-noel span:nth-child(7) { --position: 88%; --retard: -7s; --duree: 15s; }
.etoiles-noel span:nth-child(8) { --position: 96%; --retard: -4s; --taille: 10px; }
.decor-sapin {
  position: absolute;
  inset: 0 0 auto auto;
  width: max(100cqw, 150cqh);
  aspect-ratio: 3 / 2;
  background: var(--fond-noel-ruban) center / 100% 100% no-repeat;
}
.guirlande-sapin i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(4px, .52vw, 8px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #ffd48d;
  box-shadow: 0 0 5px 2px #ffbe57a0, 0 0 13px 4px #ffa03949;
  opacity: .28;
  animation: lueur-guirlande 4.8s ease-in-out var(--retard) infinite;
}
.guirlande-sapin i:nth-child(1) { --x: 30%; --y: 13%; --retard: -1.4s; }
.guirlande-sapin i:nth-child(2) { --x: 43%; --y: 10%; --retard: -2.7s; }
.guirlande-sapin i:nth-child(3) { --x: 53%; --y: 17%; --retard: -.4s; }
.guirlande-sapin i:nth-child(4) { --x: 64%; --y: 22%; --retard: -3.9s; }
.guirlande-sapin i:nth-child(5) { --x: 74%; --y: 24%; --retard: -1.8s; }
.guirlande-sapin i:nth-child(6) { --x: 82%; --y: 28%; --retard: -3s; }
.guirlande-sapin i:nth-child(7) { --x: 91%; --y: 34%; --retard: -.8s; }
.guirlande-sapin i:nth-child(8) { --x: 96%; --y: 40%; --retard: -2.2s; }
@media (prefers-reduced-motion: reduce) {
  .etoiles-noel > span { display: none; }
  .guirlande-sapin i { animation: none; }
}
.puzzle-page .puzzle-main :is(h2, .stats, .instructions, .foot, .tray-note) { color: #fff4ee; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: white;
  --eclat-1: 77% 24%;
  --eclat-2: 89% 71%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #2c0205b8, #43040870 58%, transparent 86%);
  mask-image: linear-gradient(to bottom, black 70%, transparent);
}
.hero-layout { display: grid; grid-template-columns: minmax(0, 1fr); position: relative; }
.hero #titre { color: white; font-size: clamp(2.35rem, 7vw, 5.7rem); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  @media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
    .hero #titre {
      width: fit-content;
      background-image: linear-gradient(106deg, white 34%, #ffd4bf 44%, #ffdf9d 50%, #ffd4bf 56%, white 66%);
      background-size: 330% 100%;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      animation: reflet-titre 5.8s ease-in-out -1.7s infinite;
    }
  }
}
@keyframes reflet-titre {
  0%, 12% { background-position: 100% center; }
  70%, 100% { background-position: 0% center; }
}
.guirlande-noel {
  --fil-guirlande: #a47132a1;
  --ampoule: #fffcdf 0 20%, #e6a843 34%, #edb35083 52%, transparent 100%;
  position: absolute; width: clamp(82px, 13vw, 150px); height: 31px; pointer-events: none;
  background:
    radial-gradient(circle 4px at 8% 35%, var(--ampoule)),
    radial-gradient(circle 5px at 28% 61%, var(--ampoule)),
    radial-gradient(circle 5px at 50% 72%, var(--ampoule)),
    radial-gradient(circle 4px at 72% 61%, var(--ampoule)),
    radial-gradient(circle 4px at 92% 35%, var(--ampoule));
  animation: lueur-guirlande 8.2s ease-in-out -2s infinite;
}
.guirlande-noel::before {
  content: ""; position: absolute; inset: 0 5% 8px;
  border-bottom: 1px solid var(--fil-guirlande); border-radius: 0 0 50% 50%;
}
.guirlande-hero {
  --fil-guirlande: #e9ba75c9;
  top: 14px; right: clamp(18px, 8vw, 130px); z-index: -1;
}
@keyframes lueur-guirlande {
  0%, 100% { opacity: .14; }
  35%, 67% { opacity: .95; }
  49% { opacity: .55; }
}
.intro { padding-block: 48px 30px; position: relative; z-index: 1; }
h1 { margin: 0 0 12px; font-size: clamp(3rem, 7.5vw, 6rem); line-height: 1.04; letter-spacing: -.055em; }
.question { font-family: Ubuntu, Arial, sans-serif; font-size: clamp(1.35rem, 3vw, 2rem); margin: 0; }
.pitch { max-width: 56ch; line-height: 1.5; margin: 16px 0 22px; }
.pitch p { margin: 0 0 .7em; }
.hero .button { background: white; color: #850d1b; }
.hero .button:hover { background: #fff1ee; }
.button { display: inline-block; padding: 14px 21px; border-radius: 6px; font-weight: 700; background: #a8353a; color: white; text-decoration: none; }
.button:hover { background: #86282e; }
.calendar { padding-block: 44px 52px; }
#calendrier {
  position: relative; isolation: isolate;
  --cadre-haut: 22px;
  --cadre-debord: -18px;
  --cadre-bas: 94px;
  padding-block-end: 122px;
}
#calendrier::before {
  content: ""; position: absolute; inset: var(--cadre-haut) var(--cadre-debord) var(--cadre-bas);
  z-index: -1; pointer-events: none; border: 1px solid #d2ac6a; border-radius: 15px;
  background: #fff7f7f5;
  box-shadow: 0 6px 22px #31030850;
}
.decor-calendrier {
  position: absolute; inset: auto var(--cadre-debord) 0; height: var(--cadre-bas);
  z-index: -1; pointer-events: none; overflow: hidden;
}
.decor-calendrier::before {
  content: ""; position: absolute; inset: 0;
  --lueur-calendrier: #fffbed 0 12%, #ffd486 26%, #e0a94e70 52%, transparent 100%;
  background:
    radial-gradient(circle 6px at 22% 29%, var(--lueur-calendrier)),
    radial-gradient(circle 4px at 37% 64%, var(--lueur-calendrier)),
    radial-gradient(circle 6px at 68% 37%, var(--lueur-calendrier)),
    radial-gradient(circle 7px at 88% 66%, var(--lueur-calendrier));
  animation: scintiller-noel 5.6s ease-in-out -1.4s infinite;
}
.etincelles-calendrier { position: absolute; inset: 0; }
.etincelles-calendrier span {
  position: absolute; inset-block: 0; left: var(--position-etincelle);
  width: var(--taille-etincelle);
  animation: chute-etincelle var(--duree-etincelle) linear var(--retard-etincelle) infinite;
}
.etincelles-calendrier span::before {
  content: ""; display: block; aspect-ratio: 1;
  background: linear-gradient(135deg, #fff8e1 8%, #f2c366 48%, #a36628);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.etincelles-calendrier span:nth-child(1) { --position-etincelle: 5%; --taille-etincelle: 11px; --duree-etincelle: 7s; --retard-etincelle: -2s; --repos-etincelle: 20%; }
.etincelles-calendrier span:nth-child(2) { --position-etincelle: 27%; --taille-etincelle: 9px; --duree-etincelle: 9s; --retard-etincelle: -4s; --repos-etincelle: 53%; }
.etincelles-calendrier span:nth-child(3) { --position-etincelle: 41%; --taille-etincelle: 12px; --duree-etincelle: 8s; --retard-etincelle: -5s; --repos-etincelle: 34%; }
.etincelles-calendrier span:nth-child(4) { --position-etincelle: 57%; --taille-etincelle: 9px; --duree-etincelle: 7.5s; --retard-etincelle: -1s; --repos-etincelle: 61%; }
.etincelles-calendrier span:nth-child(5) { --position-etincelle: 73%; --taille-etincelle: 10px; --duree-etincelle: 10s; --retard-etincelle: -7s; --repos-etincelle: 46%; }
.etincelles-calendrier span:nth-child(6) { --position-etincelle: 94%; --taille-etincelle: 11px; --duree-etincelle: 8.5s; --retard-etincelle: -3.5s; --repos-etincelle: 26%; }
@keyframes chute-etincelle {
  0% { transform: translate(-5px, -10%); opacity: 0; }
  18%, 76% { opacity: .96; }
  100% { transform: translate(5px, 100%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .decor-calendrier::before { animation: none; opacity: .65; }
  .etincelles-calendrier span { animation: none; transform: translateY(var(--repos-etincelle)); opacity: .7; }
}
.titre-calendrier { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.titre-calendrier h2 { color: var(--bordeaux-noel); }
.sapins-decoratifs { display: flex; flex: none; align-items: end; gap: 3px; padding-inline-end: 2px; }
.sapins-decoratifs span {
  width: 19px; height: 26px; background: var(--sapin-noel);
  clip-path: polygon(50% 0, 76% 33%, 65% 33%, 88% 61%, 75% 61%, 100% 88%, 57% 88%, 57% 100%, 43% 100%, 43% 88%, 0 88%, 25% 61%, 12% 61%, 35% 33%, 24% 33%);
}
.sapins-decoratifs span:nth-child(2) { width: 25px; height: 35px; }
.sapins-decoratifs span:last-child { width: 14px; height: 20px; background: #b48848; }
h2 { font-size: clamp(1.65rem, 4vw, 2.35rem); margin: 0 0 9px; letter-spacing: -.025em; }
#etat { color: #695742; margin: 0 0 24px; }
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.days li { display: flex; }
.card {
  --carte-ruban: #ba394d;
  width: 100%; min-height: 147px; display: flex; flex-direction: column; align-items: flex-start;
  gap: 9px; padding: 16px; border: 1px solid #e6d8bd; border-radius: 10px;
  background: white linear-gradient(var(--carte-ruban), var(--carte-ruban)) top / 100% 6px no-repeat;
  box-shadow: 0 4px 12px #5639231a;
  text-decoration: none;
}
.card.open { --carte-ruban: #3b7757; }
.card.open:hover { box-shadow: 0 6px 16px #56392330; }
.card.open:focus-visible { outline-color: var(--bordeaux-noel); }
.carte-invitation .card { background-color: #810f1b; color: white; border-color: #a94750; }
.carte-invitation .card .date { color: #fff2f3; }
.carte-invitation .decompte-invitation { background: white; }
.card .day { color: #65513a; font-size: .875rem; font-weight: 700; }
.card h3 { font-size: 1.03rem; margin: 0; }
.badge { margin-top: auto; padding: 4px 8px; border-radius: 4px; color: #88292d; background: #f8e8e9; font-size: .875rem; }
.open .badge { color: #24553b; background: #e5f2e8; }
.date { font-size: .875rem; color: #65513a; }
footer { padding: 23px 0; background: white; border-top: 1px solid #e6d8bd; font-size: .875rem; }
footer strong { letter-spacing: .12em; }
@media (max-width: 760px) {
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .days .carte-invitation { grid-column: span 2; }
}
@media (max-width: 720px) {
  .days { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
 .wrap { width: calc(100% - 36px); }
 .top .wrap { min-height: 62px; }
 .top img { width: 106px; }
 .hero { --eclat-1: 71% 12%; --eclat-2: 90% 17%; }
 .guirlande-hero { top: 6px; right: 16px; }
 .hero-layout { display: block; min-height: auto; }
 .intro { padding-block: 132px 20px; }
 .hero::before { background: linear-gradient(180deg, transparent 35px, #3b0308c9 180px); }
 .calendar { padding-block: 32px 38px; }
 #calendrier {
   --cadre-haut: 15px;
   --cadre-debord: -8px;
   --cadre-bas: 86px;
   padding-block-end: 108px;
 }
 .days { gap: 10px; }
 .card { padding: 13px; min-height: 126px; }
}

.en-tete-indice {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(24px, 5vw, 48px);
  background: linear-gradient(100deg, var(--ivoire-noel), #e3c599);
  box-shadow: inset 0 -1px #b5895066;
  --eclat-1: 86% 26%;
  --eclat-2: 96% 67%;
}
.en-tete-indice::before {
  content: ""; position: absolute; z-index: -1; inset: 0 0 0 auto;
  width: min(38%, 530px); pointer-events: none;
  background: var(--image-noel) right 43% / auto clamp(145px, 16vw, 245px) no-repeat;
  mask-image: linear-gradient(to right, transparent 12%, #000 72%);
}
.indice-page .en-tete-indice::before,
.puzzle-page .en-tete-indice::before { content: none; }
:is(.indice-page, .puzzle-page) .en-tete-indice {
  background: transparent;
  box-shadow: none;
}
:is(.indice-page, .puzzle-page) .en-tete-indice .titre-enigme,
:is(.indice-page, .puzzle-page) .en-tete-indice .titre-enigme span,
.indice-page .aide-indice,
.invitation-page .calendar > p,
.invitation-page .solutions-invitation h2 {
  color: white;
  text-shadow: 0 1px 3px #240205, 0 1px 8px #240205;
}
.hero::after, .hero-layout::after, .en-tete-indice::after, .en-tete-indice > .wrap::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  --eclat: var(--eclat-1);
  --lumiere: #fffef4 0 12%, #ffda88 38%, transparent 100%;
  background:
    radial-gradient(ellipse 14px 1.7px at var(--eclat), var(--lumiere)),
    radial-gradient(ellipse 1.7px 16px at var(--eclat), var(--lumiere)),
    radial-gradient(circle 12px at var(--eclat), #ffce739e, transparent),
    var(--lueurs-noel, none);
  animation: scintiller-noel 5.2s ease-in-out -.8s infinite;
}
.en-tete-indice::after {
  --lueurs-noel:
    radial-gradient(circle 5px at 80% 59%, #fff5d0 12%, #f0bf648f 36%, transparent),
    radial-gradient(circle 4px at 89% 18%, #fff5d0 12%, #f0bf648f 36%, transparent),
    radial-gradient(circle 6px at 94% 48%, #fff5d0 12%, #f0bf648f 36%, transparent);
}
.hero::after {
  --lueurs-noel:
    radial-gradient(circle 5px at 81% 43%, #fff5d0 12%, #f0bf6496 36%, transparent),
    radial-gradient(circle 4px at 91% 36%, #fff5d0 12%, #f0bf6496 36%, transparent),
    radial-gradient(circle 6px at 95% 69%, #fff5d0 12%, #f0bf6496 36%, transparent);
}
.hero-layout::after, .en-tete-indice > .wrap::after {
  --eclat: var(--eclat-2);
  animation-duration: 7.4s;
  animation-delay: -3s;
}
.hero-layout::after { z-index: 0; }
@keyframes scintiller-noel {
  0%, 100% { opacity: .18; }
  42% { opacity: 1; }
  72% { opacity: .34; }
}
@media (prefers-reduced-motion: reduce) {
  .top::after, .guirlande-noel, .hero::after, .hero-layout::after, .en-tete-indice::after, .en-tete-indice > .wrap::after {
    animation: none; opacity: .6;
  }
}
@media (max-width: 750px) {
  .en-tete-indice::before { opacity: .35; }
}
.en-tete-indice h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.5rem); }
.en-tete-indice .titre-enigme { color: var(--bordeaux-noel); }
.indice-visuel { margin-block: 25px 42px; }
.indice-visuel img {
  display: block;
  margin-inline: auto;
  max-width: 100%;
  max-height: min(76vh, 850px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 28px #392c2326;
}

.indice-grille img { max-width: min(100%, 760px); max-height: none; height: auto; }

.aide-indice { margin-block: 22px 0; line-height: 1.5; }
[data-jeu] .indice-visuel { position: relative; width: min(760px, calc(100% - 36px)); }
[data-jeu] .indice-visuel img { width: 100%; max-height: none; }
.panneau-reponses {
  margin-block: 0 40px;
  color: white;
  text-shadow: 0 1px 4px #240205;
}
.panneau-reponses label { display: grid; gap: 6px; font-weight: 700; }
.panneau-reponses input {
  border: 0; border-radius: 5px; min-width: 0; width: 100%;
  min-height: 38px; padding: 9px; font: inherit; color: #392c23; background: white;
}
.panneau-reponses :is(input, button):focus-visible { outline: 2px solid #ffdb94; outline-offset: 3px; }
.panneau-reponses .button { min-height: 44px; }
#cases { position: absolute; left: 16.44%; top: 17.62%; width: 67.15%; height: 50.65%; display: grid; grid-template: repeat(13,minmax(0, 1fr)) / repeat(13,minmax(0, 1fr)); }
#cases input { min-width: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; color: #6b2125; font: 700 clamp(1rem, 3vw, 1.5rem) Ubuntu, sans-serif; text-align: center; cursor: text; }
#cases input:focus { outline: 2px solid #a8353a; outline-offset: -2px; background: #f6df9e9e; z-index: 1; }


/* Les deux jeux utilisent la hauteur visible, y compris sur mobile. */
body[data-jeu] { height: 100dvh; display: flex; flex-direction: column; }
body[data-jeu] > .top { flex: none; }
[data-jeu] main {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
[data-jeu] .en-tete-indice { padding-block: clamp(8px, 2dvh, 20px); }
[data-jeu] .en-tete-indice h1 { font-size: clamp(1.25rem, 4dvh, 2.25rem); }
[data-jeu] .aide-indice { margin-block: 6px; font-size: .875rem; }
[data-jeu] .indice-visuel {
  --ratio: 1.333333;
  width: auto;
  min-height: 0;
  margin: 3px 12px;
  container-type: size;
  display: grid;
  place-items: center;
}
[data-jeu="mots-croises"] .indice-visuel { --ratio: 1; }
[data-jeu] .cadre-indice {
  position: relative;
  width: min(100cqw, calc(100cqh * var(--ratio)), 850px);
  aspect-ratio: var(--ratio);
}
[data-jeu] .indice-visuel img { width: 100%; max-width: none; }
[data-jeu] .panneau-reponses {
  width: min(760px, calc(100% - 24px));
  display: grid;
  gap: 10px;
  margin-block: 4px 8px;
}
[data-jeu] .panneau-reponses label { font-size: .875rem; gap: 3px; }
[data-jeu] .panneau-reponses input { padding: 5px 7px; font-size: 1rem; }
#cases input { font-size: clamp(.625rem, 1.9dvh, 1.35rem); }

#reponse-rebus { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
#reponse-rebus button { border: 0; font: 700 .875rem Lato, sans-serif; padding: 8px 12px; cursor: pointer; }
@media (max-width: 600px) {
  #reponse-rebus { grid-template-columns: minmax(0, 1fr); }
  #reponse-rebus button { justify-self: start; }
}
.erreur-reponse { grid-column: 1 / -1; margin: 0; color: #ffe0e5; font-size: .875rem; }
.reponse-validee { width: 100%; overflow-wrap: anywhere; border-top: 1px solid #e6d8bd; padding-top: 8px; color: #574431; font-size: .875rem; line-height: 1.3; }
.reponse-joueur { padding-top: calc(8px + 1lh); }
@media (max-width: 400px) { #reponse-rebus { gap: 6px; } #reponse-rebus button { padding-inline: 8px; } }

.indice-naturel { display: flex; align-items: center; gap: 10px; width: fit-content; padding: 9px 13px; margin: -8px 0 18px; border: 1px solid #b58950; border-radius: 6px; background: #fff9eae8; color: #6b3825; font-size: .9375rem; }
.indice-naturel span { flex: none; font-size: 1.1rem; color: #a8353a; }
.puzzle-main .cell .tile { cursor: grab; }
.puzzle-main .cell .tile.selected { outline-offset: -3px; z-index: 1; }

.largeur-video-indice { max-width: min(72dvh, 820px); }
.video-indice {
  width: 100%;
  display: block; margin-inline: auto; max-width: 100%;
  max-height: min(72dvh, 820px); border-radius: 8px;
  background: #211b17;
}
.actions-video { text-align: center; }
.actions-video .button { margin-top: 16px; border: 0; font: 700 .875rem Lato, sans-serif; cursor: pointer; }
.actions-video .button[hidden] { display: none; }
.pied-page { flex: none; padding: 9px 0; color: #65513a; font-size: .8125rem; }
.pied-page .wrap { justify-content: center; text-align: center; }

body { min-height: 100dvh; display: flex; flex-direction: column; }
body > main, .puzzle-page { flex: 1; }
.puzzle-page { display: flex; flex-direction: column; }
.puzzle-page > main { flex: 1; }
.pied-page { margin-top: auto; }
.pied-page .wrap { justify-content: space-between; text-align: left; gap: 12px; }
.pied-page .liens-legaux { justify-content: flex-start; flex-wrap: wrap; gap: 4px 16px; margin-block-start: 5px; }
.liens-legaux a { padding-block: 4px; text-underline-offset: 3px; }
.liens-legaux a:hover, .liens-legaux a[aria-current="page"] { color: var(--bordeaux-noel); }
.page-legale { padding-block: clamp(24px, 5vw, 44px); }
.texte-legal { max-width: 72ch; padding: clamp(16px, 4vw, 34px); border: 1px solid #e6d8bd; border-radius: 9px; background: #fff; line-height: 1.6; overflow-wrap: anywhere; }
.texte-legal h2 { margin: 0 0 6px; color: var(--bordeaux-noel); font-size: clamp(1.12rem, 3vw, 1.35rem); }
.texte-legal p { margin: 0; }
.texte-legal p + p { margin-block-start: 8px; }
.texte-legal section + section { margin-block-start: 20px; }
.texte-legal a { color: var(--bordeaux-noel); text-underline-offset: 3px; }
@media (max-width: 600px) {
  .pied-page .wrap { align-items: baseline; gap: 8px; }
  .pied-page .droits-reserves { display: block; }
}
[data-jeu="mots-croises"] main { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
[data-jeu="mots-croises"] .cadre-indice {
  overflow: hidden; background: white; border-radius: 6px;
  box-shadow: 0 0 0 2px var(--bordeaux-noel), 0 0 0 5px var(--or-noel);
}
[data-jeu="mots-croises"] .cadre-indice img { width: 100%; height: 100%; max-width: none; border-radius: 0; }
[data-jeu="mots-croises"] #cases {
  inset: 0; width: auto; height: auto;
  gap: 1px; padding: 1px; background: #53676b;
}
.case-croisee { position: relative; min-width: 0; min-height: 0; background: white; }
.case-croisee.case-noire { background: #223a40; }
.case-croisee:has(.case-mystere) { background: #dcebe8; }
.numeros-case, .repere-mystere {
  position: absolute; z-index: 2; pointer-events: none;
  font-size: clamp(7px, 2.2cqw, 13px); line-height: 1; color: #153238;
}
.numeros-case { inset: 1px 1px auto; display: flex; flex-wrap: wrap; gap: 1px 3px; }
.repere-mystere { inset: auto 2px 1px auto; font-weight: 700; }
.liste-definitions li button {
  padding: 0; border: 0; background: transparent; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
}
.liste-definitions li button:hover { text-decoration: underline; }
#cases[hidden] { display: none; }
.commandes-tactiles { display: none; }
@media (any-pointer: coarse) {
  .aide-mots-croises { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
  .commandes-tactiles { display: flex; flex-wrap: wrap; gap: 6px; }
  .commandes-tactiles button {
    min-height: 40px; padding: 4px 10px; border: 1px solid #cbb591;
    border-radius: 6px; background: white; color: var(--bordeaux-noel); font: inherit;
  }
  [data-jeu="mots-croises"] #cases input { font-size: clamp(1rem, 1.9dvh, 1.35rem); }
}

[data-jeu="mots-croises"] main { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.espace-mots-croises {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px;
  width: min(1120px, calc(100% - 24px)); margin-inline: auto; min-height: 0;
}
.espace-mots-croises .indice-grille { margin: 0; }
.definitions-grille { display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; min-width: 0; }
.zone-definitions {
  min-height: 0; container-type: size; overflow: auto;
  width: min(100%, 480px); margin: auto; height: 100%;
  display: flex; flex-direction: column; justify-content: safe center;
}
@media (max-width: 640px) and (orientation: portrait) {
  body[data-jeu="mots-croises"] { height: auto; }
  [data-jeu="mots-croises"] main { display: flex; flex-direction: column; }
  [data-jeu="mots-croises"] .espace-mots-croises { display: contents; }
  [data-jeu="mots-croises"] .indice-grille {
    width: calc(100% - 32px); max-width: 480px; container-type: normal; margin: 12px auto;
  }
  [data-jeu="mots-croises"] .cadre-indice { width: 100%; }
  [data-jeu="mots-croises"] #cases input { font-size: 1rem; }
  [data-jeu="mots-croises"] .definitions-grille {
    order: 1; width: calc(100% - 32px); margin: 6px auto 24px;
  }
  [data-jeu="mots-croises"] .zone-definitions { display: block; height: auto; container-type: normal; overflow: visible; }
  [data-jeu="mots-croises"] .liste-definitions { font-size: .875rem; line-height: 1.4; }
}



.mot-mystere { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 12px; }
.mot-mystere p { margin: 0; font-size: .8125rem; }
#lettres-mystere { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; max-width: 350px; }
#lettres-mystere label { text-align: center; font-size: .75rem; gap: 1px; }
#lettres-mystere input { text-align: center; padding: 2px; min-height: 25px; }
#lettres-mystere .lettre-active input { background: #fff0ca; }
#cases .case-mystere { border-radius: 50%; box-shadow: inset 0 0 0 1px #a8353a88; }
@media (max-width: 480px) { .mot-mystere { grid-template-columns: 1fr; } }

.puzzle-page .en-tete-indice { padding-block: clamp(8px, 2dvh, 20px); }
.puzzle-page .en-tete-indice h1 { font-size: clamp(1.25rem, 4dvh, 2.25rem); }

.sous-titre-carte { color: #574431; font-size: .9375rem; }


/* Les cartes d’une même rangée partagent les lignes de leurs contenus. */
.days li, .days .card { display: grid; grid-template-rows: subgrid; grid-row: span 6; gap: 9px; min-width: 0; }
.days .card { align-items: start; }
.days .day { grid-row: 1; align-self: center; }
.decompte-invitation {
  grid-row: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%; max-width: 23rem; padding: 7px 3px;
  border: 1px solid #dac097; border-radius: 6px;
  background: linear-gradient(125deg, #fff9ee, #efdcba); color: #695034;
  text-align: center;
}
.decompte-invitation > span {
  display: grid; gap: 2px; min-width: 0;
  font-size: .625rem; line-height: 1.2;
}
.decompte-invitation > span + span { border-inline-start: 1px solid #c9a67580; }
.decompte-invitation strong {
  color: var(--bordeaux-noel); font: 700 1.15rem/1 Ubuntu, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.decompte-invitation.decompte-termine {
  display: block; padding: 8px; color: var(--bordeaux-noel); font-weight: 700;
}
.days .card h3 { grid-row: 2; }
.days .sous-titre-carte { grid-row: 3; }
.days .date { grid-row: 4; font-size: .8125rem; }
@media (max-width: 440px) {
  .days { grid-template-columns: minmax(0, 1fr); }
  .days .carte-invitation { grid-column: auto; }
}
.days .badge { grid-row: 5; justify-self: start; margin-top: 0; }
.days .reponse-validee { grid-row: 6; }
.statut-puzzle, .libelle-reponse, .valeur-reponse { display: block; }



.en-tete-indice h1.titre-enigme { font-size: min(clamp(1.25rem, 4dvh, 2.25rem), 6.1vw); }
.titre-enigme span { color: #000; font-weight: 400; }
@media (max-width: 400px) { .puzzle-page .en-tete-indice .titre-enigme { font-size: min(clamp(1.1rem, 4dvh, 2.25rem), 5.4vw); } }
.mot-mystere #lettres-mystere { grid-column: 1; }
.valider-mystere { grid-column: 2; align-self: end; justify-self: end; border: 0; padding: 6px 9px; font: 700 .8125rem Lato, sans-serif; cursor: pointer; }
@media (max-width: 480px) {
  .mot-mystere { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .mot-mystere .valider-mystere { grid-column: 1; justify-self: start; min-height: 40px; }
  .mot-mystere #lettres-mystere { max-width: none; }
  #lettres-mystere input { min-height: 38px; }
}


#reponse-video { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-block: 12px 0; }
#reponse-video[hidden] { display: none; }
#reponse-video button { border: 0; font: 700 .875rem Lato, sans-serif; cursor: pointer; }
@media (max-width: 600px) { #reponse-video { grid-template-columns: minmax(0, 1fr); } #reponse-video button { justify-self: start; } }

body[data-jeu="rebus"] { height: auto; }
[data-jeu="rebus"] main { grid-template-rows: auto auto auto 1fr; }
[data-jeu="rebus"] .indice-visuel { container-type: normal; margin-block-end: 24px; }
[data-jeu="rebus"] .cadre-indice { width: min(100%, 709px); aspect-ratio: 709 / 1063; }

.invitation-carte {
  --proportions-invitation: 1218 / 1329;
  width: min(560px, calc(100% - 36px)); margin: 24px auto 42px; text-align: center;
}
.invitation-carte img { display: block; width: 100%; height: auto; }
.invitation-carte .enveloppe-invitation {
  aspect-ratio: var(--proportions-invitation);
  object-fit: cover;
  object-position: right center;
}
.ouvrir-invitation {
  list-style: none; border: 1px solid #b5895066; border-radius: 8px;
  background: #fff9ed; color: #79282d; overflow: hidden; cursor: pointer;
}
.ouvrir-invitation::-webkit-details-marker { display: none; }
.ouvrir-invitation span { display: block; padding: 11px; font-weight: 700; }
.ouvrir-invitation:hover { background: #f8e8d9; }
.ouvrir-invitation:focus-visible { outline: 3px solid #a8353a; outline-offset: 4px; }
.invitation-carte:not([open]) > :not(summary),
.invitation-carte:not([open]) .libelle-fermer,
.invitation-carte[open] :is(.libelle-ouvrir, .enveloppe-invitation) { display: none; }
.invitation-carte :is(.video-enveloppe, .carte-invitation-image) {
  display: block; width: min(100%, calc(72vh * var(--proportions-invitation))); height: auto;
  aspect-ratio: var(--proportions-invitation); margin: 14px auto 0; border-radius: 6px;
}
.invitation-carte .video-enveloppe { object-fit: cover; object-position: right center; background: #281e1a; }
.invitation-carte .video-enveloppe[hidden] { display: none; }
.invitation-carte .carte-invitation-image { object-fit: contain; }
.invitation-revelee .button { margin-block-start: 16px; }
.solutions-invitation { width: min(560px, calc(100% - 36px)); margin-block-end: 42px; }
.solutions-invitation h2 { color: var(--bordeaux-noel); font-size: clamp(1.35rem, 3.6vw, 1.8rem); margin-block-end: 14px; }
.solution-enigme { background: white; border: 1px solid #dbbf8c; border-radius: 8px; }
.solution-enigme + .solution-enigme { margin-block-start: 8px; }
.solution-enigme summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 48px; padding: 10px 13px; border-radius: 7px;
  background: #fff9ed; color: var(--bordeaux-noel); font-weight: 700; cursor: pointer;
}
.solution-enigme summary::-webkit-details-marker { display: none; }
.solution-enigme summary:hover { background: #f8e8d9; }
.solution-enigme summary:focus-visible { outline: 3px solid var(--bordeaux-noel); outline-offset: 2px; }
.solution-enigme summary::after {
  content: ""; width: 8px; height: 8px; flex: none; margin-inline-end: 3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.solution-enigme[open] summary { border-radius: 7px 7px 0 0; background: #f8ecd8; }
.solution-enigme[open] summary::after { transform: rotate(225deg); }
.solution-theme { margin-inline-start: 7px; color: #392c23; font-weight: 400; }
.solution-contenu { padding: 14px; line-height: 1.5; }
.solution-contenu h3 { margin: 0 0 6px; color: var(--bordeaux-noel); font-size: 1.2rem; }
.solution-contenu p { margin: 0 0 10px; }
.solution-contenu p:last-child { margin-block: 10px 0; }
.solution-contenu img { display: block; width: 100%; height: auto; border-radius: 5px; }
.solution-contenu a { color: var(--bordeaux-noel); text-underline-offset: 3px; }

.liste-definitions {
  padding: 10px 14px; background: white; color: #222;
  font-size: clamp(.75rem, 1.9cqh, 1rem); line-height: 1.28;
}
.liste-definitions:first-child { border-radius: 6px 6px 0 0; }
.liste-definitions + .liste-definitions { border-top: 1px solid #e6d8bd; border-radius: 0 0 6px 6px; }
.liste-definitions h2 { font-size: 1.05em; text-transform: uppercase; margin: 0 0 6px; }
.liste-definitions ol { padding-inline-start: 1.55em; margin: 0; }
.liste-definitions li { padding-inline-start: .2em; }
.liste-definitions li + li { margin-top: .2em; }
[data-jeu="mots-croises"] #cases .case-mystere { border-radius: 0; box-shadow: none; }
@media (max-width: 640px) {
  .liste-definitions { padding: 5px 9px; line-height: 1.16; }
  .liste-definitions h2 { margin-bottom: 4px; }
  .liste-definitions li + li { margin-top: .08em; }
}
