/* ============================================================
   RETROZIA PRESTIGES — DESIGN ENHANCEMENT LAYER
   Loaded after style.css to override and elevate visuals.
   Layout is preserved. Only aesthetics are upgraded.
   ============================================================ */

/* ── 1. VARIABLES ─────────────────────────────────────────── */
:root {
    --title-start: #ffffff;
    --text-soft: #cbd5e1;
    --on-surface: #fff;
    --on-accent: #fff;
    --panel: 10, 14, 26;
    --bg-dark: #060911;
    --bg-card: rgba(var(--panel), 0.78);
    --bg-card-hover: rgba(var(--panel), 0.94);
    --bg-modal: #0b0e1a;
    --border-color: rgba(var(--tint), 0.07);
    --border-glow: rgba(139, 92, 246, 0.35);

    --purple-main: var(--purple-deep);
    --purple-light: var(--purple-soft);
    --purple-dark: #6d28d9;
    --purple-glow: rgba(139, 92, 246, 0.42);

    --green-main: #10b981;
    --green-light: #34d399;
    --green-glow: rgba(16, 185, 129, 0.42);

    --gold: #f59e0b;
    --gold-light: #fcd34d;
    --gold-glow: rgba(245, 158, 11, 0.42);

    --cyan-main: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.38);

    --boss-red: #ef4444;
    --boss-red-glow: rgba(239, 68, 68, 0.35);

    --text-main: #eef2ff;
    --text-muted: #8896b3;
    --text-accent: var(--purple-pale);

    --glass-blur: blur(22px);
    --glass-bg: rgba(var(--panel), 0.82);
    --glass-border: 1px solid rgba(var(--tint), 0.07);

    --shadow-sm: 0 4px 16px rgba(var(--shade), 0.35);
    --shadow-card: 0 8px 32px rgba(var(--shade), 0.45), 0 0 0 1px rgba(var(--tint), 0.035);
    --shadow-hover: 0 20px 52px rgba(var(--shade), 0.6), 0 0 30px rgba(139, 92, 246, 0.14);
    --shadow-purple: 0 6px 24px rgba(139, 92, 246, 0.45);
    --shadow-green: 0 6px 24px rgba(16, 185, 129, 0.4);

    --font-heading: 'Cinzel', serif;
    --font-body: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    --font-mono: 'Space Grotesk', monospace;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-main: 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* ── THÈME CLAIR ──────────────────────────────────────────────
   Ce fichier est chargé APRÈS style.css et redéfinit ses variables : la palette
   claire doit donc être répétée ici, sinon les valeurs sombres ci-dessus
   l'emportent et seules les zones non couvertes par cette couche s'éclaircissent.
   ─────────────────────────────────────────────────────────── */
html[data-theme="light"] {
    --title-start: #1e1b4b;
    --text-soft: #334155;
    --on-surface: #0f172a;
    --on-accent: #fff;
    --panel: 255, 255, 255;
    --bg-dark: #eef2f7;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-card-hover: #ffffff;
    --bg-modal: #ffffff;
    --border-color: rgba(var(--tint), 0.13);
    --border-glow: rgba(109, 40, 217, 0.35);

    --purple-glow: rgba(109, 40, 217, 0.2);
    --green-glow: rgba(4, 120, 87, 0.2);
    --gold-light: #a16207;
    --gold-glow: rgba(180, 83, 9, 0.2);
    --cyan-main: #0e7490;
    --cyan-glow: rgba(14, 116, 144, 0.2);
    --boss-red-glow: rgba(185, 28, 28, 0.2);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-accent: var(--purple-deep);

    --glass-bg: rgba(255, 255, 255, 0.86);
    --glass-border: 1px solid rgba(var(--tint), 0.13);

    /* Les ombres portées d'un thème sombre écrasent un fond clair. */
    --shadow-sm: 0 2px 8px rgba(var(--shade), 0.12);
    --shadow-card: 0 4px 18px rgba(var(--shade), 0.14), 0 0 0 1px rgba(var(--tint), 0.05);
    --shadow-hover: 0 10px 30px rgba(var(--shade), 0.2), 0 0 20px rgba(109, 40, 217, 0.08);
    --shadow-purple: 0 4px 14px rgba(109, 40, 217, 0.25);
    --shadow-green: 0 4px 14px rgba(4, 120, 87, 0.22);
}

/* ── 2. BODY & BACKGROUND ─────────────────────────────────── */
body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Les dégradés passent sur le calque fixe (cf. body::after dans style.css) :
   en `background-attachment: fixed` sur le body, ils obligeaient à repeindre
   tout le viewport à chaque cran de molette. */
body::after {
    background-image:
        radial-gradient(ellipse 70% 60% at 8% 8%, rgba(139, 92, 246, 0.13) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 92% 18%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 55% 55% at 50% 95%, rgba(245, 158, 11, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 45% 40% at 82% 72%, rgba(6, 182, 212, 0.05) 0%, transparent 45%);
}

/* Noise texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* ── 3. TYPOGRAPHY ────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.01em;
}

.shopping-title-area h2,
.primo-banner-text h2,
.modal-title-text h2,
.guide-header h3,
.jetons-title h3,
.element-title h3,
.dofus-stats-title h3 {
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
}

/* Stat values use mono-style font */
.stat-info h3,
.res-progress-numbers,
.casse-restant-val,
.elem-pct {
    font-family: var(--font-mono);
}

/* ── 4. GLOWING BACKGROUND ORBS ──────────────────────────── */
.bg-glow-purple {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    filter: blur(120px);
    width: 700px;
    height: 700px;
}

.bg-glow-green {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.14) 0%, transparent 70%);
    filter: blur(120px);
}

/* ── 5. SIDEBAR / TOPBAR ──────────────────────────────────── */
/* Pas de backdrop-filter : le fond est opaque à 97 %, le flou derrière ne se
   voit pas (diff de pixels : écart maximum de 1/255). C'était pourtant le plus
   cher de la page — une barre fixe reflouté son arrière-plan à chaque image,
   puisque le contenu défile derrière elle. */
.topbar {
    background: rgba(var(--panel), 0.97);
    border-right: 1px solid rgba(139, 92, 246, 0.12);
    box-shadow:
        4px 0 48px rgba(var(--shade), 0.65),
        1px 0 0 rgba(139, 92, 246, 0.08),
        inset -1px 0 0 rgba(var(--tint), 0.03);
}

.topbar-right {
    border-top-color: rgba(139, 92, 246, 0.12);
}

.site-main-logo {
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6))
            drop-shadow(0 2px 4px rgba(var(--shade), 0.8));
}

.site-main-logo:hover {
    filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.85))
            drop-shadow(0 2px 4px rgba(var(--shade), 0.8));
}

/* ── 6. NAV TAB BUTTONS ───────────────────────────────────── */
.tab-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.86rem;
    border-radius: var(--radius-sm);
    color: rgba(136, 150, 179, 0.8);
    transition: all var(--transition-main);
    letter-spacing: 0.01em;
}

.tab-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    color: rgba(var(--tint), 0.9);
}

.tab-btn.active {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.95) 0%,
        rgba(109, 40, 217, 0.98) 100%);
    color: var(--on-surface);
    box-shadow:
        0 4px 20px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(var(--tint), 0.22),
        0 0 0 1px rgba(167, 139, 250, 0.25);
}

/* ── 7. TOPBAR UTILITY BUTTONS ────────────────────────────── */
.topbar-btn {
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.83rem;
    background: rgba(var(--tint), 0.035);
    border: 1px solid rgba(var(--tint), 0.07);
    color: var(--text-muted);
    letter-spacing: 0.01em;
    transition: all var(--transition-main);
}

.topbar-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--purple-pale);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
}

.auth-btn-login {
    font-family: var(--font-body);
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-dark));
    border-color: rgba(139, 92, 246, 0.45);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.38);
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all var(--transition-main);
}

.auth-btn-login:hover {
    background: linear-gradient(135deg, var(--purple-soft), var(--purple-deep));
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.58);
    transform: translateY(-2px);
}

/* ── 8. STAT OVERVIEW CARDS ───────────────────────────────── */
.stats-overview {
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(var(--tint), 0.06);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-main);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(139, 92, 246, 0.6) 40%,
        rgba(139, 92, 246, 0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-main);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.2);
    box-shadow: var(--shadow-hover);
    background: var(--bg-card-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-info .stat-label {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--title-start) 0%, var(--purple-pale) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Colored stat icons */
.stat-icon {
    border-radius: 16px;
    transition: all var(--transition-main);
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.purple-glow {
    background: rgba(139, 92, 246, 0.14);
    color: var(--purple-pale);
    border: 1px solid rgba(139, 92, 246, 0.28);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.18);
}

.green-glow {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.18);
}

.red-glow {
    background: rgba(239, 68, 68, 0.14);
    color: var(--red-pale);
    border: 1px solid rgba(239, 68, 68, 0.28);
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.18);
}

.gold-glow {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.18);
}

/* ── 9. FILTER BAR ────────────────────────────────────────── */
.filter-bar {
    background: rgba(var(--tint), 0.018);
    border: 1px solid rgba(var(--tint), 0.055);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(var(--shade), 0.25);
}

.search-box input {
    font-family: var(--font-body);
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.88rem;
    transition: all var(--transition-main);
}

.search-box input:focus {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.07);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12), 0 4px 20px rgba(139, 92, 246, 0.1);
}

.filter-tag {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-xs);
    transition: all var(--transition-main);
}

.filter-tag.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.88), rgba(109, 40, 217, 0.93));
    border-color: rgba(167, 139, 250, 0.45);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(var(--tint), 0.15);
}

.dofus-tag {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.83rem;
    border-radius: var(--radius-xs);
    transition: all var(--transition-main);
}

/* ── 10. ITEM CARDS ───────────────────────────────────────── */
.item-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--tint), 0.06);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-main);
    position: relative;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.8), rgba(16, 185, 129, 0.4), transparent);
    opacity: 0.4;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transition: opacity var(--transition-main);
}

.item-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(var(--tint), 0.025) 0%,
        transparent 50%,
        rgba(139, 92, 246, 0.02) 100%);
    border-radius: inherit;
    pointer-events: none;
}

.item-card:hover {
    transform: translateY(-7px);
    border-color: rgba(139, 92, 246, 0.22);
    box-shadow:
        0 24px 56px rgba(var(--shade), 0.55),
        0 0 32px rgba(139, 92, 246, 0.16),
        0 0 0 1px rgba(139, 92, 246, 0.12);
}

.item-card:hover::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--purple-soft), var(--green-light), transparent);
}

.item-card.crafted {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.04);
}

.item-card.crafted::before {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.9), rgba(6, 182, 212, 0.4), transparent);
    opacity: 0.7;
}

.item-slot-frame {
    border-radius: 18px;
    border-color: rgba(var(--tint), 0.12);
    background: rgba(var(--panel), 0.95);
    box-shadow: inset 0 0 24px rgba(var(--shade), 0.9), 0 4px 16px rgba(var(--shade), 0.4);
    transition: all var(--transition-main);
}

.item-slot-frame[style*="cursor: pointer"]:hover {
    border-color: var(--purple-soft) !important;
    box-shadow:
        0 0 24px rgba(139, 92, 246, 0.55),
        inset 0 0 12px rgba(139, 92, 246, 0.2) !important;
    transform: translateY(-2px) scale(1.06);
}

.item-title-box h3 {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ── 11. BUTTONS ──────────────────────────────────────────── */
.btn {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all var(--transition-main);
    border-radius: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple-dark) 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4), inset 0 1px 0 rgba(var(--tint), 0.15);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--purple-soft) 0%, var(--purple-deep) 100%);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.6), inset 0 1px 0 rgba(var(--tint), 0.2);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--green-main) 0%, var(--green-deep) 100%);
    border: 1px solid rgba(52, 211, 153, 0.3);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.38), inset 0 1px 0 rgba(var(--tint), 0.14);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green-main) 100%);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.55), inset 0 1px 0 rgba(var(--tint), 0.18);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.08);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(var(--tint), 0.1);
    border-color: rgba(var(--tint), 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--boss-red) 0%, #b91c1c 100%);
    border: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(var(--tint), 0.12);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--red-light) 0%, var(--boss-red) 100%);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.btn-card {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.83rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.07);
    transition: all var(--transition-main);
}

.btn-card:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.88), rgba(109, 40, 217, 0.93));
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.38), inset 0 1px 0 rgba(var(--tint), 0.15);
    transform: translateY(-2px);
}

.btn-icon {
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: var(--radius-sm);
    transition: all var(--transition-main);
}

.btn-icon:hover {
    background: rgba(var(--tint), 0.1);
    border-color: rgba(var(--tint), 0.18);
    transform: scale(1.05);
}

.btn-max {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.25);
    color: var(--purple-pale);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    border-radius: 7px;
    transition: all var(--transition-fast);
}

.btn-max:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* ── 12. PROGRESS BARS ────────────────────────────────────── */
.progress-bar-container {
    background: rgba(var(--tint), 0.05);
    border: 1px solid rgba(var(--tint), 0.08);
    border-radius: 999px;
    padding: 2px;
}

.progress-bar {
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--tint), 0.35), transparent);
    animation: shimmer 2.4s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

.fill-purple {
    background: linear-gradient(90deg, var(--purple-soft), var(--purple-deep), #7c3aed);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.7);
}

.fill-gold {
    background: linear-gradient(90deg, #fcd34d, var(--gold), #d97706);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.65);
}

.fill-success {
    background: linear-gradient(90deg, #6ee7b7, var(--green-light), var(--green-main));
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.65);
}

/* ── 13. RESOURCE ROWS ────────────────────────────────────── */
.resource-item-row {
    background: rgba(var(--tint), 0.022);
    border: 1px solid rgba(var(--tint), 0.06);
    border-left: 3px solid rgba(var(--tint), 0.06);
    border-radius: 14px;
    transition: all var(--transition-fast);
}

.resource-item-row:hover {
    background: rgba(var(--tint), 0.045);
    border-color: rgba(var(--tint), 0.12);
}

.resource-item-row.is-boss {
    border-left-color: rgba(239, 68, 68, 0.65);
    background: rgba(239, 68, 68, 0.028);
}

.resource-item-row.is-completed {
    border-left-color: rgba(16, 185, 129, 0.65);
    background: rgba(16, 185, 129, 0.035);
}

.res-progress-fill {
    background: linear-gradient(90deg, var(--purple-dark), var(--purple-deep), var(--purple-soft));
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-item-row.is-completed .res-progress-fill {
    background: linear-gradient(90deg, var(--green-deep), var(--green-main), var(--green-light));
}

/* Quantity controller */
.quantity-controller {
    background: rgba(var(--shade), 0.35);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: 9px;
}

.btn-qty:hover {
    background: rgba(139, 92, 246, 0.32);
    color: var(--purple-pale);
}

/* ── 14. MODALS ───────────────────────────────────────────── */
.modal-backdrop {
    background: rgba(var(--panel), 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.modal-content {
    background: var(--bg-modal);
    border: 1px solid rgba(139, 92, 246, 0.14);
    border-radius: var(--radius-xl);
    box-shadow:
        0 40px 80px -20px rgba(var(--shade), 0.9),
        0 0 0 1px rgba(var(--tint), 0.04),
        0 0 60px rgba(139, 92, 246, 0.1);
}

.modal-header {
    background: rgba(var(--shade), 0.25);
    border-bottom: 1px solid rgba(var(--tint), 0.06);
    padding: 1.75rem 2.25rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-footer {
    background: rgba(var(--shade), 0.22);
    border-top: 1px solid rgba(var(--tint), 0.06);
    padding: 1.5rem 2.25rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.modal-body {
    padding: 2.25rem;
}

.modal-title-text h2 {
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

/* Modal icon */
.modal-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.modal-icon.purple-glow {
    background: rgba(139, 92, 246, 0.16);
    color: var(--purple-pale);
    border: 1px solid rgba(139, 92, 246, 0.32);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.22);
}

/* Auth modal */
.auth-modal-content {
    background: rgba(var(--panel), 0.97);
    border: 1px solid rgba(139, 92, 246, 0.22);
    box-shadow:
        0 40px 80px -20px rgba(var(--shade), 0.95),
        0 0 60px rgba(139, 92, 246, 0.25);
}

.auth-tab-btn {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all var(--transition-main);
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-dark));
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(var(--tint), 0.15);
}

.btn-google-modal {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 14px;
    transition: all var(--transition-main);
    background: rgba(var(--tint), 0.045);
    border: 1px solid rgba(var(--tint), 0.1);
}

.btn-google-modal:hover {
    background: rgba(var(--tint), 0.1);
    border-color: rgba(var(--tint), 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(var(--tint), 0.08);
}

/* ── 15. FORM ELEMENTS ────────────────────────────────────── */
.form-group label {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    background: rgba(var(--shade), 0.55);
    border: 1px solid rgba(var(--tint), 0.1);
    border-radius: 13px;
    color: var(--text-main);
    font-size: 0.93rem;
    transition: all var(--transition-main);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14), 0 4px 20px rgba(139, 92, 246, 0.1);
    outline: none;
    background: rgba(139, 92, 246, 0.06);
}

.form-group select option {
    background: #0b0e1a;
    color: var(--on-surface);
}

textarea {
    font-family: var(--font-body);
    background: rgba(var(--shade), 0.55);
    border: 1px solid rgba(var(--tint), 0.1);
    border-radius: 13px;
    color: var(--text-main);
    width: 100%;
    padding: 0.85rem 1.1rem;
    font-size: 0.93rem;
    resize: vertical;
    outline: none;
    transition: all var(--transition-main);
}

textarea:focus {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
    background: rgba(139, 92, 246, 0.06);
}

.tier-pill {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--purple-pale);
    font-weight: 800;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
}

.jetons-header {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.22), rgba(244, 63, 94, 0.04));
    border-top: 3px solid rgba(236, 72, 153, 0.75);
    padding: 1.5rem 2rem;
}

.jetons-title h3 {
    font-weight: 800;
    letter-spacing: 0.04em;
}

.jetons-icon {
    color: #f472b6;
    filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.6));
}

/* ── 19. BADGES & PILLS ───────────────────────────────────── */
.prestige-pill {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    border-radius: var(--radius-xs);
    padding: 0.22rem 0.7rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--purple-pale);
    border: 1px solid rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.category-pill {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.78rem;
    border-radius: var(--radius-xs);
    background: rgba(var(--tint), 0.07);
    color: var(--text-muted);
}

.count-badge {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.82rem;
    background: rgba(139, 92, 246, 0.18);
    color: var(--purple-pale);
    border: 1px solid rgba(139, 92, 246, 0.32);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
    border-radius: 999px;
}

.badge-type {
    font-family: var(--font-body);
    font-weight: 700;
    background: rgba(var(--tint), 0.07);
    border-radius: var(--radius-xs);
}

.crafted-badge {
    font-family: var(--font-body);
    font-weight: 800;
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.res-consolidated-card {
    background: rgba(var(--tint), 0.028);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: 18px;
    transition: all var(--transition-main);
}

.res-consolidated-card:hover {
    border-color: rgba(var(--tint), 0.2);
    background: rgba(var(--tint), 0.065);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--shade), 0.25);
}

.res-consolidated-card.boss {
    border-left: 4px solid rgba(239, 68, 68, 0.8);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.07), rgba(var(--tint), 0.018));
}

.res-consolidated-card.completed {
    border-left: 4px solid rgba(16, 185, 129, 0.8);
    opacity: 0.8;
}

.btn-subfilter {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.87rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-main);
}

.btn-subfilter.active {
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-dark));
    color: var(--on-surface);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.4), inset 0 1px 0 rgba(var(--tint), 0.15);
}

/* ── 21. RELIQUES PAGE ────────────────────────────────────── */
.reliques-page-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.75rem 2rem;
    background: var(--glass-bg);
    border: 1px solid rgba(var(--tint), 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.reliques-page-header i {
    font-size: 2rem;
    color: #fcd34d;
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.7));
}

.reliques-page-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--title-start) 0%, #fcd34d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reliques-page-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ── 22. PERSONNAGES PAGE ─────────────────────────────────── */
.perso-list-header h2 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.perso-list-header p {
    color: var(--text-muted);
    font-size: 0.93rem;
}

/* ── 23. DOFUS STATS PANEL ────────────────────────────────── */
.dofus-stats-card {
    background: rgba(var(--panel), 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.dofus-stats-card::before {
    background: linear-gradient(90deg, var(--green-light), var(--purple-deep));
    height: 2px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dofus-stat-item {
    background: rgba(var(--tint), 0.028);
    border: 1px solid rgba(var(--tint), 0.04);
    border-radius: 13px;
    transition: all var(--transition-main);
}

.dofus-stat-item:hover {
    background: rgba(var(--tint), 0.065);
    border-color: rgba(var(--tint), 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--shade), 0.2);
}

.dofus-stat-value {
    font-family: var(--font-mono);
    font-size: 1.12rem;
    font-weight: 700;
}

.dofus-stat-name {
    font-family: var(--font-body);
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ── 24. ITEM PROGRESS CARD (modal) ───────────────────────── */
.item-progress-card {
    background: rgba(var(--tint), 0.02);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: 18px;
    box-shadow: inset 0 0 24px rgba(var(--shade), 0.3);
}

.progress-info {
    font-size: 1rem;
}

.progress-percent-glow {
    color: var(--purple-pale);
    font-weight: 800;
    font-family: var(--font-mono);
    text-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
}

/* ── 25. PRESTIGE BANNER ──────────────────────────────────── */
.prestige-actions-banner {
    background: rgba(var(--panel), 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 22px rgba(var(--shade), 0.22), 0 0 0 1px rgba(139, 92, 246, 0.07);
}

/* ── 26. TOAST ────────────────────────────────────────────── */
.toast {
    background: rgba(16, 185, 129, 0.96);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(var(--shade), 0.65), 0 0 24px rgba(16, 185, 129, 0.45);
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ── 27. FOOTER ───────────────────────────────────────────── */
.app-footer {
    border-top: 1px solid rgba(var(--tint), 0.04);
    margin-top: 50px;
    padding: 32px 20px 18px;
}

.app-footer p {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(var(--tint), 0.3);
    letter-spacing: 0.3px;
}

.app-footer strong {
    color: rgba(196, 181, 253, 0.75);
    font-weight: 700;
}

/* Soutien : un bouton, une phrase, rien qui s'impose pendant qu'on joue. */
.soutien {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.app-footer .soutien-texte {
    color: rgba(var(--tint), 0.55);
    font-size: 0.88rem;
    text-align: center;
    max-width: 520px;
}

.soutien-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0070ba, #1546a0);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 112, 186, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.soutien-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 112, 186, 0.45);
}

.soutien-btn i {
    color: #ffc439;
}

/* ── 28. SCROLLBAR ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(var(--tint), 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.35);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.6);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}

/* ── 29. PRIMO QTY CONTROLLER ─────────────────────────────── */
.primo-qty-ctrl {
    background: rgba(var(--shade), 0.5);
    border: 1px solid rgba(var(--tint), 0.1);
    border-radius: var(--radius-sm);
}

.primo-qty-ctrl button:hover {
    background: rgba(139, 92, 246, 0.32);
}

.primo-qty-ctrl input {
    font-family: var(--font-mono);
    font-weight: 800;
}

/* ── 30. SELECTION ────────────────────────────────────────── */
::selection {
    background: rgba(139, 92, 246, 0.35);
    color: var(--on-surface);
}

/* ── 31. MINI RES TAGS ────────────────────────────────────── */
.mini-res-tag {
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.07);
    transition: all var(--transition-fast);
}

.mini-res-tag.completed {
    background: rgba(16, 185, 129, 0.13);
    border-color: rgba(16, 185, 129, 0.28);
    color: #6ee7b7;
}

/* ── 32. USER PROFILE WIDGET ──────────────────────────────── */
.user-profile {
    background: rgba(var(--tint), 0.03);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: 14px;
}

.user-avatar {
    border: 2px solid rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.4);
}

.user-name {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.83rem;
}

.sync-status {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ── 33. GROUP MODAL ──────────────────────────────────────── */
.btn-group-header {
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm) !important;
    transition: all var(--transition-main) !important;
}

.group-code-value {
    font-family: var(--font-mono);
    font-weight: 900;
    letter-spacing: 0.08em;
}

/* ── 34. ITEM SLOT BIG (modal) ────────────────────────────── */
.item-slot-big {
    border-radius: 22px;
    border: 2px solid rgba(167, 139, 250, 0.55);
    background: rgba(var(--panel), 0.98);
    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.4),
        inset 0 0 24px rgba(var(--shade), 0.85);
}

.item-slot-big i {
    color: var(--purple-pale);
}

/* ── 36. PROSPECTION CALCULATOR ───────────────────────────── */
.prosp-calculator {
    background: rgba(var(--tint), 0.02);
    border: 1px solid rgba(var(--tint), 0.07);
    border-radius: 20px;
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.prosp-calc-header {
    font-family: var(--font-body);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.prosp-diff-btn {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.82rem;
}

.prosp-diff-btn.active {
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-dark));
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

/* ── 37. EMPTY STATE ──────────────────────────────────────── */
.empty-state {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(var(--tint), 0.055);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.empty-icon-box {
    border-radius: 26px;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.18);
    color: var(--purple-pale);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.12);
}

.empty-state h3 {
    font-weight: 900;
    letter-spacing: -0.01em;
}

/* ── 38. ITEM CARD SLOT FRAME (crafted state) ─────────────── */
.item-card.crafted .item-slot-frame {
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), inset 0 0 12px rgba(16, 185, 129, 0.1);
}

/* ── 39. RESOURCES BUILDER ────────────────────────────────── */
.resources-builder {
    background: rgba(var(--tint), 0.018);
    border: 1px solid rgba(var(--tint), 0.08);
    border-radius: 18px;
    box-shadow: inset 0 0 24px rgba(var(--shade), 0.25);
}

.res-edit-row {
    background: rgba(var(--shade), 0.38);
    border: 1px solid rgba(var(--tint), 0.08);
    border-radius: 14px;
}

/* ── 40. FILE LABEL ───────────────────────────────────────── */
.file-label {
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--purple-deep), var(--purple-dark));
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.38);
    transition: all var(--transition-main);
}

.file-label:hover {
    background: linear-gradient(135deg, var(--purple-soft), var(--purple-deep));
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

/* ──────────────────────────────────────────────────────────────────
   PERF — smoother scrolling (targets ~60fps)

   `backdrop-filter: blur()` forces the browser to re-rasterise the
   blurred region behind an element on every paint. On the cards — dozens
   on screen, all repainting while you scroll — it was the main cause of
   the framerate drop. The panels already sit at ~0.82+ alpha so the live
   blur was barely visible; we drop it and lean on a near-opaque
   background to keep the same glass look. The shimmer sweep on every
   progress bar is also an always-on animation × dozens of cards, so we
   stop it (the gradient fill stays).
   ────────────────────────────────────────────────────────────────── */
.item-card,
.stat-card,
.primo-element-card,
.dofus-stats-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
.item-card {
    background: rgba(var(--panel), 0.94);
    /* was `transition: all` — only animate what changes on hover */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.progress-bar::after,
.elem-bar::after {
    display: none;
}

/* ── OÙ FARMER ────────────────────────────────────────────────
   Le plan de farm : ce qui manque, regroupé par boss. Volontairement dense —
   c'est une liste qu'on parcourt des yeux avant de se connecter au jeu, pas
   une page à contempler. */
.farm-container { padding-bottom: 2rem; }

.farm-head { margin-bottom: 1.4rem; }
.farm-head h2 {
    margin: 0 0 0.25rem;
    font-family: var(--font-heading, inherit);
    font-size: 1.5rem;
    display: flex; align-items: center; gap: 0.6rem;
}
.farm-head h2 i { color: var(--purple-main); }
.farm-head p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.farm-block { margin-bottom: 1.8rem; }
.farm-block h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.farm-block h3 i { color: var(--green-main); font-size: 0.9rem; }
.farm-sub { margin: 0 0 0.7rem; color: var(--text-muted); font-size: 0.8rem; }

.farm-list, .farm-almost-list {
    display: flex; flex-direction: column; gap: 4px;
}

.farm-row {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 0.55rem 0.9rem;
    background: rgba(var(--tint), 0.025);
    border: 1px solid rgba(var(--tint), 0.05);
    border-radius: 10px;
    transition: background 0.15s, border-color 0.15s;
}
.farm-row:hover { background: rgba(168, 85, 247, 0.07); border-color: rgba(168, 85, 247, 0.25); }
.farm-rank {
    flex: none; width: 1.6rem; text-align: right;
    color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 0.85rem;
}
.farm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.farm-boss { font-weight: 600; font-size: 0.92rem; }
.farm-for {
    color: var(--text-muted); font-size: 0.76rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.farm-count {
    flex: none; font-variant-numeric: tabular-nums; font-weight: 700;
    color: var(--purple-light); font-size: 1rem;
}
.farm-count em { font-style: normal; font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }

.farm-almost {
    display: flex; align-items: baseline; gap: 0.8rem;
    padding: 0.45rem 0.9rem;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
}
.farm-almost-name { font-weight: 600; font-size: 0.88rem; flex: none; }
.farm-almost-need {
    color: var(--text-muted); font-size: 0.78rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.farm-empty {
    text-align: center; padding: 4rem 1rem; color: var(--text-muted);
}
.farm-empty i { font-size: 2.4rem; color: var(--gold); margin-bottom: 0.8rem; display: block; }
.farm-empty h3 { margin: 0 0 0.4rem; color: var(--text-main); }
.farm-empty p { margin: 0 auto; max-width: 38rem; font-size: 0.88rem; }

@media (max-width: 720px) {
    .farm-row { gap: 0.5rem; padding: 0.5rem 0.6rem; }
    .farm-for { display: none; }
    .farm-almost { flex-direction: column; gap: 2px; }
    .farm-almost-need { white-space: normal; }
}
.farm-aside { display: block; margin-top: 2px; font-size: 0.78rem; opacity: 0.75; }

/* ── 30. DOFUS DE L'ASCENSION ─────────────────────────────── */
.ascension-container { padding-bottom: 2rem; }

.ascension-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    background: var(--glass-bg);
    border: 1px solid rgba(var(--tint), 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}
.ascension-header-img {
    width: 56px;
    height: 56px;
    flex: none;
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.55));
}
.ascension-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--title-start) 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ascension-header p { font-size: 0.95rem; color: var(--text-muted); }

.ascension-explication,
.ascension-suivi,
.ascension-reference {
    background: var(--glass-bg);
    border: 1px solid rgba(var(--tint), 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
}
.ascension-explication h3,
.ascension-suivi h3,
.ascension-reference h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.ascension-explication h3 i,
.ascension-suivi h3 i,
.ascension-reference h3 i { color: var(--purple-light); }

.ascension-etapes { margin: 0.75rem 0 1rem 1.15rem; display: grid; gap: 0.5rem; }
.ascension-etapes li { font-size: 0.92rem; color: var(--text-muted); line-height: 1.5; }
.ascension-etapes strong { color: var(--text); }

.ascension-piege {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem 1.1rem;
    border-radius: var(--r-sm, 10px);
    background: rgba(245, 158, 11, 0.09);
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
}
.ascension-piege i { color: var(--gold-light); margin-top: 2px; flex: none; }
.ascension-piege strong { color: var(--text); }

.ascension-chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    margin-top: 1.15rem;
}
.ascension-chiffre {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.9rem 1.1rem;
    border-radius: var(--r-sm, 10px);
    background: rgba(var(--tint), 0.04);
    border: 1px solid rgba(var(--tint), 0.07);
}
.ascension-chiffre-val { font-size: 1.5rem; font-weight: 900; color: var(--purple-light); }
.ascension-chiffre-nom { font-size: 0.85rem; font-weight: 700; }
.ascension-chiffre-sous { font-size: 0.78rem; color: var(--text-muted); }

.ascension-aide { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; }

.ascension-total { margin-bottom: 1.25rem; }
.ascension-total p { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }
.ascension-total strong { color: var(--text); }
.asc-total-barre, .asc-barre {
    height: 8px;
    border-radius: 99px;
    background: rgba(var(--tint), 0.09);
    overflow: hidden;
}
.asc-total-barre span, .asc-barre span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #8b5cf6, #c084fc);
}

/* Les tableaux débordent sur mobile : ils défilent dans leur cadre, la page
   elle-même ne part jamais de travers. */
.ascension-table-wrap { overflow-x: auto; }
.ascension-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
.ascension-table th {
    text-align: left;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(var(--tint), 0.09);
    white-space: nowrap;
}
.ascension-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid rgba(var(--tint), 0.05);
    vertical-align: middle;
}
.asc-stat { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; white-space: nowrap; }
.asc-stat-img { width: 22px; height: 22px; flex: none; }
.asc-saisie { white-space: nowrap; }
.asc-saisie input {
    width: 84px;
    padding: 4px 7px;
    border-radius: 8px;
    border: 1px solid rgba(var(--tint), 0.14);
    background: rgba(var(--tint), 0.04);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
}
.asc-sur { color: var(--text-muted); margin-left: 6px; font-size: 0.82rem; }
.asc-barre-cell { min-width: 140px; }
.asc-pct { font-size: 0.76rem; color: var(--text-muted); }
.asc-palier { color: var(--text-muted); white-space: nowrap; }
.asc-fini { color: var(--leaf, #5db850); font-weight: 700; }
.asc-cout { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ascension-table th.asc-num { text-align: right; }
.asc-max { font-weight: 600; }
.asc-jeton-mini { width: 18px; height: 18px; vertical-align: -4px; margin-right: 5px; }

.asc-ref-ligne { cursor: pointer; }
.asc-ref-ligne:hover { background: rgba(var(--tint), 0.04); }
.asc-ref-ligne.ouverte { background: rgba(139, 92, 246, 0.09); }
.asc-ref-palier { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; white-space: nowrap; }
.asc-jeton-img { width: 24px; height: 24px; flex: none; }
.asc-ref-jeton { color: var(--text-muted); white-space: nowrap; }
.asc-ref-cout { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.asc-ref-chevron { text-align: right; color: var(--text-muted); width: 30px; }
.asc-ref-detail > td { padding: 0 0 0.9rem 0; }
.asc-detail-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.asc-detail-table th {
    text-align: left;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
}
.asc-detail-table td { padding: 0.35rem 0.6rem; border-bottom: 1px solid rgba(var(--tint), 0.04); }
.asc-detail-table td:first-child { display: flex; align-items: center; gap: 0.5rem; }
.asc-detail-table td:last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.ascension-vide { padding: 3rem; text-align: center; color: var(--text-muted); }

@media (max-width: 640px) {
    .ascension-header { padding: 1.15rem 1.15rem; gap: 0.9rem; }
    .ascension-header h2 { font-size: 1.5rem; }
    .ascension-explication, .ascension-suivi, .ascension-reference { padding: 1.15rem; }
}

/* La phrase d'avertissement est un seul bloc : sans ce span, le <strong> et le
   reste du texte devenaient deux colonnes du flex parent. */
.ascension-piege > span { flex: 1; }

/* Barre et pourcentage sur la même ligne, sinon le « 0 % » tombe sous la barre
   et décale la hauteur de chaque ligne du tableau. */
.asc-barre-cell { display: flex; align-items: center; gap: 0.6rem; }
.asc-barre-cell .asc-barre { flex: 1; min-width: 80px; }
.asc-pct { flex: none; width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* Les étages de la Tour, sous le nom du jeton. */
.asc-etages { display: block; font-size: 0.76rem; opacity: 0.7; margin-top: 1px; }

/* Dévoreuse de Cartes : son propre onglet, même gabarit que l'Ascension mais
   en rose, pour qu'on voie d'un coup d'œil qu'on a changé d'objet. */
.devoreuse-container { padding-bottom: 2rem; }
.dev-header h2 { background: linear-gradient(135deg, var(--title-start) 0%, #f472b6 100%); -webkit-background-clip: text; background-clip: text; }
.dev-header .ascension-header-img { filter: drop-shadow(0 0 14px rgba(244, 114, 182, 0.5)); }

/* Relique Stadium : même gabarit que l'Ascension, teinte cyan (couleur de la
   relique), et un sélecteur de difficulté au lieu des saisies par stat. */
.stadium-container { padding-bottom: 2rem; }
.stadium-container .ascension-header h2 { background: linear-gradient(135deg, var(--title-start) 0%, #38bdf8 100%); -webkit-background-clip: text; background-clip: text; }
.stadium-container .ascension-header-img { filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.5)); }
.stadium-container .asc-ref-reste { color: #38bdf8; }

/* Le renvoi d'un onglet vers l'autre, en bas de l'explication. */
.dev-lien { margin-top: 1rem; }
.dev-lien a { color: var(--purple-light, #c084fc); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.dev-lien a:hover { opacity: 0.8; }

/* Ce qu'il reste à payer (idée de Sakr, 14 septembre 2026) : la quantité sous
   le coût du palier en cours, et la colonne « Il te reste » des paliers. */
.asc-sous { display: block; font-size: 0.74rem; font-weight: 600; color: var(--text-muted); margin-top: 1px; }
.asc-ref-reste { color: var(--purple-light, #c084fc); white-space: nowrap; }
.dev-reference .asc-ref-reste { color: #f472b6; }
.asc-detail-table .asc-num { text-align: right; }
.asc-detail-table td.asc-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.asc-ref-total td {
    border-top: 1px solid rgba(var(--tint), 0.12);
    border-bottom: none;
    padding-top: 0.7rem;
    font-weight: 800;
}
/* Sur téléphone, « Il te reste » doit tenir à l'écran sans faire défiler le
   tableau. Ce qui laisse sa place : le nom du jeton, qui répète celui du
   palier (« Ascenton Novice » à côté de « Novice »), le total des cartes, que
   « Il te reste » redonne, et dans le détail le prix et le coût du palier. */
@media (max-width: 640px) {
    .asc-ref { min-width: 0; }
    .asc-ref .asc-ref-jeton, .asc-ref .asc-mobile-cache { display: none; }
    .asc-ref th, .asc-ref td { padding-left: 0.35rem; padding-right: 0.35rem; }
}


/* ── Personnages : lien avec la collection, reliques évolutives, récap ──── */
.perso-lien-bandeau {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.6rem 0.8rem;
    margin: 0 0 0.8rem;
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    background: rgba(var(--tint), 0.03);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.perso-lien-bandeau span { flex: 1; min-width: 200px; }
.perso-lien-bandeau.lie {
    border-style: solid;
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.07);
    color: var(--text-primary);
}
.perso-lien-bandeau.lie i { color: #4ade80; }

.perso-reliq-evo { flex-wrap: wrap; }
.perso-evo-champs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.35rem;
    flex: 1 1 100%;
    padding-left: calc(32px + 0.6rem);
}
.perso-evo-champ {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.perso-evo-champ input,
.relique-evo-champ input {
    width: 70px;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(var(--tint), 0.05);
    color: var(--text-primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.perso-evo-onglet {
    padding: 4px 9px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--purple-light);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
}
.perso-evo-onglet:hover { border-color: var(--purple-main); }
.relique-evo-champ { display: inline-flex; align-items: center; gap: 6px; }
.relique-evo-champ input { width: 64px; }
.relique-evo-lien { color: var(--purple-light); font-weight: 600; }

.perso-recap-tete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}
.perso-recap-tete h3 { margin: 0; }
.perso-dofus-scope { display: inline-flex; gap: 4px; }
.perso-recap-vide { margin: 0; font-size: 0.82rem; color: var(--text-muted); }


/* ── Onglet Dofus : poser un Dofus dans le stuff du Book ─────────────────── */
.item-footer:has(.btn-porter) { display: flex; gap: 0.5rem; }
.item-footer:has(.btn-porter) .btn-card { flex: 1; }
.item-footer .btn-porter { flex: 0 0 auto; width: auto; white-space: nowrap; }
.item-footer .btn-porter.on {
    border-color: rgba(74, 222, 128, 0.55);
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}
