/* Calendrier de l'Avent — village 3D a explorer librement. Bloc de hauteur normale : la page defile comme d habitude (aucun epinglage). */
.noel3d { position: relative; margin: 0 0 28px; }
.noel3d-stage { position: relative; height: clamp(520px, 78vh, 860px); border-radius: 22px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #5b4f9c 0%, #c79bc4 62%, #f2b9a2 100%); box-shadow: 0 24px 60px rgba(40, 20, 80, .35), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.noel3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; outline: none; }
.noel3d-canvas:focus-visible { box-shadow: inset 0 0 0 3px #fff; }
.noel3d-on .noel-hero { display: none; }

.noel3d-loader { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; color: #fff; font-weight: 700; letter-spacing: 1px; z-index: 5; transition: opacity .6s; text-shadow: 0 2px 10px rgba(60, 20, 80, .6);
  background: radial-gradient(90% 60% at 30% 82%, rgba(255, 214, 160, .55), transparent 55%), linear-gradient(180deg, #4b4590 0%, #b98ac0 60%, #f4b9a0 100%); }
.noel3d-loader::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28%; background: linear-gradient(180deg, #f3f6ff, #dfe8fb); clip-path: polygon(0 60%, 12% 40%, 26% 58%, 42% 30%, 58% 55%, 74% 36%, 88% 52%, 100% 38%, 100% 100%, 0 100%); z-index: -1; }
.noel3d-loader-bar { width: min(260px, 60vw); height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.noel3d-loader-bar span { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, #ffd56b, #f59e0b); transition: width .3s; }
.noel3d.is-ready .noel3d-loader { opacity: 0; pointer-events: none; }

.noel3d-intro { position: absolute; z-index: 3; left: 50%; top: 9%; transform: translateX(-50%); width: min(92%, 640px); text-align: center; color: #fff; pointer-events: none; transition: opacity 1s, transform 1s; }
.noel3d-intro img { width: clamp(100px, 11vw, 160px); height: auto; filter: drop-shadow(0 8px 22px rgba(30, 10, 60, .5)); }
.noel3d-title { margin: 4px 0 0; font-family: "Titan One", Rajdhani, sans-serif; font-weight: 400; font-size: clamp(30px, 4.6vw, 58px); line-height: 1; color: #fff; text-shadow: 0 3px 0 #b3203a, 0 6px 0 #6d0f20, 0 14px 34px rgba(30, 10, 60, .5); }
.noel3d-title em { font-style: normal; color: #ffd56b; text-shadow: 0 3px 0 #c97a06, 0 6px 0 #6b3a00, 0 14px 34px rgba(30, 10, 60, .5); }
.noel3d-sub { margin: 10px 0 0; font-size: clamp(15px, 1.6vw, 20px); font-weight: 700; text-shadow: 0 2px 10px rgba(30, 10, 60, .7); }
.noel3d.is-used .noel3d-intro, .noel3d.is-intro-done .noel3d-intro { opacity: 0; transform: translate(-50%, -14px); }

.noel3d-tip { position: absolute; z-index: 3; left: 50%; top: 52%; transform: translateX(-50%); margin: 0; padding: 9px 18px; border-radius: 99px; font-weight: 800; font-size: 14px; color: #fff; white-space: nowrap; pointer-events: none;
  background: rgba(50, 30, 90, .55); border: 1px solid rgba(255, 255, 255, .3); backdrop-filter: blur(8px); animation: noel3d-pulse 2.4s ease-in-out infinite; transition: opacity .6s; }
.noel3d.is-used .noel3d-tip { opacity: 0; animation: none; }

.noel3d-bottom { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(94%, 720px); display: grid; justify-items: center; gap: 8px; text-align: center; pointer-events: none; }
.noel3d-bottom > * { pointer-events: auto; }
.noel3d-cap, .noel3d-hint { margin: 0; padding: 9px 18px; border-radius: 18px; font-weight: 700; font-size: 15px; color: #fff; background: rgba(50, 30, 90, .62); border: 1px solid rgba(255, 213, 107, .4); backdrop-filter: blur(8px); }
.noel3d-cap[hidden] { display: none; }
.noel3d-cap b, .noel3d-hint b { color: #ffd56b; }
.noel3d-cap a { color: #ffd56b; margin-left: 8px; }
.noel3d-btn { width: auto; height: auto; line-height: 1.2; border: 0; cursor: pointer; padding: 13px 28px; border-radius: 99px; font: 900 16px Rajdhani, sans-serif; letter-spacing: .8px; text-transform: uppercase; color: #3b1d00;
  background: linear-gradient(180deg, #fff0b3, #ffd34d 45%, #f59e0b); box-shadow: 0 5px 0 #a35f00, 0 14px 34px rgba(245, 158, 11, .5); }
.noel3d-btn:disabled { filter: grayscale(.35) brightness(.9); cursor: default; }
.noel3d-btn:focus-visible, .noel3d-nav button:focus-visible, .noel3d-nav a:focus-visible, .noel3d-zoom button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.noel3d-tag { position: absolute; z-index: 4; left: 0; top: 0; pointer-events: none; padding: 5px 12px; border-radius: 10px; font: 800 13px Rajdhani, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #3b1d00;
  background: linear-gradient(180deg, #fff1b8, #ffd56b 50%, #e8a317); box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 24px rgba(255, 213, 107, .55); white-space: nowrap; }
.noel3d-tag[hidden] { display: none; }

.noel3d-reveal { position: absolute; z-index: 6; left: 50%; bottom: 5%; transform: translateX(-50%); width: min(92%, 380px); padding: 18px 22px; border-radius: 22px; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(122, 14, 34, .96), rgba(44, 6, 14, .96)); box-shadow: 0 0 0 1px rgba(255, 213, 107, .55), 0 30px 70px rgba(0, 0, 0, .6); }
.noel3d-reveal[hidden] { display: none; }
.noel3d-reveal .k { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: #8af5b0; }
.noel3d-reveal img { width: 110px; height: 110px; object-fit: contain; margin: 6px auto 0; display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.noel3d-reveal .c { margin: 4px 0 0; font-size: 13px; opacity: .8; }
.noel3d-reveal h3 { margin: 2px 0 0; font-family: "Titan One", Rajdhani, sans-serif; font-weight: 400; font-size: 26px; color: #ffd56b; }
.noel3d-reveal .q { margin: 2px 0 0; font-weight: 700; }
.noel3d-reveal button { width: auto; height: auto; line-height: 1.2; margin-top: 12px; padding: 11px 30px; border: 0; border-radius: 99px; cursor: pointer; font: 800 15px Rajdhani, sans-serif; text-transform: uppercase; color: #3b1d00; background: linear-gradient(180deg, #fff1b8, #ffd56b 45%, #e8a317); box-shadow: 0 4px 0 #9a5d00; }

.noel3d-nav { position: absolute; z-index: 4; left: 14px; top: 12px; right: 70px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.noel3d-nav button, .noel3d-nav a, .noel3d-nav label, .noel3d-zoom button { width: auto; height: auto; min-height: 0; line-height: 1.2; display: inline-flex; align-items: center; gap: 4px; box-shadow: none; padding: 6px 12px; border-radius: 99px; font: 700 13px Rajdhani, sans-serif; letter-spacing: .5px; color: #fff; text-decoration: none; cursor: pointer;
  background: rgba(50, 30, 90, .55); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(6px); }
.noel3d-nav button.is-on { background: rgba(255, 213, 107, .9); color: #3b1d00; border-color: transparent; }
.noel3d-nav [aria-pressed="true"] { background: linear-gradient(180deg, #ffe58a, #f5b422); color: #3b1d00; border-color: transparent; }
.noel3d-nav select { background: transparent; color: #fff; border: 0; font: inherit; }
.noel3d-nav option { color: #000; }
.noel3d-zoom { position: absolute; z-index: 4; right: 14px; top: 12px; display: grid; gap: 6px; }
.noel3d-zoom button { justify-content: center; width: 40px; height: 40px; padding: 0; font-size: 22px; font-weight: 900; }
.noel3d.is-opening .noel3d-nav, .noel3d.is-opening .noel3d-zoom, .noel3d.is-opening .noel3d-bottom { opacity: .25; pointer-events: none; }
.noel3d.is-lost::after { content: "Rechargement de la scène 3D…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(60, 40, 110, .85); color: #fff; font-weight: 700; z-index: 7; }

@keyframes noel3d-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.04); } }
@media (max-width: 680px) {
  .noel3d-stage { height: clamp(520px, 78vh, 700px); border-radius: 14px; }
  .noel3d-nav { left: 8px; top: 8px; right: 58px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .noel3d-nav > * { flex: 0 0 auto; } .noel3d-zoom { right: 8px; top: 8px; }
  .noel3d-tip { top: 46%; font-size: 13px; }
  .noel3d-cap, .noel3d-hint { font-size: 14px; padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) { .noel3d-tip { animation: none; } .noel3d-intro { transition: none; } }
.noel3d-credit { margin: -18px 0 22px; text-align: center; font-size: 12px; color: #9aa6c8; }
.noel3d-credit a { color: #c7d2f2; }
.noel3d-credit[hidden], html:not(.noel3d-on) .noel3d-credit { display: none; }

/* ---- MODE DEFILEMENT : section epinglee, la camera suit le scroll (par defaut) ---- */
.noel3d.is-scroll.is-ready { height: 420vh; }
.noel3d.is-scroll .noel3d-stage { position: sticky; top: 76px; height: calc(100vh - 92px); min-height: 460px; }
.noel3d.is-scroll .noel3d-canvas { cursor: default; }
.noel3d.is-scroll .noel3d-zoom, .noel3d.is-scroll [data-noel3d-auto] { display: none; }
.noel3d-modebtn { background: linear-gradient(180deg, #ffe58a, #f5b422) !important; color: #3b1d00 !important; border-color: transparent !important; font-weight: 800 !important; }
.noel3d-modebtn[hidden] { display: none; }
.noel3d-nav { right: 14px; } .noel3d:not(.is-scroll) .noel3d-nav { right: 70px; }
.noel3d-chapter { position: absolute; z-index: 3; left: 50%; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s; text-align: center; width: min(92%, 720px); color: #fff; display: none; }
.noel3d.is-scroll .noel3d-chapter { display: block; }
.noel3d-chapter.is-on { opacity: 1; transform: translate(-50%, 0); } .noel3d-chapter.is-on a { pointer-events: auto; }
.noel3d-caption { bottom: 9%; }
.noel3d-caption p { display: inline-block; margin: 0; padding: 10px 20px; border-radius: 99px; font-weight: 700; font-size: 17px; background: rgba(50, 30, 90, .62); border: 1px solid rgba(255, 213, 107, .4); backdrop-filter: blur(8px); }
.noel3d-caption b { color: #ffd56b; }
.noel3d-final { top: 16%; } .noel3d-plaza { bottom: 6%; }
.noel3d-final h3, .noel3d-plaza h3 { margin: 0; font-family: "Titan One", Rajdhani, sans-serif; font-weight: 400; font-size: clamp(22px, 3.2vw, 40px); text-shadow: 0 3px 0 #6d0f20, 0 10px 26px rgba(30, 10, 60, .6); }
.noel3d-final h3 em { font-style: normal; color: #ffd56b; }
.noel3d-final p, .noel3d-bye { margin: 10px auto 0; max-width: 540px; font-size: 16px; font-weight: 700; text-shadow: 0 2px 10px rgba(30, 10, 60, .8); }
.noel3d-bye a { color: #ffd56b; }
.noel3d.is-scroll .noel3d-intro { opacity: 0; } .noel3d.is-scroll .noel3d-intro.is-on { opacity: 1; transform: translateX(-50%); }
.noel3d.is-scroll .noel3d-bottom { opacity: 0; pointer-events: none; transition: opacity .5s; }
.noel3d.is-scroll .noel3d-bottom.is-on { opacity: 1; } .noel3d.is-scroll .noel3d-bottom.is-on > * { pointer-events: auto; }
.noel3d.is-scroll .noel3d-tip { top: 62%; }
@media (max-width: 680px) { .noel3d.is-scroll.is-ready { height: 380vh; } .noel3d.is-scroll .noel3d-stage { top: 64px; height: calc(100vh - 140px); } .noel3d.is-scroll .noel3d-nav { right: 8px; } .noel3d-caption p { font-size: 15px; } }

/* Voile de verrouillage avant l ouverture (cadenas + compte a rebours) */
.noel3d-lock { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 16px; text-align: center; color: #fff; cursor: not-allowed;
  background: radial-gradient(ellipse at 50% 40%, rgba(20, 12, 50, .35), rgba(8, 6, 24, .8)); backdrop-filter: blur(2px); }
.noel3d-lock-card { max-width: 440px; padding: 22px 26px; border-radius: 22px; background: rgba(12, 10, 36, .74); border: 1px solid rgba(255, 213, 107, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.noel3d-lock-ico { font-size: 44px; line-height: 1; }
.noel3d-lock-title { margin: 8px 0 4px; font-family: "Titan One", Rajdhani, sans-serif; font-weight: 400; font-size: clamp(22px, 3vw, 32px); line-height: 1.1; color: #ffd56b; }
.noel3d-lock-msg { margin: 0; font-weight: 700; font-size: 16px; }
.noel3d-lock-tiles { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.noel3d-lock-tiles[hidden] { display: none; }
.noel3d-lock-tile { min-width: 58px; padding: 8px 6px; border-radius: 12px; background: rgba(255, 255, 255, .08); display: grid; }
.noel3d-lock-tile b { font: 800 24px Rajdhani, sans-serif; }
.noel3d-lock-tile small { font-size: 11px; opacity: .8; text-transform: uppercase; }
.noel3d-lock-note { margin: 12px 0 0; font-size: 13px; opacity: .8; }
