/* ============================================================
   Menus : titre, salon, passe de combat, casier, résultats
   ============================================================ */
#menu-root { position: fixed; inset: 0; z-index: 20; font-family: Impact, "Arial Narrow", sans-serif; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.45); }
.menu-screen { position: absolute; inset: 0; }

/* ---------- titre ---------- */
#m-title { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0) 30%, rgba(0,10,50,0.55) 100%); }
#m-title .logo-big { animation: logoIn 1.2s cubic-bezier(.2,1.6,.4,1); }
@keyframes logoIn { from { transform: skewX(-6deg) scale(0.3); opacity: 0; } }
#m-title .press { margin-top: 5vh; font-size: 30px; letter-spacing: 3px; animation: blink 1.4s infinite; background: rgba(0,20,80,0.55); padding: 6px 26px; border: 2px solid rgba(255,216,58,0.8); text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
#m-title .version { position: absolute; bottom: 14px; right: 18px; font-family: Arial, sans-serif; font-size: 13px; opacity: 0.8; }

/* ---------- barre du haut ---------- */
#m-top { position: absolute; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; padding: 0 18px; background: linear-gradient(180deg, rgba(0,10,50,0.75), rgba(0,10,50,0)); z-index: 3; }
#m-top .mlogo { font-size: 30px; margin-right: 26px; transform: skewX(-6deg); }
#m-top .mlogo span { color: #ffd83a; font-size: 16px; margin-left: 6px; }
.tabs { display: flex; gap: 4px; }
.tab { font-size: 22px; padding: 8px 16px; cursor: pointer; opacity: 0.75; border-bottom: 4px solid transparent; transition: all 0.12s; }
.tab:hover { opacity: 1; }
.tab.sel { opacity: 1; border-bottom-color: #ffd83a; }
.tab .badge { display: inline-block; background: #ffd83a; color: #111; font-size: 13px; padding: 0 6px; border-radius: 8px; margin-left: 4px; text-shadow: none; vertical-align: top; }
#m-top .spacer { flex: 1; }
.lvl-box { display: flex; align-items: center; gap: 10px; margin-right: 14px; }
.lvl-star { position: relative; width: 46px; height: 46px; background: linear-gradient(160deg, #6ad0ff, #2a5ad8); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); display: flex; align-items: center; justify-content: center; font-size: 18px; padding-top: 6px; }
.lvl-info { width: 150px; }
.lvl-info .ln { font-size: 16px; }
.xpbar { height: 8px; background: rgba(0,0,0,0.45); margin-top: 3px; transform: skewX(-12deg); overflow: hidden; }
.xpbar div { height: 100%; background: linear-gradient(90deg, #ffe45a, #ffb31a); }
.icon-btn { width: 44px; height: 44px; font-size: 24px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); border: 2px solid rgba(255,255,255,0.3); cursor: pointer; margin-left: 6px; }
.icon-btn:hover { background: rgba(255,255,255,0.3); }

/* ---------- salon ---------- */
#m-lobby .play-wrap { position: absolute; right: 36px; bottom: 34px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#btn-play { font-size: 56px; padding: 12px 70px; transform: skewX(-8deg); background: linear-gradient(180deg, #fff26a, #ffc41a); color: #1a1a1a; border: 4px solid #fff; cursor: pointer; text-shadow: none; box-shadow: 0 8px 0 #b88800, 0 12px 30px rgba(0,0,0,0.45); transition: transform 0.1s; font-family: Impact, sans-serif; }
#btn-play:hover { transform: skewX(-8deg) scale(1.05); }
#btn-play:active { transform: skewX(-8deg) translateY(4px); box-shadow: 0 4px 0 #b88800; }
.mode-card { background: linear-gradient(160deg, rgba(40,90,220,0.9), rgba(20,40,130,0.9)); padding: 10px 16px; border: 2px solid rgba(255,255,255,0.4); min-width: 330px; transform: skewX(-8deg); }
.mode-card .mt { font-size: 28px; }
.mode-card .ms { font-family: Arial, sans-serif; font-size: 13px; opacity: 0.9; }
.opt-row { display: flex; gap: 4px; margin-top: 6px; align-items: center; font-family: Arial, sans-serif; font-size: 12px; }
.opt-row .lbl { width: 78px; opacity: 0.9; }
.chip { font-family: Impact, sans-serif; font-size: 14px; padding: 3px 8px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.3); cursor: pointer; }
.chip.sel { background: #ffd83a; color: #111; text-shadow: none; }
#m-lobby .news { position: absolute; left: 26px; top: 90px; width: 330px; background: linear-gradient(160deg, rgba(20,40,120,0.82), rgba(10,20,70,0.82)); border: 2px solid rgba(255,255,255,0.25); padding: 12px 16px; }
.news h3 { font-size: 22px; color: #ffd83a; font-weight: normal; }
.news p { font-family: Arial, sans-serif; font-size: 13px; margin-top: 6px; line-height: 1.35; text-shadow: none; opacity: 0.95; }
.player-tag { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); text-align: center; }
.player-tag .pn { font-size: 26px; }
.player-tag .ps { font-family: Arial, sans-serif; font-size: 13px; opacity: 0.85; }
.player-tag input { font-family: Impact, sans-serif; font-size: 24px; background: rgba(0,0,0,0.35); color: #fff; border: 2px solid rgba(255,255,255,0.4); text-align: center; padding: 2px 8px; width: 240px; }

/* ---------- panneaux ---------- */
.panel { position: absolute; top: 80px; bottom: 20px; right: 24px; width: 58%; background: linear-gradient(160deg, rgba(20,50,150,0.88), rgba(10,20,80,0.9)); border: 2px solid rgba(255,255,255,0.25); padding: 16px 20px; overflow: auto; }
.panel h2 { font-size: 34px; font-weight: normal; }
.panel .sub { font-family: Arial, sans-serif; font-size: 14px; opacity: 0.85; margin-bottom: 12px; text-shadow: none; }

/* passe de combat */
.pass-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.pass-head .big-lvl { font-size: 60px; color: #ffd83a; line-height: 1; }
.pass-head .xpwrap { flex: 1; }
.pass-head .xpbar { height: 14px; }
.pass-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.card { position: relative; aspect-ratio: 0.8; border: 3px solid rgba(255,255,255,0.3); cursor: pointer; overflow: hidden; transition: transform 0.12s, border-color 0.12s; background: #333; }
.card:hover { transform: scale(1.04); border-color: #fff; z-index: 2; }
.card.sel { border-color: #ffd83a; box-shadow: 0 0 16px rgba(255,216,58,0.6); }
.card img { position: absolute; inset: 6px 6px 30px 6px; width: calc(100% - 12px); height: calc(100% - 36px); object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.5)); }
.card .cname { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.55); font-size: 13px; padding: 4px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .ctier { position: absolute; left: 5px; top: 3px; font-size: 18px; }
.card .ccat { position: absolute; right: 5px; top: 5px; font-family: Arial, sans-serif; font-size: 10px; background: rgba(0,0,0,0.4); padding: 1px 4px; text-shadow: none; }
.card.locked::after { content: '🔒'; position: absolute; inset: 0; background: rgba(0,0,20,0.5); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.card.owned .check { position: absolute; right: 5px; bottom: 30px; color: #7dff6a; font-size: 22px; }
.card.equipped { border-color: #7dff6a; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.pager .pg { font-size: 20px; }

/* défis */
.chal { display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,0.25); padding: 10px 14px; margin-bottom: 8px; border-left: 5px solid #ffd83a; }
.chal.done { border-left-color: #7dff6a; opacity: 0.8; }
.chal .cname { flex: 1; font-size: 20px; }
.chal .cprog { width: 220px; }
.chal .cprog .xpbar { height: 10px; }
.chal .cprog .pt { font-family: Arial, sans-serif; font-size: 12px; text-align: right; }
.chal .cxp { font-size: 18px; color: #ffd83a; width: 90px; text-align: right; }

/* casier */
#m-locker .lk-slots { position: absolute; left: 24px; top: 84px; width: 300px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lk-slot { position: relative; aspect-ratio: 1; border: 3px solid rgba(255,255,255,0.3); cursor: pointer; background: rgba(0,0,0,0.35); overflow: hidden; }
.lk-slot:hover { border-color: #fff; }
.lk-slot.sel { border-color: #ffd83a; }
.lk-slot img { position: absolute; inset: 4px 4px 20px 4px; width: calc(100% - 8px); height: calc(100% - 24px); object-fit: contain; }
.lk-slot .lt { position: absolute; left: 0; right: 0; bottom: 0; font-size: 12px; text-align: center; background: rgba(0,0,0,0.5); padding: 2px; }
#m-locker .panel { width: 44%; }
.lk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.lk-info { margin-top: 12px; font-family: Arial, sans-serif; font-size: 14px; text-shadow: none; }

/* carrière */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: rgba(0,0,0,0.3); padding: 14px; text-align: center; }
.stat .sv { font-size: 40px; color: #ffd83a; }
.stat .sl { font-family: Arial, sans-serif; font-size: 13px; opacity: 0.9; }

/* paramètres */
#m-settings { position: fixed; inset: 0; z-index: 60; background: rgba(0,10,40,0.75); display: flex; align-items: center; justify-content: center; font-family: Impact, sans-serif; color: #fff; }
.set-box { width: min(760px, 94vw); max-height: 90vh; overflow: auto; background: linear-gradient(160deg, rgba(20,60,170,0.97), rgba(10,25,90,0.97)); border: 2px solid rgba(255,255,255,0.3); padding: 20px 26px; box-shadow: 0 12px 50px rgba(0,0,0,0.6); }
.set-box h2 { font-size: 36px; font-weight: normal; }
.set-tabs { display: flex; gap: 6px; margin: 10px 0 14px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.set-row .sl { width: 260px; font-size: 18px; }
.set-row .sc { flex: 1; display: flex; align-items: center; gap: 10px; }
.set-row input[type=range] { flex: 1; accent-color: #ffd83a; }
.set-row .val { width: 60px; text-align: right; font-size: 18px; color: #ffd83a; }
.set-foot { display: flex; justify-content: space-between; margin-top: 16px; gap: 10px; }

/* résultats */
#m-results { background: radial-gradient(ellipse at 50% 30%, rgba(20,60,160,0.75), rgba(5,10,40,0.92)); overflow: auto; }
#m-results.win { background: radial-gradient(ellipse at 50% 30%, rgba(200,150,20,0.55), rgba(40,20,5,0.9)); }
.res-wrap { max-width: 1100px; margin: 0 auto; padding: 30px 20px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.res-title { grid-column: 1 / 3; text-align: center; }
.res-title .rp { font-size: 90px; color: #ffd83a; line-height: 1; transform: skewX(-8deg); text-shadow: 0 6px 0 #8a5a00, 0 10px 30px rgba(0,0,0,0.5); }
.res-title .rt { font-size: 46px; transform: skewX(-8deg); }
.res-title .rs { font-family: Arial, sans-serif; font-size: 16px; opacity: 0.9; }
.res-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.res-box { background: rgba(0,0,0,0.3); padding: 14px 16px; border: 1px solid rgba(255,255,255,0.15); }
.res-box h3 { font-size: 22px; font-weight: normal; margin-bottom: 8px; color: #ffd83a; }
.xp-line { display: flex; justify-content: space-between; font-family: Arial, sans-serif; font-size: 14px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.08); text-shadow: none; opacity: 0; animation: fadeIn 0.3s forwards; }
.xp-line b { color: #ffd83a; }
.xp-total { display: flex; justify-content: space-between; font-size: 24px; margin-top: 8px; }
@keyframes fadeIn { to { opacity: 1; } }
.rank-line { display: flex; gap: 10px; font-family: Arial, sans-serif; font-size: 14px; padding: 4px 6px; text-shadow: none; }
.rank-line:nth-child(odd) { background: rgba(255,255,255,0.05); }
.rank-line.me { background: rgba(255,216,58,0.3); font-weight: bold; }
.rank-line .rk { width: 36px; color: #ffd83a; font-family: Impact, sans-serif; font-size: 16px; }
.rank-line .rn { flex: 1; }
.lvl-up { font-size: 30px; color: #7dff6a; text-align: center; margin: 8px 0; animation: pop 0.6s; }
@keyframes pop { 0% { transform: scale(0.3); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.unlocks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.unlocks .card { width: 110px; }
.res-btns { grid-column: 1 / 3; display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 21; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* matchmaking */
#m-match { display: flex; align-items: center; justify-content: center; background: rgba(0,10,40,0.6); }
.mm-box { text-align: center; }
.mm-box .mm1 { font-size: 40px; }
.mm-box .mm2 { font-family: Arial, sans-serif; font-size: 16px; margin-top: 8px; }
.spinner { width: 60px; height: 60px; margin: 20px auto; border: 6px solid rgba(255,255,255,0.2); border-top-color: #ffd83a; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint-drag { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); font-family: Arial, sans-serif; font-size: 12px; opacity: 0.7; }

/* ---------- Boutique ---------- */
.vb { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #9af0ff, #2a8ad8 60%, #1a4a9a); color: #fff; font: 900 12px Arial, sans-serif; margin-right: 4px; box-shadow: 0 0 6px rgba(80,200,255,0.7); vertical-align: middle; text-shadow: none; }
.vb-box { display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,0.35); padding: 6px 12px; margin-right: 10px; font-size: 18px; border-radius: 3px; }
.vb-box .vb { width: 22px; height: 22px; font-size: 14px; }
#m-shop .panel { width: 680px; max-height: calc(100vh - 110px); overflow-y: auto; }
.shop-timer { margin: -4px 0 8px; }
.shop-sec { font-size: 20px; color: #ffd83a; margin: 10px 0 6px; letter-spacing: 1px; }
.shop-feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-daily { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card.shop-card { aspect-ratio: 0.85; }
.card.shop-card.big { aspect-ratio: 1.05; }
.card.shop-card img { inset: 6px 6px 50px 6px; height: calc(100% - 56px); }
.card.shop-card .cname { bottom: 22px; background: rgba(0,0,0,0.45); font-size: 14px; }
.card.shop-card.big .cname { font-size: 18px; }
.card.shop-card .price { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: rgba(0,0,0,0.75); display: flex; align-items: center; justify-content: center; font: bold 14px Arial, sans-serif; color: #fff; }
.card.shop-card .price .own { color: #7dff6a; letter-spacing: 1px; }
.card.shop-card.owned { filter: saturate(0.75); }
.shop-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; background: rgba(0,0,0,0.3); padding: 10px 12px; min-height: 30px; }
.shop-info:empty { display: none; }
.btn.dis { opacity: 0.55; cursor: default; }
.vb-gain { margin-top: 6px; font: bold 16px Arial, sans-serif; color: #9af0ff; }
.tab, .vb-box, .lvl-box { white-space: nowrap; }
@media (max-width: 1500px) {
  .tab { font-size: 18px; padding: 8px 10px; }
  #m-top .mlogo { font-size: 24px; margin-right: 14px; }
  .vb-box { font-size: 16px; padding: 5px 9px; }
}
@media (max-width: 1100px) {
  .tab { font-size: 15px; padding: 6px 7px; }
  .lvl-box .lvl-info { display: none; }
}

.lk-styles { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.lk-styles:empty { display: none; }
.lk-styles .fn { color: #ffd83a; margin-right: 4px; }

.mm-tip { margin-top: 18px; font: 15px Arial, sans-serif; color: #ffe89a; max-width: 520px; text-shadow: 0 1px 2px #000; }

/* ---------- Mode classé ---------- */
.rk-badge { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #fff 0%, var(--rc) 35%, var(--rd) 100%); position: relative; flex: none; }
.rk-badge::after { content: ''; position: absolute; inset: 12%; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(200deg, var(--rd), rgba(0,0,0,0.55)); }
.rk-badge span { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 2px #000; }
#rk-mini { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.rk-mini-t { font-family: Impact, sans-serif; font-size: 14px; text-shadow: 0 1px 2px #000; }
.rk-res { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.2); }
.rk-res h3 { margin: 0 0 8px; }
.rk-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.rk-info { flex: 1; }
.rk-name { font-size: 24px; text-shadow: 0 2px 3px rgba(0,0,0,0.6); }
.rk-bar { height: 10px; background: rgba(255,255,255,0.18); margin: 4px 0; }
.rk-bar div { height: 100%; }
.rk-pts { display: flex; justify-content: space-between; font-family: Arial, sans-serif; font-size: 13px; }
.rk-pts .up { color: #7dff6a; font-weight: bold; } .rk-pts .down { color: #ff6a6a; font-weight: bold; }
.xp-line b.neg { color: #ff6a6a; }
.rk-car { display: flex; align-items: center; gap: 14px; margin-top: 16px; background: rgba(0,0,0,0.25); padding: 10px 14px; }
.res-augs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; justify-content: center; }
.res-augs .ag-chip { display: inline-flex; align-items: center; gap: 4px; font: bold 11px Arial, sans-serif; color: #e8dcff; background: rgba(40,10,90,0.7); border: 1px solid rgba(190,150,255,0.6); padding: 2px 7px 2px 4px; border-radius: 10px; }
.res-augs .ag-chip i { font-style: normal; font-size: 13px; }
#m-lobby .news { max-height: calc(100vh - 120px); overflow-y: auto; pointer-events: auto; scrollbar-width: thin; scrollbar-color: rgba(255,216,58,0.7) rgba(0,0,0,0.2); }
@media (max-height: 820px) { .news p { font-size: 12px; margin-top: 4px; } }

/* ---------- Manette ---------- */
#pad-gate { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 40%, rgba(30,70,190,0.96), rgba(5,10,45,0.98)); font-family: Impact, "Arial Narrow", sans-serif; color: #fff; text-align: center; }
#pad-gate.show { display: flex; }
#pad-gate .pg-box { max-width: 560px; padding: 30px 36px; }
#pad-gate .pg-icon { font-size: 110px; line-height: 1; animation: padBounce 1.6s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5)); }
#pad-gate .pg-title { font-size: 54px; margin-top: 10px; transform: skewX(-6deg); color: #ffd83a; text-shadow: 0 5px 0 #8a5a00, 0 8px 24px rgba(0,0,0,0.5); }
#pad-gate .pg-sub { font-family: Arial, sans-serif; font-size: 18px; margin-top: 14px; opacity: 0.92; line-height: 1.4; }
#pad-gate .pg-spin { width: 44px; height: 44px; margin: 24px auto 18px; border: 5px solid rgba(255,255,255,0.2); border-top-color: #ffd83a; border-radius: 50%; animation: spin 0.9s linear infinite; }
#pad-gate #pg-kb { font-family: Arial, sans-serif; font-size: 13px; color: #fff; opacity: 0.55; background: none; border: 1px solid rgba(255,255,255,0.35); padding: 6px 14px; cursor: pointer; margin-top: 8px; }
#pad-gate #pg-kb:hover { opacity: 1; }
@keyframes padBounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }
.pad-toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 210; background: rgba(10,30,90,0.92); border: 2px solid #7dff6a; color: #fff; font: bold 16px Arial, sans-serif; padding: 8px 20px; animation: padToast 3.2s forwards; pointer-events: none; }
@keyframes padToast { 0% { opacity: 0; transform: translate(-50%, -20px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.pad-focus { outline: 3px solid #fff !important; outline-offset: 2px; box-shadow: 0 0 18px 4px rgba(255,216,58,0.9) !important; z-index: 5; }
.card.pad-focus, .lk-slot.pad-focus { transform: scale(1.05); }
