/* Pages Profil (/membre/<id>) et Classement (/classement). Se charge après home.css. */
.wrap { max-width: 1180px; margin: 0 auto; padding: 110px 20px 60px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; backdrop-filter: blur(10px); }
.panel h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.01em; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.pills button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; padding: 8px 13px; border-radius: 10px; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.pills button:hover { color: var(--text); }
.pills button.on { background: rgba(12, 252, 2, .14); color: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }
.loading { display: grid; place-items: center; padding: 120px 0; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { text-align: center; padding: 100px 20px; color: var(--muted); }
.error-box h1 { color: var(--text); }
.fade-in { animation: fade-up .6s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }

/* ---- Profil ---------------------------------------------------------------------- */
.hero-card { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line-2); background: var(--panel); margin-bottom: 18px; }
.banner { height: 150px; background: linear-gradient(120deg, var(--ta), var(--tb)); position: relative; }
.banner::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .08) 0 28px, transparent 28px 70px); }
.hero-body { display: flex; gap: 24px; align-items: flex-end; padding: 0 28px 26px; margin-top: -64px; position: relative; flex-wrap: wrap; }
.big-avatar { width: 136px; height: 136px; border-radius: 50%; border: 6px solid var(--panel-solid, #0e1510); background: var(--panel-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); flex: none; }
.who { flex: 1; min-width: 220px; }
.who h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); font-weight: 900; letter-spacing: -.02em; }
.who .handle { color: var(--muted); font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-weight: 800; font-size: 13.5px; color: var(--muted); }
.chip b { color: var(--text); }
/* Le rond du niveau est placé sous la bannière (lisible quelle que soit sa couleur). */
.ring { width: 132px; height: 132px; position: relative; flex: none; align-self: flex-start; margin-top: 82px; }
.hero-body .big-avatar { align-self: flex-start; }
/* Rien ne passe sur la bannière : le texte commence sous elle (et garde un contour pour rester lisible). */
.hero-body .who { align-self: flex-start; margin-top: 76px; }
.who h1 { text-shadow: 0 0 1px rgba(0, 0, 0, .9), 0 2px 10px rgba(0, 0, 0, .55); }
.who-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.who-actions:empty { display: none; }
.who-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.edit-btn { margin-top: 14px; }
.editor { margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; }
.editor[hidden] { display: none; }
.ed-label { font-weight: 900; font-size: 15px; display: flex; justify-content: space-between; }
.ed-label small { color: var(--muted); font-weight: 700; }
.editor textarea { width: 100%; font: inherit; font-size: 15px; color: var(--text); background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; resize: vertical; outline: none; }
.editor textarea:focus { border-color: var(--green); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; transition: transform .2s var(--ease); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.ed-actions { display: flex; justify-content: flex-end; gap: 10px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg-c { stroke: rgba(255, 255, 255, .08); }
.ring .fg-c { stroke: url(#ringGrad); transition: stroke-dashoffset 1.4s var(--ease); }
.ring .label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .label b { display: block; font-size: 38px; font-weight: 900; line-height: 1; }
.ring .label span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.bio { margin: 0 28px 26px; padding: 14px 18px; border-left: 4px solid var(--tb); background: rgba(255, 255, 255, .03); border-radius: 0 14px 14px 0; color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.tile { padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-3px); border-color: var(--line-2); }
.tile span { display: block; color: var(--muted); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.tile b { display: block; font-size: 28px; font-weight: 900; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile small { color: var(--muted); font-weight: 700; }
.bar-progress { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 10px; }
.bar-progress i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--green), var(--green-light)); transition: width 1.2s var(--ease); }

.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart .grid-line { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 12px; font-weight: 700; font-family: inherit; }
.chart .cursor { stroke: rgba(255, 255, 255, .35); stroke-width: 1; stroke-dasharray: 4 4; pointer-events: none; }
.chart .cursor-dot { stroke: #04140a; stroke-width: 3; pointer-events: none; filter: drop-shadow(0 0 8px var(--green)); }
.chart .chart-line { filter: drop-shadow(0 4px 12px rgba(12, 252, 2, .35)); }
.chart .chart-area { animation: fade-in-area 1s var(--ease); }
@keyframes fade-in-area { from { opacity: 0; } }
.chart .bar { transform-origin: bottom; transform-box: fill-box; animation: grow .7s var(--ease) both; cursor: pointer; transition: opacity .2s; }
.chart .bar:hover { opacity: .75; }
@keyframes grow { from { transform: scaleY(0); } }
.chart-tip {
  position: absolute; transform: translate(-50%, -100%); pointer-events: none; opacity: 0; transition: opacity .15s;
  background: #0b120d; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); white-space: nowrap; z-index: 2;
}
.chart-tip b { display: block; font-size: 16px; font-weight: 900; color: var(--green-light); }
.chart-tip span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.chart-tip em { display: block; font-style: normal; font-size: 13px; font-weight: 900; }
.chart-tip em.gain { color: #7dff9e; }
.chart-tip em.loss { color: #ff8a8a; }
.chart .step-dot { pointer-events: none; opacity: .85; }
.kv { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.kv div { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.kv span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.kv b { font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); max-width: 100%; }
.badge-item i { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.badge-item b { font-weight: 900; display: block; }
.badge-item small { color: var(--muted); font-size: 12.5px; }
.badge-item.off { opacity: .4; filter: grayscale(1); }
button.badge-item { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, opacity .2s; }
button.badge-item:hover { transform: translateY(-2px); border-color: var(--line-2); opacity: 1; }
button.badge-item.off:hover { opacity: .75; }
.badge-item.r-legend { border-color: rgba(251, 191, 36, .55); box-shadow: 0 0 18px rgba(251, 191, 36, .12); }
.badge-item.r-epic { border-color: rgba(192, 132, 252, .5); }
.badge-item.r-rare { border-color: rgba(96, 165, 250, .45); }

/* ---- Profil : icônes, série et gels, économie, jeux, badges ---- */
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.chip .ico, .chip .coin-ico { width: 16px; height: 16px; }
.chip-flame { color: #ffb36b; border-color: rgba(255, 140, 50, .4); background: rgba(255, 140, 50, .08); }
.tile { position: relative; }
.tile-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 10px; color: var(--c, var(--green-light)); background: color-mix(in srgb, var(--c, #19d64b) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c, #19d64b) 35%, transparent); }
.tile-ico .ico { width: 22px; height: 22px; }
.tile-ico .coin-ico { width: 26px; height: 26px; }
.t-xp { --c: #0cfc02; } .t-total { --c: #a9fc9e; } .t-coins { --c: #f5b700; } .t-msg { --c: #5bc0ff; } .t-voice { --c: #c084fc; } .t-react { --c: #ff6b8b; }
.panel-sub { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; margin: 20px 0 10px; }
.panel-sub small { color: var(--muted); font-weight: 800; }

.streak-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.streak-box { padding: 18px; border-radius: 18px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.streak-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.streak-top > div:nth-child(2) { flex: 1; min-width: 120px; }
.streak-top span { display: block; color: var(--muted); font-weight: 800; font-size: 13px; }
.big-ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.big-ico .ico { width: 32px; height: 32px; }
.flame-ico { color: #ffb36b; background: radial-gradient(circle at 50% 70%, rgba(255, 120, 40, .35), rgba(255, 120, 40, .08)); box-shadow: 0 0 24px rgba(255, 120, 40, .25); }
.snow-ico { color: #8fd3ff; background: radial-gradient(circle, rgba(91, 192, 255, .3), rgba(91, 192, 255, .06)); box-shadow: 0 0 24px rgba(91, 192, 255, .2); }
.big-num { display: block; font-size: 34px; font-weight: 900; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 16px; color: var(--muted); }
.streak-side { display: flex; flex-direction: column; gap: 4px; }
.streak-side span { display: flex; align-items: center; gap: 6px; }
.streak-side b { color: var(--text); }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.strip .day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 0 5px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.strip .day .ico { width: 17px; height: 17px; }
.strip .day i { width: 8px; height: 8px; margin: 4.5px 0; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.strip .day small { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.strip .day.on { color: #ffb36b; background: rgba(255, 140, 50, .1); border-color: rgba(255, 140, 50, .35); }
.strip .day.frozen { color: #8fd3ff; background: rgba(91, 192, 255, .1); border-color: rgba(91, 192, 255, .4); }
.strip .day.today { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: rgba(255, 255, 255, .2); border: 1px dashed rgba(255, 255, 255, .15); }
.slot .ico { width: 24px; height: 24px; }
.slot.full { color: #bfe6ff; border: 1px solid rgba(91, 192, 255, .55); background: linear-gradient(160deg, rgba(91, 192, 255, .3), rgba(47, 107, 255, .12)); box-shadow: 0 0 16px rgba(91, 192, 255, .2); }
.freeze-box p { margin: 0; }
.used b { font-size: 14px; }
.frozen-chip { color: #8fd3ff; border-color: rgba(91, 192, 255, .35); }

.eco-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px; background: linear-gradient(120deg, rgba(245, 183, 0, .16), rgba(245, 183, 0, .03)); border: 1px solid rgba(245, 183, 0, .3); margin-bottom: 14px; }
.eco-coin { width: 58px; height: 58px; filter: drop-shadow(0 0 14px rgba(255, 200, 50, .45)); }
.eco-hero span { display: block; color: var(--muted); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.eco-hero b { font-size: 36px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eco-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.eco-chips b { font-size: 14px; }
.eco-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.eco-box { padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.eco-box span { display: block; color: var(--muted); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.eco-box b { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.eco-box small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.eco-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.eco-box.earned { --c: #7dff9e; } .eco-box.spent { --c: #ff8a8a; } .eco-box.given { --c: #ff9ad5; } .eco-box.received { --c: #8fd3ff; }
.buys { display: grid; gap: 8px; margin-top: 10px; }
.buy { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .025); }
.buy b { display: block; font-weight: 900; font-size: 14.5px; }
.buy small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.buy-tile { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--c) 80%, white), color-mix(in srgb, var(--c) 75%, black)); box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.buy-tile .ico { width: 20px; height: 20px; }

.games { display: flex; flex-direction: column; gap: 10px; }
.game-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.game-ico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.game-ico .ico { width: 22px; height: 22px; }
.game-text { flex: 1; min-width: 0; }
.game-text b { display: block; font-weight: 900; }
.game-text small { display: block; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.game-text .bar-progress { height: 6px; margin-top: 7px; }
.game-text .bar-progress i { background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, white)); }
.game-text .goal { margin-top: 3px; }
.game-val { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.game-val small { font-size: 14px; color: var(--muted); }
.g-chifoumi { --c: #ff9a5a; } .g-quiz { --c: #67e8f9; } .g-flip { --c: #f5b700; } .g-rush { --c: #c084fc; } .g-cal { --c: #ff6b6b; } .g-ticket { --c: #5bc0ff; }
.achs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.ach { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.ach b { display: block; font-weight: 900; font-size: 14px; }
.ach small { color: var(--muted); font-weight: 700; font-size: 12px; }
.ach-emoji { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; flex: none; background: rgba(255, 255, 255, .05); }
.ach.on { border-color: rgba(12, 252, 2, .35); background: linear-gradient(120deg, rgba(12, 252, 2, .08), rgba(255, 255, 255, .02)); }
.ach.off { opacity: .55; }
.ach.off .ach-emoji { color: var(--muted); }

.modal-bg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); animation: fade-in-area .2s; }
.modal-bg.out { opacity: 0; transition: opacity .2s; }
.modal { position: relative; width: min(420px, 100%); padding: 30px 26px 24px; border-radius: 26px; background: #0e1510; border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); text-align: center; animation: fade-up .3s var(--ease); }
.modal h3 { margin: 14px 0 6px; font-size: 24px; font-weight: 900; }
.modal p { color: var(--soft, #b9cbbe); margin: 10px 0; line-height: 1.5; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { color: var(--text); }
.modal-badge { width: 82px; height: 82px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--bc) 35%, transparent), transparent 70%); }
.modal-badge i { width: 38px; height: 38px; border-radius: 50%; background: var(--bc); box-shadow: 0 0 30px var(--bc); }
.rarity { display: inline-block; padding: 4px 14px; border-radius: 99px; font-weight: 900; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255, 255, 255, .07); color: var(--muted); }
.r-legend .rarity { background: linear-gradient(90deg, #ffd84a, #f59e0b); color: #3a2400; }
.r-epic .rarity { background: linear-gradient(90deg, #c084fc, #7c3aed); color: #fff; }
.r-rare .rarity { background: linear-gradient(90deg, #60a5fa, #2f6bff); color: #fff; }
.r-uncommon .rarity { background: rgba(12, 252, 2, .15); color: var(--green-light); }
.modal-rows { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 6px; text-align: left; }
.modal-rows div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); color: var(--muted); font-weight: 700; }
.modal-rows b { color: var(--text); }
.rarity-bar { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 14px; }
.rarity-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, var(--green), var(--green-light)); }
.r-legend .rarity-bar i { background: linear-gradient(90deg, #f59e0b, #ffd84a); }
.r-epic .rarity-bar i { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.r-rare .rarity-bar i { background: linear-gradient(90deg, #2f6bff, #60a5fa); }
.modal .rarity-text { margin: 8px 0 0; font-weight: 900; color: var(--text); }
/* ---- Profil : blocs cliquables, série / gels, fenêtres de détails ---- */
.clickable { cursor: pointer; }
.clickable:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.tile.clickable:hover, .sf-panel:hover, .eco-box.clickable:hover, .game-card:hover, .buy.clickable:hover { border-color: var(--line-2); transform: translateY(-2px); }
.gel-ico { width: 1.6em; height: 1.6em; vertical-align: middle; }
.flame-ico-img { width: 1.6em; height: 1.6em; vertical-align: middle; }
.grid-sf { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.sf-panel { display: flex; flex-direction: column; gap: 16px; transition: transform .25s var(--ease), border-color .25s; }
.sf-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sf-big img { width: 58px; height: 58px; }
.sf-text { flex: 1; min-width: 150px; }
.sf-text span { display: block; color: var(--muted); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
.sf-text b { display: block; font-size: 28px; font-weight: 900; line-height: 1.15; }
.sf-text b small { font-size: 16px; color: var(--muted); }
.sf-text > small { color: var(--muted); font-weight: 700; font-size: 13px; }
.more { color: var(--muted); font-weight: 800; font-size: 13px; }
.strip .day img { width: 26px; height: 26px; }
.strip .day i { width: 10px; height: 10px; margin: 8px 0; }
.strip .day small { font-size: 11px; }
.gels { display: flex; flex-wrap: wrap; gap: 8px; }
.gels .gel-ico { width: 44px; height: 44px; }
.gels.big .gel-ico { width: 52px; height: 52px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
.buy-gel { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.buy-gel .coin-ico { width: 18px; height: 18px; }
.wide-panel { width: 100%; }
.eco-layout { display: grid; gap: 14px; grid-template-columns: minmax(260px, 1fr) 2fr; align-items: stretch; }
.eco-layout .eco-hero { margin: 0; flex-direction: column; align-items: flex-start; justify-content: center; }
.eco-layout .eco-chips { margin-left: 0; }
.eco-layout .eco-grid { grid-template-columns: repeat(4, 1fr); }
.eco-box { transition: transform .25s var(--ease), border-color .25s; }
.buys { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.buy { border: 1px solid transparent; transition: transform .25s var(--ease), border-color .25s; }
.games-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.game-card { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; transition: transform .25s var(--ease), border-color .25s; }
.gc-top { display: flex; align-items: center; gap: 12px; }
.gc-name { flex: 1; min-width: 0; }
.gc-name b { display: block; font-weight: 900; }
.gc-name small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.game-card .bar-progress { height: 6px; margin-top: 2px; }
.game-card .bar-progress i { background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 50%, white)); }
.game-card .goal { color: var(--muted); font-weight: 700; font-size: 12px; }
.game-val .ico { width: 24px; height: 24px; color: var(--green); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; color: var(--muted); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); background: color-mix(in srgb, var(--rc) 8%, transparent); opacity: .7; }
.role-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--rc); }
.role-chip.on { color: #fff; opacity: 1; border-color: color-mix(in srgb, var(--rc) 70%, transparent); background: color-mix(in srgb, var(--rc) 20%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 25%, transparent); }
.role-chip .ico { width: 13px; height: 13px; color: var(--green-light); }

/* Fenêtres de détails (communes) */
.modal { text-align: left; }
.modal.center { text-align: center; }
.modal.wide { width: min(560px, 100%); }
.m-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-right: 40px; }
.m-head h3 { margin: 0; font-size: 21px; }
.m-head p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.m-ico { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; flex: none; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.m-ico .ico { width: 26px; height: 26px; }
.m-ico img { width: 34px; height: 34px; }
.m-ico .buy-tile { width: 40px; height: 40px; }
.m-rows { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.m-rows div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .035); }
.m-rows span { color: var(--muted); font-weight: 700; font-size: 14px; }
.m-rows b { font-weight: 900; text-align: right; display: inline-flex; align-items: center; gap: 6px; }
.m-rows b small { color: var(--muted); font-weight: 700; }
.m-rows .pos { color: #7dff9e; } .m-rows .neg { color: #ff8a8a; }
.m-sub { margin: 14px 0 8px !important; font-weight: 900; color: var(--text) !important; }
.m-msg { margin: 8px 0 0 !important; padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 14px; }
.m-msg.ok { background: rgba(12, 252, 2, .12); color: #a9fc9e !important; }
.m-msg.err { background: rgba(239, 68, 68, .14); color: #fca5a5 !important; }
.m-msg.warn { background: rgba(251, 191, 36, .14); color: #fde68a !important; }
.m-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.bar-progress.big { height: 12px; }
.succ { display: flex; flex-direction: column; gap: 8px; }
.succ-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); opacity: .65; }
.succ-row.on { opacity: 1; border-color: color-mix(in srgb, var(--rc) 55%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); }
.succ-row > i { width: 14px; height: 14px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 10px var(--rc); flex: none; }
.succ-row div { flex: 1; }
.succ-row b { display: block; font-weight: 900; }
.succ-row small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.succ-row span { color: var(--muted); font-weight: 800; font-size: 13px; }
.heat-legend { display: flex; gap: 14px; color: var(--muted); font-weight: 700; font-size: 13px; margin: 6px 0 10px; }
.heat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.heat-wrap { overflow-x: auto; padding-bottom: 6px; }
.heat { display: grid; grid-template-rows: repeat(7, 14px); grid-auto-flow: column; grid-auto-columns: 14px; gap: 4px; width: max-content; }
.h-cell { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .07); }
.h-cell.empty { background: transparent; }
.h-cell.s1 { background: linear-gradient(135deg, #ffcf3f, #ff5a1f); }
.h-cell.s2 { background: linear-gradient(135deg, #bfe6ff, #5bc0ff); }
.g-form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.g-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 13.5px; color: var(--muted); }
.g-form label[hidden] { display: none; }
.g-form select, .g-form input[type=number] { font: inherit; font-weight: 700; color: var(--text); background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; outline: none; }
.g-form select:focus, .g-form input:focus { border-color: var(--green); }
.g-form .g-check { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
@media (max-width: 860px) {
  .eco-layout { grid-template-columns: 1fr; }
  .eco-layout .eco-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .eco-grid { grid-template-columns: 1fr 1fr; }
  .g-form { grid-template-columns: 1fr; }
  .strip { gap: 3px; }
  .strip .day small { font-size: 9px; }
  .eco-chips { margin-left: 0; }
}

/* ---- Classement ------------------------------------------------------------------- */
.lb-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.lb-head h1 { margin: 0; font-size: clamp(36px, 5vw, 56px); font-weight: 900; letter-spacing: -.03em; background: linear-gradient(90deg, var(--green), var(--green-light), var(--green)) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: title-flow 6s linear infinite; }
.lb-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 240px; }
.search input { flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 700; padding: 11px 0; outline: none; }
.updated { color: var(--muted); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.updated::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 16px; align-items: end; margin: 10px 0 26px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 14px 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); text-align: center; cursor: pointer; transition: transform .3s var(--ease), border-color .3s; text-decoration: none; color: inherit; }
.pod:hover { transform: translateY(-5px); border-color: var(--line-2); }
.pod img { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--medal); box-shadow: 0 0 26px color-mix(in srgb, var(--medal) 55%, transparent); }
.pod.first { padding-top: 30px; background: linear-gradient(180deg, rgba(12, 252, 2, .12), var(--panel)); border-color: rgba(12, 252, 2, .35); }
.pod.first img { width: 108px; height: 108px; }
.pod .place { font-size: 15px; font-weight: 900; color: var(--medal); }
.pod b { font-size: 18px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod span { color: var(--green-light); font-weight: 900; font-variant-numeric: tabular-nums; }
.pod .pod-lvl { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 13px; color: #fff; background: color-mix(in srgb, var(--medal) 22%, transparent); border: 1px solid color-mix(in srgb, var(--medal) 55%, transparent); }
.pod .pod-val { display: inline-flex; align-items: center; gap: 6px; font-size: 17px; }
.lb-row .val { display: inline-flex; align-items: center; gap: 6px; }
img.coin-ico, .pod img.coin-ico, .lb-row img.coin-ico { display: inline-block; width: 1.25em; height: 1.25em; border: 0; border-radius: 50%; box-shadow: none; flex: none; vertical-align: -.25em; }
.lb-list { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .25s var(--ease), border-color .25s, background .25s; }
.lb-row:hover { transform: translateX(4px); border-color: var(--line-2); }
.lb-row.me { border-color: var(--green); background: linear-gradient(90deg, rgba(12, 252, 2, .1), var(--panel)); }
.lb-row .rank { width: 48px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-row img { width: 42px; height: 42px; border-radius: 50%; flex: none; }
.lb-row .name { flex: 1; min-width: 0; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .lvl { color: var(--muted); font-size: 13px; font-weight: 800; }
.lb-row .val { font-weight: 900; color: var(--green-light); font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line-2); border-radius: 18px; }

@media (max-width: 720px) {
  .wrap { padding-top: 90px; }
  .hero-body { flex-direction: column; align-items: flex-start; }
  .podium { grid-template-columns: 1fr; }
  .pod.first { order: -1; }
  .grid2 { grid-template-columns: 1fr; }
  .lb-row .lvl { display: none; }
}

/* ---- Don depuis le profil ---- */
.btn-gold { background: linear-gradient(135deg, #ffe58a, #f5b700); color: #3a2400; border: 0; }
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold .coin-ico { width: 18px; height: 18px; }
.wraps { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.wrap-sw { width: 38px; height: 38px; border-radius: 10px; border: 2px solid rgba(255,255,255,.12); cursor: pointer; display: grid; place-items: center; color: rgba(255,255,255,.6);
  background: var(--wc, rgba(255,255,255,.06)); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 5px, transparent 5px 11px); }
.wrap-sw[data-id=""] { background-image: none; }
.wrap-sw.on { border-color: #fff; box-shadow: 0 0 0 2px #0cfc02; }

/* ---- Contours de rareté plus épais ---- */
.badge-item { border-width: 2px; }
.badge-item.r-legend { border: 3px solid #f5b700; box-shadow: 0 0 0 1px rgba(255, 216, 74, .35), 0 0 22px rgba(251, 191, 36, .28); background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(255, 255, 255, .02)); }
.badge-item.r-epic { border: 3px solid #a855f7; box-shadow: 0 0 18px rgba(168, 85, 247, .22); background: linear-gradient(135deg, rgba(168, 85, 247, .1), rgba(255, 255, 255, .02)); }
.badge-item.r-rare { border: 3px solid #3b82f6; box-shadow: 0 0 14px rgba(59, 130, 246, .18); }
.badge-item.r-uncommon { border: 2.5px solid rgba(12, 252, 2, .55); }
.badge-item.r-common { border: 2px solid rgba(255, 255, 255, .16); }
.badge-item.off.r-legend, .badge-item.off.r-epic, .badge-item.off.r-rare { filter: grayscale(.6); }

/* ---- Profil sur petit écran : nom juste sous l'avatar ---- */
@media (max-width: 720px) {
  .hero-body { gap: 14px; padding: 0 18px 20px; }
  .hero-body .who { margin-top: 0; min-width: 0; width: 100%; }
  .hero-body .ring { margin-top: 0; align-self: center; }
  .who-actions { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .hero-body { padding: 0 12px 16px; }
  .chips .chip { font-size: 12px; }
}

/* ---- Anniversaire : choix du mois et du jour ---- */
.bd-chip { border-color: rgba(244, 114, 182, .45) !important; }
.bd-modal { display: grid; gap: 10px; }
.bd-step { margin: 6px 0 0; font-weight: 900; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bd-step.done { color: var(--green-light); }
.bd-months { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .bd-months { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bd-month { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; cursor: pointer; font: inherit; color: var(--text);
  border: 2px solid rgba(255,255,255,.08); background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 16%, transparent), rgba(255,255,255,.02));
  animation: bd-pop .45s var(--ease) both; animation-delay: calc(var(--i) * 28ms); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.bd-month b { font-size: 13px; }
.bd-month .bd-emo { font-size: 24px; transition: transform .3s var(--ease); }
.bd-month:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--mc) 60%, transparent); }
.bd-month:hover .bd-emo { transform: scale(1.18) rotate(-8deg); }
.bd-month.on { border-color: var(--mc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 30%, transparent), 0 10px 26px color-mix(in srgb, var(--mc) 30%, transparent); transform: scale(1.04); }
.bd-month.on .bd-emo { animation: bd-wiggle .6s var(--ease); }
.bd-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.bd-dow { text-align: center; font-size: 11px; font-weight: 900; color: var(--muted); }
.bd-day { aspect-ratio: 1; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: var(--text); font: inherit; font-weight: 800; cursor: pointer;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s; }
.bd-days.anim .bd-day { animation: bd-pop .35s var(--ease) both; animation-delay: calc(var(--i) * 12ms); }
.bd-day:hover { transform: scale(1.1); background: color-mix(in srgb, var(--mc, #0cfc02) 22%, transparent); }
.bd-day.on { background: var(--mc, #0cfc02); color: #111; box-shadow: 0 6px 18px color-mix(in srgb, var(--mc, #0cfc02) 45%, transparent); transform: scale(1.12); }
.bd-year { display: grid; gap: 6px; font-weight: 800; }
.bd-year small { color: var(--muted); font-weight: 600; }
.bd-year input { max-width: 180px; }
.bd-summary { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(244,114,182,.12), rgba(12,252,2,.06)); border: 1px solid rgba(244,114,182,.25); text-align: center; }
.bd-big { font-size: 24px; font-weight: 900; animation: bd-pop .4s var(--ease); }
.bd-warn { margin: 0; font-size: 13px; color: var(--muted); }
.bd-modal.saved .bd-summary { animation: bd-party .9s var(--ease); }
@keyframes bd-pop { from { opacity: 0; transform: translateY(8px) scale(.92); } }
@keyframes bd-wiggle { 30% { transform: scale(1.3) rotate(-12deg); } 60% { transform: scale(1.15) rotate(10deg); } }
@keyframes bd-party { 30% { transform: scale(1.06); box-shadow: 0 0 40px rgba(244,114,182,.5); } }
@media (prefers-reduced-motion: reduce) { .bd-month, .bd-day, .bd-big { animation: none !important; } }
