/* Developed by Slyness */
/* Whiskers et la Lune volée : personnages, échanges, sardines, nouvelles énigmes */

/* ---------- Compteur de sardines ---------- */
.sard {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 10px; border-radius: 23px;
  background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 2px rgba(244,201,93,.6);
  font-size: 26px; font-weight: 700; color: #ffe9b0; font-variant-numeric: tabular-nums;
}
.sard img { width: 56px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.sard.bump { animation: sardbump .5s cubic-bezier(.3,1.8,.6,1); }
@keyframes sardbump { 40% { transform: scale(1.25); box-shadow: inset 0 0 0 2px #fff4c4, 0 0 22px rgba(255,220,120,.8); } }
.fly.fish { width: 130px; filter: drop-shadow(0 0 14px rgba(200,230,255,1)); }

/* ---------- Dialogue : portrait de Whiskers ou du personnage ---------- */
#dialog .dpic { width: 150px; display: flex; align-items: flex-end; justify-content: center; }
#dialog .dpic img { width: 150px; }
#dialog.pose .dpic img, #dialog.npc .dpic img { width: auto; max-width: 170px; max-height: 200px; }
#dialog.pop .dpic img { animation: catpop .4s ease-out; }
#dialog.pop img { animation: none; }
#dialog.npc .say-bubble { box-shadow: 0 8px 24px rgba(0,0,0,.6), inset 0 0 0 3px #7c8fc4; }
#dialog.npc .say-bubble::before { border-right-color: #7c8fc4; }
#dialog.npc .say-bubble b { color: #34508f; }

/* ---------- Sprites ---------- */
.sprite.lay { transform: rotate(72deg); animation: none; }
.sprite.lay:hover { transform: rotate(72deg) scale(1.15); }
.sprite.plank { transform: rotate(-4deg); filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); }
.sprite.mirror { scale: -1 1; }
.sprite.plank.appear { animation: plank .9s cubic-bezier(.3,1.4,.6,1); }
@keyframes plank { from { transform: translateX(-40%) rotate(-30deg); opacity: 0; } }
.sprite.npc {
  cursor: pointer; transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.5));
  animation: npcbreath 3.2s ease-in-out infinite; transition: filter .2s;
}
.sprite.npc:hover { filter: drop-shadow(0 0 10px rgba(190,215,255,.95)) drop-shadow(0 8px 8px rgba(0,0,0,.5)) brightness(1.08); }
@keyframes npcbreath { 50% { transform: scale(1.015, .985); } }
.sprite.npc.scared { animation: shiver .35s ease-in-out infinite; }
@keyframes shiver { 25% { transform: translateX(-2px) rotate(-1deg); } 75% { transform: translateX(2px) rotate(1deg); } }

/* ---------- Étang : lanternes éteintes / allumées ---------- */
/* Lanternes éteintes : la lumière est assombrie et désaturée sur place (pas de taches opaques) */
[data-scene=etang][data-state=unlit] .pond-off {
  display: block; inset: 0;
  backdrop-filter: brightness(.38) saturate(.15); -webkit-backdrop-filter: brightness(.38) saturate(.15);
  --m: radial-gradient(ellipse 3.2% 5.2% at 29.8% 64.5%, #000 35%, transparent 100%),
    radial-gradient(ellipse 3.2% 5.2% at 75.8% 64.5%, #000 35%, transparent 100%),
    radial-gradient(ellipse 3.4% 4.6% at 29.8% 77%, #000 30%, transparent 100%),
    radial-gradient(ellipse 3.4% 4.6% at 75.8% 74.8%, #000 30%, transparent 100%),
    radial-gradient(ellipse 2.2% 3.4% at 61.1% 57.6%, #000 30%, transparent 100%),
    radial-gradient(ellipse 2.2% 3.2% at 61.1% 62%, #000 30%, transparent 100%),
    radial-gradient(ellipse 1.8% 2.6% at 40.9% 61.3%, #000 30%, transparent 100%),
    radial-gradient(ellipse 1.8% 2.6% at 57.9% 60.6%, #000 30%, transparent 100%);
  -webkit-mask: var(--m); mask: var(--m);
}
/* Nuit plus sombre tant que les lanternes ne sont pas allumées */
[data-scene=etang][data-state=unlit] .pond-dark {
  display: block; inset: 0; mix-blend-mode: multiply;
  background: linear-gradient(rgba(96,108,170,.9), rgba(70,80,140,.88));
}
[data-scene=etang][data-state=lit] .pond-glow {
  display: block; inset: 0; mix-blend-mode: screen; animation: flicker 3s infinite;
  background:
    radial-gradient(circle at 29.8% 64%, rgba(255,190,90,.38), transparent 11%),
    radial-gradient(circle at 75.8% 64%, rgba(255,190,90,.38), transparent 11%),
    radial-gradient(circle at 61% 58%, rgba(255,190,90,.25), transparent 7%),
    radial-gradient(ellipse 30% 14% at 52% 82%, rgba(255,170,80,.16), transparent 100%);
}
@keyframes flicker { 0%,100% { opacity: .85; } 20% { opacity: 1; } 35% { opacity: .7; } 50% { opacity: .95; } 70% { opacity: .75; } 85% { opacity: 1; } }

/* ---------- Échanges avec les personnages ---------- */
.modal-card.trade { width: 940px; text-align: left; }
.modal-card.trade h3 { text-align: left; margin-left: 270px; }
.tr-head { display: flex; gap: 30px; align-items: flex-end; margin-top: -10px; }
.tr-pic { width: 240px; height: 260px; object-fit: contain; object-position: bottom; margin-top: -70px; filter: drop-shadow(0 12px 14px rgba(0,0,0,.6)); animation: npcbreath 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.tr-say { position: relative; flex: 1; padding: 18px 26px 20px; border-radius: 22px; background: #fffaf0; color: #2a1606; box-shadow: inset 0 0 0 3px #7c8fc4, 0 8px 20px rgba(0,0,0,.45); margin-bottom: 20px; }
.tr-say::before { content: ""; position: absolute; left: -16px; bottom: 30px; border: 16px solid transparent; border-right-color: #7c8fc4; border-left: 0; }
.tr-say small { display: block; font-size: 17px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #5a6fa8; }
.tr-say p { margin: 6px 0 0; font-size: 25px; line-height: 1.35; font-weight: 500; }
.tr-list { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.tr-row {
  display: flex; align-items: center; gap: 18px; padding: 10px 14px 10px 12px; border-radius: 18px;
  background: rgba(255,240,210,.08); box-shadow: inset 0 0 0 2px rgba(244,201,93,.35);
}
.tr-row.done { opacity: .55; }
.tr-item { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
.tr-talk { display: grid; place-items: center; font-size: 40px; }
.tr-label { flex: 1; font-size: 25px; font-weight: 600; color: #ffeccc; }
.tr-price { display: flex; align-items: center; gap: 6px; font-size: 26px; font-weight: 700; color: var(--gold); }
.tr-price img { width: 60px; }
.tr-row .btn { min-width: 120px; }
.tr-row .btn:disabled { filter: grayscale(.7) brightness(.75); cursor: default; transform: none; }
.tr-locked { margin: 0; padding: 16px; border-radius: 16px; font-size: 24px; text-align: center; color: #f3dfbf; background: rgba(0,0,0,.25); }
.tr-tip { margin: 22px 0 0; font-size: 19px; color: #e1c99f; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tr-tip img { width: 40px; }
.tr-tip b { color: var(--gold); font-size: 22px; }

/* ---------- Intro, menu, fin ---------- */
#intro-cat { width: auto !important; height: 230px; margin-top: -190px !important; }
#intro-cat.in { animation: catin .6s cubic-bezier(.3,1.5,.6,1); }
@keyframes catin { from { opacity: 0; transform: translateY(30px) scale(.8); } }
.menu-cat { width: 440px; }
.menu-box h1 small { font-size: 76px; margin-left: 60px; }
.end-bg { filter: brightness(.9) saturate(.95); }
.end-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,8,25,.65), transparent 40%, transparent 55%, rgba(5,8,25,.7)); }
.end-cat { width: 430px; left: 70px; bottom: 20px; animation: endcat 4s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(200,220,255,.35)) drop-shadow(0 30px 30px rgba(0,0,0,.5)); }
@keyframes endcat { 50% { transform: translateY(-10px) rotate(-1deg); } }
.end-box h2 { font-size: 68px; line-height: 1.05; font-family: "Caveat", cursive; color: #3b4f9a; text-shadow: 0 3px 0 #cfd9ff; }
.end-box p { font-size: 23px; }

/* ---------- Pots de fleurs ---------- */
.pots-row { display: flex; gap: 14px; justify-content: center; padding: 0 20px; transition: filter .4s; }
.pots-row.solved { filter: drop-shadow(0 0 24px rgba(140,255,170,.8)); }
.fpot { width: 128px; background: none; display: flex; flex-direction: column; align-items: center; transition: transform .2s; }
.fpot:hover { transform: translateY(-6px); }
.fpot.sel { transform: translateY(-16px); }
.fpot.sel .terra { box-shadow: 0 0 0 4px #ffe066, 0 0 24px rgba(255,220,100,.8); }
.fl svg { width: 110px; height: 132px; display: block; margin-bottom: -10px; position: relative; z-index: 1; }
.terra {
  position: relative; z-index: 2;
  width: 112px; height: 96px; display: grid; place-items: center;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
  background: linear-gradient(180deg, #e07c46 0 18%, #b8552a 18% 22%, #cf6a39 22%);
  border-radius: 6px;
}
.terra span { margin-top: 24px; padding: 2px 8px; border-radius: 6px; background: #fff7e2; color: #4a2a0c; font-family: "Caveat", cursive; font-size: 24px; font-weight: 700; }
.shelf-plank { height: 22px; margin: 0 auto; width: 860px; border-radius: 4px; background: linear-gradient(180deg, #8a4f22, #5a2e10); box-shadow: 0 12px 18px rgba(0,0,0,.45); }

/* ---------- Panneau à outils ---------- */
.pegboard {
  position: relative; width: 860px; height: 290px; margin: 0 auto 22px; border-radius: 12px;
  background: radial-gradient(circle, #6b4826 2.5px, transparent 3.5px) 0 0 / 26px 26px, linear-gradient(180deg, #d9a86a, #c18c4c);
  box-shadow: inset 0 0 0 6px #8a5a2c, 0 14px 26px rgba(0,0,0,.5); transition: box-shadow .4s;
}
.pegboard.solved { box-shadow: inset 0 0 0 6px #8a5a2c, 0 0 0 5px #9dffbf, 0 0 50px rgba(130,255,180,.7); }
.outline { position: absolute; cursor: pointer; }
.outline svg { display: block; }
.outline svg.ghost * { fill: rgba(60,35,15,.55) !important; stroke: rgba(40,20,5,.6); stroke-width: 2; stroke-dasharray: 6 4; }
.outline:hover svg.ghost * { fill: rgba(90,55,20,.65) !important; }
.outline.filled { animation: appear .5s ease-out; filter: drop-shadow(0 4px 3px rgba(0,0,0,.45)); }
.tooltray { display: flex; flex-wrap: wrap; gap: 18px 26px; justify-content: center; align-items: center; min-height: 120px; padding: 16px; border-radius: 16px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 2px rgba(244,201,93,.3); }
.tool { cursor: grab; touch-action: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); transition: filter .2s; }
.tool:hover { filter: drop-shadow(0 0 10px rgba(255,230,140,.9)); }
.tool.sel { filter: drop-shadow(0 0 0 #ffe066) drop-shadow(0 0 12px rgba(255,220,100,1)); }
.tool.drag { position: relative; z-index: 5; cursor: grabbing; transition: none; }
.tool svg { display: block; }

/* ---------- Mémoire ---------- */
.memory { display: grid; grid-template-columns: repeat(4, 150px); gap: 14px; justify-content: center; perspective: 1000px; transition: filter .4s; }
.memory.solved { filter: drop-shadow(0 0 24px rgba(140,255,170,.7)); }
.mcard { position: relative; height: 150px; background: none; padding: 0; transform-style: preserve-3d; transition: transform .45s; }
.mcard.flip { transform: rotateY(180deg); }
.mback, .mface { position: absolute; inset: 0; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mback { background: radial-gradient(circle at 50% 50%, #ffe39a 0 14px, transparent 15px), repeating-linear-gradient(45deg, #3c4f96 0 12px, #33437f 12px 24px); box-shadow: inset 0 0 0 4px #f4c95d, 0 6px 12px rgba(0,0,0,.5); }
.mcard:hover .mback { filter: brightness(1.15); }
.mface { transform: rotateY(180deg); display: grid; place-items: center; background: #fff7e2; box-shadow: inset 0 0 0 4px #e0b25a, 0 6px 12px rgba(0,0,0,.5); }
.mface img { width: 104px; height: 104px; object-fit: contain; }
.mcard.match .mface { box-shadow: inset 0 0 0 4px #6fd690, 0 0 20px rgba(120,255,160,.6); }

/* ---------- Lanternes ---------- */
.lpond { position: relative; width: 760px; height: 430px; margin: 0 auto 20px; }
.lwater { position: absolute; left: 18%; right: 18%; top: 22%; bottom: 22%; border-radius: 50%; background: radial-gradient(ellipse, #22306a, #0c1435 70%); box-shadow: 0 0 0 10px #4a5a3a, 0 0 0 16px #3a4a2c, inset 0 0 40px #000; transition: box-shadow .8s, background .8s; }
.lpond.solved .lwater { background: radial-gradient(ellipse, #6a5a3a, #1c2448 70%); box-shadow: 0 0 0 10px #4a5a3a, 0 0 0 16px #3a4a2c, 0 0 80px rgba(255,200,100,.5), inset 0 0 40px rgba(255,190,90,.3); }
.lantern { position: absolute; width: 80px; height: 120px; translate: -50% -50%; background: none; display: flex; flex-direction: column; align-items: center; transition: transform .2s; }
.lantern:hover { transform: scale(1.06); }
.lroof { width: 80px; height: 24px; background: #8c8a84; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.lbox { position: relative; width: 50px; height: 46px; background: #a8a59c; box-shadow: inset 0 0 0 4px #77746c; display: grid; place-items: center; }
.lbox b { width: 26px; height: 26px; border-radius: 4px; background: #232328; transition: background .3s, box-shadow .3s; }
.lfoot { width: 30px; height: 40px; background: linear-gradient(90deg, #8c8a84, #a8a59c, #8c8a84); }
.lantern.on .lbox b { background: radial-gradient(circle, #fff6c8, #ffb847 70%); box-shadow: 0 0 22px 10px rgba(255,190,80,.7); animation: flicker 2s infinite; }

/* ---------- Pigeons ---------- */
.pigeons { display: flex; gap: 30px; justify-content: center; margin: 10px 0 24px; transition: filter .4s; }
.pigeons.solved { filter: drop-shadow(0 0 24px rgba(140,255,170,.7)); }
.pigeon { width: 160px; height: 210px; padding: 10px; border-radius: 22px; background: rgba(255,240,210,.08); box-shadow: inset 0 0 0 2px rgba(244,201,93,.35); transition: background .2s; }
.pigeon:hover { background: rgba(255,240,210,.16); }
.pigeon img { width: 100%; height: 100%; object-fit: contain; filter: hue-rotate(var(--hue)) saturate(1.4) drop-shadow(0 6px 6px rgba(0,0,0,.5)); transform-origin: 50% 100%; }
.pigeon { position: relative; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--col) 45%, transparent); }
.pigeon.sing { background: color-mix(in srgb, var(--col) 38%, transparent); box-shadow: inset 0 0 0 4px var(--col), 0 0 34px var(--col); }
.pnote { position: absolute; left: 50%; top: 4px; translate: -50% 0; font-size: 44px; font-weight: 700; color: var(--col); text-shadow: 0 0 12px var(--col); opacity: 0; pointer-events: none; }
.pigeon.sing .pnote { animation: pnote .7s ease-out; }
@keyframes pnote { 0% { opacity: 0; transform: translateY(20px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-36px); } }
.pigeon.sing img { animation: sing .5s ease-out; }
@keyframes sing { 30% { transform: scale(1.12, .92) translateY(-14px) rotate(-5deg); } 60% { transform: scale(.96, 1.06); } }
.pdots { display: flex; gap: 14px; justify-content: center; }
.pdots i { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); transition: background .3s; }
.pdots i.on { background: #ffd34d; box-shadow: 0 0 12px rgba(255,210,80,.9); }

/* ---------- Girouette ---------- */
.vdial { position: relative; width: 400px; height: 400px; margin: 0 auto 22px; border-radius: 50%; background: radial-gradient(circle, #1f2c5a, #0b1230 70%); box-shadow: 0 0 0 10px #2a2420, 0 0 0 14px var(--gold2), 0 20px 40px rgba(0,0,0,.6); transition: box-shadow .4s; }
.vdial.solved { box-shadow: 0 0 0 10px #2a2420, 0 0 0 14px #9dffbf, 0 0 60px rgba(130,255,180,.8); }
.vlab { position: absolute; translate: -50% -50%; font-family: Georgia, serif; font-size: 22px; color: #9fb0e0; }
.vlab.big { font-size: 40px; font-weight: 700; color: #ffe7b0; }
.varrow { position: absolute; left: 50%; top: 50%; width: 60px; height: 300px; margin: -150px 0 0 -30px; transition: transform .35s cubic-bezier(.3,1.4,.6,1); }
.varrow svg { width: 100%; height: 100%; filter: drop-shadow(0 0 2px #9fb0e0); }
.vcoq { position: absolute; left: 50%; top: 64px; translate: -50% 0; font-size: 46px; filter: brightness(.35) drop-shadow(0 0 2px #cfd8ff); }
.vpin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c0, var(--gold) 45%, #8a5a1c); }
.vslots { display: flex; gap: 14px; justify-content: center; margin-bottom: 22px; }
.vslots i { width: 70px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 28px; font-weight: 700; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px rgba(244,201,93,.4); }
.vslots i.on { color: #3a2a0a; background: linear-gradient(180deg, #ffe39a, #e0a93f); box-shadow: 0 0 12px rgba(255,210,100,.7); }
.vctrl { display: flex; gap: 20px; justify-content: center; align-items: center; }
.vctrl .btn.small { font-size: 32px; width: 80px; }
.vreset { margin-top: 18px; }

/* ---------- Note à l'envers ---------- */
.paper.mirror { transform: scaleX(-1) rotate(1.2deg); margin: 0 auto; }
.pz-sub.after { margin: 26px 0 0; }

/* ---------- Boîte à musique ---------- */
.comb { display: flex; gap: 8px; justify-content: center; align-items: flex-start; width: 760px; height: 230px; margin: 0 auto; padding: 24px 30px 0; border-radius: 16px; background: linear-gradient(180deg, #5a2e12, #3a1c0a); box-shadow: inset 0 0 0 4px #c79a4a, 0 12px 24px rgba(0,0,0,.6); }
.tooth { position: relative; flex: 1; height: var(--len); border-radius: 0 0 14px 14px; background: linear-gradient(90deg, #8c939b, #f2f5f8 45%, #aab1b8); box-shadow: 0 4px 6px rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; color: #3a3f45; font-size: 22px; font-weight: 700; transform-origin: top; }
.tooth.down { animation: twang .5s ease-out; }
@keyframes twang { 15% { transform: rotate(3deg); background: linear-gradient(90deg, #c9a24a, #fff3c8 45%, #d9b25a); } 40% { transform: rotate(-2deg); } 65% { transform: rotate(1deg); } }

/* ---------- Télescope ---------- */
.scope.aim { position: relative; cursor: grab; touch-action: none; }
.scope.aim:active { cursor: grabbing; }
.cross { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.35); pointer-events: none; }
.cross::before, .cross::after { content: ""; position: absolute; background: rgba(255,255,255,.35); }
.cross::before { left: 50%; top: -14px; bottom: -14px; width: 1.5px; }
.cross::after { top: 50%; left: -14px; right: -14px; height: 1.5px; }
.aimpad { display: grid; grid-template-columns: repeat(4, auto); gap: 6px; margin-right: 20px; }
.aimpad .btn.small { padding: 6px 14px; }

/* Les objets à ramasser et les personnages passent au-dessus des zones cliquables */
.hot { z-index: 2; }
.sprite.pick, .sprite.npc { z-index: 3; }
.sprite.lay { filter: drop-shadow(0 0 8px rgba(255,240,190,.75)) drop-shadow(0 4px 4px rgba(0,0,0,.45)); }
.sprite svg { display: block; width: 100%; height: auto; }

/* =================== 2e partie : la Ruelle, la Boulangerie et le Clocher =================== */

/* Cave : noire tant que la lampe n'est pas allumée */
[data-scene=cave][data-state=unlit] .cave-dark {
  display: block; inset: 0;
  background: radial-gradient(ellipse 22% 30% at 9% 18%, rgba(4,4,10,.55), rgba(2,2,6,.97) 100%);
}
[data-scene=cave][data-state=lit] .cave-dark {
  display: block; inset: 0; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 60% 70% at 55% 55%, transparent 40%, rgba(10,6,20,.55) 100%);
}

/* Église : rayon coloré de la rosace sur la dalle */
[data-scene=eglise][data-state=glow] .rose-beam {
  display: block; inset: 0; mix-blend-mode: screen; animation: beam 4s ease-in-out infinite;
  background:
    radial-gradient(ellipse 7% 5% at 51% 83%, rgba(255,200,120,.85), transparent 100%),
    radial-gradient(ellipse 5% 3.5% at 49% 82%, rgba(120,170,255,.6), transparent 100%),
    radial-gradient(ellipse 5% 3.5% at 53.5% 84%, rgba(255,110,170,.5), transparent 100%),
    linear-gradient(172deg, transparent 20%, rgba(255,220,160,.0) 22%, rgba(255,210,150,.16) 40%, transparent 78%);
  -webkit-mask: linear-gradient(90deg, transparent 38%, #000 44%, #000 57%, transparent 62%); mask: linear-gradient(90deg, transparent 38%, #000 44%, #000 57%, transparent 62%);
}
@keyframes beam { 50% { opacity: .75; } }

/* Sommet de la flèche : halo de la lune */
[data-scene=nid] .moon-glow {
  display: block; inset: 0; mix-blend-mode: screen; animation: moonpulse 5s ease-in-out infinite;
  background: radial-gradient(circle at 75% 27%, rgba(220,232,255,.3), rgba(180,200,255,.12) 18%, transparent 34%);
}
@keyframes moonpulse { 50% { opacity: .6; } }

/* Notes */
.paper .bells { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 10px 0 24px; }
.nbell { display: block; }
.nbell.s1 { width: 92px; } .nbell.s2 { width: 76px; } .nbell.s3 { width: 60px; } .nbell.s4 { width: 46px; } .nbell.s5 { width: 34px; }

/* Lucioles */
.ffield { position: relative; width: 760px; height: 400px; margin: 0 auto; border-radius: 22px; overflow: hidden; touch-action: none;
  background: radial-gradient(ellipse 50% 60% at 50% 110%, rgba(255,190,90,.18), transparent 70%), radial-gradient(circle at 15% 20%, #22385e, #0d1630 60%, #070c1c);
  box-shadow: inset 0 0 0 4px rgba(244,201,93,.4), inset 0 0 60px rgba(0,0,0,.8), 0 14px 30px rgba(0,0,0,.5); transition: box-shadow .5s; }
.ffield::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background: radial-gradient(circle at 8% 30%, #2f5a32 0 60px, transparent 61px), radial-gradient(circle at 18% 12%, #2a5230 0 50px, transparent 51px), radial-gradient(circle at 92% 20%, #2f5a32 0 70px, transparent 71px), radial-gradient(circle at 84% 44%, #26482a 0 46px, transparent 47px); }
.ffield.solved { box-shadow: inset 0 0 0 4px #9dffbf, 0 0 50px rgba(200,255,120,.7); }
.ffly { position: absolute; left: 0; top: 0; width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer; z-index: 2;
  background: radial-gradient(circle, #fbffd0 0 4px, rgba(214,255,120,.9) 6px, rgba(214,255,120,.25) 12px, transparent 22px); }
.ffly.caught { transition: transform .7s cubic-bezier(.5,-0.2,.6,1), opacity .7s; opacity: 0 !important; pointer-events: none; }
.ffjar { position: absolute; left: 50%; bottom: 6px; width: 130px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; z-index: 1; pointer-events: none; }
.ffjar img { width: 110px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); }
.ffjar b { font-size: 22px; color: #f3ffc0; text-shadow: 0 1px 3px #000; }
.ffglow { position: absolute; left: 50%; top: 40px; width: 90px; height: 90px; translate: -50% 0; border-radius: 50%; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle, rgba(230,255,140,.9), rgba(200,255,110,.3) 45%, transparent 70%); mix-blend-mode: screen; }

/* Plan du tunnel */
.tmap { position: relative; display: inline-block; padding: 26px 90px; border-radius: 12px; transition: box-shadow .4s;
  background: url(../assets/tx_papier.webp) center / 360px, #e9d3a6; box-shadow: inset 0 0 50px rgba(120,70,20,.45), 0 16px 30px rgba(0,0,0,.55); }
.treset { display: block; margin: 14px auto 0; }
.tmap.solved { box-shadow: inset 0 0 50px rgba(120,70,20,.45), 0 0 0 5px #9dffbf, 0 0 50px rgba(130,255,180,.75); }
.tgrid { display: grid; grid-template-columns: repeat(6, 92px); grid-template-rows: repeat(4, 92px); gap: 4px; }
.ttile { padding: 0; border-radius: 8px; background: rgba(110,70,30,.22); box-shadow: inset 0 0 0 2px rgba(90,55,20,.35); }
.ttile:hover { background: rgba(110,70,30,.36); }
.ttile svg { display: block; width: 100%; height: 100%; transition: transform .25s cubic-bezier(.3,1.4,.6,1); }
.tdirt { fill: none; stroke: #5a3a1a; stroke-width: 30; stroke-linecap: butt; }
.tlit { fill: none; stroke: #ffcf6a; stroke-width: 10; opacity: 0; transition: opacity .3s; }
.ttile.on .tlit { opacity: 1; }
.tlabel { position: absolute; width: 80px; translate: 0 -50%; text-align: center; line-height: .9; font: 700 30px "Caveat", cursive; color: #5a2a0a; }
.tlabel::after { content: "➜"; display: block; font-size: 30px; }
.tlabel.in { left: 6px; top: calc(26px + 96px + 46px); }
.tlabel.out { right: 6px; top: calc(26px + 192px + 46px); }

/* Rosace */
.rose { display: grid; grid-template-columns: repeat(3, 150px); gap: 3px; width: max-content; margin: 0 auto; padding: 10px; border-radius: 16px; background: #1b130e; box-shadow: 0 0 0 6px #5d5a66, 0 18px 34px rgba(0,0,0,.6); transition: box-shadow .5s, gap .5s; }
.rose.solved { gap: 0; box-shadow: 0 0 0 6px #9dffbf, 0 0 70px rgba(255,220,140,.85); }
.rpanel { width: 150px; height: 150px; padding: 0; border-radius: 4px; overflow: hidden; transition: transform .3s cubic-bezier(.3,1.4,.6,1), filter .2s; }
.rpanel:hover { filter: brightness(1.2); }
.rpanel svg { display: block; width: 100%; height: 100%; }
.rose.solved .rpanel { filter: brightness(1.15) saturate(1.2); }

/* Horloge vue de dos */
.clockface.back { background: radial-gradient(circle, #f6f0e0 0%, #e2d6ba 70%, #c7b38a 100%); }
.clockface.back .cnum { font-size: 26px; opacity: .75; transform: translate(-50%, -50%) scaleX(-1); }

/* Cloches */
.belfry { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: 22px; width: 820px; height: 330px; margin: 0 auto 20px; padding-top: 30px; border-radius: 18px;
  background: linear-gradient(180deg, #5a3a1a 0 26px, transparent 26px), radial-gradient(ellipse at 50% 120%, #2a3a70, #0b1230 75%); box-shadow: inset 0 0 0 4px #7a5226, 0 16px 30px rgba(0,0,0,.55); transition: box-shadow .4s; }
.belfry.solved { box-shadow: inset 0 0 0 4px #7a5226, 0 0 0 5px #9dffbf, 0 0 60px rgba(255,210,120,.8); }
.bbell { position: relative; padding: 0; background: none; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; }
.bbell svg { display: block; width: 100%; filter: drop-shadow(0 8px 8px rgba(0,0,0,.5)); }
.bbell .brope { position: absolute; left: 50%; top: 92%; width: 4px; height: 70px; margin-left: -2px; background: repeating-linear-gradient(180deg, #d9b98a 0 6px, #a8824c 6px 10px); }
.bbell:hover svg { filter: drop-shadow(0 0 12px rgba(255,220,140,.9)) drop-shadow(0 8px 8px rgba(0,0,0,.5)); }
.bbell.s1 { width: 190px; } .bbell.s2 { width: 155px; } .bbell.s3 { width: 125px; } .bbell.s4 { width: 98px; } .bbell.s5 { width: 72px; }
.bbell.ring { animation: bswing .9s ease-out; }
@keyframes bswing { 15% { transform: rotate(12deg); } 40% { transform: rotate(-9deg); } 65% { transform: rotate(5deg); } 85% { transform: rotate(-2deg); } }

/* Télescope : carte du Grand Chat */
.scope-wrap { position: relative; width: 760px; margin: 0 auto; }
.skycard { position: absolute; right: 14px; top: 14px; width: 150px; padding: 8px 8px 4px; border-radius: 10px; transform: rotate(3deg); text-align: center;
  background: url(../assets/tx_papier.webp) center / 200px, #f0dcb0; box-shadow: 0 8px 16px rgba(0,0,0,.5); pointer-events: none; }
.skycard svg { display: block; width: 100%; }
.skycard span { font: 700 22px "Caveat", cursive; color: #5a2a0a; }

/* Tour de fromages */
.hanoi { display: flex; gap: 24px; justify-content: center; margin: 0 auto 14px; transition: filter .4s; }
.hanoi.solved { filter: drop-shadow(0 0 24px rgba(140,255,170,.8)); }
.hshelf { position: relative; width: 240px; height: 250px; padding: 0; border-radius: 16px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 2px rgba(244,201,93,.3); }
.hshelf::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 26px; height: 10px; border-radius: 4px; background: linear-gradient(180deg, #8a4f22, #5a2e10); }
.hshelf.wet { background: linear-gradient(180deg, rgba(90,140,200,.25), rgba(0,0,0,.25)); }
.hshelf.dry { background: linear-gradient(180deg, rgba(255,200,120,.18), rgba(0,0,0,.25)); }
.hshelf.sel { box-shadow: inset 0 0 0 3px #ffe066, 0 0 20px rgba(255,220,100,.5); }
.hshelf:hover { background-color: rgba(255,240,210,.08); }
.hlab { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 17px; color: #e1c99f; }
.cheese { position: absolute; left: 50%; height: 38px; translate: -50% 0; border-radius: 10px 10px 6px 6px; transition: transform .2s; z-index: 1;
  background: radial-gradient(circle at 25% 40%, #c99a2a 0 4px, transparent 5px), radial-gradient(circle at 70% 60%, #c99a2a 0 5px, transparent 6px), linear-gradient(180deg, #ffe58a, #f2c23e 55%, #d89b1c);
  box-shadow: inset 0 0 0 3px #8a5a10, 0 4px 6px rgba(0,0,0,.4); }
.cheese.up { transform: translateY(-26px); box-shadow: inset 0 0 0 3px #8a5a10, 0 0 16px rgba(255,220,100,.9); }
.hcount { font-size: 20px; color: #e1c99f; margin-bottom: 12px; }

/* Engrenages */
.gsvg { display: block; width: 760px; height: auto; margin: 0 auto; border-radius: 18px; background: radial-gradient(ellipse at 50% 40%, #3a2a1a, #1a1008 80%); box-shadow: inset 0 0 0 3px rgba(244,201,93,.35); transition: box-shadow .4s; }
.gsvg.solved { box-shadow: inset 0 0 0 3px #9dffbf, 0 0 50px rgba(255,210,120,.6); }
.gbar { fill: #4a3220; }
.gbody { stroke: #3a2208; stroke-width: 3; stroke-linejoin: round; }
.brass .gbody { fill: #d9a441; } .fixed .gbody { fill: #9aa3ad; }
.ginner { fill: rgba(0,0,0,.12); stroke: rgba(58,34,8,.6); stroke-width: 2; }
.ghole { fill: #2a1a0c; }
.gpin { fill: #fff0b0; stroke: #3a2208; stroke-width: 2; }
.ghit { fill: transparent; cursor: pointer; }
.gaxle { fill: #2a1a0c; stroke: #c9a24a; stroke-width: 3; stroke-dasharray: 4 3; pointer-events: none; }
.peg { cursor: pointer; }
.peg:hover .gaxle { stroke: #ffe066; }
.glab { fill: #e1c99f; font-size: 18px; text-anchor: middle; }
.spin.on { animation: gspin var(--d) linear infinite; }
.spin.rev.on { animation-direction: reverse; }
@keyframes gspin { to { transform: rotate(360deg); } }
.gtray { display: flex; gap: 18px; align-items: center; justify-content: center; min-height: 140px; margin-top: 16px; padding: 10px; border-radius: 16px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 2px rgba(244,201,93,.3); }
.gpick { padding: 4px; border-radius: 50%; background: none; }
.gpick svg { display: block; }
.gpick:hover { filter: drop-shadow(0 0 10px rgba(255,230,140,.9)); }
.gpick.sel { filter: drop-shadow(0 0 0 #ffe066) drop-shadow(0 0 14px rgba(255,220,100,1)); }

/* Devinettes */
.riddle { width: 760px; margin: 0 auto 20px; padding: 26px 30px; border-radius: 18px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 2px rgba(244,201,93,.35); transition: box-shadow .4s; }
.riddle.solved { box-shadow: inset 0 0 0 3px #9dffbf, 0 0 40px rgba(130,255,180,.6); }
.rq { font-size: 28px; line-height: 1.4; margin: 0 0 22px; color: #ffefd2; font-style: italic; }
.ropts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ropts .btn { font-size: 24px; }

/* Chatons cachés, cloches */
.sprite.kitten { animation: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.sprite.kitten:hover { filter: drop-shadow(0 0 10px rgba(255,230,140,.95)) brightness(1.1); }
.sprite.basket { clip-path: inset(-30px -30px 40% -30px); }
.sprite.bell { transform-origin: 50% 0; animation: bellsway 5s ease-in-out infinite; }
.sprite.bell:nth-child(2n) { animation-delay: -2s; }
@keyframes bellsway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

.menu-box h1 .part { display: block; width: max-content; margin: 18px 0 0 168px; padding: 6px 22px; border-radius: 14px; font: 700 34px "Fredoka", sans-serif; font-style: normal; letter-spacing: 3px; text-transform: uppercase; color: #4a2a0c; background: linear-gradient(180deg, #ffe39a, #e0a93f); box-shadow: 0 6px 16px rgba(0,0,0,.5); transform: rotate(-4deg); }
.sprite.bat { transform-origin: 50% 2%; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); animation: batsway 4s ease-in-out infinite; }
@keyframes batsway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
