/* DataCard — mise en page générale */
:root {
  --bg: #070a16; --panel: rgba(255, 255, 255, .05); --panel2: rgba(255, 255, 255, .085); --line: rgba(255, 255, 255, .11);
  --txt: #eef1ff; --mut: #94a0cf; --acc: #6f8dff; --acc2: #b06bff; --acc3: #ff5fd2; --cyan: #4fd1ff; --gold: #ffc83d; --good: #3ddc97; --bad: #ff5d6c; --flame: #ff8a3d;
  --r0: #b6c3d3; --r1: #6db6ff; --r2: #c58aff; --r3: #ffd24a; --r4: #ff7de0;
  --radius: 20px;
  --grad: linear-gradient(135deg, #4fd1ff 0%, #7a6bff 45%, #ff5fd2 100%);
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif; color: var(--txt); background: var(--bg);
  min-height: 100vh; overflow-x: clip; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { line-height: 1.1; }
.mut { color: var(--mut); }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic.fill { fill: currentColor; }

/* ───── Fond animé ───── */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 55vmax; height: 55vmax; left: -15vmax; top: -22vmax; background: #3d5bff; }
.aurora i:nth-child(2) { width: 48vmax; height: 48vmax; right: -14vmax; top: -10vmax; background: #9a3dff; animation-delay: -7s; opacity: .42; }
.aurora i:nth-child(3) { width: 50vmax; height: 50vmax; left: 25vmax; bottom: -30vmax; background: #ff3db8; animation-delay: -13s; opacity: .26; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.12); } }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
}

/* ───── En-tête ───── */
.top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 26px;
  background: rgba(7, 10, 22, .72); backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 38px; height: 38px; filter: drop-shadow(0 4px 14px rgba(122, 107, 255, .65)); transition: transform .4s cubic-bezier(.2, 1.4, .3, 1); }
.brand:hover img { transform: rotate(-10deg) scale(1.12); }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
#nav { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
#nav button {
  position: relative; background: none; border: 0; padding: 9px 18px; border-radius: 12px; color: var(--mut); font-weight: 600;
  display: flex; gap: 8px; align-items: center; transition: color .2s, background .2s, transform .15s;
}
#nav button:hover { color: var(--txt); }
#nav button:active { transform: scale(.95); }
#nav button.active { color: #fff; background: linear-gradient(135deg, rgba(111, 141, 255, .5), rgba(176, 107, 255, .45)); box-shadow: 0 4px 18px rgba(122, 107, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.dot { position: absolute; top: 5px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); display: none; animation: pulse 1.4s infinite; }
.dot.on { display: block; }
.hud { display: flex; align-items: center; gap: 8px; }
.hud-pill { display: flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 6px 13px; font-weight: 600; font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud-pill.flame .ic { color: var(--flame); } .hud-pill.gem .ic { color: var(--cyan); } .hud-pill.rank .ic { color: var(--gold); }
.hud-pill.bump { animation: bump .5s cubic-bezier(.2, 1.6, .3, 1); }
@keyframes bump { 40% { transform: scale(1.18); box-shadow: 0 0 22px rgba(79, 209, 255, .6); } }
.icon-btn { background: var(--panel); border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; transition: .15s; }
.icon-btn:hover { background: var(--panel2); }

main { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 26px 24px 90px; }
.view { animation: viewIn .4s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* ───── Boutons & panneaux ───── */
.btn {
  position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px 20px; font-weight: 700;
  transition: transform .15s, background .2s, box-shadow .2s; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.btn:hover:not(:disabled) { background: var(--panel2); transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.btn.primary { border: 0; color: #fff; background: linear-gradient(120deg, #4f7bff, #9a5bff 55%, #ff5fd2); background-size: 160% 100%; box-shadow: 0 10px 34px rgba(140, 90, 255, .5); }
.btn.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); background-size: 260% 100%; background-position: 160% 0; animation: btnSheen 3s ease-in-out infinite; pointer-events: none; }
@keyframes btnSheen { 0%, 55% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.btn.primary:hover:not(:disabled) { box-shadow: 0 14px 44px rgba(150, 90, 255, .7); background-position: 100% 0; }
.btn.big { padding: 18px 30px; font-size: 1.15rem; border-radius: 18px; }
.btn.ready { animation: ctaPulse 1.8s ease-in-out infinite; }
@keyframes ctaPulse { 50% { box-shadow: 0 10px 50px rgba(200, 100, 255, .85); transform: scale(1.02); } }
.btn.gold { border: 0; color: #2a1b00; background: linear-gradient(135deg, #ffe48a, #ffb12b); box-shadow: 0 8px 26px rgba(255, 177, 43, .35); }
.panel { background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; backdrop-filter: blur(8px); }
.panel h3 { font-size: 1.02rem; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; font-weight: 700; }
.panel h3 .ic { color: var(--acc); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-top: 34px; }
.bar { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
h2.sec { font-size: 1.3rem; margin: 34px 0 14px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
h2.sec::before { content: ""; width: 5px; height: 1.1em; border-radius: 4px; background: var(--grad); }

/* ───── Accueil : booster ───── */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; padding-top: 10px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(111, 141, 255, .15); border: 1px solid rgba(111, 141, 255, .4); color: #b9c6ff; font-weight: 700; font-size: .85rem; letter-spacing: .04em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1; margin-bottom: 18px; }
.grad-text { background: linear-gradient(100deg, #4fd1ff, #8a7bff 35%, #ff5fd2 70%, #ffc83d); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradMove 6s linear infinite alternate; }
@keyframes gradMove { to { background-position: 100% 0; } }
.hero p.lead { color: var(--mut); font-size: 1.12rem; line-height: 1.55; margin-bottom: 26px; max-width: 520px; }
.hero p.lead b { color: var(--txt); font-variant-numeric: tabular-nums; }
.actions { display: grid; gap: 12px; max-width: 480px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.tile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); min-width: 150px; }
.tile .ti { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; }
.tile b { display: block; font-size: 1.3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--mut); font-size: .8rem; }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--acc2) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0e1228; }
.ring .ic { position: relative; color: var(--acc2); }

.hero-stage { position: relative; display: grid; place-items: center; min-height: 470px; perspective: 1000px; overflow-x: clip; }
.hero-stage .pack { --pw: 250px; }
.aura { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(140, 100, 255, .55), transparent 65%); filter: blur(20px); animation: auraPulse 4s ease-in-out infinite; }
@keyframes auraPulse { 50% { transform: scale(1.18); opacity: .75; } }
.fan { position: absolute; width: 230px; height: 326px; border-radius: 16px; overflow: hidden; border: 6px solid transparent; display: grid; place-items: center;
  background: radial-gradient(circle, #5b34d6 0, #231c7a 34%, #0b0d3c 72%, #04051a 100%) padding-box, linear-gradient(135deg, #ff3fd0, #ffd84a, #3ddc97, #4fd1ff, #7a6bff, #ff3fd0) border-box; box-shadow: 0 20px 40px rgba(0, 0, 0, .5), 0 0 30px rgba(122, 90, 255, .45); }
.fan::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(110, 200, 255, .2) 0 1px, transparent 1px 22px), repeating-linear-gradient(-45deg, rgba(255, 110, 220, .2) 0 1px, transparent 1px 22px); }
.fan::after { content: ''; position: absolute; width: 136px; height: 136px; border-radius: 50%; background: conic-gradient(#ff3fd0, #ffd84a, #3ddc97, #4fd1ff, #7a6bff, #ff3fd0); animation: spin 6s linear infinite; -webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask-image: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.fan img { position: relative; z-index: 1; width: 90px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.fan.f1 { transform: translate(-90px, 18px) rotate(-14deg); animation: fanL 5s ease-in-out infinite; }
.fan.f2 { transform: translate(92px, 14px) rotate(13deg); animation: fanR 5s ease-in-out infinite; }
@keyframes fanL { 50% { transform: translate(-104px, 6px) rotate(-17deg); } }
@keyframes fanR { 50% { transform: translate(106px, 2px) rotate(16deg); } }
.spark { position: absolute; width: 14px; height: 14px; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkleStar 3s ease-in-out infinite; filter: drop-shadow(0 0 6px #fff); }
@keyframes twinkleStar { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.2) rotate(90deg); opacity: 1; } }

.streak { display: flex; align-items: center; margin-bottom: 14px; }
.sd { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: rgba(255, 255, 255, .07); color: var(--mut); border: 1px solid var(--line); flex: none; z-index: 1; }
.sd.on { background: linear-gradient(135deg, #ffb13d, #ff4d6d); color: #fff; border: 0; box-shadow: 0 0 16px rgba(255, 120, 60, .55); }
.sd.now { animation: pulse 1.6s infinite; }
.sd.gift.on { background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #3a2400; }
.sl { flex: 1; height: 4px; background: rgba(255, 255, 255, .1); }
.sl.on { background: linear-gradient(90deg, #ffb13d, #ff4d6d); }
.quest { list-style: none; padding: 0; display: grid; gap: 14px; }
.quest li { display: grid; grid-template-columns: 36px 1fr auto; gap: 5px 12px; align-items: center; }
.quest .qi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(111, 141, 255, .18); color: #aebcff; grid-row: span 2; }
.quest b { font-size: .95rem; font-weight: 600; }
.quest em { font-style: normal; font-size: .85rem; color: var(--mut); text-align: right; }
.quest small { grid-column: 3; color: var(--cyan); font-size: .78rem; text-align: right; font-weight: 600; }
.quest li.done .qi { background: rgba(61, 220, 151, .22); color: var(--good); }
.quest li.done b { color: var(--good); }
.quest li.done em { color: var(--good); }
.pity-line { display: flex; justify-content: space-between; font-size: .93rem; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.pity-line:last-of-type { border: 0; }
.chip-rar { font-weight: 800; }
.showcase { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 18px; scrollbar-width: thin; }
.showcase .g-item { flex: none; }

/* ───── Collection ───── */
.col-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.col-head h2 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.col-title { display: flex; align-items: center; gap: 16px; }
.col-title .ring { width: 62px; height: 62px; }
.col-title .ring::before { inset: 6px; }
.col-title .ring span { position: relative; font-weight: 800; font-size: .9rem; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools input, .tools select { background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--txt); border-radius: 12px; padding: 10px 13px; font: inherit; min-width: 0; }
.tools select option { background: #151a35; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip-cat { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: .88rem; font-weight: 600; color: var(--mut); transition: .15s; }
.chip-cat small { opacity: .8; font-weight: 500; }
.chip-cat:hover { color: var(--txt); transform: translateY(-1px); }
.chip-cat.active { color: #fff; background: rgba(111, 141, 255, .3); border-color: rgba(111, 141, 255, .75); }
.chip-cat.done { border-color: rgba(255, 200, 61, .65); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 24px 14px; justify-items: center; }
.g-item { position: relative; cursor: pointer; transition: transform .25s cubic-bezier(.2, 1.4, .3, 1); outline: none; }
.g-item:hover, .g-item:focus-visible { transform: translateY(-6px) scale(1.03); }
.new-badge { position: absolute; top: -8px; left: -6px; z-index: 5; padding: 3px 9px; border-radius: 99px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: #1b0b1f; background: linear-gradient(90deg, #ff5fd2, #ffb12b); box-shadow: 0 4px 14px rgba(255, 95, 210, .6); animation: pulseBadge 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes pulseBadge { 50% { transform: scale(1.12) rotate(-3deg); } }
.empty { grid-column: 1/-1; text-align: center; color: var(--mut); padding: 60px 0; }

/* ───── Défis ───── */
.two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.quiz-q { font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--mut); margin-bottom: 10px; display: flex; justify-content: space-between; }
.quiz-text { font-size: 1.15rem; line-height: 1.5; padding: 18px 20px; border-radius: 14px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); margin: 12px 0 16px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { text-align: left; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; transition: .15s; display: flex; gap: 10px; align-items: center; }
.opt .ic { color: var(--acc); }
.opt:hover:not(:disabled) { background: var(--panel2); transform: translateY(-2px); }
.opt:active:not(:disabled) { transform: scale(.97); }
.opt.ok { background: rgba(61, 220, 151, .22); border-color: var(--good); animation: popOk .5s; }
.opt.bad { background: rgba(255, 93, 108, .2); border-color: var(--bad); animation: shake .4s; }
.opt:disabled { cursor: default; }
@keyframes popOk { 40% { transform: scale(1.05); } }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; flex-wrap: wrap; }
.quiz-foot b { display: flex; align-items: center; gap: 8px; }
.recap-q { display: grid; gap: 8px; margin: 14px 0; }
.recap-q div { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: .95rem; }
.art-mini { width: 28px; height: 28px; border-radius: 8px; background: #fff; display: grid; place-items: center; flex: none; }
.art-mini img { width: 18px; height: 18px; }
.art-mini.glass { background: rgba(111, 141, 255, .35); }
.art-mini.dark { background: #22274a; }

/* ───── Profil ───── */
.rank-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.rank-ico { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 2.6rem; color: #2a1b00; background: linear-gradient(135deg, #ffe48a, #ffb12b); box-shadow: 0 10px 34px rgba(255, 177, 43, .45); }
.rank-card .grow { flex: 1; min-width: 220px; }
.rank-card h2 { font-size: 1.8rem; font-weight: 800; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.kpi { text-align: center; padding: 16px 8px; }
.kpi b { display: block; font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--mut); font-size: .82rem; }
.cat-row { display: grid; grid-template-columns: 210px 1fr auto; gap: 14px; align-items: center; padding: 7px 0; font-size: .92rem; }
.cat-row > span:first-child { display: flex; align-items: center; gap: 9px; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ach { display: flex; gap: 13px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.ach .ai { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: 1.2rem; flex: none; }
.ach small { color: var(--mut); display: block; font-size: .78rem; margin-top: 2px; }
.ach.lock { opacity: .4; filter: grayscale(1); }
.ach.got { border-color: rgba(255, 200, 61, .55); background: rgba(255, 200, 61, .07); }
.ach.got .ai { background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #2a1b00; }
table.odds { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.odds td, table.odds th { padding: 9px 4px; text-align: left; border-bottom: 1px solid var(--line); }
textarea { width: 100%; min-height: 70px; background: rgba(0, 0, 0, .3); color: var(--txt); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font: .78rem/1.4 ui-monospace, Consolas, monospace; resize: vertical; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ───── Fiche carte (modale) ───── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 6, 16, .8); backdrop-filter: blur(8px); animation: fadeIn .25s; }
.modal-box {
  position: relative; width: min(940px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 26px; padding: 28px;
  background: linear-gradient(160deg, #1a2044, #0d1128); border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  display: grid; grid-template-columns: auto 1fr; gap: 32px; animation: pop .4s cubic-bezier(.2, 1.2, .3, 1);
}
.modal-box .x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); z-index: 2; display: grid; place-items: center; }
.m-left { display: grid; place-items: start center; padding-top: 6px; }
.m-right h2 { font-size: 2rem; font-weight: 800; margin: 10px 0 16px; padding-right: 34px; letter-spacing: -.02em; }
.m-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 12px; font-size: .8rem; font-weight: 700; border: 1px solid var(--line); background: var(--panel); }
.lvl-info { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 8px; color: var(--mut); }
.lessons { display: grid; gap: 8px; margin: 18px 0; }
.lesson { padding: 12px 15px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.lesson b { font-size: .84rem; display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.lesson b .ic { color: var(--acc); }
.lesson p { font-size: .96rem; line-height: 1.5; color: #d8defa; }
.lesson.lock { opacity: .55; border-style: dashed; }
.lesson.lock p { color: var(--mut); font-style: italic; }
.lesson.lock b .ic { color: var(--mut); }
.ascend-box { padding: 16px; border-radius: 16px; border: 1px solid rgba(255, 200, 61, .4); background: linear-gradient(135deg, rgba(255, 200, 61, .12), rgba(255, 95, 210, .07)); }
.ascend-box p { font-size: .88rem; color: var(--mut); margin-bottom: 12px; line-height: 1.45; }
.stat-bars { display: grid; gap: 8px; margin: 14px 0; }
.stat-bars div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; font-size: .85rem; color: var(--mut); }

/* ───── Toasts, particules, bannière ───── */
#toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; display: grid; gap: 8px; pointer-events: none; max-width: min(390px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; background: rgba(20, 26, 54, .96); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-weight: 600; font-size: .92rem; box-shadow: 0 12px 34px rgba(0, 0, 0, .5); animation: toastIn .45s cubic-bezier(.2, 1.3, .3, 1); }
.toast .ti { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(111, 141, 255, .25); flex: none; }
.toast.quest { border-color: rgba(61, 220, 151, .6); } .toast.quest .ti { background: rgba(61, 220, 151, .25); color: var(--good); }
.toast.ach { border-color: rgba(255, 200, 61, .7); background: linear-gradient(135deg, rgba(64, 48, 8, .96), rgba(20, 26, 54, .96)); } .toast.ach .ti { background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #2a1b00; }
.toast.out { opacity: 0; transform: translateX(20px); transition: .45s; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 110; overflow: hidden; }
#fx i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; box-shadow: 0 0 12px currentColor; animation: burst var(--t, 1s) cubic-bezier(.1, .7, .3, 1) forwards; }
#fx i.star { border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 5px currentColor); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
#fx i.conf { border-radius: 2px; box-shadow: none; width: calc(var(--s) * .6); height: var(--s); animation: confetti var(--t, 2.6s) cubic-bezier(.3, .6, .5, 1) forwards; }
#flash { position: fixed; inset: 0; z-index: 105; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff, rgba(255, 220, 255, .6) 40%, transparent 75%); }
#flash.go { animation: flash .9s ease-out; }
.banner { position: fixed; z-index: 115; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: bannerIn 3.2s cubic-bezier(.2, 1.2, .3, 1) forwards; }
.banner .bi { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 28px; display: grid; place-items: center; font-size: 3rem; color: #2a1b00; background: linear-gradient(135deg, #ffe48a, #ffb12b); box-shadow: 0 0 60px rgba(255, 200, 61, .8); }
.banner small { display: block; letter-spacing: .3em; font-weight: 800; color: var(--gold); font-size: .8rem; }
.banner b { display: block; font-size: 2.2rem; font-weight: 800; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }

@keyframes burst { from { transform: translate(0, 0) scale(1) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(180deg); opacity: 0; } }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 720deg)); opacity: 0; } }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
@keyframes pulse { 50% { transform: scale(1.4); opacity: .65; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(16px); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(34px) scale(.9); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes bannerIn { 0% { opacity: 0; transform: translateX(-50%) scale(.3); } 12% { opacity: 1; transform: translateX(-50%) scale(1.08); } 20% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px); } }

/* ───── Mobile ───── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .actions { margin-inline: auto; width: 100%; }
  .tiles { justify-content: center; }
  .hero-stage { order: -1; min-height: 380px; }
}
@media (max-width: 760px) {
  .top { padding: 8px 12px; gap: 8px; backdrop-filter: none; background: rgba(7, 10, 22, .96); } /* backdrop-filter casserait le position:fixed de la nav */
  .brand { font-size: 1.15rem; } .brand img { width: 30px; height: 30px; }
  .hud { margin-left: auto; gap: 5px; }
  .hud-pill { padding: 5px 10px; font-size: .82rem; }
  .hud-pill.rank { display: none; }
  #nav {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 40; justify-content: space-around; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); border-radius: 0;
    background: rgba(7, 10, 22, .96); border: 0; border-top: 1px solid var(--line);
  }
  #nav button { flex-direction: column; gap: 3px; padding: 6px 14px; font-size: .72rem; } #nav button .ic { width: 1.4em; height: 1.4em; }
  main { padding: 16px 14px 100px; }
  .two { grid-template-columns: 1fr; }
  .modal-box { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .opts { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 1fr auto; } .cat-row .bar { grid-column: 1/-1; grid-row: 2; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  #toasts { bottom: 76px; }
  .hero h1 { font-size: 2.4rem; }
  .hero-stage .pack { --pw: 210px; } .hero-stage { min-height: 340px; }
  .fan { width: 160px; height: 228px; } .fan::after { width: 100px; height: 100px; } .fan img { width: 64px; }
  .fan.f1 { transform: translate(-70px, 14px) rotate(-14deg); } .fan.f2 { transform: translate(72px, 10px) rotate(13deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───── Fiche carte : onglets, guide détaillé, atelier ───── */
.m-left { position: sticky; top: 0; align-self: start; display: grid; justify-items: center; gap: 14px; }
.pin-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: .88rem; transition: .15s; }
.pin-btn:hover { background: var(--panel2); transform: translateY(-1px); }
.pin-btn.on { border-color: rgba(255, 200, 61, .7); color: var(--gold); background: rgba(255, 200, 61, .1); }
.tabs { display: flex; gap: 6px; margin: 16px 0 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); position: sticky; top: -1px; z-index: 3; backdrop-filter: blur(8px); }
.tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 0; background: none; color: var(--mut); font-weight: 700; transition: .15s; }
.tab:hover { color: var(--txt); }
.tab.active { color: #fff; background: linear-gradient(135deg, rgba(111, 141, 255, .5), rgba(176, 107, 255, .45)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.tab.off { opacity: .5; }
.pane { animation: fadeIn .25s; }
.guide { display: grid; gap: 12px; margin-top: 14px; }
.g-sec { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.g-sec h4 { display: flex; align-items: center; gap: 9px; font-size: .86rem; letter-spacing: .04em; text-transform: uppercase; color: #b9c6ff; margin-bottom: 9px; }
.g-sec h4 .ic { color: var(--acc); }
.g-sec p { font-size: .98rem; line-height: 1.6; color: #dde3fb; }
.g-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.g-sec li { font-size: .95rem; line-height: 1.5; color: #d3daf7; }
.g-sec li::marker { color: var(--acc2); }
.g-sec.warn { border-color: rgba(255, 138, 61, .4); background: rgba(255, 138, 61, .06); }
.g-sec.warn h4, .g-sec.warn h4 .ic { color: #ffb27a; }
.g-sec.warn li::marker { color: #ff8a3d; }
.g-ex { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #090c1c; }
.g-ex-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255, 255, 255, .06); font-size: .85rem; }
.g-ex pre { margin: 0; padding: 14px; overflow-x: auto; font: .84rem/1.55 ui-monospace, 'Cascadia Code', Consolas, monospace; color: #cfe0ff; white-space: pre; tab-size: 2; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 10px; font-size: .78rem; font-weight: 700; }
.mini-btn:hover { background: var(--panel2); }
.g-next { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 5px 12px; border-radius: 99px; background: rgba(111, 141, 255, .16); border: 1px solid rgba(111, 141, 255, .35); color: #c4cfff; font-size: .85rem; font-weight: 600; }
.rel { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px 6px 7px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; font-size: .85rem; transition: .15s; }
.rel:hover { background: var(--panel2); transform: translateY(-1px); }
.rel .art-mini { width: 24px; height: 24px; } .rel .art-mini img { width: 15px; height: 15px; } .rel .art-mini .ic { width: 12px; height: 12px; color: #8e98c4; }
@media (max-width: 760px) { .m-left { position: static; } .tabs { top: -1px; } }

/* Le contenu du guide (blocs de code) ne doit jamais élargir la fiche */
.modal-box { grid-template-columns: auto minmax(0, 1fr); overflow-x: hidden; }
.m-right, .pane, .guide, .g-sec, .g-ex { min-width: 0; max-width: 100%; }
.g-ex pre { max-width: 100%; }
@media (max-width: 760px) { .modal-box { grid-template-columns: minmax(0, 1fr); } }

.grid-more { grid-column: 1 / -1; height: 1px; }
