/* DataCard — barre de navigation et onglet Boosters */

/* ───── Navigation : pastille qui glisse, pastilles de compteur ───── */
#nav { position: relative; }
#nav button { z-index: 1; }
#nav button.active { background: none; box-shadow: none; color: #fff; }
.nav-pill { position: absolute; top: 4px; bottom: 4px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 12px; pointer-events: none;
  background: linear-gradient(135deg, rgba(111, 141, 255, .55), rgba(176, 107, 255, .5)); box-shadow: 0 4px 18px rgba(122, 107, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .2);
  transition: transform .42s cubic-bezier(.3, 1.35, .4, 1), width .42s cubic-bezier(.3, 1.35, .4, 1); }
.nb { position: absolute; top: -5px; right: -3px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font: 800 .7rem/1 'Outfit', sans-serif; font-style: normal; color: #fff;
  background: #ff4d6d; box-shadow: 0 0 0 2px var(--bg), 0 4px 10px rgba(255, 77, 109, .5); animation: nbPop .5s cubic-bezier(.2, 1.8, .3, 1); }
.nb[hidden] { display: none; }
.nb.gold { background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #3a2000; box-shadow: 0 0 0 2px var(--bg), 0 0 14px rgba(255, 177, 43, .8); animation: nbPop .5s cubic-bezier(.2, 1.8, .3, 1), pulse 1.6s 1s infinite; }
.nb.new { background: linear-gradient(90deg, #ff5fd2, #ffb12b); color: #1b0b1f; }
.nb.soft { background: #3a4474; box-shadow: 0 0 0 2px var(--bg); }
@keyframes nbPop { from { transform: scale(0); } }
#nav button:not(.active):hover .ic { transform: translateY(-2px) scale(1.1); }
#nav button .ic { transition: transform .2s; }

/* ───── Barre du haut : minuteur des boosters, rang avec progression ───── */
.hud-pill.timer { cursor: pointer; gap: 8px; }
.hud-pill.timer .ic { color: var(--mut); }
.hud-pill.timer span { color: var(--mut); font-variant-numeric: tabular-nums; font-size: .84rem; font-weight: 600; }
.hud-pill.timer.ready { border-color: rgba(61, 220, 151, .65); box-shadow: 0 0 18px rgba(61, 220, 151, .3); }
.hud-pill.timer.ready .ic { color: var(--good); }
.hud-pill.timer:hover { background: var(--panel2); }
.hud-pill.rank .rk { display: grid; gap: 4px; min-width: 100px; }
.hud-pill.rank .rk b { font-size: .84rem; line-height: 1; font-weight: 700; }
.hud-pill.rank .rk i { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.hud-pill.rank .rk u { display: block; height: 100%; background: var(--grad); text-decoration: none; transition: width .6s; }

/* ───── Onglet Boosters ───── */
.hero { text-align: left; align-items: center; }
.hero-main { display: grid; gap: 16px; align-content: center; justify-items: start; min-width: 0; }
.hero h1 { margin-bottom: 0; }
.hero p.lead { margin: 0; }
.tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 540px; }
.tray-item { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); text-align: left; transition: .15s; min-width: 0; }
.tray-item:disabled { opacity: .42; cursor: default; }
.tray-item.has:hover { transform: translateY(-3px); background: var(--panel2); }
.tray-item.has:active { transform: scale(.97); }
.tray-item.free.has { border-color: rgba(111, 141, 255, .65); box-shadow: 0 0 22px rgba(111, 141, 255, .28); color: #b9c6ff; }
.tray-item.bonus.has { border-color: rgba(25, 200, 179, .65); box-shadow: 0 0 22px rgba(25, 200, 179, .25); color: #7ff0de; }
.tray-item.gold.has { border-color: rgba(255, 200, 61, .75); box-shadow: 0 0 24px rgba(255, 190, 60, .35); color: var(--gold); animation: pulseBadge 2s ease-in-out infinite; }
.mp { position: relative; flex: none; width: 36px; height: 52px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(165deg, #2a6bff, #7a3bff 55%, #ff3fd0); box-shadow: 0 6px 14px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.tray-item.bonus .mp { background: linear-gradient(165deg, #19c8b3, #2a6bff); }
.tray-item.gold .mp { background: linear-gradient(165deg, #fff0a6, #ffb12b 50%, #ff5d2e); }
.mp::before, .mp::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.mp::before { mix-blend-mode: overlay; opacity: .7; background: linear-gradient(115deg, #ff3fd0, #ffd84a, #3ddc97, #4fd1ff, #7a6bff, #ff3fd0, #ffd84a); background-size: 320% 320%; animation: foilMove 5s linear infinite; }
.mp::after { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 1px, rgba(0, 0, 0, .25) 1px 3px) top / 100% 5px no-repeat, repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 1px, rgba(0, 0, 0, .25) 1px 3px) bottom / 100% 5px no-repeat; }
.mp img { position: relative; z-index: 1; width: 58%; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.cnt { position: absolute; top: -9px; right: -12px; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: linear-gradient(135deg, #ff7ad9, #7a6bff); border: 2px solid #fff; box-shadow: 0 3px 10px rgba(122, 107, 255, .6); font: 800 .85rem/1 'Outfit', sans-serif; font-style: normal; color: #fff; }
.tray-item.bonus .cnt { background: linear-gradient(135deg, #3ddc97, #2a8cff); } .tray-item.gold .cnt { background: linear-gradient(135deg, #ffd54a, #ff7a1c); color: #3a1b00; }
.tl { min-width: 0; color: var(--txt); }
.tl b { display: block; font-size: .95rem; }
.tl small { display: block; color: var(--mut); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta { width: 100%; max-width: 540px; }
.cta b { font-variant-numeric: tabular-nums; }
.timer-card { display: flex; gap: 16px; align-items: center; width: 100%; max-width: 540px; padding: 14px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.tring { --p: 0; position: relative; flex: none; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--good) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); }
.tring { background: conic-gradient(#3ddc97 calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); box-shadow: 0 0 22px rgba(61, 220, 151, .3); }
.tring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .26), rgba(110, 120, 255, .26) 55%, rgba(60, 40, 160, .34)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), inset 0 -6px 14px rgba(79, 209, 255, .22); }
.tring span { position: relative; font-weight: 800; font-size: .78rem; font-variant-numeric: tabular-nums; }
.tring .ic { color: var(--good); width: 1.9em; height: 1.9em; }
.tinfo b { display: block; font-size: 1rem; }
.tinfo small { display: block; color: var(--mut); font-size: .8rem; line-height: 1.4; margin-top: 8px; }
.slots { display: flex; gap: 6px; margin-top: 8px; }
.slots i { width: 32px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .12); }
.slots i.on { background: linear-gradient(90deg, #3ddc97, #4fd1ff); box-shadow: 0 0 10px rgba(61, 220, 151, .6); }
.btn.buy { justify-self: start; }

.home-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 30px; }
.todos { display: grid; gap: 8px; }
.todo { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); transition: .15s; width: 100%; }
.todo:hover { background: var(--panel2); transform: translateX(4px); }
.todo:active { transform: scale(.98); }
.todo .ti { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(111, 141, 255, .18); color: #aebcff; }
.todo .tt { font-weight: 600; font-size: .94rem; line-height: 1.3; }
.todo em { font-style: normal; color: var(--cyan); font-size: .76rem; font-weight: 700; text-align: right; }
.todo > .ic { color: var(--mut); }
.todo.hot { border-color: rgba(255, 200, 61, .6); background: linear-gradient(90deg, rgba(255, 200, 61, .13), rgba(255, 95, 210, .08)); }
.todo.hot .ti { background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #3a2000; animation: pulse 1.8s infinite; }
.todo-done { display: flex; gap: 12px; align-items: center; padding: 18px; border-radius: 16px; background: rgba(61, 220, 151, .08); border: 1px solid rgba(61, 220, 151, .35); color: #c8f5e0; line-height: 1.4; }
.todo-done .ic { color: var(--good); width: 1.6em; height: 1.6em; flex: none; }
.prog .pg-rank { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.prog .rank-badge { flex: none; filter: drop-shadow(0 8px 20px rgba(255, 200, 61, .3)); }
.pg-info { flex: 1; min-width: 0; }
.pg-info small { color: var(--mut); }
.pg-info > b { display: block; font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; line-height: 1.1; }
.pg-info span { display: block; color: var(--mut); font-size: .82rem; margin-top: 7px; line-height: 1.4; }
.pg-info span b { color: var(--txt); }
.pg-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.pg-stats > div { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: rgba(255, 255, 255, .04); }
.pg-stats .ring { width: 46px; height: 46px; }
.pg-stats .ring::before { inset: 5px; }
.pg-stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pg-stats small { color: var(--mut); font-size: .74rem; }
.pg-stats .ti { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 138, 61, .15); font-size: 1.3rem; }
.pity { margin-bottom: 12px; }
.pity .pt-top { display: flex; justify-content: space-between; font-size: .86rem; margin-bottom: 6px; font-weight: 700; }
.pity .pt-top b { color: var(--mut); font-weight: 600; }
.calendar { margin-top: 16px; }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; margin-top: 22px; }
  .hero { text-align: left; }
  .hero-stage { min-height: 320px; }
  .hero-stage .pack { --pw: 190px; }
  .hero-main { justify-items: stretch; }
}

/* ───── Mobile : barre du bas, bouton Boosters en relief au centre ───── */
@media (max-width: 760px) {
  #nav { position: fixed; align-items: flex-end; padding-top: 8px; }
  #nav button[data-view="collection"] { order: 1; } #nav button[data-view="challenges"] { order: 2; }
  #nav button[data-view="games"] { order: 3; } #nav button[data-view="booster"] { order: 4; } #nav button[data-view="news"] { order: 5; } #nav button[data-view="board"] { order: 6; } #nav button[data-view="profile"] { order: 7; }
  #nav button { padding: 6px 4px; min-width: 0; flex: 1; } #nav button:not([data-view="booster"]) span { font-size: .56rem; letter-spacing: -.01em; }
  .hud-pill.rank { display: none; }
  #nav button[data-view="booster"] {
    flex: none; width: 66px; height: 66px; margin-top: -30px; padding: 0; border-radius: 50%; justify-content: center; align-items: center; color: #fff;
    background: linear-gradient(135deg, #5b7cff, #b06bff 60%, #ff5fd2); box-shadow: 0 10px 28px rgba(140, 90, 255, .65), 0 0 0 5px var(--bg); transition: transform .2s;
  }
  #nav button[data-view="booster"].active { background: linear-gradient(135deg, #5b7cff, #b06bff 60%, #ff5fd2); box-shadow: 0 10px 34px rgba(160, 100, 255, .85), 0 0 0 5px var(--bg); transform: scale(1.06); }
  #nav button[data-view="booster"] span { display: none; }
  #nav button[data-view="booster"] .ic { width: 1.9em; height: 1.9em; }
  #nav button[data-view="booster"] .nb { top: -2px; right: -4px; }
  .nav-pill { top: 0; bottom: auto; height: 3px; border-radius: 0 0 4px 4px; box-shadow: 0 0 12px rgba(150, 120, 255, .8); background: var(--grad); }
  .hud-pill.timer span { display: none; }
  .hud-pill.timer { padding: 5px 10px; }
  .tray { gap: 8px; } .tray-item { flex-direction: column; text-align: center; gap: 8px; padding: 12px 6px; }
  .tl small { white-space: normal; }
  .todo { grid-template-columns: 38px minmax(0, 1fr) 16px; } .todo em { display: none; }
  .timer-card { padding: 12px; gap: 12px; } .tring { width: 70px; height: 70px; }
  .prog .pg-rank { gap: 12px; }
}

@media (max-width: 440px) {
  .brand span { display: none; }
  .hud { gap: 5px; }
  .icon-btn { width: 34px; height: 34px; }
}

/* ───── Notifications ───── */
#toasts { gap: 10px; }
.toast { position: relative; overflow: hidden; min-width: 270px; padding: 12px 16px 15px 12px; border-radius: 18px; background: linear-gradient(135deg, rgba(36, 44, 96, .97), rgba(16, 20, 46, .97)); border: 1px solid rgba(140, 160, 255, .45); box-shadow: 0 14px 38px rgba(0, 0, 0, .55), 0 0 26px rgba(111, 141, 255, .3); animation: toastIn .55s cubic-bezier(.2, 1.4, .3, 1); }
.toast::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); background-size: 260% 100%; animation: sweep 1.4s .2s 1 both; pointer-events: none; }
.toast .ti { width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, #6f8dff, #b06bff); color: #fff; box-shadow: 0 6px 16px rgba(111, 141, 255, .5); animation: pop .6s .1s cubic-bezier(.2, 1.8, .3, 1) both; }
.toast .ti .ic { width: 22px; height: 22px; }
.toast .tx { display: grid; gap: 1px; min-width: 0; flex: 1; }
.toast .tx small { font-size: .66rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #aebcff; }
.toast .tx b { font-size: .94rem; line-height: 1.25; font-weight: 700; }
.toast .tc { flex: none; display: inline-flex; align-items: center; gap: 5px; font-style: normal; font-weight: 800; font-size: .95rem; padding: 5px 10px; border-radius: 99px; background: linear-gradient(135deg, #ffe48a, #ffb12b); color: #3a2400; box-shadow: 0 4px 14px rgba(255, 177, 43, .5); animation: pop .5s .35s cubic-bezier(.2, 1.8, .3, 1) both; }
.toast .tc .ic { width: 1em; height: 1em; }
.toast .tb { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: linear-gradient(90deg, #4fd1ff, #b06bff); transform-origin: 0 50%; animation: toastBar 4.2s linear forwards; }
@keyframes toastBar { to { transform: scaleX(0); } }
.toast.quest { border-color: rgba(61, 220, 151, .7); box-shadow: 0 14px 38px rgba(0, 0, 0, .55), 0 0 26px rgba(61, 220, 151, .35); }
.toast.quest .ti { background: linear-gradient(135deg, #3ddc97, #2a8cff); } .toast.quest .tx small { color: #7ff0c0; } .toast.quest .tb { background: linear-gradient(90deg, #3ddc97, #4fd1ff); }
.toast.ach { border-color: rgba(255, 200, 61, .85); background: linear-gradient(135deg, rgba(86, 60, 6, .97), rgba(24, 20, 40, .97)); box-shadow: 0 14px 38px rgba(0, 0, 0, .55), 0 0 34px rgba(255, 190, 60, .5); }
.toast.ach .ti { background: linear-gradient(135deg, #ffe48a, #ff9d1c); color: #3a1b00; } .toast.ach .tx small { color: #ffd77a; } .toast.ach .tb { background: linear-gradient(90deg, #ffe48a, #ff9d1c); }

/* Sept onglets : sous 1240 px, seul l'onglet actif garde son nom */
@media (min-width: 761px) and (max-width: 1240px) {
  #nav button:not(.active) span { display: none; }
  #nav button { padding-inline: 12px; }
}
