/* ===== LevelPlan V8 · récompenses et effets =====
   La lumière n'apparaît qu'ici : halo de lampe en laiton, poussière dorée, sceau des succès.
   Tout mouvement est coupé si l'utilisateur préfère moins d'animations. */

/* ---------- XP flottante, poussière ---------- */
.fxfloat { position: fixed; z-index: 140; transform: translate(-50%, 0); pointer-events: none; font-weight: 800; font-size: 15px; color: var(--acs); text-shadow: 0 2px 8px #0008; animation: fxup 1.05s cubic-bezier(.2, .8, .2, 1) forwards; font-variant-numeric: tabular-nums; }
@keyframes fxup { from { opacity: 0; transform: translate(-50%, 6px) scale(.9); } 20% { opacity: 1; transform: translate(-50%, -6px) scale(1.05); } to { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
#fxLayer { position: fixed; inset: 0; z-index: 130; pointer-events: none; overflow: hidden; }
.dust { position: absolute; width: 5px; height: 5px; margin: -2px 0 0 -2px; border-radius: 50%; background: radial-gradient(circle, #fff6d8, var(--ac) 60%, transparent 70%); box-shadow: 0 0 6px var(--ac); animation: dust 1.3s cubic-bezier(.15, .75, .3, 1) forwards; }
.dust:nth-child(3n) { width: 3px; height: 3px; }
.dust:nth-child(4n) { background: radial-gradient(circle, #e9fff8, var(--vg) 60%, transparent 70%); box-shadow: 0 0 6px var(--vg); }
@keyframes dust { from { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }

/* ---------- fenêtre de récompense ---------- */
.modal { overflow: hidden; }
.reward, .reveal { position: relative; text-align: center; }
.rw-light { position: absolute; left: 50%; top: -120px; width: 420px; height: 300px; margin-left: -210px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--rc, var(--ac)) 34%, transparent), transparent); opacity: .9; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion=reduced]) .rw-light { animation: lamp 3.2s ease-in-out infinite alternate; } }
@keyframes lamp { from { opacity: .65; transform: scale(.96); } to { opacity: 1; transform: scale(1.04); } }
.rw-kicker { position: relative; margin: 2px 0 6px; font-size: 13px; font-weight: 650; color: var(--acs); }
.rw-title { position: relative; font-family: var(--font-d); font-size: 27px; font-weight: 600; line-height: 1.15; }
.rw-sub { position: relative; margin: 8px auto 0; max-width: 34ch; color: var(--tx2); font-size: 14.5px; line-height: 1.5; }
.reward > .stack { position: relative; margin-top: 18px; }
.rw-sub .rar { vertical-align: middle; }
.rw-sub svg { width: 14px; height: 14px; vertical-align: middle; }
.rw-art { position: relative; width: 180px; margin: 14px auto 0; }
.rw-art svg { width: 100%; height: auto; display: block; border-radius: 22px; }
.rw-art.sm { width: 132px; }
.rw-art.xs { width: 92px; margin: 0; flex: none; }
.v8pick { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 12px; text-align: left; }
.reward .v8pick .fl { text-align: left; margin-top: 8px; }
.v8pick .v8opts { min-width: 0; }
.rw-art.pet { width: 150px; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion=reduced]) .rw-art { animation: rise .6s cubic-bezier(.2, .9, .3, 1.2) both; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.94); } to { opacity: 1; transform: none; } }
.gain { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 14px 0 0; }
.gain span { padding: 5px 11px; border-radius: 99px; background: var(--acbg); color: var(--acs); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.loot { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 14px; }
.loot .li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: var(--r-m); background: var(--s2); border: 1px solid color-mix(in srgb, var(--rc, var(--line2)) 50%, var(--line)); }
.loot .li.dupe { opacity: .7; }
.loot .ii { width: 56px; height: 56px; border-radius: 13px; overflow: hidden; background: var(--s3); }
.loot .ii svg { width: 100%; height: 100%; display: block; }
.loot b { font-size: 12.5px; line-height: 1.25; }
.reward .btns { position: relative; margin-top: 18px; }
.news { position: relative; list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 1px; border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); background: var(--line); text-align: left; }
.news li { background: var(--s2); padding: 10px 12px; }
.news b { display: block; font-size: 14px; font-family: var(--font-d); }
.news span { display: block; font-size: 12.5px; color: var(--tx2); margin-top: 1px; }
.rw-perk { position: relative; margin: 12px 0 0; padding: 9px 12px; border-radius: var(--r-s); background: var(--acbg); color: var(--acs); font-size: 13px; font-weight: 550; line-height: 1.45; }
.reward .fl { text-align: center; }
.evoanim { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.evoanim span { width: 100px; height: 100px; }
.evoanim span svg { width: 100%; height: 100%; }
.evoanim i { color: var(--acs); } .evoanim i svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion=reduced]) .evoanim .to { animation: rise .7s .25s cubic-bezier(.2, .9, .3, 1.3) both; } }

/* ---------- succès secret : le sceau ---------- */
.seal-stage { position: relative; width: 120px; height: 120px; margin: 4px auto 10px; }
.seal-stage .seal { position: absolute; inset: 14px; border-radius: 50%; display: grid; place-items: center; color: var(--actx); background: radial-gradient(circle at 38% 32%, #f6e2ad, var(--ac) 55%, var(--ac2)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ac) 30%, transparent), 0 10px 30px #0007, inset 0 -6px 12px #0003; }
.seal-stage .seal svg { width: 40px; height: 40px; }
.seal-stage .ink { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ac); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion=reduced]) .seal-stage .seal { animation: stamp .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  :root:not([data-motion=reduced]) .seal-stage .ink { animation: ink 1s .35s ease-out both; }
}
@keyframes stamp { from { transform: scale(1.8) rotate(-18deg); opacity: 0; } 60% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes ink { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.35); } }

/* ---------- coffre ---------- */
.reveal { padding-top: 6px; }
.chestbox { position: relative; display: block; width: 168px; height: 168px; margin: 6px auto 4px; border-radius: 24px; }
.chestbox svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 18px #0007); }
.reveal .chestbox:not(.open) { animation: idle 2.6s ease-in-out infinite; }
@keyframes idle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.reveal.shake .chestbox { animation: shake .45s cubic-bezier(.36, .07, .19, .97) 3; }
@keyframes shake { 10%, 90% { transform: translate(-1px, 0) rotate(-1deg); } 20%, 80% { transform: translate(3px, 0) rotate(2deg); } 30%, 50%, 70% { transform: translate(-5px, -1px) rotate(-3deg); } 40%, 60% { transform: translate(5px, 1px) rotate(3deg); } }
.reveal.lit .rw-light { background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 55%, transparent), transparent); opacity: 1; }
.reveal.lit .chestbox svg { filter: drop-shadow(0 0 22px var(--rc)) drop-shadow(0 12px 18px #0007); }
.reveal.open .chestbox { width: 120px; height: 120px; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion=reduced]) .reveal.open .chestbox { animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; } }
@keyframes pop { from { transform: scale(.85); } to { transform: scale(1); } }
.reveal.r-SSR .rw-light, .reveal.r-LR .rw-light { width: 560px; margin-left: -280px; height: 380px; }
.lootone { position: relative; display: flex; align-items: center; gap: 14px; margin: 10px 0 0; padding: 12px; border-radius: var(--r-l); background: var(--s2); border: 1px solid color-mix(in srgb, var(--rc, var(--line2)) 60%, var(--line)); text-align: left; }
@media (prefers-reduced-motion: no-preference) { :root:not([data-motion=reduced]) .lootone { animation: rise .5s .05s cubic-bezier(.2, .9, .3, 1.2) both; } }
.lootone .ii { width: 76px; height: 76px; flex: none; border-radius: 16px; overflow: hidden; background: var(--s3); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc, var(--line2)) 70%, transparent), 0 0 24px color-mix(in srgb, var(--rc, transparent) 40%, transparent); }
.lootone .ii svg { width: 100%; height: 100%; display: block; }
.lootone .lt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.lootone .rw-title { font-size: 21px; }
.cmpmini { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 12px; }
.cmpline { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 6px; font-size: 13.5px; max-width: 100%; }
.cmpline b { font-weight: 650; overflow-wrap: anywhere; }
.cmpline i { color: var(--mu); display: inline-grid; align-self: center; } .cmpline i svg { width: 15px; height: 15px; }
.reveal.busy .chestbox { cursor: pointer; }
/* objet LR : un moment rare, un halo qui tourne lentement autour de l'objet */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion=reduced]) .reveal.lr-moment .lootone .ii { animation: lrglow 2.4s ease-in-out infinite alternate; }
}
@keyframes lrglow { from { box-shadow: 0 0 0 2px #e8648f, 0 0 26px #e8648f88; } 33% { box-shadow: 0 0 0 2px #e8aa4a, 0 0 30px #e8aa4a88; } 66% { box-shadow: 0 0 0 2px #5fc79a, 0 0 30px #5fc79a88; } to { box-shadow: 0 0 0 2px #a777e6, 0 0 34px #a777e688; } }
.reveal .btns { position: relative; }

/* ---------- moins d'animations : tout est immédiat ---------- */
@media (prefers-reduced-motion: reduce) { .dust { display: none; } .fxfloat { animation-duration: .001ms; } .reveal .chestbox:not(.open) { animation: none; } }
:root[data-motion=reduced] .dust { display: none; }
:root[data-motion=reduced] .reveal .chestbox { animation: none !important; }
