:root {
    --bg-dark: #0a0c12;
    --bg-card: rgba(19, 23, 34, 0.75);
    --bg-card-hover: rgba(28, 34, 50, 0.9);
    --bg-modal: #121622;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(168, 85, 247, 0.3);
    --purple-main: #a855f7;
    --purple-light: #c084fc;
    --purple-glow: rgba(168, 85, 247, 0.35);
    --green-main: #10b981;
    --green-light: #34d399;
    --green-glow: rgba(16, 185, 129, 0.35);
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-glow: rgba(245, 158, 11, 0.35);
    --boss-red: #ef4444;
    --boss-red-glow: rgba(239, 68, 68, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --p1-color: #38bdf8;
    --p2-color: #a855f7;
    --p3-color: #f59e0b;
    --p4-color: #ec4899;
    --p5-color: #ef4444;
    --glass-blur: blur(16px);
    --glass-bg: rgba(15, 19, 29, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    background-image:
        radial-gradient(at 15% 20%, rgba(168, 85, 247, 0.08) 0px, transparent 55%),
        radial-gradient(at 85% 15%, rgba(16, 185, 129, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 85%, rgba(245, 158, 11, 0.06) 0px, transparent 55%);
    background-attachment: fixed;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-purple {
    top: -120px;
    left: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-glow-green {
    top: 35%;
    right: -150px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
}

.app-container {
    max-width: none;
    margin: 0 0 0 var(--sidebar-w);
    padding: 1.5rem 2rem 3rem;
    position: relative;
    z-index: 1;
}

.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(12px);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.4);
    z-index: 9999;
    font-weight: 600;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

.toast-icon {
    font-size: 1.25rem;
}

/* =========================================================
   TOPBAR — Header sticky 3-colonnes premium
   ========================================================= */
/* ===== SIDEBAR ===== */
:root { --sidebar-w: 220px; }

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1.25rem 0.85rem 1.25rem;
    background: rgba(9, 12, 20, 0.92);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.topbar-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}

.site-main-logo {
    max-height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.site-main-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.7));
}

.topbar-nav {
    flex: 1;
    display: block;
    overflow: visible;
    min-width: 0;
}

.topbar-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

/* Bouton utilitaire topbar (Sauvegardes, Groupe) */
.topbar-btn {
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    width: 100%;
}

.topbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.topbar-btn i {
    font-size: 0.85rem;
}

.topbar-btn-label {
    font-size: 0.82rem;
}

/* Bouton connexion */
.auth-btn-login {
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(135deg, var(--purple-main), #7c3aed);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    color: white;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
    width: 100%;
    white-space: nowrap;
}

.auth-btn-login:hover {
    background: linear-gradient(135deg, var(--purple-light), var(--purple-main));
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

/* Bouton déconnexion */
.logout-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
}

/* User profile widget */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.4rem 0.6rem 0.4rem 0.45rem;
    width: 100%;
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--purple-main);
    object-fit: cover;
    box-shadow: 0 0 10px var(--purple-glow);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-status {
    font-size: 0.72rem;
    color: var(--green-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sync-dot {
    font-size: 0.45rem;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Auth container */
.auth-widget {
    display: flex;
    align-items: center;
}

.btn {
    font-family: var(--font-body);
    padding: 0.8rem 1.6rem;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-main), #7e22ce);
    color: white;
    box-shadow: 0 6px 20px var(--purple-glow);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.6);
    background: linear-gradient(135deg, var(--purple-light), var(--purple-main));
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, var(--green-main), #059669);
    color: white;
    box-shadow: 0 6px 20px var(--green-glow);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-edit-item:hover {
    color: #38bdf8;
    border-color: #38bdf8;
}

.btn-delete-item:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(15, 19, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 1.4rem 1.6rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.purple-glow {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.green-glow {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.red-glow {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.gold-glow {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.stat-info {
    min-width: 0;
    flex: 1;
}

.stat-info .stat-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    display: block;
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info h3 {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}



/* Navigation tabs pill */
.prestige-tabs {
    display: flex;
    flex-direction: column;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    gap: 2px;
    box-shadow: none;
}

.mode-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 0.75rem;
    background: transparent;
    border: none;
    color: rgba(148, 163, 184, 0.7);
    border-radius: 11px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    text-align: left;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-btn .tab-label {
    font-size: 0.88rem;
    display: block;
}

.tab-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(109, 40, 217, 0.95));
    color: white;
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

.prestige-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.tab-icon-img-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    transition: box-shadow 0.22s ease;
}

.tab-btn.active .tab-icon-img-wrap,
.tab-btn:hover .tab-icon-img-wrap {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.4);
}

.tab-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
}

.badge-p0 {
    background: rgba(52, 211, 153, 0.15);
    color: var(--green-light);
}

.badge-prest {
    background: rgba(56, 189, 248, 0.15);
    color: var(--p1-color);
}

.badge-primo {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold-light);
}

/* Legacy badge classes kept for compatibility */
.badge-p1 { background: rgba(56, 189, 248, 0.2); color: var(--p1-color); }
.badge-p2 { background: rgba(168, 85, 247, 0.2); color: var(--p2-color); }
.badge-p3 { background: rgba(245, 158, 11, 0.2); color: var(--p3-color); }
.badge-p4 { background: rgba(236, 72, 153, 0.2); color: var(--p4-color); }
.badge-p5 { background: rgba(239, 68, 68, 0.2); color: var(--p5-color); }

/* =========================================================
   FILTER BAR
   ========================================================= */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 340px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.6rem 0.9rem 0.6rem 2.6rem;
    border-radius: 12px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.22s;
}

.search-box input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.search-box input:focus {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.06);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.filter-divider {
    width: 1px;
    height: 26px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.filter-options {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
}

.filter-tag {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-tag:hover {
    color: white;
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-tag.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.85), rgba(109, 40, 217, 0.9));
    color: white;
    border-color: rgba(192, 132, 252, 0.4);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.3);
}

.dofus-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.4rem 0.6rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}

.dofus-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dofus-tag:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.dofus-tag[data-dofus-filter="all"].active {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: white;
    border-color: #c084fc;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.dofus-tag[data-dofus-filter="P0"].active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #34d399;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.dofus-tag[data-dofus-filter="P1"].active {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: white;
    border-color: #7dd3fc;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.dofus-tag[data-dofus-filter="P2"].active {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: white;
    border-color: #c084fc;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.dofus-tag[data-dofus-filter="P3"].active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #fbbf24;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.dofus-tag[data-dofus-filter="P4"].active {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    border-color: #f472b6;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.dofus-tag[data-dofus-filter="P5"].active {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    border-color: #f87171;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.item-slot-frame {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: rgba(10, 14, 23, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.item-slot-frame[style*="cursor: pointer"]:hover {
    border-color: #a855f7 !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5), inset 0 0 10px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.item-slot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    transition: transform 0.3s ease;
}

.item-card:hover .item-slot-img {
    transform: scale(1.1);
}

.slot-fallback-icon {
    font-size: 2.2rem;
    color: var(--purple-light);
    opacity: 0.8;
}

.item-slot-big {
    width: 88px;
    height: 88px;
    border-radius: 20px;
    background: rgba(10, 14, 23, 0.95);
    border: 2px solid var(--purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 25px var(--purple-glow), inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.item-slot-big img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.item-slot-big i {
    font-size: 2.8rem;
    color: var(--purple-light);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.75rem;
}

.item-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 1.75rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-main), transparent);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.item-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--purple-glow);
}

.item-card:hover::before {
    opacity: 1;
    background: linear-gradient(90deg, var(--purple-light), var(--green-light));
}

.item-card.crafted {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.05);
}

.item-card.crafted::before {
    background: linear-gradient(90deg, var(--green-main), transparent);
}

.item-card.crafted .item-slot-frame {
    border-color: var(--green-main);
    box-shadow: 0 0 15px var(--green-glow);
}

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.item-title-box {
    flex-grow: 1;
}

.item-title-box h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    line-height: 1.25;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge-type {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.crafted-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.item-progress {
    margin-bottom: 1.5rem;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-percent {
    font-weight: 800;
    color: white;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-purple {
    background: linear-gradient(90deg, #c084fc, #9333ea);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
}

.fill-gold {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.fill-success {
    background: linear-gradient(90deg, #34d399, #10b981);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.item-footer {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.btn-card {
    flex: 1;
    padding: 0.7rem;
    border-radius: 11px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.btn-card:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.85), rgba(109, 40, 217, 0.9));
    color: white;
    border-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}

/* =========================================================
   MINI RESOURCE PREVIEW TAGS on item cards
   ========================================================= */
.mini-res-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.mini-res-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(148, 163, 184, 0.9);
    padding: 0.25rem 0.6rem;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.mini-res-tag.completed {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

/* =========================================================
   PRESTIGE ACTIONS BANNER
   ========================================================= */
.prestige-actions-banner {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: 16px;
    padding: 0.85rem 1.25rem;
}

.prestige-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 1rem;
    flex-wrap: wrap;
}

.prestige-banner-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(192, 132, 252, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prestige-banner-title i {
    color: var(--gold-light);
}

.prestige-banner-buttons {
    display: flex;
    gap: 0.6rem;
}

/* =========================================================
   GROUPE BUTTON (header)
   ========================================================= */
.btn-group-header {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
}

.btn-group-header:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #6ee7b7 !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }

    .topbar {
        position: sticky;
        top: 0;
        left: unset;
        height: auto;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        padding: 0.65rem 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        overflow: visible;
        margin-bottom: 1.25rem;
        border-radius: 0 0 16px 16px;
    }

    .topbar-left {
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 0;
    }

    .topbar-nav {
        flex: 1;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .topbar-nav::-webkit-scrollbar { display: none; }

    .prestige-tabs {
        flex-direction: row;
        background: rgba(0,0,0,0.4);
        border: 1px solid rgba(255,255,255,0.07);
        padding: 4px;
        border-radius: 14px;
        gap: 2px;
    }

    .tab-btn {
        width: auto;
        flex-direction: row;
    }

    .tab-btn .tab-label {
        display: none;
    }

    .topbar-right {
        flex-direction: row;
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        gap: 0.4rem;
    }

    .topbar-btn {
        width: auto;
    }

    .auth-btn-login {
        width: auto;
    }

    .user-profile {
        width: auto;
    }

    .topbar-btn-label {
        display: none;
    }

    .app-container {
        margin-left: 0;
        padding: 0.75rem 1rem 2rem;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .topbar {
        padding: 0.75rem 1rem;
    }

    .stats-overview {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-info h3 {
        font-size: 1.3rem;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .filter-options {
        margin-left: 0;
        justify-content: center;
    }
}

.empty-state {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    border: var(--glass-border);
}

.empty-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--purple-light);
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.empty-state h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.shopping-view {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.shopping-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.75rem;
}

.shopping-title-area h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.shopping-title-area p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.shopping-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-subfilter {
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-subfilter:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.btn-subfilter.active {
    background: var(--purple-main);
    color: white;
    border-color: var(--purple-light);
    box-shadow: 0 0 20px var(--purple-glow);
}

.boss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--boss-red);
    box-shadow: 0 0 8px var(--boss-red);
}

.shopping-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
}

.res-consolidated-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: all 0.2s;
}

.res-consolidated-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}

.res-consolidated-card.boss {
    border-left: 4px solid var(--boss-red);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.02));
}

.res-consolidated-card.completed {
    border-left: 4px solid var(--green-main);
    opacity: 0.75;
}

.res-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.res-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--purple-light);
}

.res-consolidated-card.boss .res-icon {
    color: var(--boss-red);
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.res-name-area h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.zone-tag {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.18rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.boss-badge { display: none; }

.res-progress {
    text-align: right;
}

.res-progress-numbers {
    font-size: 1.25rem;
    font-weight: 800;
}

.res-progress-numbers .current {
    color: var(--purple-light);
}

.res-progress-numbers .req {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(12px);
}

.modal-content {
    background: var(--bg-modal);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(168, 85, 247, 0.2);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-detail-modal {
    max-width: 1050px;
}

.add-item-modal {
    max-width: 900px;
}

.db-modal {
    max-width: 650px;
}

.modal-header {
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.modal-title-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.modal-title-text h2 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 900;
    margin-top: 0.3rem;
}

.prestige-tag-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.prestige-pill {
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple-light);
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.category-pill {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
}

.modal-header-btns {
    display: flex;
    gap: 0.6rem;
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
}

.item-progress-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.75rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.progress-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-reset:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.resources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.resources-header h3 {
    font-size: 1.4rem;
    font-weight: 800;
}

.count-badge {
    background: rgba(168, 85, 247, 0.2);
    color: var(--purple-light);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ---- Resource cards ---- */
.resources-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.resource-item-row {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-left: 3px solid rgba(255, 255, 255, 0.07);
    border-radius: 13px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.15s, border-color 0.15s;
}

.resource-item-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.13);
}

.resource-item-row.is-boss {
    border-left: 3px solid rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.025);
}

.resource-item-row.is-completed {
    border-left: 3px solid rgba(16, 185, 129, 0.6);
    background: rgba(16, 185, 129, 0.035);
    border-color: rgba(16, 185, 129, 0.17);
}

.res-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
}

.res-row-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.res-row-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a78bfa;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.resource-item-row.is-boss .res-row-icon {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #f87171;
}

.resource-item-row.is-completed .res-row-icon {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
    color: #34d399;
}

.res-row-title {
    min-width: 0;
    overflow: hidden;
}

.res-row-title h4 {
    font-size: 0.86rem;
    font-weight: 700;
    margin: 0 0 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.3;
    color: var(--text-main);
}

.res-row-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Thin progress bar at the bottom of each card */
.res-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
}
.res-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6d28d9, #a855f7);
    transition: width 0.3s ease;
}
.resource-item-row.is-completed .res-progress-fill {
    background: linear-gradient(90deg, #059669, #10b981);
}

/* Quantity controller */
.quantity-controller {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px;
    border-radius: 8px;
    flex-shrink: 0;
}

.btn-qty {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-family: var(--font-body);
}

.btn-qty:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #e9d5ff;
}

.input-qty {
    width: 36px;
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-weight: 800;
    font-size: 0.82rem;
    outline: none;
    font-family: var(--font-body);
}

.btn-max {
    background: rgba(168, 85, 247, 0.1);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.2);
    padding: 0.28rem 0.65rem;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-max:hover {
    background: rgba(168, 85, 247, 0.22);
    border-color: rgba(168, 85, 247, 0.45);
    color: #ede9fe;
}

.btn-min {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.28rem 0.65rem;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-min:hover {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.45);
    color: #f1f5f9;
}

.res-name-copy {
    cursor: pointer;
    transition: color 0.15s;
}

.res-name-copy:hover {
    color: #c4b5fd;
}

.modal-footer {
    padding: 1.75rem 2.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.25);
}

.form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.col-4 {
    flex: 4;
}

.col-2 {
    flex: 2;
}

.col-3 {
    flex: 3;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.9rem 1.15rem;
    border-radius: 14px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 15px var(--purple-glow);
}

.form-group select option {
    background: #121622;
    color: white;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 1.15rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.input-with-icon input {
    width: 100%;
    padding-left: 3rem;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.mb-4 {
    margin-bottom: 1.75rem;
}

.resources-builder {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.75rem;
    margin-bottom: 2.5rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.25rem;
}

.builder-title h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.builder-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.resource-rows {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.res-edit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1.15rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.res-edit-row input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: white;
    font-family: var(--font-body);
}

.res-input-name {
    flex: 2;
}

.res-input-zone {
    flex: 2;
}

.res-input-req {
    width: 100px;
    text-align: center;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    font-weight: 700;
    font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
    accent-color: var(--boss-red);
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.db-section {
    padding: 0.75rem 0;
}

.db-section h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.db-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.separator {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 1.75rem 0;
}

.import-file-box {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.file-input {
    display: none;
}

.file-label {
    padding: 0.8rem 1.5rem;
    background: var(--purple-main);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--purple-glow);
}

.file-label:hover {
    background: var(--purple-light);
    transform: translateY(-1px);
}

.file-name {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.danger-zone h3 {
    color: #ef4444;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes floatLeaf {
    0% {
        transform: translateY(0px) rotate(-5deg);
    }

    100% {
        transform: translateY(-5px) rotate(10deg);
    }
}

@media (max-width: 900px) {
    .res-edit-row {
        flex-wrap: wrap;
    }

    .res-input-name,
    .res-input-zone {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

.mini-res-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-res-tag {
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
}

.mini-res-tag:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mini-res-tag.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mini-res-tag strong {
    color: #fff;
    font-weight: 700;
}

.mini-res-tag.completed strong {
    color: #10b981;
}

.req-pill {
    font-size: 0.62rem;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.13);
    color: #c4b5fd;
    padding: 1px 6px;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

.res-progress-fraction {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.38);
    white-space: nowrap;
    min-width: 38px;
    text-align: right;
}

.resource-item-row.is-completed .res-progress-fraction {
    color: #34d399;
}

/* BOUCLIER PRIMORDIAL STYLES */
.badge-primo {
    background: linear-gradient(135deg, #f59e0b, #ef4444, #a855f7, #38bdf8);
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.primo-header-banner {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 28px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(168, 85, 247, 0.1);
    position: relative;
    overflow: hidden;
}

.primo-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #a855f7, #38bdf8);
}

.primo-banner-content {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.primo-shield-img-box {
    width: 140px;
    height: 140px;
    border-radius: 28px;
    background: rgba(10, 14, 23, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.4), inset 0 0 25px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.primo-shield-img-box:hover {
    transform: scale(1.05) rotate(2deg);
}

.primo-shield-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.5));
}

.primo-banner-text {
    flex: 1;
    min-width: 300px;
}

.primo-banner-text h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.primo-banner-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.primo-banner-actions {
    display: flex;
    gap: 1rem;
}

/* GUIDE DE FORGE VISUEL */
.primo-guide-card {
    background: rgba(15, 19, 29, 0.85);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 28px;
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(168, 85, 247, 0.1);
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.guide-icon {
    font-size: 1.8rem;
    color: #c084fc;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.6));
}

.guide-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.guide-steps-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.guide-step {
    flex: 1;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    transition: transform 0.2s, border-color 0.2s;
}

.guide-step:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(168, 85, 247, 0.4);
}

.step-num {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple-main), #7e22ce);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--purple-glow);
    flex-shrink: 0;
}

.step-desc h4 {
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.4rem;
}

.step-desc p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-desc strong {
    color: #e2e8f0;
}

.step-arrow {
    font-size: 1.8rem;
    color: var(--text-muted);
    opacity: 0.5;
}

@media (max-width: 950px) {
    .guide-steps-container {
        flex-direction: column;
        align-items: stretch;
    }

    .step-arrow {
        display: none;
    }
}

/* PROGRESS BAR DES ÉLÉMENTS */
.elem-progress-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
}

.elem-pct {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
}

.elem-bar-bg {
    flex-grow: 1;
    width: 100px;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 999px;
    overflow: hidden;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.elem-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-aerdala {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 10px #f59e0b;
}

.fill-feudala {
    background: linear-gradient(90deg, #f87171, #ef4444);
    box-shadow: 0 0 10px #ef4444;
}

.fill-akwadala {
    background: linear-gradient(90deg, #38bdf8, #0284c7);
    box-shadow: 0 0 10px #38bdf8;
}

.fill-terrdala {
    background: linear-gradient(90deg, #34d399, #10b981);
    box-shadow: 0 0 10px #10b981;
}

.primo-elements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 1200px) {
    .primo-elements-grid {
        grid-template-columns: 1fr;
    }
}

.primo-element-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primo-element-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
}

.element-card-header {
    padding: 1.25rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.element-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.element-title h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.element-icon {
    font-size: 1.4rem;
}

/* Custom element header themes */
.element-aerdala .element-card-header {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.05));
    border-top: 3px solid #f59e0b;
}

.element-aerdala .element-icon {
    color: #f59e0b;
}

.element-feudala .element-card-header {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.25), rgba(185, 28, 28, 0.05));
    border-top: 3px solid #ef4444;
}

.element-feudala .element-icon {
    color: #ef4444;
}

.element-akwadala .element-card-header {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.25), rgba(2, 132, 199, 0.05));
    border-top: 3px solid #38bdf8;
}

.element-akwadala .element-icon {
    color: #38bdf8;
}

.element-terrdala .element-card-header {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.25), rgba(4, 120, 87, 0.05));
    border-top: 3px solid #10b981;
}

.element-terrdala .element-icon {
    color: #10b981;
}

.element-table-wrapper,
.jetons-table-wrapper {
    padding: 1.5rem;
    overflow-x: auto;
}

.primo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    text-align: center;
}

.primo-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    font-weight: 700;
}

.primo-table td {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    font-size: 0.95rem;
    font-weight: 600;
}

.primo-table tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.primo-table tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.primo-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.tier-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-weight: 800;
    color: white;
}

.primo-qty-ctrl {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    padding: 2px;
}

.primo-qty-ctrl button {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: white;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.primo-qty-ctrl button:hover {
    background: var(--purple-main);
}

.primo-qty-ctrl input {
    width: 48px;
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    outline: none;
    font-family: var(--font-body);
}

.primo-qty-ctrl input::-webkit-outer-spin-button,
.primo-qty-ctrl input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.primo-qty-ctrl input[type=number] {
    -moz-appearance: textfield;
}

.casse-restant-val {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fbbf24;
}

.casse-restant-val.zero {
    color: #10b981;
}

/* Jetons Section Card */
.primo-jetons-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.stat-dj {
    color: #38bdf8;
    font-weight: 800;
    font-size: 1.15rem;
}

.sub-run {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-weight: 600;
}

.col-active {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left: 1px solid rgba(236, 72, 153, 0.4);
    border-right: 1px solid rgba(236, 72, 153, 0.4);
    box-shadow: inset 0 0 15px rgba(236, 72, 153, 0.15);
}

/* Jetons Info Banner & Mode Selection */
.jetons-header {
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.25), rgba(244, 63, 94, 0.05));
    border-top: 4px solid #ec4899;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.jetons-mode-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.jetons-info-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.info-card.enu-info {
    border-left: 4px solid #38bdf8;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.08), rgba(255, 255, 255, 0.01));
}

.info-card.std-info {
    border-left: 4px solid #fbbf24;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.01));
}

.info-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.enu-info .info-icon {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.std-info .info-icon {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.info-text h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: white;
}

.enu-info .info-text h4 span {
    color: #38bdf8;
    font-weight: 900;
}

.std-info .info-text h4 span {
    color: #fbbf24;
    font-weight: 900;
}

.info-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.info-text strong {
    color: #e2e8f0;
}

.jetons-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.jetons-title h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.jetons-icon {
    font-size: 1.8rem;
    color: #ec4899;
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.5));
}

.jetons-table {
    font-size: 1rem;
}

.jeton-name-pill {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #f472b6;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
}

.stat-highlight {
    font-weight: 800;
    color: white;
}

.stat-missing {
    color: #f43f5e;
    font-weight: 800;
}

.stat-missing.zero {
    color: #10b981;
}

/* Utils */
.hidden {
    display: none !important;
}

.badge-p0 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.item-description {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    white-space: pre-line;
    border-left: 4px solid #10b981;
}

/* Google Auth Widget */
.auth-widget {
    display: inline-flex;
    align-items: center;
}

.btn-google {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
}

.btn-google i {
    color: #4285F4;
    font-size: 1rem;
}

.btn-google:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--purple-light);
    box-shadow: 0 0 10px var(--purple-glow);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.sync-status {
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sync-status.offline {
    color: #f43f5e;
}

.btn-logout-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-logout-icon:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
}

/* Panneau de statistiques cumulées Dofus */
.dofus-stats-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dofus-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-green), var(--color-purple));
}

.dofus-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.dofus-stats-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dofus-stats-title i {
    color: var(--color-green);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.dofus-stats-title h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: #fff;
    margin: 0;
}

.dofus-stats-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.dofus-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.dofus-stat-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.dofus-stat-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.dofus-stat-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: transparent !important;
}

.dofus-stat-icon.pa-pm {
    color: #60a5fa;
}

.dofus-stat-icon.stats {
    color: #34d399;
}

.dofus-stat-icon.vitality {
    color: #f87171;
}

.dofus-stat-icon.wisdom {
    color: #fbbf24;
}

.dofus-stat-icon.damages {
    color: #c084fc;
}

.dofus-stat-icon.crit {
    color: #f472b6;
}

.dofus-stat-icon.res {
    color: #9ca3af;
}

.dofus-stat-info {
    display: flex;
    flex-direction: column;
}

.dofus-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.dofus-stat-name {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dofus-stats-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 0;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
    font-size: 0.95rem;
}

/* Badge de test pour les calculs du bouclier primordial */
.primo-badge-testing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 12px;
    vertical-align: middle;
    animation: pulse-orange-glow 2s infinite ease-in-out;
}

@keyframes pulse-orange-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.1);
        border-color: rgba(245, 158, 11, 0.2);
    }
    50% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
        border-color: rgba(245, 158, 11, 0.5);
    }
}

/* Alerte d'information de fiabilité pour les boucliers */
.primo-alert-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 15px 20px;
    font-family: 'Outfit', sans-serif;
}

.primo-alert-info .alert-icon {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-top: 2px;
}

.primo-alert-info .alert-content p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.primo-alert-info .alert-content strong {
    color: #fff;
    font-weight: 600;
}

/* Style de pied de page */
.app-footer {
    text-align: center;
    padding: 30px 20px 15px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'Outfit', sans-serif;
}

.app-footer p {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.app-footer strong {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

.app-footer-heart {
    color: #ef4444;
    font-size: 0.8rem;
    animation: heart-beat 1.3s infinite ease-in-out;
}

@keyframes heart-beat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.22);
    }
}

/* Bannière d'actions rapides de prestige */
.prestige-actions-banner {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.prestige-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.prestige-banner-title {
    font-family: 'Outfit', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prestige-banner-title i {
    color: #a855f7;
    animation: flash-purple 1.5s infinite ease-in-out;
}

@keyframes flash-purple {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.prestige-banner-buttons {
    display: flex;
    gap: 10px;
}

.prestige-banner-buttons .btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
}

/* =========================================================================
   AUTH MODAL & PREMIUM STYLES
   ========================================================================= */

.auth-modal-content {
    max-width: 460px;
    background: rgba(18, 22, 34, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9), 0 0 50px rgba(168, 85, 247, 0.35);
}

.btn-google-modal {
    width: 100%;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    border-radius: 14px;
    margin-bottom: 0.5rem;
}

.btn-google-modal:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.auth-separator {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-separator:not(:empty)::before {
    margin-right: 1rem;
}

.auth-separator:not(:empty)::after {
    margin-left: 1rem;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.35rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 2rem;
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-body);
}

.auth-tab-btn:hover {
    color: white;
}

.auth-tab-btn.active {
    background: linear-gradient(135deg, var(--purple-main), #7e22ce);
    color: white;
    box-shadow: 0 4px 15px var(--purple-glow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeIn 0.2s ease-out;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: 14px;
    margin-top: 1rem;
}

.auth-error-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #f87171;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.auth-error-box.hidden {
    display: none;
}

#pw-strength-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: color 0.3s;
}

#pw-strength-hint.valid {
    color: #34d399;
}

#pw-strength-hint.invalid {
    color: #f87171;
}

/* =========================================================================
   SYSTÈME GROUPE DE FARM
   ========================================================================= */

.btn-group-header {
    background: linear-gradient(135deg, rgba(16,185,129,0.2), rgba(16,185,129,0.1));
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.4);
    font-weight: 700;
    transition: all 0.2s;
}
.btn-group-header:hover {
    background: linear-gradient(135deg, rgba(16,185,129,0.35), rgba(16,185,129,0.2));
    border-color: #34d399;
    box-shadow: 0 0 20px rgba(16,185,129,0.3);
    transform: translateY(-2px);
}
.btn-group-header.in-group {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #34d399;
    box-shadow: 0 4px 15px rgba(16,185,129,0.4);
}
.btn-group-header.group-mode-active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-color: #fbbf24;
    box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}

.group-modal-content { max-width: 520px; }

/* Sections create/join */
.group-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.group-separator-or {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 1.5rem 0;
    position: relative;
}
.group-separator-or::before, .group-separator-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border-color);
}
.group-separator-or::before { left: 0; }
.group-separator-or::after { right: 0; }

/* Panel groupe actif */
.group-active-panel { display: flex; flex-direction: column; gap: 1.25rem; }

.group-code-card {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.group-code-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 0 0 auto;
}
.group-code-value {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    color: #34d399;
    letter-spacing: 4px;
    flex: 1;
    text-align: center;
}
.group-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.group-info-row strong { color: white; }

.group-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem;
}
.group-member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}
.group-member-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--purple-light);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.group-member-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.group-member-name { font-weight: 700; font-size: 0.95rem; }
.group-creator-badge {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
    border: 1px solid rgba(245,158,11,0.3);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}
.group-you-badge {
    background: rgba(168,85,247,0.15);
    color: var(--purple-light);
    border: 1px solid rgba(168,85,247,0.3);
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Toggle groupe */
.group-mode-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.group-mode-toggle {
    width: 48px; height: 26px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    transition: all 0.25s;
}
.group-mode-toggle.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    box-shadow: 0 0 12px rgba(16,185,129,0.4);
}
.toggle-knob {
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: left 0.25s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.group-mode-toggle.active .toggle-knob { left: 25px; }

.group-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Bandeau mode groupe */
.group-mode-banner {
    background: linear-gradient(90deg, rgba(245,158,11,0.12), rgba(245,158,11,0.05));
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 14px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}
.group-mode-banner-text {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Barre groupe sur les ressources */
.group-res-breakdown {
    margin-top: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 10px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.group-res-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.group-res-breakdown-row .member-name { color: var(--text-muted); font-weight: 600; }
.group-res-breakdown-row .member-qty { font-weight: 800; color: #fbbf24; }
.group-res-total-row {
    border-top: 1px solid rgba(245,158,11,0.2);
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    font-weight: 800;
    color: white;
    display: flex;
    justify-content: space-between;
}
.group-res-total-pct { color: #34d399; }

/* =========================================================================
   RESPONSIVE MOBILE ET TABLETTE PREMIUM
   ========================================================================= */

@media (max-width: 768px) {
    .app-container {
        padding: 1.25rem 1rem;
    }
    .nav-tabs {
        padding: 0.4rem;
        border-radius: 16px;
        width: 100%;
        margin-bottom: 1.75rem;
    }
    .prestige-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .prestige-tabs::-webkit-scrollbar {
        display: none; /* Safari et Chrome */
    }
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
    .stats-overview {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1rem;
        margin-bottom: 1.75rem;
    }
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 1rem 0.75rem;
    }
    .main-header {
        gap: 1rem;
        margin-bottom: 1.75rem;
    }
    .header-brand {
        gap: 0.75rem;
    }
    .site-main-logo {
        max-height: 56px;
    }
    .brand-subtitle {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .header-actions button, 
    .header-actions .auth-widget, 
    .header-actions .auth-widget button {
        width: 100% !important;
        justify-content: center;
    }
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .stat-card {
        padding: 1rem;
        gap: 1rem;
    }
    .stat-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    .stat-icon svg {
        width: 22px;
        height: 22px;
    }
    .items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .item-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    .dofus-stats-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    .dofus-stats-header {
        margin-bottom: 16px;
    }
    .dofus-stats-title h3 {
        font-size: 1.1rem;
    }
    .dofus-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dofus-stat-item {
        padding: 8px 10px;
        gap: 8px;
        border-radius: 10px;
    }
    .dofus-stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
        border-radius: 6px;
    }
    .dofus-stat-value {
        font-size: 1rem;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .search-box {
        max-width: 100%;
    }
    .filter-options {
        justify-content: space-between;
        gap: 0.5rem;
    }
    .filter-tag {
        flex: 1;
        text-align: center;
        padding: 0.55rem;
        font-size: 0.8rem;
    }
    .dofus-filters {
        width: 100%;
        justify-content: flex-start;
        padding: 0.4rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .dofus-filters::-webkit-scrollbar {
        display: none;
    }
    .dofus-tag {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* MODALS RESPONSIVES */
    .modal {
        padding: 0.5rem;
    }
    .modal-content {
        border-radius: 20px;
    }
    .modal-header {
        padding: 1.25rem 1.5rem;
    }
    .modal-title-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .item-slot-big {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }
    .modal-body {
        padding: 1.25rem 1.5rem;
    }
    .modal-footer {
        padding: 1.25rem 1.5rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .modal-footer button {
        width: 100%;
        justify-content: center;
    }
    
    /* LIGNES DE COMPOSANTS DANS LES MODALS */
    .resource-item-row { border-radius: 11px; }
    .res-inner {
        flex-direction: column;
        gap: 0.55rem;
    }
    .res-row-left { width: 100%; }
    .res-row-right {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.4rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        gap: 0.45rem;
        flex-wrap: wrap;
    }
    
    /* AJOUT D'ITEM ET FORMULAIRE VERTICAL */
    .res-edit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.85rem;
        border-radius: 12px;
    }
    .res-input-req {
        width: 100% !important;
    }
    .checkbox-group {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }
}

/* Style des images pour les statistiques des Dofus */
.dofus-stat-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}
.dofus-stat-item:hover .dofus-stat-img {
    transform: scale(1.15);
}

/* =========================================================
   CALCULATEUR DE PROSPECTION
   ========================================================= */
.prosp-calculator {
    background: rgba(10, 14, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.prosp-calc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.prosp-calc-header i {
    color: var(--gold-light);
}

.prosp-badge-new {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #000;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.prosp-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.prosp-param-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prosp-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.prosp-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
}

.prosp-input:focus {
    outline: none;
    border-color: var(--gold-light);
}

/* Custom Checkbox Toggle */
.prosp-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.prosp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.prosp-toggle input:checked + .toggle-slider {
    background-color: var(--gold-light);
}
.prosp-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.prosp-diff-btns {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.prosp-diff-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.prosp-diff-btn.active {
    background: var(--gold-light);
    color: #000;
}

.prosp-total-row {
    grid-column: 1 / -1;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.prosp-total-label, .prosp-example-label {
    font-size: 0.85rem;
    color: var(--gold-light);
    font-weight: 600;
}
.prosp-total-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-right: auto;
}
.prosp-example-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

/* Table */
.prosp-table-wrap {
    overflow-x: auto;
}

.prosp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.prosp-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prosp-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.prosp-card-name {
    font-weight: 600;
    color: white;
}

.prosp-cell-base {
    color: var(--text-muted);
}

.prosp-cell-actuel {
    font-weight: 700;
    color: var(--green-light);
}
.prosp-cell-max {
    color: #fbbf24;
}

.prosp-cell-combats {
    color: white;
    font-weight: 600;
}

.prosp-cell-obtenu {
    text-align: center;
}

.prosp-check-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
    cursor: pointer;
    transition: 0.2s;
}

.prosp-check-btn.obtained {
    color: var(--green-light);
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5));
}

.prosp-row-done td {
    opacity: 0.5;
}
.prosp-row-done td.prosp-cell-obtenu {
    opacity: 1;
}

/* =====================================================================
   AMÉLIORATIONS CSS v2 — Scrollbar, animations, depth, polish
   ===================================================================== */

/* SCROLLBAR CUSTOM */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.35);
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.62);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(168, 85, 247, 0.35) rgba(0, 0, 0, 0.2);
}

/* BACKGROUND GLOWS ANIMÉS — mouvement lent */
@keyframes glow-drift-purple {
    0%   { transform: translate(0,     0)     scale(1);    }
    50%  { transform: translate(45px, -40px)  scale(1.08); }
    100% { transform: translate(-25px,  22px) scale(0.94); }
}
@keyframes glow-drift-green {
    0%   { transform: translate(0,     0)     scale(1);    }
    50%  { transform: translate(-40px,  28px) scale(1.1);  }
    100% { transform: translate(22px,  -18px) scale(0.96); }
}
.bg-glow-purple { animation: glow-drift-purple 20s ease-in-out infinite alternate; }
.bg-glow-green  { animation: glow-drift-green  25s ease-in-out infinite alternate; }

/* SHIMMER SUR PROGRESS BARS */
@keyframes shimmer-slide {
    0%   { transform: translateX(-160%); }
    100% { transform: translateX(260%);  }
}
.progress-bar {
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: shimmer-slide 2.8s ease-in-out infinite;
    pointer-events: none;
}
.elem-bar {
    position: relative;
    overflow: hidden;
}
.elem-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: shimmer-slide 2.8s ease-in-out infinite;
    pointer-events: none;
}

/* STAT CARDS — Colored top border per type */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 20px 20px 0 0;
    opacity: 0.55;
    transition: opacity 0.3s;
    z-index: 1;
}
.stat-card:hover::before { opacity: 1; }

.stat-card:has(.purple-glow)::before {
    background: linear-gradient(90deg, var(--purple-main), var(--purple-light), transparent);
}
.stat-card:has(.green-glow)::before {
    background: linear-gradient(90deg, var(--green-main), var(--green-light), transparent);
}
.stat-card:has(.red-glow)::before {
    background: linear-gradient(90deg, var(--boss-red), #f87171, transparent);
}
.stat-card:has(.gold-glow)::before {
    background: linear-gradient(90deg, var(--gold), var(--gold-light), transparent);
}

/* STAT CARDS — Gradient text per type */
.stat-card:has(.purple-glow) .stat-info h3 {
    background: linear-gradient(135deg, #e9d5ff, var(--purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card:has(.green-glow) .stat-info h3 {
    background: linear-gradient(135deg, #a7f3d0, var(--green-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card:has(.red-glow) .stat-info h3 {
    background: linear-gradient(135deg, #fca5a5, #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card:has(.gold-glow) .stat-info h3 {
    background: linear-gradient(135deg, var(--gold-light), #fef3c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* STAT CARDS — Hover glow per type */
.stat-card:has(.purple-glow):hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(168, 85, 247, 0.22);
    border-color: rgba(168, 85, 247, 0.22);
}
.stat-card:has(.green-glow):hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.22);
}
.stat-card:has(.red-glow):hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.22);
}
.stat-card:has(.gold-glow):hover {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 28px rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.22);
}

/* STAT CARDS — Appearance animation */
@keyframes stat-appear {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}
.stats-overview .stat-card:nth-child(1) { animation: stat-appear 0.4s   0ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.stats-overview .stat-card:nth-child(2) { animation: stat-appear 0.4s  75ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.stats-overview .stat-card:nth-child(3) { animation: stat-appear 0.4s 150ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.stats-overview .stat-card:nth-child(4) { animation: stat-appear 0.4s 225ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ITEM CARDS — Micro-animation d'apparition échelonnée */
@keyframes item-appear {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}
.item-card {
    animation: item-appear 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.item-card:nth-child(1)    { animation-delay:   0ms; }
.item-card:nth-child(2)    { animation-delay:  55ms; }
.item-card:nth-child(3)    { animation-delay: 110ms; }
.item-card:nth-child(4)    { animation-delay: 165ms; }
.item-card:nth-child(5)    { animation-delay: 220ms; }
.item-card:nth-child(6)    { animation-delay: 275ms; }
.item-card:nth-child(7)    { animation-delay: 330ms; }
.item-card:nth-child(8)    { animation-delay: 385ms; }
.item-card:nth-child(9)    { animation-delay: 440ms; }
.item-card:nth-child(n+10) { animation-delay: 480ms; }

/* ITEM CARDS — Enhanced hover glow */
.item-card:hover {
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.55),
        0 0 30px rgba(168, 85, 247, 0.32),
        0 0 60px rgba(168, 85, 247, 0.10);
}

/* TAB BTN ACTIVE — glow renforcé */
.tab-btn.active {
    box-shadow:
        0 4px 18px rgba(168, 85, 247, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(168, 85, 247, 0.28);
}

/* PRIMO ELEMENT CARDS — Colored hover glow */
.element-aerdala:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 28px rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.2);
}
.element-feudala:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 28px rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.2);
}
.element-akwadala:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 28px rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.2);
}
.element-terrdala:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 28px rgba(16, 185, 129, 0.22);
    border-color: rgba(16, 185, 129, 0.2);
}

/* ===== TAB ICON FA (pour Reliques) ===== */
.tab-icon-fa {
    font-size: 18px;
    color: var(--gold);
}

/* ===== RELIQUES ===== */
.reliques-container {
    padding: 1.5rem 2rem;
}
.reliques-page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.reliques-page-header > i {
    font-size: 2rem;
    color: var(--gold);
}
.reliques-page-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}
.reliques-page-header p {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0.2rem 0 0;
}
.reliques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
    align-items: start;
}

/* Group card */
.relique-group {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--rg-color, var(--purple-main));
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.relique-group:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.04);
}
.relique-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
}
.relique-stat-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
}
.relique-group-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--rg-color, var(--text-primary));
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.relique-group-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Item list */
.relique-list {
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.relique-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
    transition: background 0.15s;
}
.relique-item:hover {
    background: rgba(255,255,255,0.04);
}
.relique-portrait {
    width: 42px;
    height: 42px;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}
.relique-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.relique-portrait-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rg-color, var(--text-muted));
    font-size: 1rem;
}
.relique-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
}
.relique-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.relique-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--rg-color, var(--purple-main));
    font-family: var(--font-heading);
}

@media (max-width: 768px) {
    .reliques-container { padding: 1rem; }
    .reliques-grid { grid-template-columns: 1fr; }
}

/* ===== RELIQUES FILTER ===== */
.relique-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}
.relique-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.relique-filter-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}
.relique-filter-btn.active {
    background: rgba(var(--rbtn-color, 168 85 247) / 0.18);
    border-color: var(--rbtn-color, var(--purple-main));
    color: var(--rbtn-color, var(--purple-main));
}
.relique-filter-btn:first-child.active {
    background: rgba(168,85,247,0.18);
    border-color: var(--purple-main);
    color: var(--purple-main);
}

/* ===== PERSONNAGES ===== */
.personnages-container { padding: 1.5rem 2rem; }

.perso-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.perso-list-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}
.perso-list-header p {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin: 0.2rem 0 0;
}

.perso-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.perso-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}
.perso-empty i { font-size: 2.5rem; margin-bottom: 1rem; display: block; opacity: 0.4; }

/* Perso Card */
.perso-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.perso-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 20px rgba(168,85,247,0.12);
    border-color: rgba(168,85,247,0.25);
    transform: translateY(-2px);
}
.perso-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.perso-avatar {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--purple-main);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.perso-card-info { flex: 1; min-width: 0; }
.perso-card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.perso-meta { font-size: 0.72rem; color: var(--text-muted); }
.perso-overall-badge {
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--purple-light);
    white-space: nowrap;
}
.perso-progress-bar-outer {
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.perso-progress-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, var(--purple-main), var(--purple-light));
    border-radius: 999px;
    transition: width 0.4s;
}
.perso-card-stats {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Detail view */
.perso-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.perso-detail-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.perso-avatar-large {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.3);
    display: flex; align-items: center; justify-content: center;
    color: var(--purple-main);
    font-size: 1.4rem;
}
.perso-detail-title h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0;
}

/* Progress bars */
.perso-detail-progress {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.perso-prog-item {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.perso-prog-item:last-of-type { color: var(--text-primary); font-weight: 600; }
.perso-prog-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}
.perso-prog-bar > div {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s;
}
.perso-overall-row {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    padding-top: 0.25rem;
    border-top: 1px solid var(--border-color);
}

/* Stats recap */
.perso-stats-recap {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}
.perso-stats-recap h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.9rem;
}
.perso-stats-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.perso-stat-chip {
    background: color-mix(in srgb, var(--chip-color, #a855f7) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--chip-color, #a855f7) 35%, transparent);
    border-radius: 10px;
    padding: 0.35rem 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 64px;
}
.perso-stat-val {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--chip-color, var(--purple-main));
    font-family: var(--font-heading);
}
.perso-stat-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.1rem;
}

/* Collapsible sections */
.perso-detail-sections { display: flex; flex-direction: column; gap: 0.75rem; }
.perso-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}
.perso-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.perso-section-header:hover { background: rgba(255,255,255,0.03); }
.perso-section-header span { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); margin-right: 0.4rem; }
.perso-section-header .fa-chevron-down { color: var(--text-muted); font-size: 0.72rem; transition: transform 0.2s; }
.perso-section.open .fa-chevron-down { transform: rotate(180deg); }
.perso-section-body { display: none; padding: 0.5rem 0.75rem 0.75rem; border-top: 1px solid var(--border-color); }
.perso-section.open .perso-section-body { display: block; }

/* Track items (dofus/reliques/items) */
.perso-track-grid { display: flex; flex-direction: column; gap: 0.2rem; }
.perso-track-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s;
    opacity: 0.55;
}
.perso-track-item:hover { background: rgba(255,255,255,0.04); opacity: 0.8; }
.perso-track-item.obtained { opacity: 1; }
.perso-track-img {
    width: 34px; height: 34px;
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.perso-track-img img { width: 100%; height: 100%; object-fit: cover; }
.perso-track-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.perso-track-val { font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.perso-track-check {
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
}
.perso-track-item.obtained .perso-track-check { color: var(--green-main); }
.perso-track-item.obtained .perso-track-name { color: var(--text-primary); }

/* Reliques groups in detail */
.perso-reliq-group { margin-bottom: 0.75rem; }
.perso-reliq-label {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.2rem;
}

/* Reliques — sélecteur de palier par relique */
.perso-reliq-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.5rem;
    border-radius: 9px;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.perso-reliq-row.owned { opacity: 1; }
.perso-reliq-row:hover { background: rgba(255,255,255,0.03); }
.perso-reliq-portrait { width: 32px; height: 32px; }
.perso-reliq-rname {
    flex: 1;
    min-width: 70px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.perso-reliq-levels {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.perso-rlvl {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 2px 5px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.15;
    transition: all 0.12s;
}
.perso-rlvl:hover { border-color: var(--rlvl-color, #a855f7); color: var(--text-primary); }
.perso-rlvl-n { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.3px; opacity: 0.75; }
.perso-rlvl-v { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.perso-rlvl.active {
    background: rgba(168,85,247,0.22);
    background: color-mix(in srgb, var(--rlvl-color, #a855f7) 22%, transparent);
    border-color: var(--rlvl-color, #a855f7);
    color: #fff;
    box-shadow: 0 0 0 1px var(--rlvl-color, #a855f7) inset;
}
.perso-rlvl.none {
    min-width: 26px;
    font-size: 0.85rem;
    color: #f87171;
    border-color: rgba(248,113,113,0.3);
}
.perso-rlvl.none.active {
    background: rgba(248,113,113,0.18);
    border-color: #f87171;
    color: #fca5a5;
    box-shadow: none;
}
.perso-rlvl.perso-rlvl-own { min-width: 32px; }
.perso-rlvl.perso-rlvl-own .perso-rlvl-n { font-size: 0.9rem; opacity: 1; }
.perso-rlvl.perso-rlvl-own.active {
    background: rgba(74,222,128,0.18);
    border-color: #4ade80;
    color: #86efac;
    box-shadow: 0 0 0 1px #4ade80 inset;
}
.perso-prest-group { margin-bottom: 0.75rem; }
.perso-prest-label {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--purple-light);
    text-transform: uppercase;
    padding: 0.3rem 0.5rem;
    margin-bottom: 0.2rem;
}

.tab-icon-breed-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}
.perso-breed-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 6px;
    max-height: 140px;
    overflow-y: auto;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.breed-pick-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    transition: border-color 0.15s, background 0.15s;
}
.breed-pick-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(1.9) saturate(1.2);
}
.breed-pick-item:hover {
    background: rgba(168,85,247,0.15);
    border-color: rgba(168,85,247,0.4);
}
.breed-pick-item.selected {
    background: rgba(168,85,247,0.2);
    border-color: #a855f7;
}
.perso-avatar img, .perso-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@media (max-width: 768px) {
    .personnages-container { padding: 1rem; }
    .perso-list-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .perso-grid { grid-template-columns: 1fr; }
    .perso-prog-item { grid-template-columns: 60px 1fr 60px; }
}

/* Custom Tooltip */
.custom-tooltip {
    position: fixed;
    z-index: 999999;
    width: 320px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    color: #e2e8f0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    opacity: 0;
    visibility: hidden;
}
.custom-tooltip.visible {
    opacity: 1;
    visibility: visible;
}
.custom-tooltip .tt-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}
.custom-tooltip .tt-head img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.4));
}
.custom-tooltip .tt-titles h4 {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 1.1rem;
}
.custom-tooltip .tt-sub {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.custom-tooltip .tt-sub .tag {
    background: #1e293b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #94a3b8;
    border: 1px solid #334155;
}
.custom-tooltip .tt-effects {
    list-style: none;
    padding: 0;
    margin: 8px 0;
    font-size: 0.9rem;
    line-height: 1.4;
}
.custom-tooltip .tt-effects li {
    padding: 2px 0;
    color: #10b981;
}
.custom-tooltip .tt-effects li.negative {
    color: #ef4444;
}