:root {
  --nuit-1: #0b1a3a;
  --nuit-2: #1d2f6b;
  --nuit-3: #3a2a6e;
  --or: #f6c945;
  --or-clair: #fff1b8;
  --blanc: #fffaf2;
  --texte: #fffaf2;
  --ombre: 0 10px 25px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--texte);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(246, 201, 69, .18), transparent 55%),
    radial-gradient(ellipse at 15% 80%, rgba(120, 90, 200, .35), transparent 60%),
    linear-gradient(180deg, var(--nuit-1) 0%, var(--nuit-2) 55%, var(--nuit-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---------- ciel féerique ---------- */
.ciel { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#etoiles-fond { position: absolute; inset: 0; }
#etoiles-fond span {
  position: absolute; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .8);
  animation: scintille ease-in-out infinite alternate;
}
@keyframes scintille { from { opacity: .15; transform: scale(.6); } to { opacity: 1; transform: scale(1.1); } }

.lune {
  position: absolute; top: 6vh; right: 8vw; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffbe6, #f6e3a1 60%, #e0c26a);
  box-shadow: 0 0 40px 10px rgba(255, 236, 170, .45), 0 0 120px 40px rgba(255, 236, 170, .15);
}
@media (max-width: 600px) { .lune { width: 54px; height: 54px; top: 3vh; right: 5vw; } }

.aurore {
  position: absolute; left: -20%; right: -20%; top: 10vh; height: 40vh;
  background:
    radial-gradient(ellipse 40% 50% at 30% 50%, rgba(140, 110, 255, .22), transparent 70%),
    radial-gradient(ellipse 35% 45% at 70% 40%, rgba(255, 140, 200, .16), transparent 70%),
    radial-gradient(ellipse 30% 40% at 50% 60%, rgba(90, 200, 255, .12), transparent 70%);
  filter: blur(20px);
  animation: aurore 18s ease-in-out infinite alternate;
}
@keyframes aurore { to { transform: translateX(8%) scaleY(1.15); opacity: .7; } }

.chateau { position: absolute; left: 0; bottom: 0; width: 100%; height: 28vh; min-height: 140px; opacity: .9; }
.fenetres-chateau { filter: drop-shadow(0 0 6px #f6c945); animation: lumiere 4s ease-in-out infinite alternate; }
@keyframes lumiere { to { opacity: .65; } }

/* ---------- photos ---------- */
.photo-entete {
  width: 120px; height: 120px; margin: 0 auto 6px; border-radius: 50%;
  background: 30% 35% / cover no-repeat;
  border: 4px solid var(--or);
  box-shadow: 0 0 0 6px rgba(246, 201, 69, .25), 0 0 40px rgba(246, 201, 69, .6);
  animation: brille 4s ease-in-out infinite;
}
.photo-entete[hidden] { display: none; }
.interieur.avec-photo {
  background: center / cover no-repeat; justify-content: flex-end; padding-bottom: 6px;
}
.interieur.avec-photo .i-nom {
  background: rgba(0, 0, 0, .45); padding: 2px 10px; border-radius: 999px; font-size: 12px;
}

/* ---------- neige ---------- */
#neige { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#neige span {
  position: absolute; top: -20px; color: #fff;
  animation: tombe linear infinite;
}
@keyframes tombe {
  to { transform: translate3d(30px, 105vh, 0) rotate(240deg); }
}

/* ---------- entête ---------- */
.entete { position: relative; z-index: 1; text-align: center; padding: 36px 16px 12px; }
.etoiles { font-size: 28px; letter-spacing: 10px; animation: brille 3s ease-in-out infinite; }
@keyframes brille { 50% { opacity: .6; transform: scale(1.05); } }

h1 {
  font-family: "Mountains of Christmas", "Nunito", cursive;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  margin: 8px 0 6px;
  color: var(--or-clair);
  text-shadow: 0 0 18px rgba(246, 201, 69, .55), 0 3px 0 #8a5a00;
}
h1 span { color: var(--or); font-size: 1.25em; }
.sous-titre {
  margin: 4px 0 6px; font-family: "Dancing Script", cursive; font-weight: 700;
  font-size: clamp(22px, 3.6vw, 32px); letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 12px rgba(255, 182, 220, .8), 0 0 24px rgba(246, 201, 69, .45);
}
.compteur {
  display: inline-block; margin: 10px 0 0; padding: 8px 18px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; font-weight: 700; backdrop-filter: blur(4px);
}

/* ---------- grille ---------- */
main { position: relative; z-index: 1; padding: 20px 16px 40px; }
.grille {
  max-width: 1050px; margin: 0 auto;
  display: grid; gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 130px;
  grid-auto-flow: dense;
}
@media (max-width: 860px) { .grille { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 120px; } }
/* sur 4 colonnes, on garde une seule grande case (+ le 24) pour une grille sans trou */
@media (max-width: 860px) and (min-width: 521px) {
  .case.grande:not(.jour24):not([data-jour="1"]) { grid-column: span 1; }
}
@media (max-width: 520px) { .grille { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 105px; gap: 10px; } }

/* ---------- une case ---------- */
.case {
  position: relative; border: 0; padding: 0; cursor: pointer;
  border-radius: 16px; perspective: 900px;
  background: var(--interieur, #2a1f4a);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .25), var(--ombre);
  font-family: inherit; color: inherit;
  opacity: 0; /* les cases attendent le début de la parade */
}

/* ---------- la parade ---------- */
/* 1) chaque case arrive par la gauche en sautillant, l'une après l'autre */
.grille.parade .case {
  opacity: 1;
  animation:
    entree-parade 1.5s cubic-bezier(.25, .9, .35, 1) var(--delai) backwards,
    marche .9s ease-in-out calc(var(--delai) + 1.5s + var(--phase)) infinite;
  animation-play-state: running, paused;
}
/* 2) quand la musique joue, les cases se dandinent en rythme */
body.en-musique .grille.parade .case { animation-play-state: running, running; }

@keyframes entree-parade {
  0%   { opacity: 0; translate: -110vw 0; rotate: -8deg; }
  20%  { opacity: 1; }
  35%  { translate: -70vw -18px; rotate: 6deg; }
  50%  { translate: -45vw 0; rotate: -6deg; }
  65%  { translate: -22vw -14px; rotate: 5deg; }
  80%  { translate: -6vw 0; rotate: -3deg; }
  92%  { translate: 1vw -6px; rotate: 2deg; }
  100% { opacity: 1; translate: 0 0; rotate: 0deg; }
}
@keyframes marche {
  0%, 100% { translate: 0 0; rotate: -1.5deg; }
  25%      { translate: 0 -5px; rotate: 0deg; }
  50%      { translate: 0 0; rotate: 1.5deg; }
  75%      { translate: 0 -5px; rotate: 0deg; }
}

/* le cortège de personnages qui défile devant le château */
.cortege {
  position: absolute; bottom: 3vh; left: 0; display: flex; gap: 26px;
  font-size: clamp(26px, 4vw, 40px); white-space: nowrap;
  translate: 100vw 0; opacity: 0;
  filter: drop-shadow(0 0 8px rgba(255, 230, 150, .6));
}
.parade-lancee .cortege { opacity: 1; animation: cortege 32s linear 1s infinite; }
.cortege span { display: inline-block; animation: saut .9s ease-in-out infinite; }
.cortege span:nth-child(odd) { animation-delay: -.45s; }
@keyframes cortege { from { translate: 100vw 0; } to { translate: -100% 0; } }
@keyframes saut { 50% { transform: translateY(-10px) rotate(6deg); } }
body:not(.en-musique) .cortege span { animation-play-state: paused; }
.case.grande { grid-column: span 2; }
.case.jour24 { grid-row: span 2; }

.interieur {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  border-radius: 16px; overflow: hidden;
}
.i-emoji { font-size: 44px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.4)); }
.i-nom { font-weight: 900; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.case.ouverte .i-emoji { animation: sautille 1.6s ease-in-out infinite; }
@keyframes sautille { 50% { transform: translateY(-6px) rotate(-6deg); } }

.porte {
  position: absolute; inset: 0; border-radius: 16px; z-index: 3;
  transform-origin: left center;
  transition: transform .8s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
  backface-visibility: hidden;
  background: var(--porte);
  border: 3px solid var(--bord, rgba(255,255,255,.6));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.case:hover .porte { transform: rotateY(-12deg); }
.case.ouverte .porte { transform: rotateY(-110deg); box-shadow: -10px 0 18px rgba(0,0,0,.4); pointer-events: none; }

/* case ouverte et vue : la porte disparaît, il reste la photo, immobile */
.case.devoilee .porte { opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }
.grille.parade .case.devoilee {
  animation: entree-parade 1.5s cubic-bezier(.25, .9, .35, 1) var(--delai) backwards; /* plus de dandinement */
}
.case.devoilee .i-emoji { animation: none; }
.case.devoilee { box-shadow: 0 0 0 3px var(--or), var(--ombre); }

/* le numéro reste toujours visible */
.i-num {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  font-family: "Mountains of Christmas", cursive; font-weight: 700; font-size: 20px; line-height: 1;
  color: #3a2400; background: linear-gradient(180deg, #fff1b8, #f6c945);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.jour24 .i-num { min-width: 40px; height: 40px; font-size: 28px; }

.numero {
  position: relative; z-index: 2;
  font-family: "Mountains of Christmas", cursive; font-weight: 700;
  font-size: 46px; color: var(--chiffre, #fff);
  text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 10px rgba(255,255,255,.3);
}
.case.grande .numero { font-size: 54px; }
.deco { position: absolute; z-index: 2; right: 8px; bottom: 6px; font-size: 22px; }
.poignee {
  position: absolute; z-index: 2; right: 10px; top: 50%; width: 8px; height: 8px;
  border-radius: 50%; background: var(--or); box-shadow: 0 0 6px var(--or);
}

.case.verrouillee .porte { filter: saturate(.75) brightness(.85); }
.case.verrouillee .porte::after {
  content: "🔒"; position: absolute; left: 8px; top: 6px; font-size: 14px; opacity: .8; z-index: 2;
}
.case.secoue .porte { animation: secoue .45s; }

/* date passée mais vidéo pas encore prête */
.case.en-tournage .porte::after {
  content: "🎬 bientôt"; position: absolute; left: 6px; top: 5px; z-index: 2;
  font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff;
}
/* case du jour prête à être ouverte : elle brille */
.case.a-ouvrir .porte { animation: appel 1.8s ease-in-out infinite; }
@keyframes appel {
  50% { box-shadow: 0 0 0 3px var(--or), 0 0 26px 6px rgba(246, 201, 69, .75); }
}
@keyframes secoue {
  20%, 60% { transform: translateX(-6px) rotate(-1deg); }
  40%, 80% { transform: translateX(6px) rotate(1deg); }
}

/* ---------- thèmes des personnages ---------- */

/* Jessie : rouge cowgirl + motif vache */
.perso-jessie {
  --porte:
    radial-gradient(ellipse 18px 13px at 22% 28%, #1a1a1a 98%, transparent),
    radial-gradient(ellipse 12px 16px at 78% 70%, #1a1a1a 98%, transparent),
    radial-gradient(ellipse 9px 7px at 65% 22%, #1a1a1a 98%, transparent),
    radial-gradient(ellipse 10px 8px at 25% 80%, #1a1a1a 98%, transparent),
    #fdfaf3;
  --bord: #d62828; --chiffre: #d62828; --interieur: linear-gradient(160deg, #d62828, #f4a300);
}
.perso-jessie .numero { text-shadow: 0 2px 0 #fff, 0 0 8px #fff; }

/* Max : sweat, ambiance skate / road trip */
.perso-max {
  --porte: repeating-linear-gradient(135deg, #2b59c3 0 14px, #2350b3 14px 28px);
  --bord: #e63946; --interieur: linear-gradient(160deg, #e63946, #2b59c3);
}

/* Tac : écureuil, glands, nez rouge */
.perso-tac {
  --porte:
    radial-gradient(circle at 50% 120%, #c96f3b 40%, transparent 41%),
    linear-gradient(180deg, #8b4a24, #6b3416);
  --bord: #f3d1a0; --interieur: linear-gradient(160deg, #f3d1a0, #8b4a24);
}
.perso-tac .poignee { background: #e63946; box-shadow: 0 0 6px #e63946; width: 10px; height: 10px; }

/* Pain d'épices : biscuit + glaçage */
.perso-painepices {
  --porte:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255,255,255,.95) 10px 14px, transparent 14px 24px) top / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255,255,255,.95) 10px 14px, transparent 14px 24px) bottom / 100% 10px no-repeat,
    radial-gradient(circle at 30% 30%, #c98a4b, #9c5b26);
  --bord: #fff; --interieur: linear-gradient(160deg, #1f7a4d, #b71c1c);
}

/* Suzy & Perla : souris de Cendrillon, pastel + couture */
.perso-suzyperla {
  --porte:
    radial-gradient(circle, rgba(255,255,255,.45) 2px, transparent 2.5px) 0 0 / 16px 16px,
    linear-gradient(160deg, #f8b5d0, #a9c8f5);
  --bord: #fff; --chiffre: #fff; --interieur: linear-gradient(160deg, #a9c8f5, #f8b5d0);
}
.perso-suzyperla .porte { outline: 2px dashed rgba(255,255,255,.8); outline-offset: -9px; }

/* Coco Lapin : potager */
.perso-coco {
  --porte:
    repeating-linear-gradient(0deg, #5c3b1e 0 6px, #6e4826 6px 12px) bottom / 100% 30% no-repeat,
    linear-gradient(180deg, #7cc46a, #4f9a45);
  --bord: #f6c945; --interieur: linear-gradient(160deg, #f9a03f, #7cc46a);
}

/* Le Roi Louie : la jungle, feuilles et bananes */
.perso-louie {
  --porte:
    radial-gradient(ellipse 22px 9px at 15% 18%, #2f8f3a 95%, transparent),
    radial-gradient(ellipse 9px 22px at 85% 25%, #3aa845 95%, transparent),
    radial-gradient(ellipse 24px 10px at 80% 88%, #2f8f3a 95%, transparent),
    radial-gradient(ellipse 10px 20px at 12% 82%, #3aa845 95%, transparent),
    radial-gradient(circle at 50% 45%, #f2a541, #c46a1c 75%);
  --bord: #2f8f3a; --interieur: linear-gradient(160deg, #f2a541, #1f6e33);
}

/* Jour 24 : le château, toute la troupe */
.perso-noel {
  --porte:
    radial-gradient(circle at 20% 20%, #fff 1px, transparent 2px) 0 0 / 30px 30px,
    radial-gradient(circle at 70% 60%, #fff8 1px, transparent 2px) 0 0 / 40px 40px,
    linear-gradient(180deg, #2a2a7a, #6a3ca8 70%, #f6c945 140%);
  --bord: var(--or); --chiffre: var(--or-clair); --interieur: radial-gradient(circle, #fff1b8, #f6c945 60%, #c98a00);
}
.jour24 .numero { font-size: 90px !important; }
.jour24 .porte::before {
  content: "🏰"; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-size: 48px; opacity: .9;
}
.jour24 .i-emoji { font-size: 70px; }
.jour24 .i-nom { color: #6b3a00; text-shadow: none; font-size: 18px; }
.jour24 { box-shadow: 0 0 0 3px var(--or), 0 0 30px rgba(246, 201, 69, .5), var(--ombre); }

/* ---------- fenêtre vidéo ---------- */
.fenetre {
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  border: 0; border-radius: 22px; padding: 22px;
  background: var(--fond-fenetre, #fffaf2); color: #2b1d3d;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 4px var(--or);
}
.fenetre[open] { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.fenetre::backdrop { background: rgba(8, 12, 40, .75); backdrop-filter: blur(4px); }

.fermer {
  position: absolute; right: 14px; top: 14px; width: 36px; height: 36px;
  border-radius: 50%; border: 0; cursor: pointer; font-size: 16px;
  background: #2b1d3d; color: #fff;
}
.fenetre-entete { display: flex; gap: 14px; align-items: center; padding-right: 40px; margin-bottom: 14px; }
.f-emoji {
  font-size: 40px; width: 64px; height: 64px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--interieur);
}
.f-jour { margin: 0; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .08em; opacity: .7; }
.fenetre h2 { margin: 2px 0 0; font-family: "Mountains of Christmas", cursive; font-size: 32px; line-height: 1.1; }

.f-media { border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.f-media video, .f-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.f-media.portrait { aspect-ratio: auto; background: transparent; display: flex; justify-content: center; }
.f-media.portrait video {
  width: auto; height: auto; max-width: 100%; max-height: 68vh; max-height: 68dvh;
  border-radius: 14px; background: #000;
}
@media (max-width: 600px) {
  .fenetre { padding: 16px; }
  .f-media.portrait video { max-height: 64vh; max-height: 64dvh; }
}
.surprise {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--interieur); color: #fff; text-align: center; padding: 16px;
}
.surprise span { font-size: 64px; animation: sautille 1.4s ease-in-out infinite; }
.surprise p { margin: 8px 0 2px; font-weight: 900; font-size: 22px; text-shadow: 0 2px 4px rgba(0,0,0,.35); }
.surprise small { text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.f-message { margin: 14px 4px 0; font-size: 17px; line-height: 1.5; }
.f-message:empty { display: none; }

/* ---------- divers ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translate(-50%, 120px); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
  background: #fffaf2; color: #2b1d3d; font-weight: 700;
  padding: 12px 20px; border-radius: 999px; box-shadow: var(--ombre);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.visible { transform: translate(-50%, 0); }

.etincelle {
  position: fixed; z-index: 60; pointer-events: none; font-size: 18px;
  animation: eclate 1s ease-out forwards;
}
@keyframes eclate {
  to { transform: translate(var(--dx), var(--dy)) scale(.4); opacity: 0; }
}

.pied { position: relative; z-index: 1; text-align: center; padding: 10px 16px 22vh; opacity: .85; }
.troupe { font-size: 26px; letter-spacing: 6px; }

/* ---------- étoiles filantes + photos dans le ciel ---------- */
#filantes { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.filante {
  position: absolute; width: 0; height: 0;
  animation: file .8s cubic-bezier(.4, 0, .9, .6) forwards;
}
.filante::before { /* la tête brillante */
  content: ""; position: absolute; width: 8px; height: 8px; left: -4px; top: -4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 4px #fff6c8, 0 0 24px 8px rgba(246, 201, 69, .7);
}
.filante::after { /* la traînée */
  content: ""; position: absolute; right: 0; top: -1.5px; width: 140px; height: 3px;
  transform-origin: right center; rotate: var(--angle);
  background: linear-gradient(90deg, transparent, rgba(255, 246, 200, .9));
  border-radius: 3px;
}
.filante.discrete { z-index: -1; opacity: .55; scale: .6; }
@keyframes file {
  from { translate: calc(var(--dx) * -1) calc(var(--dy) * -1); opacity: 0; }
  15%  { opacity: 1; }
  to   { translate: 0 0; opacity: 1; }
}
.filante.discrete { animation-name: file-discrete; }
@keyframes file-discrete {
  from { translate: calc(var(--dx) * -1) calc(var(--dy) * -1); opacity: 0; }
  30%  { opacity: 1; }
  to   { translate: 0 0; opacity: 0; }
}

.photo-ciel {
  position: absolute; translate: -50% -50%;
  padding: 6px 6px 20px; background: #fffaf2; border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(246, 201, 69, .7), 0 0 30px rgba(246, 201, 69, .6), 0 12px 30px rgba(0, 0, 0, .5);
  animation: photo-ciel 3.2s ease-in-out forwards;
}
.photo-ciel img { display: block; width: 110px; height: 128px; object-fit: cover; }
@media (max-width: 600px) { .photo-ciel img { width: 84px; height: 98px; } }
@keyframes photo-ciel {
  0%   { opacity: 0; scale: .1; rotate: calc(var(--incl) - 25deg); }
  12%  { opacity: .7; scale: 1.1; rotate: var(--incl); }
  20%  { scale: 1; }
  65%  { opacity: .6; translate: -50% -60%; }
  100% { opacity: 0; scale: .7; translate: -50% -110%; }
}

/* ---------- Nos souvenirs ---------- */
.souvenirs { position: relative; z-index: 1; max-width: 1050px; margin: 0 auto; padding: 10px 16px 20px; }
.souvenirs[hidden] { display: none; }
.souvenirs h2 {
  text-align: center; font-family: "Mountains of Christmas", cursive; font-size: clamp(30px, 5vw, 44px);
  margin: 10px 0 22px; color: var(--or-clair); text-shadow: 0 0 14px rgba(246, 201, 69, .5);
}
.galerie { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.polaroid {
  border: 0; cursor: pointer; padding: 8px 8px 30px; background: #fffaf2;
  border-radius: 4px; box-shadow: var(--ombre);
  rotate: var(--incl); transition: rotate .3s, scale .3s;
}
.polaroid:hover { rotate: 0deg; scale: 1.06; z-index: 2; }
.polaroid img { display: block; width: 140px; height: 160px; object-fit: cover; background: #ddd; }
@media (max-width: 520px) {
  .galerie { gap: 12px; }
  .polaroid { padding: 6px 6px 22px; }
  .polaroid img { width: 96px; height: 112px; }
}

.visionneuse {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; display: none; place-items: center;
}
.visionneuse[open] { display: grid; }
.visionneuse::backdrop { background: rgba(8, 12, 40, .92); }
.visionneuse img {
  max-width: calc(100vw - 32px); max-height: calc(100vh - 100px); border-radius: 8px;
  border: 6px solid #fffaf2; box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.visionneuse .fermer { position: fixed; background: #fffaf2; color: #2b1d3d; }
.v-nav {
  position: fixed; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 30px; line-height: 1; background: rgba(255, 255, 255, .85); color: #2b1d3d;
}
.v-prec { left: 12px; }
.v-suiv { right: 12px; }

/* ---------- bouton musique ---------- */
.btn-musique {
  position: fixed; top: 14px; left: 14px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 20px;
  border: 2px solid var(--or); background: rgba(11, 26, 58, .75); color: #fff;
  box-shadow: 0 0 14px rgba(246, 201, 69, .45); backdrop-filter: blur(4px);
}
body.en-musique .btn-musique { animation: battement .9s ease-in-out infinite; }
@keyframes battement { 50% { transform: scale(1.1); } }
.btn-musique[hidden] { display: none; }

/* ---------- écran d'accueil ---------- */
.accueil {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(58, 42, 110, .92), rgba(8, 12, 40, .97));
  transition: opacity .6s;
}
.accueil[hidden] { display: none; }
.accueil.sortie { opacity: 0; pointer-events: none; }
.accueil-boite { text-align: center; max-width: 480px; }
.accueil-etoile { font-size: 60px; animation: brille 2s ease-in-out infinite; }
.accueil-petit { margin: 6px 0 0; letter-spacing: .15em; text-transform: uppercase; font-size: 13px; opacity: .75; }
.accueil h2 {
  font-family: "Mountains of Christmas", cursive; font-size: clamp(32px, 7vw, 48px); line-height: 1.1;
  margin: 8px 0 26px; color: var(--or-clair); text-shadow: 0 0 18px rgba(246, 201, 69, .6);
}
.btn-entrer {
  font-family: inherit; font-weight: 900; font-size: 18px; cursor: pointer;
  padding: 16px 30px; border-radius: 999px; border: 0; color: #3a2400;
  background: linear-gradient(180deg, #fff1b8, #f6c945 60%, #d9a521);
  box-shadow: 0 0 0 4px rgba(246, 201, 69, .3), 0 0 40px rgba(246, 201, 69, .6), var(--ombre);
  animation: battement 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .grille .case { opacity: 1 !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
