/* =========================================================
   ROGUE//Z — application mobile (PWA)
   Identité : noir profond, dégradé rouge → orange, accents cyan / ambre / vert / violet.
   ========================================================= */
@font-face { font-family: "Anton"; src: local("Anton"), local("Anton-Regular"), url("fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #0b0a10; --bg2: #14131c; --bg3: #1e1c29;
  --card: rgba(255,255,255,.045); --card2: rgba(255,255,255,.075); --card-solid: #14131c;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.15);
  --text: #f4f2ee; --soft: #c9ced6; --muted: #9c99ab; --dim: #5d6472;
  --red: #ff6b2c; --orange: #ff6b2c; --amber: #ffc93d; --cyan: #3dd9ff; --green: #3dd9ff; --violet: #9d7bff;
  --grad: linear-gradient(135deg, #ff6b2c 0%, #ff6b2c 100%);
  --glass: rgba(16,15,23,.72);
  --shadow: 0 18px 40px -20px rgba(0,0,0,.9);
  --r: 18px; --r2: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  --display: "Anton", Impact, "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --top-h: 56px; --tab-h: 66px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f1ee; --bg2: #ebe6e1; --bg3: #e1dbd4;
  --card: rgba(255,255,255,.78); --card2: rgba(255,255,255,.95); --card-solid: #ffffff;
  --line: rgba(20,16,12,.09); --line2: rgba(20,16,12,.18);
  --text: #16130f; --soft: #3a342d; --muted: #6c645b; --dim: #9a9188;
  --cyan: #0a8fb8; --green: #0e9e6e; --amber: #b57800; --violet: #6b4fe0; --red: #e02828; --orange: #e5601a;
  --glass: rgba(250,248,245,.8);
  --shadow: 0 14px 30px -18px rgba(60,40,20,.35);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { overflow: hidden; overscroll-behavior: none; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 420px at 110% -5%, rgba(255,107,44,.16), transparent 60%), radial-gradient(520px 420px at -20% 105%, rgba(157,123,255,.12), transparent 60%), var(--bg); }
[data-theme="light"] body::before { background: radial-gradient(600px 420px at 110% -5%, rgba(255,107,44,.16), transparent 60%), radial-gradient(520px 420px at -20% 105%, rgba(157,123,255,.10), transparent 60%), var(--bg); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .5; cursor: not-allowed; }
input, select, textarea { font-size: 16px; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.neg { color: var(--red) !important; }
.pos { color: var(--green) !important; }
.eyebrow { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.eyebrow .ic { width: 13px; height: 13px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Tons d'accent réutilisables */
.tone-red { --a: var(--red); } .tone-orange { --a: var(--orange); } .tone-amber { --a: var(--amber); } .tone-cyan { --a: var(--cyan); }
.tone-green { --a: var(--green); } .tone-violet { --a: var(--violet); } .tone-muted { --a: var(--muted); } .tone-grad { --a: var(--orange); } .tone-ok { --a: var(--green); } .tone-error { --a: var(--red); }

/* ---------- Écran de démarrage ---------- */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 26px; background: var(--bg); transition: opacity .45s ease, visibility .45s; }
.splash img { width: 112px; height: 112px; animation: pulse 1.6s ease-in-out infinite; }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.splash-bar i { display: block; width: 40%; height: 100%; background: var(--grad); animation: slide 1.1s ease-in-out infinite; }
.splash.gone { opacity: 0; visibility: hidden; }
@keyframes pulse { 50% { transform: scale(1.06); filter: drop-shadow(0 0 30px rgba(255,107,44,.45)); } }
@keyframes slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------- Connexion ---------- */
.login { position: fixed; inset: 0; overflow-y: auto; display: grid; align-items: end; padding: calc(var(--st) + 24px) calc(16px + var(--sr)) calc(var(--sb) + 22px) calc(16px + var(--sl)); }
.login-bg { position: fixed; inset: 0 0 40% 0; background-size: cover; background-position: 30% center; mask-image: linear-gradient(#000 30%, transparent); -webkit-mask-image: linear-gradient(#000 30%, transparent); opacity: .75; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.12) translateX(-3%); } }
.login-card { position: relative; width: 100%; max-width: 440px; margin: 0 auto; display: grid; gap: 14px; padding: 26px 22px 22px; border-radius: 28px; background: var(--glass); border: 1px solid var(--line2); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); box-shadow: var(--shadow); animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.login-logo { width: 104px; height: 104px; margin: -78px auto 0; filter: drop-shadow(0 10px 30px rgba(0,0,0,.7)); }
.login-card .eyebrow { justify-content: center; }
.login-title { font: 400 42px/1 var(--display); text-transform: uppercase; letter-spacing: .5px; text-align: center; }
.login-text { color: var(--soft); text-align: center; font-size: 15px; }
.login-actions { display: grid; gap: 10px; margin-top: 4px; }
.login-actions .is-disabled { opacity: .45; pointer-events: none; }
.login-error { color: var(--red); text-align: center; font-size: 14px; min-height: 0; }
.login-error:empty { display: none; }
.login-foot { color: var(--muted); font-size: 12px; text-align: center; }
@keyframes rise { from { transform: translateY(24px); } }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 15px; font-weight: 750; font-size: 15px; letter-spacing: .1px; transition: transform .15s ease, filter .15s, background .2s; user-select: none; -webkit-user-select: none; position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn .ic { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 13px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -12px rgba(255,107,44,.8); }
.btn-ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line2); }
.btn-danger { background: linear-gradient(135deg, #c81e1e, #ff6b2c); color: #fff; }
.btn-discord { background: #5865f2; color: #fff; box-shadow: 0 10px 26px -12px rgba(88,101,242,.9); }
.danger-text { color: var(--red) !important; }
.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.is-busy { pointer-events: none; }
.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px; color: var(--text); background: var(--card2); border: 1px solid var(--line); flex: none; transition: transform .15s; }
.icon-btn:active { transform: scale(.92); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--orange); font-weight: 700; font-size: 14px; justify-content: center; }
.link-btn .ic { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- Barre du haut ---------- */
.topbar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: calc(var(--top-h) + var(--st)); padding: var(--st) calc(12px + var(--sr)) 0 calc(12px + var(--sl)); display: flex; align-items: center; gap: 10px;
  background: linear-gradient(var(--bg) 0%, transparent); transition: background .25s, box-shadow .25s; }
.topbar.scrolled { background: var(--glass); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: 0 1px 0 var(--line); }
.tb-logo { width: 34px; height: 34px; }
.tb-back { background: transparent; border: 0; }
.tb-title { flex: 1; min-width: 0; font: 400 19px/1 var(--display); letter-spacing: .5px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.topbar.scrolled .tb-title { opacity: 1; transform: none; }
.tb-server { display: inline-flex; align-items: center; gap: 7px; max-width: 46vw; min-height: 40px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.tb-server span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-server .ic { width: 16px; height: 16px; color: var(--muted); }
.tb-server.single .ic { display: none; }
.tb-profile { border-radius: 50%; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61,217,255,.6); animation: live 2s infinite; flex: none; display: inline-block; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(61,217,255,0); } 100% { box-shadow: 0 0 0 0 rgba(61,217,255,0); } }

.offline-bar { position: fixed; z-index: 19; top: calc(var(--top-h) + var(--st)); left: 50%; transform: translate(-50%, -140%); padding: 7px 14px; border-radius: 999px; background: var(--amber); color: #1c1302; font-size: 12px; font-weight: 800; transition: transform .3s, opacity .3s, visibility .3s; white-space: nowrap; opacity: 0; visibility: hidden; }
body.offline .offline-bar { transform: translate(-50%, 6px); opacity: 1; visibility: visible; }

/* ---------- Vue principale ---------- */
.view { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scrollbar-width: none;
  padding: calc(var(--top-h) + var(--st)) var(--sr) calc(var(--tab-h) + var(--sb) + 26px) var(--sl); outline: none; }
.view.view-full { overflow: hidden; padding-bottom: 0; padding-top: 0; }
.screen { min-height: 100%; }
.view-full .screen { height: 100%; }
.enter-left { animation: inL .34s cubic-bezier(.2,.8,.2,1) both; }
.enter-right { animation: inR .34s cubic-bezier(.2,.8,.2,1) both; }
.enter-push { animation: inL .32s cubic-bezier(.2,.8,.2,1) both; }
.enter-pop { animation: inR .32s cubic-bezier(.2,.8,.2,1) both; }
.enter-fade { animation: fadeUp .35s ease both; }
@keyframes inL { from { transform: translateX(36px); } }
@keyframes inR { from { transform: translateX(-36px); } }
@keyframes fadeUp { from { transform: translateY(12px); } }
.pad { padding: 6px 16px 0; max-width: 680px; margin: 0 auto; }
.stack { display: grid; gap: 14px; }
.stack > * { min-width: 0; }
.stack > * { animation: fadeUp .45s ease both; }
.stack > *:nth-child(2) { animation-delay: .04s; } .stack > *:nth-child(3) { animation-delay: .08s; } .stack > *:nth-child(4) { animation-delay: .12s; }
.stack > *:nth-child(5) { animation-delay: .16s; } .stack > *:nth-child(6) { animation-delay: .2s; } .stack > *:nth-child(n+7) { animation-delay: .24s; }

.scr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 4px; }
.scr-title { font: 400 34px/1.02 var(--display); text-transform: uppercase; letter-spacing: .4px; overflow-wrap: anywhere; }
.sec-title { font: 400 19px/1.1 var(--display); text-transform: uppercase; letter-spacing: .5px; margin-top: 8px; color: var(--soft); }
.sec-row { margin-top: 6px; }
.sec-row .sec-title { margin: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px dashed var(--line2); color: var(--soft); font-size: 13px; }
.hint .ic { width: 18px; height: 18px; color: var(--orange); margin-top: 1px; }
.note { padding: 12px 14px; border-radius: 14px; background: rgba(255,201,61,.1); border: 1px solid rgba(255,201,61,.3); color: var(--amber); font-size: 13px; }
.foot-note { text-align: center; color: var(--dim); font-size: 12px; }
.dash-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 14px; color: var(--muted); font-size: 14px; font-weight: 650; border: 1px solid var(--line); }
.dash-link .ic { width: 16px; height: 16px; }

/* ---------- Cartes ---------- */
.card { display: block; width: 100%; text-align: left; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
button.card { transition: transform .18s ease, border-color .2s; }
button.card:active, .tile:active, .fab-item:active { transform: scale(.975); }
.card.list { padding: 4px 0; }
.list .row { padding: 12px 16px; }
.list .row + .row { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; text-align: left; }
.row.is-saving { opacity: .6; }
.row-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-txt b { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.row-txt small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.row-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--a); background: color-mix(in srgb, var(--a) 16%, transparent); }
.row-ic .ic { width: 20px; height: 20px; }
.row-go { color: var(--dim); width: 18px; height: 18px; }
.row-card { display: flex; align-items: center; gap: 12px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 750; }
.me { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--grad); color: #fff; margin-left: 4px; vertical-align: middle; }

/* ---------- Héros ---------- */
.hero { position: relative; min-height: 168px; border-radius: var(--r2); overflow: hidden; display: flex; align-items: flex-end; background-color: var(--bg3); background-size: cover; background-position: 35% 30%; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,16,.05) 0%, rgba(11,10,16,.55) 50%, rgba(11,10,16,.95) 100%); }
.hero-in { position: relative; padding: 18px; display: grid; gap: 6px; color: #fff; width: 100%; }
.hero-in .eyebrow { color: rgba(255,255,255,.75); }
.hero-title { font-size: 32px; text-shadow: 0 3px 20px rgba(0,0,0,.6); }
.hero-in p { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.82); font-size: 14px; }
.hero-in p .ic { width: 16px; height: 16px; }
.hero-sub { font-size: 12px !important; color: rgba(255,255,255,.65) !important; }
.hero-err { color: #ffb3b3 !important; }
.cockpit-hero { min-height: 200px; }
.status-row { display: flex; flex-wrap: wrap; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 750; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.status.warn i { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* ---------- Portefeuille ---------- */
.wallet { background: linear-gradient(135deg, rgba(255,107,44,.16), rgba(255,107,44,.06) 55%, transparent), var(--card); }
.wallet-top { display: flex; gap: 14px; align-items: center; }
.wallet-ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(255,107,44,.9); flex: none; }
.wallet-amount { display: flex; align-items: baseline; gap: 6px; font: 400 40px/1 var(--display); letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.wallet-amount small { font-size: 22px; color: var(--orange); }
.wallet .chips { margin-top: 12px; }

/* ---------- Puces et badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.hscroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; scroll-snap-type: x proximity; }
.chips.hscroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--soft); font-size: 13.5px; font-weight: 700; white-space: nowrap; flex: none; scroll-snap-align: start; transition: background .2s, color .2s, border-color .2s; }
.chip .ic { width: 15px; height: 15px; }
.chip small { color: var(--muted); font-weight: 600; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.on small { color: var(--dim); }
.radio-chips .chip { cursor: pointer; position: relative; }
.radio-chips input { position: absolute; opacity: 0; pointer-events: none; }
.radio-chips .chip:has(input:checked) { background: var(--text); color: var(--bg); }
.radio-chips .chip:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; color: var(--a); background: color-mix(in srgb, var(--a) 15%, transparent); border: 1px solid color-mix(in srgb, var(--a) 30%, transparent); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.pill .ic { width: 15px; height: 15px; }
.pill.coin { color: var(--amber); background: rgba(255,201,61,.12); }
.pill.xp { color: var(--violet); background: rgba(157,123,255,.14); }

/* ---------- Anneaux et barres ---------- */
.ring { position: relative; flex: none; display: grid; place-items: center; color: var(--a); }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track { fill: none; stroke: var(--line2); stroke-width: 10; }
.ring-bar { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a) 50%, transparent)); }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; color: var(--text); }
.ring-in b { font: 400 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.ring-in small { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.ring-sm { width: 62px; height: 62px; } .ring-sm .ring-in b { font-size: 19px; } .ring-sm .ring-track, .ring-sm .ring-bar { stroke-width: 11; }
.ring-md { width: 84px; height: 84px; }
.ring-lg { width: 118px; height: 118px; } .ring-lg .ring-in b { font-size: 38px; }
.bar { height: 8px; border-radius: 8px; background: var(--line2); overflow: hidden; margin-top: 8px; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--a); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.bar.tone-grad span { background: var(--grad); }

/* ---------- Grilles ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ring-card { display: grid; justify-items: start; gap: 12px; }
.ring-card-txt { display: grid; gap: 2px; min-width: 0; }
.ring-card-txt b { font-size: 17px; font-weight: 800; }
.ring-card-txt small { color: var(--muted); font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpis.two { grid-template-columns: 1fr 1fr; }
.kpi { padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); display: grid; gap: 4px; min-width: 0; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--a) 35%, transparent), transparent 70%); }
.kpi-ic { color: var(--a); }
.kpi-ic .ic { width: 20px; height: 20px; }
.kpi b { font: 400 26px/1.05 var(--display); letter-spacing: .3px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi b small { font: 700 13px var(--font); color: var(--muted); }
.kpi .kpi-txt { font: 750 15px/1.2 var(--font); white-space: normal; }
.kpi > small { color: var(--muted); font-size: 12px; font-weight: 650; }
.kpis.three .kpi b { font-size: 22px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; min-height: 128px; padding: 14px; border-radius: var(--r); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; text-align: left; overflow: hidden; color: #fff;
  background-color: var(--bg3); background-size: cover; background-position: center; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .18s; isolation: isolate; }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,10,16,.15), rgba(11,10,16,.88)); }
.tile b { font: 400 20px/1.05 var(--display); text-transform: uppercase; letter-spacing: .4px; }
.tile small { color: rgba(255,255,255,.75); font-size: 12.5px; }
.tile-ic { position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.18); }
.tile-ic .ic { width: 19px; height: 19px; }

/* ---------- Appels à l'action ---------- */
.cta-claim { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px; border-radius: var(--r); background: linear-gradient(135deg, rgba(61,217,255,.22), rgba(61,217,255,.12)); border: 1px solid rgba(61,217,255,.4); color: var(--text); text-align: left; overflow: hidden; }
.cta-claim > .ic:first-of-type { width: 28px; height: 28px; color: var(--green); animation: wiggle 2.4s ease-in-out infinite; }
.cta-claim span:not(.cta-glow) { flex: 1; display: grid; }
.cta-claim small { color: var(--soft); }
.cta-glow { position: absolute; inset: 0; background: radial-gradient(240px 80px at 15% 50%, rgba(61,217,255,.3), transparent); animation: glow 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-12deg); } 85% { transform: rotate(10deg); } }
@keyframes glow { 50% { opacity: .4; } }
.faction-mini { display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--c, var(--orange)); }
.faction-mini img { width: 54px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.faction-mini > div { flex: 1; display: grid; min-width: 0; }
.faction-mini b em { font-style: normal; color: var(--muted); font-weight: 650; }
.faction-mini small { color: var(--muted); }
.faction-mini .ic:last-child, .faction-mini > .ic { color: var(--dim); }
.empty-mini > .ic:first-child { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--card2); color: var(--orange); }
.alerts { display: grid; gap: 10px; }
.alert { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 16px; text-align: left; background: color-mix(in srgb, var(--a) 12%, transparent); border: 1px solid color-mix(in srgb, var(--a) 35%, transparent); }
.alert > .ic:first-child { color: var(--a); }
.alert span { flex: 1; display: grid; }
.alert small { color: var(--muted); font-size: 12.5px; }
.alert > .ic:last-child { color: var(--dim); width: 18px; }

/* ---------- Contrôle segmenté ---------- */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); }
.seg-btn { position: relative; z-index: 1; min-height: 42px; border-radius: 12px; font-weight: 750; font-size: 14px; color: var(--muted); transition: color .2s; }
.seg-btn.on { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(255,107,44,.9); }
.seg-pill { display: none; }

/* ---------- Saison / battlepass ---------- */
.season { display: grid; gap: 14px; }
.season-top { display: flex; gap: 16px; align-items: center; }
.season-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.season-txt small { color: var(--muted); font-size: 13px; }
.season-txt .chips { margin-top: 8px; gap: 6px; }
.big { font: 400 26px/1.05 var(--display); letter-spacing: .3px; overflow-wrap: anywhere; }
.track-head { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 8px; padding: 0 2px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.track-head span { display: flex; align-items: center; gap: 4px; }
.track-head .ic { width: 14px; height: 14px; color: var(--amber); }
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.track::before { content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--line2); }
.track-row { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 8px; align-items: stretch; position: relative; }
.lvl { display: grid; place-items: center; align-self: center; width: 46px; height: 46px; margin-left: 3px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--line2); font: 400 17px/1 var(--display); position: relative; z-index: 1; }
.lvl .ic { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--green); color: #052; stroke-width: 3.5; }
.track-row.reached .lvl { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 0 18px -4px rgba(255,107,44,.8); }
.track-row.next .lvl { border-color: var(--orange); animation: nextLvl 1.8s ease-in-out infinite; }
@keyframes nextLvl { 50% { box-shadow: 0 0 0 6px rgba(255,107,44,.18); } }
.rw-cell { padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 6px; align-content: space-between; min-width: 0; font-size: 13px; }
.rw-cell.none { background: transparent; border-style: dashed; opacity: .4; }
.rw-cell.premium { background: linear-gradient(160deg, rgba(255,201,61,.1), transparent 70%), var(--card); border-color: rgba(255,201,61,.22); }
.rw-copy { display: grid; gap: 3px; }
.rw-copy > * { display: flex; align-items: flex-start; gap: 5px; overflow-wrap: anywhere; }
.rw-copy .ic { width: 14px; height: 14px; margin-top: 2px; }
.rw-money { color: var(--amber); font-size: 14px; }
.rw-special { color: var(--violet); }
.rw-cell small { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; color: var(--muted); }
.rw-cell small .ic { width: 12px; height: 12px; }
.rw-cell.st-done small { color: var(--green); }
.rw-cell.st-pending small { color: var(--amber); }
.rw-cell.st-locked { opacity: .55; }
.rw-cell.st-progress small { color: var(--cyan); }

/* ---------- Quêtes ---------- */
.xp-strip { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.xp-strip .chips { grid-column: 1 / -1; }
.xp-strip b { font: 400 24px/1 var(--display); }
.xp-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--violet), var(--cyan)); }
.quest-list { display: grid; gap: 12px; }
.quest { display: flex; gap: 14px; align-items: flex-start; }
.quest.st-completed { border-color: rgba(61,217,255,.45); background: linear-gradient(140deg, rgba(61,217,255,.12), transparent 60%), var(--card); }
.quest.st-claimed { opacity: .62; }
.quest-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.quest-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.quest h3 { font-size: 16.5px; font-weight: 800; }
.quest p { color: var(--muted); font-size: 13.5px; }
.quest-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.quest-foot .btn, .quest-foot > small { margin-left: auto; }
.quest-foot > small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.quest-foot > small .ic { width: 14px; height: 14px; }

/* ---------- Faction ---------- */
.faction-hero { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r2); background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--orange)) 30%, transparent), transparent 70%), var(--card); border: 1px solid color-mix(in srgb, var(--c, var(--orange)) 40%, transparent); }
.faction-hero > div { min-width: 0; display: grid; gap: 6px; }
.faction-hero p { color: var(--soft); font-size: 14px; }
.faction-hero.small { padding: 14px; margin-bottom: 12px; }
.faction-hero h2 { font: 400 24px/1.05 var(--display); text-transform: uppercase; }
.flag-big { width: 84px; height: 100px; object-fit: contain; flex: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); animation: flagWave 4s ease-in-out infinite; transform-origin: left center; }
@keyframes flagWave { 50% { transform: skewY(-2deg) scaleX(.97); } }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-color: rgba(61,217,255,.4); }
.invite > div { flex: 1; display: grid; }
.invite .btn-row { width: 100%; }
.fac-list { display: grid; gap: 10px; }
.fac-card { display: flex; align-items: center; gap: 12px; border-left: 4px solid var(--c, var(--orange)); }
.fac-rank { font: 400 22px/1 var(--display); width: 22px; text-align: center; color: var(--muted); flex: none; }
.fac-card img { width: 42px; height: 50px; object-fit: contain; flex: none; }
.fac-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.fac-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fac-txt em { font-style: normal; color: var(--muted); font-weight: 600; }
.fac-txt small { color: var(--muted); font-size: 12.5px; }
.fac-txt .bar { margin-top: 6px; height: 5px; }
.fac-side { display: grid; justify-items: end; gap: 6px; flex: none; }
.fac-side b { font-variant-numeric: tabular-nums; }

/* ---------- Classement ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding-top: 10px; }
.podium-col { display: grid; justify-items: center; gap: 4px; text-align: center; min-width: 0; }
.podium-col b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-col small { color: var(--muted); font-size: 12px; }
.podium-step { width: 100%; display: grid; place-items: center; border-radius: 16px 16px 6px 6px; margin-top: 6px; background: var(--card2); border: 1px solid var(--line); font: 400 30px/1 var(--display); }
.p1 .podium-step { height: 104px; background: linear-gradient(180deg, rgba(255,201,61,.35), rgba(255,201,61,.05)); border-color: rgba(255,201,61,.5); color: var(--amber); }
.p2 .podium-step { height: 78px; background: linear-gradient(180deg, rgba(201,206,214,.25), transparent); color: var(--soft); }
.p3 .podium-step { height: 60px; background: linear-gradient(180deg, rgba(255,107,44,.25), transparent); color: var(--orange); }
.p1 .avatar { box-shadow: 0 0 0 3px var(--amber), 0 0 24px rgba(255,201,61,.5); }
.podium-col.me b { color: var(--orange); }
.rank-list .row.me { background: rgba(255,107,44,.08); }
.rank-n { width: 26px; text-align: center; font: 400 18px/1 var(--display); color: var(--muted); flex: none; }
.rank-k { display: grid; justify-items: end; flex: none; }
.rank-k b { font: 400 20px/1 var(--display); }
.rank-k small { color: var(--muted); font-size: 11px; }

/* ---------- Avatars ---------- */
.avatar { --h: 20; width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; font-weight: 850; font-size: 14px; color: #fff; letter-spacing: .3px;
  background: linear-gradient(135deg, hsl(var(--h) 75% 52%), hsl(calc(var(--h) + 40) 80% 40%)); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; }
.avatar.xl { width: 84px; height: 84px; border-radius: 26px; font-size: 28px; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
.av-wrap { position: relative; flex: none; }
.pres { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2.5px solid var(--bg); background: var(--dim); }
.pres.on { background: var(--green); } .pres.unconfirmed { background: var(--amber); }
.player-row .num.neg { color: var(--red); }

/* ---------- Profil ---------- */
.profile-hero { position: relative; border-radius: var(--r2); overflow: hidden; background-size: cover; background-position: center 30%; border: 1px solid var(--line); }
.profile-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(11,10,16,.35), rgba(11,10,16,.92)); }
.profile-in { position: relative; display: grid; justify-items: center; gap: 6px; padding: 26px 16px 20px; text-align: center; color: #fff; }
.profile-in .scr-title { font-size: 30px; }
.profile-in p { color: rgba(255,255,255,.7); }

/* ---------- Interrupteurs ---------- */
.switch { position: relative; flex: none; width: 54px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-ui { width: 50px; height: 30px; border-radius: 30px; background: var(--line2); position: relative; transition: background .25s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + .switch-ui { background: var(--grad); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- Accordéons de réglages ---------- */
.acc-list { display: grid; gap: 10px; }
.acc { padding: 0; }
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; min-height: 64px; text-align: left; }
.acc-chev { color: var(--muted); transition: transform .25s; }
.acc.open .acc-chev { transform: rotate(180deg); }
.acc-body { padding: 0 14px 12px; display: grid; gap: 2px; animation: fadeUp .3s ease both; }
.acc-body .row { border-top: 1px solid var(--line); padding: 8px 0; }
.kv { margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 650; overflow-wrap: anywhere; max-width: 55%; }
.sk-line { margin: 10px 0; }

/* ---------- Chronologie ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; display: grid; gap: 0; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--a); margin-top: 5px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 18%, transparent); }
.timeline li > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.timeline b { font-size: 14.5px; }
.timeline p { color: var(--soft); font-size: 13px; overflow-wrap: anywhere; }
.timeline small { color: var(--muted); font-size: 12px; }
.queue .btn { justify-self: start; margin-top: 4px; }

/* ---------- Graphiques ---------- */
.chart-card { display: grid; gap: 8px; }
.chart-card .row-between > div { display: grid; gap: 4px; }
.spark { width: 100%; height: 70px; display: block; }
.spark-line { fill: none; stroke: var(--orange); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart { width: 100%; height: auto; display: block; margin-top: 10px; }
.ch-bar { fill: var(--orange); opacity: .85; }
.ch-line { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linejoin: round; }
.ch-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.ch-txt { fill: var(--muted); font-size: 10px; }
.ch-txt.end { text-anchor: end; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.lg-bar, .lg-line { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--orange); }
.lg-line { height: 3px; background: var(--cyan); margin-left: 6px; }
.rings3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ring-stat { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 14px 8px; }
.ring-stat small { font-size: 12px; font-weight: 700; }
.rot { display: grid; gap: 10px; justify-items: start; }
.rot small { color: var(--muted); font-size: 12px; display: block; }

/* ---------- Boutique ---------- */
.shop-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.shop-item { display: grid; gap: 6px; }
.shop-item.off { opacity: .55; }
.shop-ic { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--card2); color: var(--orange); }
.shop-item h3 { font-size: 16px; font-weight: 800; padding-right: 48px; }
.shop-item p { color: var(--muted); font-size: 13.5px; }
.shop-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.shop-foot b { font: 400 22px/1 var(--display); color: var(--amber); margin-right: auto; }

/* ---------- Offres ---------- */
.plans { display: grid; gap: 10px; }
.plan { display: grid; gap: 8px; }
.plan.on { border-color: color-mix(in srgb, var(--a) 60%, transparent); background: linear-gradient(140deg, color-mix(in srgb, var(--a) 14%, transparent), transparent 60%), var(--card); }
.plan-name { font: 400 22px/1 var(--display); text-transform: uppercase; color: var(--a); }
.plan-price { font-size: 18px; font-weight: 850; }
.plan p { color: var(--muted); font-size: 13.5px; }
.tpl-row { flex-wrap: wrap; }
.tpl-act { display: flex; gap: 8px; align-items: center; }
.ic.fav { color: var(--amber); fill: var(--amber); width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }
.tpl-act .ic.fav { width: 20px; height: 20px; margin: 0; }

/* ---------- Recherche et formulaires ---------- */
.search { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); }
.search .ic { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; min-height: 48px; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-size: 13px; font-weight: 750; color: var(--soft); padding: 0; margin-bottom: 7px; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,44,.15); }
.toggle-row { padding: 6px 0; }

/* ---------- Barre d'onglets ---------- */
.tabbar { position: fixed; z-index: 30; left: calc(10px + var(--sl)); right: calc(10px + var(--sr)); bottom: calc(10px + var(--sb)); height: var(--tab-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  border-radius: 24px; background: var(--glass); border: 1px solid var(--line2); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: 0 16px 40px -14px rgba(0,0,0,.85); max-width: 560px; margin: 0 auto; }
.tab { position: relative; z-index: 1; display: grid; justify-items: center; gap: 3px; min-height: 56px; padding-top: 8px; color: var(--muted); font-size: 11px; font-weight: 750; transition: color .2s; }
.tab .ic { width: 24px; height: 24px; transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
.tab.on { color: var(--text); }
.tab.on .ic { transform: translateY(-2px) scale(1.08); stroke: var(--orange); }
.tab:active .ic { transform: scale(.85); }
.tab-pill { position: absolute; left: 0; top: 4px; width: 36px; height: 4px; border-radius: 4px; background: var(--grad); transition: transform .35s cubic-bezier(.3,1.3,.5,1), opacity .2s; opacity: 0; box-shadow: 0 0 14px rgba(255,107,44,.8); }
.tab-fab-slot { display: grid; place-items: center; }
.fab { width: 62px; height: 62px; margin-top: -30px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 14px 30px -10px rgba(255,107,44,.95), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .25s cubic-bezier(.3,1.5,.5,1), border-radius .25s; border: 4px solid var(--bg); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.6; transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.fab:active { transform: scale(.9); }
.fab.open { border-radius: 50%; }
.fab.open .ic { transform: rotate(135deg); }

/* ---------- Tirer pour actualiser ---------- */
.ptr { position: fixed; z-index: 25; top: calc(var(--top-h) + var(--st)); left: 50%; width: 40px; height: 40px; margin-top: -10px; border-radius: 50%; display: grid; place-items: center; background: var(--card-solid); border: 1px solid var(--line2); box-shadow: var(--shadow); transform: translate(-50%, -60px); opacity: 0; transition: opacity .2s; color: var(--muted); pointer-events: none; }
.ptr.show { opacity: 1; }
.ptr.ready { color: var(--orange); }
.ptr.spin { transition: transform .25s; }
.ptr.spin .ic { animation: spin .8s linear infinite; color: var(--orange); }

/* ---------- Panneaux du bas ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 60; }
.sheet-layer:not(.open) { pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .3s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; border-radius: 28px 28px 0 0; background: var(--bg2); border: 1px solid var(--line2); border-bottom: 0;
  box-shadow: 0 -20px 50px -20px rgba(0,0,0,.9); transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.9,.25,1); outline: none; padding-bottom: var(--sb); }
.sheet.tall { height: 82vh; }
.sheet.dragging { transition: none; }
.sheet-layer.open .sheet { transform: translateY(0); }
.sheet-layer.open .sheet-backdrop { opacity: 1; }
.sheet-grab { display: grid; place-items: center; height: 26px; flex: none; cursor: grab; touch-action: none; }
.sheet-grab span { width: 42px; height: 5px; border-radius: 5px; background: var(--line2); }
.sheet-x { position: absolute; right: 12px; top: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; }
.sheet-body { overflow-y: auto; padding: 4px 18px 22px; display: grid; gap: 14px; overscroll-behavior: contain; }
.sheet-head { display: grid; gap: 4px; padding-right: 48px; }
.sheet-head h2 { font: 400 26px/1.05 var(--display); text-transform: uppercase; letter-spacing: .4px; overflow-wrap: anywhere; }
.poi-head { display: flex; align-items: center; gap: 12px; }
.poi-head > div { display: grid; gap: 2px; min-width: 0; }
.poi-pin { width: 44px; height: 48px; object-fit: contain; }
.poi-photo { height: 170px; margin: -4px -18px 0; background-size: cover; background-position: center; position: relative; border-radius: 0; }
.poi-shade { position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--bg2)); }
.sheet-sub { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.confirm { display: grid; gap: 12px; justify-items: center; text-align: center; padding-top: 6px; }
.confirm h2 { font: 400 26px/1.05 var(--display); text-transform: uppercase; }
.confirm p { color: var(--soft); }
.confirm .btn-row { width: 100%; margin-top: 6px; }
.confirm-ic { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; color: var(--a); background: color-mix(in srgb, var(--a) 16%, transparent); }
.confirm-ic .ic { width: 28px; height: 28px; }
.fab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fab-item { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; min-height: 108px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; transition: transform .15s; animation: popIn .35s cubic-bezier(.3,1.4,.5,1) both; }
.fab-item:nth-child(2) { animation-delay: .03s; } .fab-item:nth-child(3) { animation-delay: .06s; } .fab-item:nth-child(4) { animation-delay: .09s; } .fab-item:nth-child(5) { animation-delay: .12s; }
.fab-item:nth-child(6) { animation-delay: .15s; } .fab-item:nth-child(n+7) { animation-delay: .18s; }
@keyframes popIn { from { transform: scale(.85) translateY(10px); } }
.fab-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: var(--a); background: color-mix(in srgb, var(--a) 16%, transparent); }
.fab-item b { font-size: 14px; }
.fab-item small { color: var(--muted); font-size: 11.5px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-btn { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 12px; border-radius: 15px; text-align: left; font-size: 13.5px; font-weight: 750; background: color-mix(in srgb, var(--a) 10%, transparent); border: 1px solid color-mix(in srgb, var(--a) 28%, transparent); }
.action-btn .ic { color: var(--a); width: 20px; height: 20px; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.choice.on { border-color: var(--orange); background: rgba(255,107,44,.08); }
.choice-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--orange); flex: none; }
.choice-ic img { width: 30px; height: 32px; object-fit: contain; }
.choice-txt { flex: 1; min-width: 0; display: grid; }
.choice-txt small { color: var(--muted); font-size: 12.5px; }
.choice-check { color: var(--orange); }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tab-h) + var(--sb) + 22px); max-width: min(92vw, 460px); display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
  background: var(--card-solid); border: 1px solid var(--line2); box-shadow: 0 16px 40px -14px rgba(0,0,0,.9); font-size: 14px; font-weight: 650; transform: translate(-50%, 30px) scale(.96); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .25s; }
.toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.toast .ic { color: var(--a); width: 20px; height: 20px; padding: 2px; border-radius: 50%; background: color-mix(in srgb, var(--a) 18%, transparent); }
body.has-sheet .toast { bottom: calc(var(--sb) + 24px); z-index: 95; }

/* ---------- Particules ---------- */
.burst { position: fixed; z-index: 99; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; width: 8px; height: 8px; border-radius: 2px; animation: burst .85s cubic-bezier(.1,.8,.3,1) forwards; }
@keyframes burst { to { transform: translate(var(--tx), var(--ty)) rotate(220deg) scale(.4); opacity: 0; } }

/* ---------- États vides & squelettes ---------- */
.empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 18px; border-radius: var(--r); border: 1px dashed var(--line2); background: var(--card); }
.empty-ic { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: var(--orange); background: radial-gradient(circle at 30% 30%, rgba(255,107,44,.25), rgba(255,107,44,.06)); animation: floaty 3.5s ease-in-out infinite; }
.empty-ic .ic { width: 30px; height: 30px; }
@keyframes floaty { 50% { transform: translateY(-5px); } }
.empty h3 { font: 400 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .4px; }
.empty p { color: var(--muted); font-size: 14px; max-width: 320px; }
.empty .btn { margin-top: 6px; }
.sk-wrap { padding: 8px 16px; display: grid; gap: 14px; max-width: 680px; margin: 0 auto; }
.sk-full { height: 100%; padding: 0; }
.sk { border-radius: 14px; background: linear-gradient(100deg, var(--card) 30%, var(--card2) 50%, var(--card) 70%); background-size: 300% 100%; animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-title { height: 38px; width: 60%; } .sk-hero { height: 168px; border-radius: var(--r2); } .sk-card { height: 110px; } .sk-map { height: 100%; border-radius: 0; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .sk-tile { height: 96px; }
.sk-row { display: flex; gap: 12px; align-items: center; } .sk-dot { width: 40px; height: 40px; border-radius: 14px; flex: none; } .sk-col { flex: 1; display: grid; gap: 8px; }
.sk-line { height: 14px; } .sk-line.short { width: 55%; }

/* ---------- Carte ---------- */
.map-screen { position: relative; height: 100%; overflow: hidden; background: #0c1a24; }
.map-viewport { position: absolute; inset: 0; touch-action: none; cursor: grab; overflow: hidden; outline: none; }
.map-viewport:active { cursor: grabbing; }
.map-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; --inv: 1; }
.map-stage.anim { transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6); }
.map-bg-empty { background: linear-gradient(135deg, #24402c, #1d3b4f); }
.map-stage > button, .map-stage > span { position: absolute; }
.m-poi { width: 34px; height: 38px; transform: translate(-50%, -100%) scale(var(--inv)); transform-origin: 50% 100%; display: grid; place-items: center; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.m-poi img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.m-poi img.is-broken { display: none; }
.m-poi > .ic { width: 28px; height: 28px; color: var(--orange); fill: rgba(0,0,0,.4); }
.m-poi.potential::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--amber); opacity: .7; animation: ping 2s infinite; z-index: -1; }
@keyframes ping { 70%, 100% { transform: scale(3); opacity: 0; } }
.m-area, .m-zone { transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; border: 1px solid rgba(233,200,88,.6); background: rgba(233,200,88,.12); }
.m-area.gas { border-color: rgba(155,255,90,.7); background: rgba(155,255,90,.15); }
.m-zone { border: 1.5px dashed rgba(255,107,44,.9); background: rgba(255,107,44,.16); }
.m-city { transform: translate(-50%, -50%) scale(var(--inv)); font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; letter-spacing: .3px; white-space: nowrap; opacity: 0; transition: opacity .25s; pointer-events: none; min-height: 24px; padding: 0 4px; }
.z2 .m-city { opacity: .95; pointer-events: auto; }
.m-player { transform: translate(-50%, -50%) scale(var(--inv)); display: flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 4px; }
.m-dot { width: 14px; height: 14px; border-radius: 50%; background: #9aa3b1; border: 2.5px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35); flex: none; }
.m-player.on .m-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(61,217,255,.3), 0 0 12px var(--green); }
.m-name { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; display: none; }
.z2 .m-name { display: inline; }
.m-fac { transform: translate(-50%, -100%) scale(var(--inv)); transform-origin: 50% 100%; display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px; border-radius: 10px; background: rgba(16,15,23,.85); border: 1px solid rgba(255,107,44,.7); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; min-height: 30px; }
.m-fac .ic { width: 15px; height: 15px; color: var(--orange); }
.m-fac span { display: none; } .z2 .m-fac span { display: inline; }
.m-note { transform: translate(-50%, -50%) scale(var(--inv)); width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--amber); color: #1c1302; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.m-note .ic { width: 18px; height: 18px; }
.map-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(var(--top-h) + var(--st) + 2px) 16px 10px; background: linear-gradient(rgba(11,10,16,.85), rgba(11,10,16,.5) 70%, transparent); display: grid; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-title { display: grid; color: #fff; }
.map-title .eyebrow { color: rgba(255,255,255,.7); }
.map-title .scr-title { font-size: 24px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.map-top .chip { background: rgba(16,15,23,.75); color: #e9ecf1; border-color: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.map-top .chip.on { background: var(--grad); border-color: transparent; color: #fff; }
.map-ctrl { position: absolute; right: calc(12px + var(--sr)); bottom: calc(var(--tab-h) + var(--sb) + 64px); display: grid; gap: 8px; }
.map-ctrl .icon-btn { background: rgba(16,15,23,.82); color: #fff; border-color: rgba(255,255,255,.15); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); width: 46px; height: 46px; }
.map-legend { position: absolute; left: calc(12px + var(--sl)); bottom: calc(var(--tab-h) + var(--sb) + 26px); display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: rgba(16,15,23,.82); color: #e9ecf1; font-size: 12px; font-weight: 700; max-width: calc(100% - 90px); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- Grand écran ---------- */
@media (min-width: 720px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .fab-grid { grid-template-columns: repeat(4, 1fr); }
  .scr-title { font-size: 40px; }
}
@media (max-width: 360px) {
  .scr-title { font-size: 29px; }
  .kpis.three .kpi b { font-size: 18px; }
  .wallet-amount { font-size: 34px; }
  .fab-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   Garde-fous : écran de chargement et écran de secours
   ========================================================= */
.splash-txt { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.fatal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; overflow-y: auto; padding: calc(var(--st) + 24px) calc(16px + var(--sr)) calc(var(--sb) + 24px) calc(16px + var(--sl)); background: var(--bg, #0b0a10); color: var(--text, #f4f2ee); }
.fatal-card { width: 100%; max-width: 420px; display: grid; gap: 12px; justify-items: center; text-align: center; padding: 26px 20px; border-radius: 26px; background: var(--card, #14131c); border: 1px solid var(--line2, rgba(255,255,255,.15)); }
.fatal-logo { width: 84px; height: 84px; }
.fatal-title { font: 400 30px/1.05 var(--display); text-transform: uppercase; letter-spacing: .4px; }
.fatal-msg { color: var(--soft); font-size: 15px; }
.fatal-help { color: var(--muted); font-size: 12.5px; }
.fatal-detail { color: var(--dim); font-size: 11px; overflow-wrap: anywhere; max-height: 90px; overflow: hidden; }
.fatal-detail:empty { display: none; }

/* =========================================================
   Configuration du bot (profil propriétaire / admin)
   ========================================================= */
.group-head { margin: 10px 4px -6px; font-size: 12.5px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.group-foot { margin: -6px 4px 0; font-size: 12.5px; color: var(--muted); }
.hub-row .row-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-row[hidden] { display: none !important; }
.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; color: var(--amber); }
.lock .ic { width: 13px; height: 13px; }
.f-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; }
.list .f-row + .f-row, .list .f-row + .row, .list .row + .f-row { border-top: 1px solid var(--line); }
.f-row.stack { display: grid; align-items: stretch; gap: 8px; }
.f-row.is-dirty { box-shadow: inset 3px 0 0 var(--orange); }
.f-row.is-locked { opacity: .55; }
.f-label { flex: 1; min-width: 0; display: grid; gap: 2px; }
.f-label b { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.f-label small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.f-ctl { width: 100%; min-height: 48px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line2); background: var(--bg2); color: var(--text); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; min-width: 0; }
textarea.f-ctl { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.4; font-family: var(--font); }
select.f-ctl { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; text-overflow: ellipsis; }
select.f-ctl[multiple] { background-image: none; padding: 8px; min-height: 120px; }
.f-ctl:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,44,.15); }
.f-ctl:disabled { opacity: .55; }
input[type="color"].f-ctl { padding: 4px; height: 48px; }
.f-num { display: flex; align-items: center; gap: 8px; }
.f-num .f-ctl { flex: 1; }
.f-unit { flex: none; color: var(--muted); font-size: 13px; font-weight: 700; min-width: 24px; }
.f-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.f-pair span { color: var(--muted); font-size: 13px; }
.f-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.f-chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--soft); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.f-chip input { position: absolute; opacity: 0; pointer-events: none; }
.f-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.f-chip:focus-within { outline: 2px solid var(--orange); outline-offset: 2px; }
.f-pick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 12px 8px 14px; border-radius: 13px; border: 1px solid var(--line2); background: var(--bg2); text-align: left; font-size: 15px; }
.f-pick span { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.f-pick span.empty-val { color: var(--muted); }
.f-pick .ic { color: var(--muted); width: 18px; height: 18px; }
.pick-list { display: grid; gap: 6px; }
.pick-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.pick-item b { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.pick-item .pick-box { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line2); display: grid; place-items: center; flex: none; }
.pick-item .pick-box .ic { width: 16px; height: 16px; opacity: 0; color: #fff; }
.pick-item.on { border-color: var(--orange); background: rgba(255,107,44,.08); }
.pick-item.on .pick-box { background: var(--grad); border-color: transparent; }
.pick-item.on .pick-box .ic { opacity: 1; }
.pick-item[hidden] { display: none !important; }
.savebar { position: fixed; z-index: 55; left: calc(10px + var(--sl)); right: calc(10px + var(--sr)); bottom: calc(var(--tab-h) + var(--sb) + 18px); max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 20px; background: var(--card-solid); border: 1px solid var(--orange); box-shadow: 0 18px 40px -12px rgba(0,0,0,.9); }
.savebar-txt { flex: 1; min-width: 0; display: grid; }
.savebar-txt b { font-size: 14px; }
.savebar-txt small { color: var(--muted); font-size: 12px; }
.savebar .btn { min-height: 44px; padding: 0 14px; }
body.has-savebar .view { padding-bottom: calc(var(--tab-h) + var(--sb) + 110px); }
body.has-sheet .savebar { display: none; }
.cfg-actions { display: grid; gap: 10px; }
.cfg-actions .btn { width: 100%; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn { flex: 1 1 auto; min-height: 42px; font-size: 13.5px; padding: 0 12px; }
.mini-btn { min-height: 38px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 750; background: var(--card2); border: 1px solid var(--line); color: var(--text); flex: none; }
.mini-btn.danger { color: var(--red); }
.subcard { padding: 12px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); display: grid; gap: 10px; }
.subcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.subcard-head b { font-size: 14px; }
.danger-card { border-color: rgba(255,107,44,.45); background: linear-gradient(140deg, rgba(255,107,44,.12), transparent 60%), var(--card); }
.lvl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lvl-cell { display: grid; gap: 4px; padding: 10px; min-height: 74px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-align: left; font-size: 12.5px; }
.lvl-cell b { font-size: 13px; }
.lvl-cell small { color: var(--muted); overflow-wrap: anywhere; }
.lvl-cell.set { border-color: color-mix(in srgb, var(--orange) 55%, transparent); }
.thumb { width: 100%; max-height: 180px; object-fit: contain; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.thumb.square { max-width: 160px; justify-self: center; }
.crop-canvas { width: 100%; height: auto; border-radius: 12px; background: #000; touch-action: none; }
.log-row { display: grid; gap: 2px; padding: 10px 16px; font-size: 13px; }
.list .log-row + .log-row { border-top: 1px solid var(--line); }
.log-row b { font-size: 14px; }
.log-row small { color: var(--muted); }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; color: var(--soft); }
.map-tools { position: absolute; left: calc(12px + var(--sl)); top: calc(var(--top-h) + var(--st) + 112px); display: grid; gap: 8px; }
.map-tools .icon-btn { background: rgba(16,15,23,.82); color: #fff; border-color: rgba(255,255,255,.15); width: 46px; height: 46px; }
.map-cross { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; color: var(--orange); pointer-events: none; filter: drop-shadow(0 2px 4px #000); }
.map-cross .ic { width: 34px; height: 34px; }
.map-bg-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: rgba(255,255,255,.75); font-size: 13px; background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.06) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.06) 39px 40px), linear-gradient(135deg, #24402c, #1d3b4f); border-radius: 4px; }
.m-rule { transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; border: 2px solid rgba(255,107,44,.9); background: rgba(255,107,44,.12); }
.m-rule.pvp { border-color: rgba(239,102,102,.9); } .m-rule.pve { border-color: rgba(73,220,154,.9); background: rgba(73,220,154,.12); }
@media (max-width: 360px) {
  .savebar { flex-wrap: wrap; }
  .savebar-txt { flex-basis: 100%; }
  .lvl-grid { grid-template-columns: 1fr; }
}
.field textarea { padding: 12px 14px; min-height: 90px; line-height: 1.4; }
.field small.muted { font-size: 12px; }
body.has-savebar .install-hint { display: none !important; }
.duo > * { min-width: 0; }
.field input, .field select, .f-ctl { min-width: 0; max-width: 100%; }
input[type="datetime-local"], input[type="date"], input[type="time"] { min-width: 0; }

/* ---------------------------------------------------------------- */
/* Carte v3 : tuiles et points visibles uniquement (voir js/map.js)   */
/* ---------------------------------------------------------------- */
.map-tiles, .map-marks { position: absolute; inset: 0; overflow: hidden; }
.map-tiles { pointer-events: none; }
.map-marks { pointer-events: none; }
.map-marks > * { position: absolute; left: 0; top: 0; pointer-events: auto; transform-origin: 0 0; will-change: transform; }
.map-marks > span { pointer-events: none; }
.map-area { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.05) 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.05) 39px 40px), linear-gradient(135deg, #24402c, #1d3b4f); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6); }
.map-tile, .map-single { position: absolute; left: 0; top: 0; display: block; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; opacity: 0; transition: opacity .25s; image-rendering: auto; }
.map-tile.ok, .map-single { opacity: 1; }
.map-tile.ko { visibility: hidden; }
.map-marks .m-poi { transform: none; width: 32px; height: 36px; }
.map-marks .m-poi.dot { width: 22px; height: 22px; }
.m-pt { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.map-marks .m-city, .map-marks .m-player, .map-marks .m-fac, .map-marks .m-note { transform: none; }
.map-marks .m-area, .map-marks .m-zone, .map-marks .m-rule { transform: none; }
.map-marks.z2 .m-city { opacity: .95; pointer-events: auto; }
.map-marks.z2 .m-name { display: inline; }
.map-marks.z2 .m-fac span { display: inline; }
.map-top .chip small { opacity: .7; font-weight: 700; font-size: 11px; }
.map-hint { position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--sb) + 76px); transform: translateX(-50%); margin: 0; padding: 7px 12px; border-radius: 999px; background: rgba(16,15,23,.85); color: #e9ecf1; font-size: 12px; font-weight: 700; white-space: nowrap; pointer-events: none; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; }
.map-legend span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- */
/* Boutique, battlepass, faction, abonnement, créateur                */
/* ---------------------------------------------------------------- */
.shop-photo { display: block; width: calc(100% + 32px); margin: -16px -16px 12px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r) var(--r) 0 0; background: var(--card2); }
.shop-item .btn { margin-top: 10px; }
.shop-balance { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-balance b { font-size: 20px; }
.inv-list .row small { overflow-wrap: anywhere; }
.claim-explain { display: grid; gap: 10px; }
.claim-explain ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.fac-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fac-actions .btn { min-width: 0; padding: 0 10px; font-size: 14px; }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.member-actions .btn { min-height: 36px; padding: 0 10px; font-size: 13px; border-radius: 11px; }
.flag-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; }
.flag-pick label { display: grid; justify-items: center; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line2); font-size: 10px; text-align: center; overflow-wrap: anywhere; }
.flag-pick input { position: absolute; opacity: 0; pointer-events: none; }
.flag-pick input:checked + img { outline: 3px solid var(--orange); border-radius: 8px; }
.flag-pick img { width: 48px; height: 32px; object-fit: cover; }
.invoice-list .row b.num { white-space: nowrap; }
.cr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cr-stat { padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.cr-stat b { font-size: 22px; overflow: hidden; text-overflow: ellipsis; }
.cr-stat small { color: var(--muted); font-size: 12px; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cr-table th, .cr-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.cr-table th { color: var(--muted); font-weight: 700; font-size: 12px; }
.cr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cr-bars { display: grid; gap: 6px; }
.cr-bar { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12px; }
.cr-bar i { display: block; height: 8px; border-radius: 4px; background: var(--grad); min-width: 2px; }
.creator-tile { border: 1px solid rgba(255,201,61,.45); }
.cr-bar-wide { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) auto; }
.cr-bar-wide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-chart { display: block; width: 100%; height: auto; margin-top: 6px; }
.cr-gl { stroke: var(--line); stroke-width: 1; }
.cr-ax { fill: var(--muted); font-size: 9px; text-anchor: end; }
.cr-ax.start { text-anchor: start; }
.cr-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cr-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
rect.cr-b-iphone { fill: var(--p, #FF3D7F); } .cr-dot.cr-b-iphone { background: var(--p, #FF3D7F); }
rect.cr-b-android { fill: var(--c, #3DD9FF); } .cr-dot.cr-b-android { background: var(--c, #3DD9FF); }
rect.cr-b-web { fill: var(--y, #FFC93D); } .cr-dot.cr-b-web { background: var(--y, #FFC93D); }.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 4px 0 -4px; }
.steps-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.map-marks.z2 .m-fac span { display: none; } .map-marks.z4 .m-fac span { display: inline; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.sheet .shop-photo { width: 100%; margin: 0 0 4px; border-radius: 14px; }

/* Listes repliables (Identités & whitelist) : même chevron que le dashboard web */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; margin: 12px 4px 8px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: '›'; display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,107,44,.14); color: var(--orange); font-size: 15px; transition: transform .2s; }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold > summary > span:first-child { flex: 1; min-width: 0; }
.fold-count { flex: none; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); }

/* =========================================================
   Performance (iPhone + Android) : uniquement des animations « composées »
   (transform / opacity) et pas de flou d'arrière-plan sur les éléments
   répétés ou posés sur la carte (le flou est recalculé à chaque image).
   ========================================================= */
.live-dot { position: relative; animation: none; box-shadow: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; opacity: .6; animation: livePing 2s ease-out infinite; }
@keyframes livePing { 70%, 100% { transform: scale(2.6); opacity: 0; } }
.status, .tile-ic { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.status { background: rgba(0,0,0,.62); }
.tile-ic { background: rgba(0,0,0,.58); }
.map-top .chip, .map-ctrl .icon-btn, .map-legend { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.map-top .chip { background: rgba(16,15,23,.9); }
.map-ctrl .icon-btn, .map-legend { background: rgba(16,15,23,.92); }
.sheet-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
.track-row.next .lvl { animation: none; box-shadow: 0 0 0 4px rgba(255,107,44,.2); }
.sk { background: var(--card2); background-size: auto; animation: skPulse 1s ease-in-out infinite alternate; }
@keyframes skPulse { from { opacity: 1; } to { opacity: .55; } }

/* Carte : fond satellite / topographique, balises posées par double tap, balises de faction */
.map-ctrl .map-style-btn, .map-tools .map-notes-btn { position: relative; }
.map-ctrl .map-style-btn small, .map-tools .map-notes-btn small { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); font-size: 8.5px; font-weight: 800; letter-spacing: .4px; line-height: 1; color: #fff; opacity: .85; }
.map-ctrl .map-style-btn .ic, .map-tools .map-notes-btn .ic { margin-top: -6px; }
.map-marks .m-note.shared { background: var(--violet); color: #fff; }
.map-marks .m-pending { position: absolute; left: 0; top: 0; width: 38px; height: 38px; color: var(--orange); pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.7)); z-index: 5; }
.map-marks .m-pending .ic { width: 38px; height: 38px; stroke-width: 2.4; }
.map-tip { position: absolute; left: calc(12px + var(--sl)); bottom: calc(var(--tab-h) + var(--sb) + 70px); margin: 0; padding: 6px 11px; border-radius: 999px; background: rgba(16,15,23,.92); color: #e9ecf1; font-size: 12px; font-weight: 650; pointer-events: none; animation: mapTip 7s ease forwards; }
@keyframes mapTip { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
