@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary-dark: #1c2636;
            --primary-light: #d7e9ff;
            --secondary-1: #575e69;
            --secondary-2: #374b69;
            --secondary-3: #96a3b5;
            --accent: #a72850;
            --glow: rgba(167, 40, 80, 0.5);
			--photon-glow: #7cc7ff;

        /* Système de Niveaux */
        .level-container {
            background: rgba(28, 38, 54, 0.95);
            backdrop-filter: blur(10px);
            padding: 30px;
            border-radius: 20px;
            margin-bottom: 30px;
            border: 2px solid rgba(215, 233, 255, 0.1);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .level-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
        }

        .level-badge {
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            padding: 15px 35px;
            border-radius: 50px;
            font-weight: 900;
            font-size: 32px;
            font-family: 'Orbitron', sans-serif;
            color: white;
            box-shadow: 0 5px 20px rgba(167, 40, 80, 0.6);
            text-transform: uppercase;
            letter-spacing: 2px;
        }

        .level-title {
            font-family: 'Orbitron', sans-serif;
            color: var(--photon-glow);
            font-size: 24px;
            text-shadow: 0 0 15px var(--photon-glow);
            letter-spacing: 1px;
        }

        .xp-bar-container {
            background: rgba(87, 94, 105, 0.3);
            border-radius: 20px;
            height: 14px !important;
            max-height: 14px !important;
            overflow: hidden;
            position: relative;
            border: 1px solid rgba(255, 215, 0, 0.2);
        }

        .xp-bar {
            background: linear-gradient(90deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
            height: 100%;
            transition: width 0.5s ease;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
            position: relative;
            overflow: hidden;
        }

        .xp-bar::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            animation: shine 2s infinite;
        }

        
        /* Séparateurs de paliers */
        .level-tier-separator {
            text-align: center;
            padding: 30px 0 20px 0;
            margin: 20px 0;
            position: relative;
        }
        
        .level-tier-separator span {
            color: var(--photon-glow);
            font-family: 'Orbitron', sans-serif;
            font-size: 16px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 2px;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
        }
        @keyframes shine {
            0% { left: -100%; }
            100% { left: 200%; }
        }

        .xp-text {
            display: block;
            margin-top: 5px;
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            font-size: 11px;
            color: rgba(255, 215, 0, 0.65);
            letter-spacing: 0.8px;
            text-align: right;
        }

        .rewards-list {
            margin-top: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .level-tier-separator{
            margin: 22px 0 8px 0;
            padding: 10px 14px;
            border-radius: 14px;
            text-align: center;
            border: 1px solid rgba(215, 233, 255, 0.18);
            background: rgba(215, 233, 255, 0.04);
            color: rgba(215, 233, 255, 0.92);
            font-family: 'Orbitron', sans-serif;
            letter-spacing: 0.8px;
            text-transform: uppercase;
        }
        .level-tier-separator span{ opacity: 0.95; }

        .reward-item {
            background: rgba(215, 233, 255, 0.05);
            padding: 14px 18px;
            border-radius: 14px;
            border: 2px solid rgba(215, 233, 255, 0.12);
            display: grid;
            grid-template-columns: 90px 1fr 140px;
            gap: 12px;
            align-items: center;
            transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
        }

        @media (max-width: 640px){
            .reward-item{
                grid-template-columns: 1fr;
                gap: 8px;
                align-items: start;
            }
            .reward-status{ justify-self: start; }
        }
.reward-item.unlocked {
            border-color: var(--photon-glow);
            background: rgba(255, 215, 0, 0.1);
        }

        .reward-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .reward-level {
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            color: var(--accent);
            font-size: 18px;
        }

        .reward-description {
            color: var(--primary-light);
            font-size: 14px;
            flex: 1;
            margin: 0 15px;
        }

        .reward-status {
            padding: 5px 15px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .reward-status.unlocked {
            background: linear-gradient(135deg, #4caf50, #66bb6a);
            color: white;
        }

        .reward-status.locked {
            background: rgba(87, 94, 105, 0.5);
            color: var(--secondary-3);
        }

        }

        body {
            font-family: 'Rajdhani', sans-serif;
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-2) 100%);
            min-height: 100vh;
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: 
                repeating-linear-gradient(
                    0deg,
                    transparent,
                    transparent 2px,
                    rgba(215, 233, 255, 0.03) 2px,
                    rgba(215, 233, 255, 0.03) 4px
                );
            pointer-events: none;
            z-index: 0;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        /* Auth Screen */
        .auth-container {
            max-width: 450px;
            margin: 100px auto;
            background: rgba(28, 38, 54, 0.95);
            backdrop-filter: blur(10px);
            padding: 50px;
            border-radius: 20px;
            border: 2px solid rgba(215, 233, 255, 0.1);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--glow);
        }

        .auth-container h1 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            margin-bottom: 40px;
            text-align: center;
            font-size: 42px;
            text-transform: uppercase;
            letter-spacing: 4px;
            text-shadow: 0 0 20px var(--glow);
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            color: var(--primary-light);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .form-group input {
            width: 100%;
            padding: 15px;
            background: rgba(215, 233, 255, 0.05);
            border: 2px solid rgba(215, 233, 255, 0.2);
            border-radius: 10px;
            font-size: 16px;
            color: var(--primary-light);
            font-family: 'Rajdhani', sans-serif;
            transition: all 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 20px var(--glow);
            background: rgba(215, 233, 255, 0.1);
        }

        .btn {
            width: 100%;
            padding: 18px;
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 18px;
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            text-transform: uppercase;
            letter-spacing: 2px;
            transition: all 0.3s;
            box-shadow: 0 5px 20px rgba(167, 40, 80, 0.4);
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(167, 40, 80, 0.6);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .btn-secondary {
            background: rgba(215, 233, 255, 0.1);
            color: var(--primary-light);
            margin-top: 15px;
            box-shadow: none;
            border: 2px solid rgba(215, 233, 255, 0.2);
        }

        .btn-secondary:hover {
            background: rgba(215, 233, 255, 0.15);
        }

        /* Main App */
        .app-header {
            background: rgba(28, 38, 54, 0.95);
            backdrop-filter: blur(10px);
            padding: 25px 40px;
            border-radius: 20px;
            margin-bottom: 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 2px solid rgba(215, 233, 255, 0.1);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 30px;
        }

        .user-info h2 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            font-size: 24px;
            letter-spacing: 1px;
        }

        .user-stats {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        .photon-balance, .level-display {
            padding: 12px 30px;
            border-radius: 30px;
            font-weight: 900;
            font-size: 24px;
            font-family: 'Orbitron', sans-serif;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .photon-balance {
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            color: var(--primary-dark);
            box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
        }

        .level-display {
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            color: white;
            box-shadow: 0 5px 20px rgba(167, 40, 80, 0.4);
        }

        .logout-btn {
            padding: 12px 25px;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.3s;
            box-shadow: 0 5px 15px rgba(167, 40, 80, 0.3);
        }

        .logout-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(167, 40, 80, 0.5);
        }

        .nav-tabs {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
        }

        .nav-tab {
            flex: 1;
            padding: 18px;
            background: rgba(28, 38, 54, 0.7);
            backdrop-filter: blur(5px);
            border: 2px solid rgba(215, 233, 255, 0.1);
            border-radius: 15px;
            cursor: pointer;
            font-weight: 700;
            font-size: 16px;
            font-family: 'Orbitron', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--secondary-3);
            transition: all 0.3s;
        }

        .nav-tab:hover {
            border-color: var(--accent);
            color: var(--primary-light);
        }

        .nav-tab.active {
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            color: white;
            border-color: var(--accent);
            box-shadow: 0 5px 20px rgba(167, 40, 80, 0.4);
        }

        .content-section {
            display: none;
        }

        .content-section.active {
            display: block;
            animation: fadeIn 0.5s;
        }

        #adminSection.active {
            display: flex !important;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Shop */
        .shop-container {
            background: rgba(28, 38, 54, 0.9);
            backdrop-filter: blur(10px);
            padding: 40px;
            border-radius: 20px;
            border: 2px solid rgba(215, 233, 255, 0.1);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .promo-section {
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 40px;
            color: white;
            box-shadow: 0 10px 30px rgba(167, 40, 80, 0.4);
        }

        .promo-section h3 {
            font-family: 'Orbitron', sans-serif;
            margin-bottom: 20px;
            font-size: 28px;
            letter-spacing: 2px;
        }

        .promo-input-group {
            display: flex;
            gap: 15px;
        }

        .promo-input-group input {
            flex: 1;
            padding: 15px;
            border: none;
            border-radius: 10px;
            font-size: 18px;
            font-family: 'Orbitron', sans-serif;
            text-transform: uppercase;
            font-weight: 700;
            letter-spacing: 2px;
        }

        .promo-btn {
            padding: 15px 35px;
            background: white;
            color: var(--accent);
            border: none;
            border-radius: 10px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            transition: all 0.3s;
        }

        .promo-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
        }

        .collections-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 350px));
            gap: 25px;
            margin-bottom: 40px;
            justify-content: start;
        }

        .collection-item {
            background: rgba(55, 75, 105, 0.4);
            backdrop-filter: blur(5px);
            border: 2px solid rgba(215, 233, 255, 0.2);
            border-radius: 15px;
            padding: 25px;
            cursor: pointer;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }

        .collection-item::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(215, 233, 255, 0.1), transparent);
            transform: rotate(45deg);
            transition: all 0.5s;
            /* IMPORTANT: never block clicks on buttons/links inside the card */
            pointer-events: none;
        }

        /* Ensure the content is above the decorative ::before layer */
        .collection-cover,
        .collection-info {
            position: relative;
            z-index: 2;
        }

        .collection-item:hover::before {
            left: 100%;
        }

        .collection-item:hover {
            transform: translateY(-5px);
            border-color: var(--accent);
            box-shadow: 0 10px 30px rgba(167, 40, 80, 0.3);
        }

.collection-cover {
    width: 100%;
    height: 240px;
    margin-bottom: 16px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-cover img {
    width: auto;
    height: 220px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}
.collection-item:hover .collection-cover img {
    transform: scale(1.05);
}

        .collection-info h3 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            margin-bottom: 10px;
            font-size: 22px;
        }

        /* ===== HISTORIQUE ===== */
        .history-filter-btn {
            padding: 7px 16px;
            border-radius: 20px;
            border: 1px solid rgba(215,233,255,0.2);
            background: rgba(55,75,105,0.4);
            color: var(--secondary-3);
            font-family: 'Orbitron', sans-serif;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .history-filter-btn:hover { background: rgba(55,75,105,0.7); color: var(--primary-light); }
        .history-filter-btn.active { background: rgba(255,215,0,0.15); color: var(--photon-glow); border-color: rgba(255,215,0,0.4); }

        .history-entry {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 14px 18px;
            border-radius: 12px;
            background: rgba(55,75,105,0.25);
            border: 1px solid rgba(215,233,255,0.07);
            margin-bottom: 8px;
            transition: background 0.2s;
        }
        .history-entry:hover { background: rgba(55,75,105,0.4); }
        .history-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
        }
        .history-amount-pos { color: #4caf50; font-weight: 900; font-family: 'Orbitron', sans-serif; font-size: 14px; white-space:nowrap; }
        .history-amount-neg { color: var(--accent); font-weight: 900; font-family: 'Orbitron', sans-serif; font-size: 14px; white-space:nowrap; }

        .hist-page-btn {
            padding: 6px 14px;
            border-radius: 8px;
            border: 1px solid rgba(215,233,255,0.2);
            background: rgba(55,75,105,0.4);
            color: var(--secondary-3);
            font-family: 'Orbitron', sans-serif;
            font-size: 11px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .hist-page-btn:hover { background: rgba(55,75,105,0.7); color: var(--primary-light); }
        .hist-page-btn.active { background: rgba(255,215,0,0.2); color: var(--photon-glow); border-color: rgba(255,215,0,0.4); }

        .mini-progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(215, 233, 255, 0.1);
            border-radius: 10px;
            overflow: hidden;
            margin-top: 10px;
        }
        
        .mini-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--accent) 0%, #c9305d 100%);
            transition: width 0.5s ease;
            border-radius: 10px;
        }

        .collection-price {
            font-size: 28px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            color: #ffd700;
            margin: 15px 0;
        }

        .buy-collection-btn {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            transition: all 0.3s;
        }

        .buy-collection-btn:disabled{
            opacity: 0.75;
            cursor: not-allowed;
            filter: saturate(0.75);
        }
        .buy-collection-btn:disabled:hover{
            transform: none !important;
            box-shadow: none !important;
        }

        

        .buy-collection-btn:hover {
            transform: scale(1.05);
        }

        .booster-card {
            background: linear-gradient(135deg, var(--secondary-2) 0%, var(--secondary-1) 100%);
            padding: 50px;
            border-radius: 20px;
            text-align: center;
            color: white;
            margin-bottom: 30px;
            border: 2px solid rgba(215, 233, 255, 0.2);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .booster-card h2 {
            font-family: 'Orbitron', sans-serif;
            font-size: 38px;
            margin-bottom: 15px;
            text-transform: uppercase;
            letter-spacing: 3px;
        }

        .booster-card p {
            font-size: 20px;
            margin-bottom: 25px;
            opacity: 0.9;
        }

        .booster-price {
            font-size: 56px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            margin: 25px 0;
            color: #ffd700;
            text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }

        .buy-btn {
            padding: 20px 50px;
            background: linear-gradient(135deg, var(--accent) 0%, #c9305d 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 20px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 2px;
            box-shadow: 0 5px 25px rgba(167, 40, 80, 0.5);
        }

        .buy-btn:hover {
            transform: scale(1.05) translateY(-3px);
            box-shadow: 0 10px 35px rgba(167, 40, 80, 0.7);
        }

        .buy-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .earn-photons-section {
            background: rgba(55, 75, 105, 0.3);
            backdrop-filter: blur(5px);
            padding: 30px;
            border-radius: 15px;
            margin-top: 30px;
            border: 2px solid rgba(215, 233, 255, 0.1);
        }

        .earn-photons-section h3 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            margin-bottom: 20px;
            font-size: 24px;
        }

        .earn-option {
            background: rgba(28, 38, 54, 0.6);
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid rgba(215, 233, 255, 0.1);
            transition: all 0.3s;
        }

        .earn-option:hover {
            border-color: var(--accent);
            transform: translateX(5px);
        }

        .earn-option strong {
            color: var(--primary-light);
            font-size: 18px;
        }

        .earn-option p {
            color: var(--secondary-3);
            font-size: 14px;
            margin-top: 5px;
        }

        .earn-photons-badge {
            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
            padding: 8px 20px;
            border-radius: 25px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-dark);
            box-shadow: 0 3px 15px rgba(255, 215, 0, 0.4);
        }

        /* Collection */
        .collection-header {
            background: rgba(28, 38, 54, 0.9);
            backdrop-filter: blur(10px);
            padding: 30px;
            border-radius: 20px;
            margin-bottom: 30px;
            text-align: center;
            border: 2px solid rgba(215, 233, 255, 0.1);
        }

        .collection-header h2 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            font-size: 32px;
            margin-bottom: 20px;
        }

        .progress-bar {
            background: rgba(55, 75, 105, 0.5);
            height: 40px;
            border-radius: 20px;
            overflow: hidden;
            margin: 20px 0;
            border: 2px solid rgba(215, 233, 255, 0.2);
        }

        .progress-fill {
            background: linear-gradient(90deg, var(--accent) 0%, #c9305d 100%);
            height: 100%;
            transition: width 0.5s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            font-size: 18px;
        }

        .collection-stats {
            color: var(--primary-light);
            font-size: 18px;
            font-weight: 600;
        }

        .cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 25px;
            background: rgba(28, 38, 54, 0.5);
            backdrop-filter: blur(5px);
            padding: 40px;
            border-radius: 20px;
            border: 2px solid rgba(215, 233, 255, 0.1);
        }

        .card-item {
            background: rgba(55, 75, 105, 0.4);
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            transition: all 0.3s;
            border: 3px solid transparent;
            cursor: pointer;
            position: relative;
        }

        .card-item.owned {
            border-color: #4caf50;
            box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
        }

        .card-item:hover {
            transform: translateY(-10px) scale(1.05);
            box-shadow: 0 15px 40px rgba(167, 40, 80, 0.4);
            border-color: var(--accent);
        }

        .card-image {
            width: 100%;
            height: 250px;
            background: var(--secondary-2);
            border-radius: 12px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 64px;
            position: relative;
            overflow: hidden;
            border: 2px solid rgba(215, 233, 255, 0.1);
        }

        .card-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .card-locked {
            filter: grayscale(100%) brightness(0.3);
        }

        .rarity-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            color: white;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
        }

        
        .new-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            color: rgba(28, 38, 54, 0.95);
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(215, 233, 255, 0.95);
            box-shadow: 0 3px 10px rgba(0, 170, 255, 0.35);
            border: 1px solid rgba(0, 170, 255, 0.35);
            backdrop-filter: blur(6px);
        }
.rarity-common { background: #95a5a6; }
        .rarity-rare { background: #3498db; box-shadow: 0 0 15px rgba(52, 152, 219, 0.5); }
        .rarity-epic { background: #9b59b6; box-shadow: 0 0 15px rgba(155, 89, 182, 0.5); }
        .rarity-legendary { 
            background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%); 
            box-shadow: 0 0 20px rgba(243, 156, 18, 0.7);
            animation: glow 2s infinite;
        }

        @keyframes glow {
            0%, 100% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.7); }
            50% { box-shadow: 0 0 30px rgba(243, 156, 18, 1); }
        }

        .card-name {
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
            margin-bottom: 8px;
            color: var(--primary-light);
            font-size: 16px;
        }

        .card-count {
            font-size: 14px;
            color: var(--secondary-3);
            font-weight: 600;
        }

        /* Card Zoom Modal */
        /* Bouton retour collections : caché sur desktop */
        .mob-back-collections {
            display: none;
        }

                .card-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            animation: fadeIn 0.3s;
        }

        .card-modal.active {
            display: flex;
        }

        .card-modal-content {
            max-width: 500px;
            max-height: 90vh;
            overflow-y: auto;
            background: rgba(28, 38, 54, 0.95);
            border: 3px solid var(--accent);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 0 60px rgba(167, 40, 80, 0.8);
            animation: zoomIn 0.3s;
        }

        @keyframes zoomIn {
            from { transform: scale(0.5); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .card-modal-image {
            width: 100%;
            height: 500px;
            border-radius: 15px;
            overflow: hidden;
            margin-bottom: 20px;
            border: 2px solid rgba(215, 233, 255, 0.2);
        }

        .card-modal-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .card-modal-info {
            text-align: center;
        }

        .card-modal-info h3 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            font-size: 28px;
            margin-bottom: 10px;
        }

        .close-modal {
            position: absolute;
            top: 20px;
            right: 20px;
            padding: 12px 25px;
            background: var(--accent);
            color: white;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
        }

        /* Booster Animation */
        .booster-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.98);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1500;
        }

        .booster-animation.active {
            display: flex;
        }

        .cards-reveal {
            display: flex;
            gap: 25px;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            max-width: 95%;
            padding: 20px;
            perspective: 1200px;
        }

        .revealed-card {
            background: rgba(28, 38, 54, 0.95);
            border: 3px solid var(--accent);
            border-radius: 20px;
            padding: 25px;
            width: 260px;
            animation: cardReveal 0.6s ease-out;
            box-shadow: 0 10px 40px rgba(167, 40, 80, 0.6);
            cursor: pointer;
        }

        .revealed-card:hover {
            transform: scale(1.05);
        }

        @keyframes cardReveal {
            0% {
                transform: scale(0) rotateY(180deg);
                opacity: 0;
            }
            50% {
                transform: scale(1.2) rotateY(90deg);
            }
            100% {
                transform: scale(1) rotateY(0deg);
                opacity: 1;
            }
        }

        .close-animation {
            position: absolute;
            top: 30px;
            right: 30px;
            padding: 15px 30px;
            background: var(--accent);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            color: white;
            font-size: 16px;
            box-shadow: 0 5px 20px rgba(167, 40, 80, 0.5);
        }

        /* Admin Panel */
        .admin-section {
            /* neutralisé — remplacé par sidebar layout */
        }

        .admin-section h2 {
            /* neutralisé */
        }

        .user-list {
            max-height: 500px;
            overflow-y: auto;
        }

        .user-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: rgba(55, 75, 105, 0.3);
            border-radius: 12px;
            margin-bottom: 15px;
            border: 1px solid rgba(215, 233, 255, 0.1);
        }

        .user-item strong {
            color: var(--primary-light);
            font-size: 18px;
        }

        .user-item small {
            color: var(--secondary-3);
        }

        .user-item input[type="number"],
        .user-item input[type="text"] {
            width: 120px;
            padding: 8px;
            background: rgba(215, 233, 255, 0.05);
            border: 2px solid rgba(215, 233, 255, 0.2);
            border-radius: 8px;
            margin-right: 10px;
            color: var(--primary-light);
            font-family: 'Rajdhani', sans-serif;
        }

        .add-photons-btn {
            padding: 10px 20px;
            background: #4caf50;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 700;
            font-family: 'Orbitron', sans-serif;
        }

        .card-form {
            background: rgba(55, 75, 105, 0.3);
            padding: 30px;
            border-radius: 15px;
            border: 1px solid rgba(215, 233, 255, 0.1);
        }

        .card-form label {
            color: var(--primary-light);
            font-weight: 600;
            margin-bottom: 8px;
            display: block;
        }

        .card-form input[type="text"],
        .card-form input[type="number"],
        .card-form input[type="file"],
        .card-form select {
            width: 100%;
            padding: 12px;
            background: rgba(215, 233, 255, 0.05);
            border: 2px solid rgba(215, 233, 255, 0.2);
            border-radius: 10px;
            margin-bottom: 20px;
            color: var(--primary-light);
            font-family: 'Rajdhani', sans-serif;
            font-size: 16px;
        }

        .promo-code-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: rgba(55, 75, 105, 0.3);
            border-radius: 12px;
            margin-bottom: 15px;
            font-family: 'Orbitron', sans-serif;
            border: 1px solid rgba(215, 233, 255, 0.1);
        }

        .promo-code-text {
            font-size: 22px;
            font-weight: 900;
            color: var(--accent);
            letter-spacing: 2px;
        }

        .promo-status {
            padding: 6px 15px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
        }

        .promo-active {
            background: #4caf50;
            color: white;
        }

        .promo-used {
            background: #95a5a6;
            color: white;
        }

        .notification {
            position: fixed;
            top: 30px;
            right: 30px;
            padding: 20px 30px;
            background: rgba(28, 38, 54, 0.98);
            backdrop-filter: blur(10px);
            color: white;
            border-radius: 15px;
            border: 2px solid var(--accent);
            box-shadow: 0 10px 40px rgba(167, 40, 80, 0.6);
            display: none;
            z-index: 3000;
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
        }

        .notification.show {
            display: block;
            animation: slideIn 0.4s;
        }

        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .history-section {
            background: rgba(28, 38, 54, 0.9);
            backdrop-filter: blur(10px);
            padding: 40px;
            border-radius: 20px;
            margin-bottom: 30px;
            border: 2px solid rgba(215, 233, 255, 0.1);
        }

        .history-section h2 {
            font-family: 'Orbitron', sans-serif;
            color: var(--primary-light);
            margin-bottom: 30px;
            font-size: 28px;
        }

        .history-item {
            padding: 20px;
            background: rgba(55, 75, 105, 0.3);
            border-radius: 12px;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid rgba(215, 233, 255, 0.1);
        }

        .history-item strong {
            color: var(--primary-light);
            font-size: 16px;
        }

        .history-date {
            font-size: 12px;
            color: var(--secondary-3);
            margin-top: 5px;
        }

        .history-amount {
            font-weight: 900;
            font-size: 22px;
            font-family: 'Orbitron', sans-serif;
        }

        .history-amount.positive {
            color: #4caf50;
        }

        .history-amount.negative {
            color: var(--accent);
        }

        /* Admin Accordion */
        /* ===== ADMIN SIDEBAR LAYOUT ===== */
        #adminSection {
            padding: 0 !important;
            gap: 0;
            min-height: 80vh;
            background: transparent;
        }

        /* IMPORTANT: l'admin doit être caché hors de l'onglet Admin */
        #adminSection.content-section.active {
            display: flex;
        }

        .admin-sidebar {
            width: 220px;
            flex-shrink: 0;
            background: rgba(12, 20, 35, 0.85);
            border-right: 1px solid rgba(167, 40, 80, 0.2);
            border-radius: 20px 0 0 20px;
            padding: 24px 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
            position: sticky;
            top: 20px;
            align-self: flex-start;
        }

        .admin-sidebar-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 10px;
            font-weight: 700;
            color: var(--accent);
            letter-spacing: 2px;
            padding: 0 20px 16px;
            border-bottom: 1px solid rgba(167, 40, 80, 0.15);
            margin-bottom: 8px;
        }

        .admin-nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 20px;
            cursor: pointer;
            transition: all 0.2s;
            border-left: 3px solid transparent;
            font-family: 'Rajdhani', sans-serif;
            font-size: 13px;
            font-weight: 600;
            color: rgba(150, 163, 181, 0.7);
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .admin-nav-item:hover {
            background: rgba(167, 40, 80, 0.08);
            color: var(--primary-light);
            border-left-color: rgba(167, 40, 80, 0.4);
        }

        .admin-nav-item.active {
            background: rgba(167, 40, 80, 0.12);
            color: var(--primary-light);
            border-left-color: var(--accent);
        }

        .admin-nav-item.active .admin-nav-icon {
            filter: none;
            opacity: 1;
        }

        .admin-nav-icon {
            font-size: 16px;
            width: 20px;
            text-align: center;
            opacity: 0.6;
            flex-shrink: 0;
        }

        .admin-nav-item.active .admin-nav-icon {
            opacity: 1;
        }

        .admin-main {
            flex: 1;
            min-width: 0;
            min-height: 400px;
            background: rgba(28, 38, 54, 0.6);
            border-radius: 0 20px 20px 0;
            border: 1px solid rgba(215, 233, 255, 0.06);
            border-left: none;
            overflow: hidden;
        }

        .admin-panel {
            display: none;
            padding: 32px;
            animation: adminFadeIn 0.2s ease;
        }

        .admin-panel.active {
            display: block;
        }

        @keyframes adminFadeIn {
            from { opacity: 0; transform: translateX(6px); }
            to   { opacity: 1; transform: translateX(0); }
        }

        .admin-panel-title {
            font-family: 'Orbitron', sans-serif;
            font-size: 16px;
            font-weight: 700;
            color: var(--primary-light);
            margin-bottom: 24px;
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(215, 233, 255, 0.08);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .admin-panel-title::before {
            content: '';
            display: inline-block;
            width: 4px;
            height: 18px;
            background: var(--accent);
            border-radius: 2px;
        }

        /* Legacy accordion — hidden in new layout */
        .admin-section { display: contents; }
        .admin-section-header { display: none; }
        .admin-section-arrow { display: none; }
        .admin-section-content {
            display: block !important;
            max-height: none !important;
            overflow: visible !important;
            padding: 0 !important;
        }

        
/* ═══════════════════════════════════════════════════════════════
   ADMIN — 900px (tablette/desktop) sidebar horizontale
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    #adminSection { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        border-radius: 16px 16px 0 0;
        border-right: none;
        border-bottom: 1px solid rgba(167, 40, 80, 0.2);
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 8px;
        gap: 4px;
        position: static;
        scrollbar-width: none;
    }
    .admin-sidebar::-webkit-scrollbar { display: none; }
    .admin-sidebar-title { display: none; }
    .admin-nav-item {
        padding: 8px 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .admin-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
    .admin-main {
        border-radius: 0 0 16px 16px;
        border-left: 1px solid rgba(215,233,255,0.06);
        border-top: none;
    }
    .admin-panel { padding: 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   TABLETTE — 769px à 1024px (touch-first, côté admin prioritaire)
═══════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
    body { padding: 12px; }

    .app-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 14px;
    }
    .user-info { gap: 14px; flex-wrap: wrap; }
    .user-info h2 { font-size: 17px; }
    .photon-balance, .level-display {
        padding: 9px 18px;
        font-size: 17px;
    }
    .user-stats { gap: 10px; flex-wrap: wrap; }
    .header-buttons { gap: 8px; flex-wrap: wrap; }
    .logout-btn { padding: 10px 16px; font-size: 12px; }

    .nav-tabs {
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 14px;
    }
    .nav-tab {
        flex: 1 1 calc(25% - 6px);
        padding: 11px 8px;
        font-size: 11px;
        min-width: 90px;
        letter-spacing: 0;
    }

    /* Admin sidebar reste latérale mais plus étroite */
    #adminSection { flex-direction: row; }
    .admin-sidebar {
        width: 175px;
        position: sticky;
        top: 12px;
        border-radius: 16px 0 0 16px;
        overflow: visible;
        flex-direction: column;
        padding: 16px 0;
    }
    .admin-sidebar-title { display: block; }
    .admin-nav-item {
        padding: 10px 16px;
        border-left: 3px solid transparent;
        border-bottom: none;
        font-size: 12px;
        white-space: normal;
    }
    .admin-nav-item.active {
        border-left-color: var(--accent);
        border-bottom-color: transparent;
    }
    .admin-main { border-radius: 0 16px 16px 0; }
    .admin-panel { padding: 22px; }

    .shop-container { padding: 20px; }
    .collections-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .collection-cover { height: 170px; }
    .collection-cover img { height: 150px; }
    .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 10px; }
    .card-image { height: 130px; }
    .content-section { padding: 14px; }
    .cards-reveal { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .earn-option { padding: 14px; gap: 10px; }
    .promo-section { padding: 20px; }
    .history-item { padding: 13px; gap: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — ≤ 768px  (bottom nav, header compact, UX tactile)
═══════════════════════════════════════════════════════════════ */

/* Bottom nav : cachée par défaut, visible sur mobile via JS */
.bottom-nav { display: none; }
.bottom-nav-item { display: none; }
.mobile-menu-item { display: none; }

@media (max-width: 768px) {
    /* ── Base ── */
    body {
        padding: 0;
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
    .container { padding: 10px 10px 0; }

    /* ── Auth ── */
    .auth-container {
        margin: 16px auto;
        padding: 28px 18px;
        max-width: 100%;
        border-radius: 16px;
    }
    .auth-container h1 { font-size: 30px; margin-bottom: 28px; }

    /* ── Header compact ── */
    .app-header {
        padding: 10px 14px;
        margin-bottom: 10px;
        border-radius: 14px;
        flex-wrap: wrap;
        gap: 8px;
    }
    /* Cacher les boutons de nav dans le header — remplacés par bottom nav */
    .app-header > div:last-child {
        display: none !important;
    }
    .user-info {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    .user-info h2 { font-size: 15px; }
    .user-stats { gap: 8px; flex-wrap: wrap; }
    .photon-balance, .level-display {
        padding: 6px 14px;
        font-size: 15px;
        gap: 6px;
    }
    /* Masquer la barre XP sur mobile pour garder le header léger */
    .xp-bar-container { display: none; }
    .xp-text { display: none; }

    /* ── Nav tabs : cachés → bottom nav ── */
    .nav-tabs { display: none !important; }

    /* ── Bottom Nav ── */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(10, 16, 28, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-top: 1px solid rgba(167, 40, 80, 0.22);
        height: calc(60px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        align-items: stretch;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    }
    .bottom-nav-item {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        cursor: pointer;
        padding: 6px 2px;
        border: none;
        background: none;
        color: rgba(150, 163, 181, 0.55);
        font-family: 'Rajdhani', sans-serif;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.15s;
        position: relative;
    }
    .bnav-icon { font-size: 22px; line-height: 1; }
    .bnav-label {
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        line-height: 1;
    }
    .bottom-nav-item.active { color: var(--accent); }
    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        top: 0; left: 15%; right: 15%;
        height: 2px;
        background: var(--accent);
        border-radius: 0 0 3px 3px;
        box-shadow: 0 0 8px rgba(167,40,80,0.6);
    }

    /* Menu "Plus" items */
    .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 12px 6px;
        border: 1px solid rgba(215,233,255,0.08);
        border-radius: 12px;
        background: rgba(28,38,54,0.5);
        color: rgba(215,233,255,0.8);
        font-family: 'Rajdhani',sans-serif;
        cursor: pointer;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-menu-item.active { border-color: rgba(167,40,80,0.4); color: var(--accent); }

    /* ── Content sections ── */
    .content-section { padding: 0; }
    .content-section.active { padding-bottom: 10px; animation: fadeIn 0.3s ease; }

    /* ── Shop ── */
    .shop-container { padding: 14px; border-radius: 14px; }
    .promo-section { padding: 16px 14px; border-radius: 12px; }
    .promo-section h3 { font-size: 20px; }
    .promo-input-group { flex-direction: column; gap: 10px; }
    .promo-input-group input, .promo-btn { width: 100%; }

    /* ── Collections ── */
    .collections-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        padding: 0;
    }
    .collection-item { padding: 10px; }
    .collection-cover { height: 130px; }
    .collection-cover img { height: 110px; }
    .collection-info h3 { font-size: 13px; }
    .collection-price { font-size: 16px; }

    /* ── Cards ── */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 8px;
    }
    .card-item { padding: 6px; }
    .card-image { height: 110px; }
    .card-name { font-size: 12px; }
    .rarity-badge { font-size: 9px; padding: 3px 6px; }

    /* ── Booster ── */
    .booster-card { padding: 24px 14px; }
    .booster-card h2 { font-size: 24px; }
    .booster-card p { font-size: 14px; }
    .booster-price { font-size: 38px; }
    .booster-animation { padding: 16px 8px; }
    .cards-reveal { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .revealed-card { padding: 8px; }
    .close-animation { position: relative; margin-bottom: 12px; width: 100%; }

    /* ── Earn Photons ── */
    .earn-photons-section { padding: 16px 12px; }
    .earn-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
    }
    .earn-photons-badge { align-self: flex-end; }

    /* ── Collection detail ── */
    .collection-header h2 { font-size: 22px; }
    .progress-bar { height: 26px; }
    .progress-fill { font-size: 11px; }

    /* ── History ── */
    .history-item {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 12px;
    }
    .history-amount { align-self: flex-end; }

    /* ── Card Modal ── */
    .card-modal-content {
        max-width: 100%;
        margin: 10px;
        padding: 18px;
        border-radius: 16px;
    }
    .card-modal-image { height: 280px; }
    .card-modal-info h3 { font-size: 18px; }
    .close-modal { top: 10px; right: 10px; padding: 8px 14px; font-size: 12px; }

    /* ── Bouton retour collections mobile ── */
    .mob-back-collections {
        display: block;
        position: sticky;
        bottom: 70px; /* au-dessus de la bottom nav */
        left: 0;
        right: 0;
        padding: 12px 16px;
        margin-top: 16px;
        z-index: 50;
    }
    .mob-back-collections button {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, rgba(167,40,80,0.9), rgba(120,20,50,0.9));
        color: #fff;
        border: none;
        border-radius: 14px;
        font-family: 'Orbitron', sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.5px;
        cursor: pointer;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(167,40,80,0.4);
    }

        /* ── Admin Section ── */
    #adminSection { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        border-radius: 14px 14px 0 0;
        border-right: none;
        border-bottom: 1px solid rgba(167, 40, 80, 0.2);
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 8px 6px;
        gap: 4px;
        position: static;
        scrollbar-width: none;
    }
    .admin-sidebar::-webkit-scrollbar { display: none; }
    .admin-sidebar-title { display: none; }
    .admin-nav-item {
        padding: 8px 12px;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .admin-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--accent);
    }
    .admin-main { border-radius: 0 0 14px 14px; border-left: 1px solid rgba(215,233,255,0.06); border-top: none; }
    .admin-panel { padding: 14px; }

    /* ── User cards admin ── */
    .user-item { flex-direction: column; gap: 12px; padding: 14px; }
    .user-item > div { width: 100%; }
    .user-item input[type="number"], .user-item input[type="text"] {
        width: 100% !important;
        margin-bottom: 8px;
    }
    .user-item button { width: 100%; }
    .card-form input, .card-form select { font-size: 14px; }

    /* ── Promo codes ── */
    .promo-code-item { flex-direction: column; gap: 12px; align-items: flex-start; padding: 14px; }
    .promo-code-text { font-size: 18px; }

    /* ── Notification ── */
    .notification {
        top: 10px; right: 10px; left: 10px;
        max-width: 100%;
        padding: 14px;
        font-size: 13px;
    }

    /* ── Mini progress bar ── */
    .mini-progress-bar { height: 6px; }

    /* ── Buttons ── */
    .btn, .buy-btn, .buy-collection-btn, .add-photons-btn {
        padding: 14px 18px;
        font-size: 14px;
    }

    /* ── Touch targets minimum 44px ── */
    .admin-nav-item, .bottom-nav-item, button.mobile-menu-item {
        min-height: 44px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   TRÈS PETITS MOBILES — ≤ 380px
═══════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
    .bnav-label { display: none; }
    .bottom-nav { height: calc(52px + env(safe-area-inset-bottom)); }
    body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
    .bnav-icon { font-size: 24px; }
    .auth-container h1 { font-size: 26px; }
    .collections-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
    .booster-card h2 { font-size: 20px; }
    .booster-price { font-size: 32px; }
}



        /* Progression accordion (tiers repliables) */
        .tier-accordion {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .tier-section {
            border: 1px solid rgba(215, 233, 255, 0.15);
            background: rgba(28, 38, 54, 0.55);
            border-radius: 16px;
            overflow: hidden;
        }
        .tier-header {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px 16px;
            background: rgba(28, 38, 54, 0.85);
            color: rgba(215, 233, 255, 0.92);
            border: none;
            cursor: pointer;
            font-weight: 800;
            letter-spacing: .4px;
        }
        .tier-header:hover {
            background: rgba(28, 38, 54, 0.95);
        }
        .tier-header .tier-title {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .tier-header .tier-chevron {
            opacity: 0.75;
            transition: transform 220ms ease;
            font-weight: 900;
        }
        .tier-header[aria-expanded="true"] .tier-chevron {
            transform: rotate(90deg);
        }
        .tier-header .tier-meta {
            font-size: 0.9em;
            color: rgba(215, 233, 255, 0.7);
            font-weight: 700;
        }
        .tier-body {
            display: none;
            padding: 10px 12px 12px;
        }
        .tier-body.open {
            display: block;
        }


        /* Admin - Accordéons collections (Gestion des cartes) */
        .admin-accordion {
            margin-bottom: 12px;
            border: 1px solid rgba(215,233,255,0.12);
            border-radius: 14px;
            overflow: hidden;
            background: rgba(15,22,35,0.18);
        }
        .admin-accordion .acc-header{
            width:100%;
            display:flex;
            align-items:center;
            justify-content:space-between;
            padding: 14px 16px;
            cursor:pointer;
            user-select:none;
            background: rgba(28,38,54,0.92);
            border-bottom: 1px solid rgba(215,233,255,0.08);
        }
        .admin-accordion .acc-title{
            display:flex;
            align-items:baseline;
            gap:10px;
            color: var(--primary-light);
            font-family: 'Orbitron', sans-serif;
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.5px;
        }
        .admin-accordion .acc-count{
            color: rgba(150,163,181,0.7);
            font-family: 'Rajdhani', sans-serif;
            font-size: 12px;
            font-weight: 600;
        }
        .admin-accordion .acc-chevron{
            width: 28px;
            height: 28px;
            display:flex;
            align-items:center;
            justify-content:center;
            border-radius: 10px;
            background: rgba(215,233,255,0.06);
            border: 1px solid rgba(215,233,255,0.10);
            color: rgba(215,233,255,0.9);
            transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
            flex-shrink:0;
        }
        .admin-accordion.is-open .acc-chevron{
            transform: rotate(90deg);
            background: rgba(124,199,255,0.10);
            border-color: rgba(124,199,255,0.35);
        }
        .admin-accordion .acc-body{
            overflow:hidden;
            max-height: 0;
            transition: max-height 260ms ease;
            background: rgba(15,22,35,0.35);
        }
        .admin-accordion .acc-body-inner{
            padding: 2px 0;
        }
        .admin-accordion:hover .acc-header{
            background: rgba(28,38,54,0.98);
        }

        .admin-accordion-controls{
            display:flex;
            gap:10px;
            margin: 0 0 14px 0;
            flex-wrap: wrap;
        }
        .admin-accordion-controls .btn-mini{
            padding: 10px 14px;
            border-radius: 12px;
            border: 1px solid rgba(215,233,255,0.16);
            background: rgba(28,38,54,0.75);
            color: var(--primary-light);
            font-family: 'Orbitron', sans-serif;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.6px;
            cursor: pointer;
        }
        .admin-accordion-controls .btn-mini:hover{
            border-color: rgba(124,199,255,0.35);
            box-shadow: 0 0 0 2px rgba(124,199,255,0.10);
        }



/* --- AUTH default (no !important) --- */
#authScreen{display:block;}
#mainApp{display:none;}

/* ═══════════════════════════════════════════════════
   PACK OPENING — TCG PRO
═══════════════════════════════════════════════════ */

/* Overlay : fond ambiant animé par rareté */
#boosterAnimation {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    background: #080d14;
    overflow: hidden;
}
#boosterAnimation.active { display: flex; }

/* Particules d'ambiance en fond */
#boosterAnimation::before {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, var(--pack-glow, rgba(124,199,255,0.06)) 0%, transparent 70%);
    animation: packAmbient 4s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes packAmbient {
    from { transform: scale(1) rotate(0deg); opacity: 0.6; }
    to   { transform: scale(1.15) rotate(3deg); opacity: 1; }
}

@keyframes packCardEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Stage */
.pack-stage {
    position: relative;
    width: min(340px, 80vw);
    margin: 0 auto;
    cursor: pointer;
    outline: none;
    perspective: 1200px;
    animation: packCardEnter 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.pack-counter {
    position: absolute;
    top: -44px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: rgba(215, 233, 255, 0.5);
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Carte 3D flip */
.pack-card {
    position: relative;
    width: 100%;
    aspect-ratio: 63 / 88;
    border-radius: 20px;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 30px 80px rgba(0,0,0,0.8),
        0 10px 30px rgba(0,0,0,0.5);
    /* PAS d'animation ici — ça écraserait le transform du flip */
}
.pack-card.is-front {
    transform: rotateY(180deg) !important;
}


/* Glow autour de la carte selon rareté — appliqué au stage */
.pack-stage.glow-common  .pack-card { box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 40px rgba(215,233,255,0.2); }
.pack-stage.glow-rare    .pack-card { box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 60px rgba(80,170,255,0.5), 0 0 120px rgba(80,170,255,0.2); }
.pack-stage.glow-epic    .pack-card { box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 60px rgba(195,80,255,0.6), 0 0 120px rgba(195,80,255,0.25); }
.pack-stage.glow-legendary .pack-card { box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 80px rgba(255,210,60,0.7), 0 0 160px rgba(255,210,60,0.3); }

/* Faces */
.pack-face {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dos */
.pack-back {
    background: #0d1520;
}
.pack-back-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.1) contrast(1.05);
}

/* Hint clique */
.pack-hint {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: rgba(215,233,255,0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: hintPulse 1.8s ease-in-out infinite;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
@keyframes hintPulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* Face avant */
.pack-front {
    transform: rotateY(180deg);
    background: #080d14;
    display: flex;
    flex-direction: column;
}

/* Image plein format */
.pack-front-media {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.pack-front-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pack-front-emoji { font-size: 64px; text-align: center; padding: 40px; }

/* Bandeau nom en bas */
.pack-front-footer {
    flex-shrink: 0;
    padding: 12px 16px 14px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.pack-front-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #d7e9ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}
.pack-front-meta {
    font-size: 11px;
    color: rgba(215,233,255,0.45);
    font-weight: 600;
}

/* Effet holographique shimmer sur la face avant */
.pack-front::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
    background: linear-gradient(
        115deg,
        transparent 20%,
        rgba(255,255,255,0.04) 40%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.04) 60%,
        transparent 80%
    );
    background-size: 200% 200%;
    animation: holoShimmer 3s linear infinite;
    mix-blend-mode: screen;
}
@keyframes holoShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Liseré intérieur */
.pack-front::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 14px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 5;
}

/* Badges */
.pack-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 6px;
    align-items: center;
    z-index: 10;
}
.pack-badges .new-badge {
    background: linear-gradient(135deg, #ff6b35, #ff3366);
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 1px;
    box-shadow: 0 0 14px rgba(255,80,80,0.6);
    animation: newBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes newBadgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}
.pack-badges .rarity-badge {
    position: relative;
    top: auto; right: auto;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
}

/* Particules dorées au reveal (injectées par JS) */
.pack-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: particleFly var(--dur, 1s) ease-out forwards;
}
@keyframes particleFly {
    0%   { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* Navigation cartes */
.pack-nav {
    position: absolute;
    bottom: -56px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.pack-nav-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.pack-nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(215,233,255,0.2);
    transition: all 0.3s;
}
.pack-nav-dot.done  { background: rgba(215,233,255,0.5); width: 4px; height: 4px; }
.pack-nav-dot.current { background: #fff; width: 8px; height: 8px; box-shadow: 0 0 8px #fff; }




/* Couleurs de rareté pour les badges */
.rarity-common    { background: rgba(215,233,255,0.15); color: #d7e9ff; border-color: rgba(215,233,255,0.3) !important; }
.rarity-rare      { background: rgba(80,170,255,0.2);   color: #7cc7ff; border-color: rgba(80,170,255,0.5) !important; }
.rarity-epic      { background: rgba(195,80,255,0.2);   color: #d580ff; border-color: rgba(195,80,255,0.5) !important; }
.rarity-legendary { background: rgba(255,210,60,0.2);   color: #ffd700; border-color: rgba(255,210,60,0.5) !important; }


/* =========================
   Admin: Récompenses par Niveau (Level Rewards)
   ========================= */
#admin-panel-levelrewards .level-reward-row,
.level-reward-row{
    background: rgba(28, 38, 54, 0.70);
    border: 1px solid rgba(215, 233, 255, 0.10);
    border-radius: 16px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

#admin-panel-levelrewards .level-reward-header,
.level-reward-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}

#admin-panel-levelrewards .level-reward-title,
.level-reward-title{
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#admin-panel-levelrewards .lvl-chip,
.lvl-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.4px;
    background: rgba(167, 40, 80, 0.18);
    border: 1px solid rgba(167, 40, 80, 0.45);
    color: var(--primary-light);
    white-space: nowrap;
}

#admin-panel-levelrewards .lvl-reward-label,
.lvl-reward-label{
    font-weight: 800;
    font-size: 12px;
    color: rgba(215,233,255,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

#admin-panel-levelrewards .level-reward-toggle,
.level-reward-toggle{
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(215, 233, 255, 0.06);
    border: 1px solid rgba(215, 233, 255, 0.14);
    color: rgba(215, 233, 255, 0.92);
    display: grid;
    place-items: center;
    cursor: pointer;
    flex: 0 0 auto;
}

#admin-panel-levelrewards .level-reward-toggle:hover,
.level-reward-toggle:hover{
    border-color: rgba(215, 233, 255, 0.24);
    background: rgba(215, 233, 255, 0.09);
}

#admin-panel-levelrewards .level-reward-body,
.level-reward-body{
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(215, 233, 255, 0.08);
}

#admin-panel-levelrewards .level-reward-grid,
.level-reward-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    align-items: end;
}

#admin-panel-levelrewards .level-reward-grid label,
.level-reward-grid label{
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(215,233,255,0.76);
}

#admin-panel-levelrewards .lvl-input,
#admin-panel-levelrewards .level-reward-grid select,
.lvl-input,
.level-reward-grid select{
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(215, 233, 255, 0.14);
    background: rgba(10, 18, 28, 0.35);
    color: var(--primary-light);
    outline: none;
}

#admin-panel-levelrewards .lvl-input:focus,
#admin-panel-levelrewards .level-reward-grid select:focus,
.lvl-input:focus,
.level-reward-grid select:focus{
    border-color: rgba(124,199,255,0.55);
    box-shadow: 0 0 0 3px rgba(124,199,255,0.18);
}

#admin-panel-levelrewards .level-reward-actions,
.level-reward-actions{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 12px;
}

#admin-panel-levelrewards .level-reward-actions .btn,
.level-reward-actions .btn{
    width: auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: 0.4px;
}

#admin-panel-levelrewards .level-reward-actions .btn-primary,
.level-reward-actions .btn-primary{
    background: var(--accent);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 10px 24px rgba(167,40,80,0.22);
}

#admin-panel-levelrewards .level-reward-actions .btn-secondary,
.level-reward-actions .btn-secondary{
    background: rgba(215,233,255,0.08);
    border: 1px solid rgba(215,233,255,0.14);
}

/* Mobile: keep things readable */
@media (max-width: 900px){
    #admin-panel-levelrewards .lvl-reward-label,
    .lvl-reward-label{
        max-width: 240px;
    }
}



/* ===== Rewards V2: Admin config accordéons (details/summary) ===== */
.lvlcfg{
  background: rgba(28,38,54,0.75);
  border: 1px solid rgba(215,233,255,0.15);
  border-radius: 14px;
  padding: 10px 14px;
  margin: 10px 0;
}
.lvlcfg > summary{
  cursor: pointer;
  list-style: none;
}
.lvlcfg > summary::-webkit-details-marker{ display:none; }
.lvlcfg-summary{ display:flex; justify-content:space-between; gap:12px; align-items:center; }
.lvlcfg-title{ font-family: Orbitron, sans-serif; color: var(--primary-light); }
.lvlcfg-sub{ color: var(--secondary-3); font-size: 12px; }
.lvlcfg-body{ padding: 12px 0 4px; }
.lvlcfg-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.lvlcfg-field{ display:flex; flex-direction:column; gap:6px; }
.lvlcfg-field span{ color: var(--secondary-3); font-size: 12px; }
.lvlcfg-field input, .lvlcfg-field select, .lvlcfg-field textarea{
  width:100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(215,233,255,0.15);
  color: var(--primary-light);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.lvlcfg-field textarea{ resize: vertical; }
.lvlcfg-wide{ grid-column: 1 / -1; }
.lvlcfg-actions{ display:flex; justify-content:flex-end; padding-top:10px; }

/* ===== Rewards list (progression tiers) ===== */
.level-tier{ margin: 12px 0; border-radius: 14px; border: 1px solid rgba(215,233,255,0.12); background: rgba(28,38,54,0.6); padding: 10px 14px; }
.level-tier > summary{ cursor:pointer; list-style:none; color: var(--secondary-3); font-family: Orbitron, sans-serif; font-size: 13px; }
.level-tier > summary::-webkit-details-marker{ display:none; }
.level-tier-body{ padding-top: 10px; display:flex; flex-direction:column; gap:10px; }

/* Small fix: reward item for list */
.reward-item.unlocked .reward-status{ color: #8fffa8; }
.reward-item.locked .reward-status{ color: var(--secondary-3); }


/* =========================
   Rewards V2 Split
   ========================= */
.rewards-split{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:20px;
    margin-top:20px;
}

@media (max-width: 980px){
    .rewards-split{ grid-template-columns: 1fr; }
}

.rewards-card{
    background: rgba(28, 38, 54, 0.92);
    border: 1px solid rgba(215, 233, 255, 0.10);
    border-radius: 18px;
    padding: 18px 18px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
}

.rewards-card-title{
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-light);
    font-size: 20px;
    margin-bottom: 6px;
    display:flex;
    align-items:center;
    gap:10px;
}

.rewards-card-subtitle{
    color: rgba(215, 233, 255, 0.75);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 14px;
}

.rewards-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height: 64px;
}

.rewards-list .loading{
    color: rgba(215, 233, 255, 0.65);
    text-align:center;
    padding: 24px 0;
}

.reward-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding: 12px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(55, 75, 105, 0.25) 0%, rgba(28, 38, 54, 0.10) 100%);
    border: 1px solid rgba(215, 233, 255, 0.10);
}

.reward-row .reward-info{
    display:flex;
    flex-direction:column;
    gap:3px;
    min-width: 0;
}

.reward-row .reward-title{
    color: var(--primary-light);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-row .reward-desc{
    color: rgba(215, 233, 255, 0.70);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-row .reward-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink: 0;
}

.reward-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(215, 233, 255, 0.15);
    background: rgba(215, 233, 255, 0.06);
    color: rgba(215, 233, 255, 0.85);
}

.reward-pill.success{
    border-color: rgba(76,175,80,0.35);
    background: rgba(76,175,80,0.12);
    color: #a6f3ac;
}

.reward-pill.lock{
    border-color: rgba(150, 163, 181, 0.25);
    background: rgba(150, 163, 181, 0.10);
    color: rgba(215, 233, 255, 0.70);
}

.reward-claim-btn{
    padding: 8px 14px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    box-shadow: 0 10px 20px rgba(167, 40, 80, 0.25);
}

.reward-claim-btn:disabled{
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.reward-row.available{
    border-color: rgba(167, 40, 80, 0.35);
    background: linear-gradient(135deg, rgba(167, 40, 80, 0.18) 0%, rgba(28, 38, 54, 0.10) 55%, rgba(55, 75, 105, 0.18) 100%);
}

.reward-row.available .reward-title{
    color: #ffffff;
}

.reward-row.available .reward-desc{
    color: rgba(255,255,255,0.80);
}


/* Rewards V2 Items */
.rewards-v2 .reward-item,
.rewards-card .reward-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(215, 233, 255, 0.10);
    background: linear-gradient(135deg, rgba(55, 75, 105, 0.22) 0%, rgba(28, 38, 54, 0.10) 100%);
}

.rewards-v2 .reward-item:hover,
.rewards-card .reward-item:hover{
    border-color: rgba(215, 233, 255, 0.18);
}

.reward-item-left{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:3px;
}

.reward-item-title{
    color: var(--primary-light);
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-item-desc{
    color: rgba(215, 233, 255, 0.72);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reward-claim-btn{
    padding: 8px 14px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    letter-spacing: .6px;
    text-transform: uppercase;
    box-shadow: 0 10px 22px rgba(167, 40, 80, 0.22);
}

.reward-claim-irl-btn{
    padding: 8px 14px !important;
    border-radius: 12px !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    letter-spacing: .6px;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35) 0%, rgba(255, 215, 0, 0.18) 100%) !important;
    border: 1px solid rgba(255, 215, 0, 0.40) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(255, 215, 0, 0.12);
}

.reward-item-compact{
    background: rgba(28, 38, 54, 0.55) !important;
}

.reward-code{
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px dashed rgba(215, 233, 255, 0.35);
    background: rgba(215, 233, 255, 0.05);
    color: rgba(215, 233, 255, 0.95);
}

.rewards-subsection-title{
    margin-top: 14px;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(215, 233, 255, 0.85);
    opacity: .9;
}

.rewards-empty, .rewards-error{
    text-align:center;
    padding: 18px 10px;
    color: rgba(215, 233, 255, 0.70);
    border: 1px dashed rgba(215, 233, 255, 0.18);
    border-radius: 14px;
    background: rgba(28, 38, 54, 0.35);
}

/* Fix couleurs texte – onglet Progression / liste récompenses de niveau */
.reward-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.reward-title {
    color: var(--primary-light, #d7e9ff);
    font-weight: 700;
    font-size: 14px;
}
.reward-description {
    color: rgba(215, 233, 255, 0.80);
    font-size: 13px;
}
.reward-item.locked .reward-title {
    color: rgba(215, 233, 255, 0.55);
}
.reward-item.locked .reward-description {
    color: rgba(215, 233, 255, 0.40);
}

/* Fix barre XP header – empêche l'écrasement */
.xp-bar-container {
    min-width: 120px !important;
    flex: 1 1 120px !important;
    height: 14px !important;
    max-height: 14px !important;
}

/* Couleur jaune garantie pour le solde Photons header */
#coinBalance {
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

        /* ═══════════════════════════════════════
           CARTES EXCLUSIVES
        ═══════════════════════════════════════ */

        .card-item.exclusive {
            border-color: rgba(255, 200, 50, 0.7) !important;
            box-shadow:
                0 0 0 1px rgba(255,200,50,0.3),
                0 0 20px rgba(255,170,0,0.25),
                inset 0 0 30px rgba(255,150,0,0.05);
            animation: excl-border-pulse 3s ease-in-out infinite;
        }

        @keyframes excl-border-pulse {
            0%,100% {
                box-shadow:
                    0 0 0 1px rgba(255,200,50,0.3),
                    0 0 20px rgba(255,170,0,0.25),
                    inset 0 0 30px rgba(255,150,0,0.05);
            }
            50% {
                box-shadow:
                    0 0 0 1px rgba(255,220,80,0.6),
                    0 0 35px rgba(255,190,0,0.45),
                    inset 0 0 40px rgba(255,160,0,0.12);
            }
        }

        /* Overlay brillant qui tourne sur l'image */
        .card-item.exclusive .card-image::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 2;
            background: linear-gradient(
                115deg,
                transparent 20%,
                rgba(255,220,100,0.12) 40%,
                rgba(255,255,200,0.22) 50%,
                rgba(255,220,100,0.12) 60%,
                transparent 80%
            );
            background-size: 200% 200%;
            animation: excl-shine 4s ease-in-out infinite;
            pointer-events: none;
        }

        @keyframes excl-shine {
            0%   { background-position: 200% 50%; opacity: 0; }
            20%  { opacity: 1; }
            80%  { opacity: 1; }
            100% { background-position: -100% 50%; opacity: 0; }
        }

        /* Badge EXCLUSIF */
        .excl-badge {
            position: absolute;
            bottom: 8px;
            left: 8px;
            z-index: 5;
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 7px;
            font-weight: 900;
            font-family: 'Orbitron', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: #1a0f00;
            background: linear-gradient(135deg, #ffd000, #ff8c00);
            box-shadow: 0 0 10px rgba(255,170,0,0.6);
            pointer-events: none;
            animation: excl-badge-glow 2s ease-in-out infinite;
        }

        @keyframes excl-badge-glow {
            0%,100% { box-shadow: 0 0 8px rgba(255,170,0,0.6); }
            50%      { box-shadow: 0 0 16px rgba(255,200,0,1); }
        }

        /* Particules étoiles */
        .card-item.exclusive .card-image::after {
            background: linear-gradient(
                to top,
                rgba(8,14,26,0.92) 0%,
                rgba(8,14,26,0.35) 38%,
                transparent 62%
            ) !important;
        }


/* =========================================================
   COLLECTION UI CLEAN (cards grid)
   - fixes badge chaos by using dedicated classes (.c-badges/.c-badge)
   - moves title below image (card-meta)
   - rarity glow border by rarity
   ========================================================= */

.cards-grid{
  gap: 18px;
  padding: 22px;
}

.card-item{
  padding: 12px;
  border-radius: 18px;
  background: rgba(18, 28, 42, 0.55);
  border: 2px solid rgba(215,233,255,0.10);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card-item:hover{
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  border-color: rgba(215,233,255,0.22);
}

/* Remove the old "owned = green" look (we color by rarity now) */
.card-item.owned{
  border-color: rgba(215,233,255,0.18);
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}

/* Rarity glow borders */
.card-item.owned.rarity-common{
  border-color: rgba(215,233,255,0.22);
  box-shadow: 0 0 0 1px rgba(215,233,255,0.12), 0 12px 34px rgba(0,0,0,0.28);
}
.card-item.owned.rarity-rare{
  border-color: rgba(124,199,255,0.65);
  box-shadow: 0 0 0 1px rgba(124,199,255,0.22), 0 0 22px rgba(124,199,255,0.18), 0 14px 36px rgba(0,0,0,0.30);
}
.card-item.owned.rarity-epic{
  border-color: rgba(195,120,255,0.75);
  box-shadow: 0 0 0 1px rgba(195,120,255,0.22), 0 0 26px rgba(195,120,255,0.18), 0 14px 36px rgba(0,0,0,0.30);
}
.card-item.owned.rarity-legendary{
  border-color: rgba(255,210,90,0.85);
  box-shadow: 0 0 0 1px rgba(255,210,90,0.22), 0 0 30px rgba(255,210,90,0.20), 0 16px 40px rgba(0,0,0,0.34);
}

.card-item.not-owned{
  opacity: 0.70;
  border-color: rgba(215,233,255,0.08);
}

.card-image{
  margin-bottom: 10px;
  height: 260px;
  border-radius: 14px;
  border: 1px solid rgba(215,233,255,0.10);
}

.card-image--hidden{
  background: rgba(10, 16, 26, 0.65);
}

.card-back-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.40) saturate(0.40);
  transform: scale(1.02);
}

.card-hidden-icon{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: 'Orbitron', sans-serif;
  font-size: 64px;
  font-weight: 900;
  color: rgba(215,233,255,0.28);
  text-shadow: 0 10px 28px rgba(0,0,0,0.55);
  pointer-events:none;
}

/* New badge system for collection cards */
.c-badges{
  position:absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  z-index: 5;
  pointer-events:none;
}

.c-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.45);
  color: #d7e9ff;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

/* Rarity chip colors (only for collection chips) */
.c-rarity.rarity-common{ background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.18); }
.c-rarity.rarity-rare{ background: rgba(124,199,255,0.18); border-color: rgba(124,199,255,0.28); }
.c-rarity.rarity-epic{ background: rgba(195,120,255,0.18); border-color: rgba(195,120,255,0.30); }
.c-rarity.rarity-legendary{ background: rgba(255,210,90,0.18); border-color: rgba(255,210,90,0.32); }

.c-count{
  margin-left: auto;
  background: rgba(215,233,255,0.92);
  color: rgba(20,28,42,0.95);
  border-color: rgba(215,233,255,0.35);
  box-shadow: 0 8px 20px rgba(0,170,255,0.18);
}

.c-exclusive{
  background: rgba(167,40,80,0.22);
  border-color: rgba(167,40,80,0.35);
}

/* Title block under image */
.card-meta{
  background: rgba(28,38,54,0.55);
  border: 1px solid rgba(215,233,255,0.10);
  border-radius: 14px;
  padding: 10px 12px;
}

.card-meta--hidden{
  background: rgba(28,38,54,0.35);
}

.card-title{
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #d7e9ff;
  line-height: 1.25;
  min-height: 34px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub{
  margin-top: 4px;
  font-size: 11px;
  color: rgba(150,163,181,0.85);
}

/* Kill old in-image title/count if any left somewhere */
.card-image .card-name,
.card-image .card-count{
  display:none !important;
}

/* Mobile: keep it tight */
@media (max-width: 480px){
  .cards-grid{ padding: 12px; gap: 10px; }
  .card-image{ height: 160px; }
  .card-title{ font-size: 12px; min-height: 30px; }
  .c-badge{ height: 22px; font-size: 10px; padding: 0 8px; }
}

/* Hide rarity text under card name (collection view) */
.card-meta .card-rarity,
.card-meta small,
.card-meta .rarity-text {
  display: none !important;
}


/* === SORT BUTTONS CLEAN (Date / Rareté / Nom) === */
/* Container (the bar where "TRIER" sits) */
.sort-controls, .sort-row, .collection-sortbar, .sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Label "TRIER" */
.sort-label, .sort-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(215,233,255,0.55);
  margin-right: 2px;
}

/* Buttons */
.sort-btn, #sortDirBtn {
  appearance: none;
  border: 1px solid rgba(215,233,255,0.12);
  background: rgba(215,233,255,0.04);
  color: rgba(215,233,255,0.85);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.sort-btn:hover, #sortDirBtn:hover {
  transform: translateY(-1px);
  background: rgba(215,233,255,0.07);
  border-color: rgba(215,233,255,0.18);
}

.sort-btn.active {
  background: rgba(255,215,0,0.10);
  border-color: rgba(255,215,0,0.30);
  box-shadow: 0 0 18px rgba(255,215,0,0.18);
  color: rgba(255,255,255,0.95);
}

/* Direction button */
#sortDirBtn {
  width: 34px;
  justify-content: center;
  padding: 6px 0;
  font-family: 'Orbitron', sans-serif;
}

/* Mobile */
@media (max-width: 520px) {
  .sort-btn { padding: 7px 10px; }
}

/* === Badges cartes collection (système c-badge) === */
.c-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: flex-start;
    justify-content: space-between;
}

.c-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 7px;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Couleurs par rareté */
.c-rarity.rarity-common    { background: rgba(215,233,255,0.15); color: #d7e9ff;  border: 1px solid rgba(215,233,255,0.25); }
.c-rarity.rarity-rare      { background: rgba(124,199,255,0.2);  color: #7cc7ff;  border: 1px solid rgba(124,199,255,0.4); }
.c-rarity.rarity-epic      { background: rgba(167,40,80,0.25);   color: #e05a7a;  border: 1px solid rgba(167,40,80,0.5); }
.c-rarity.rarity-legendary { background: rgba(255,215,0,0.2);    color: #ffd700;  border: 1px solid rgba(255,215,0,0.4); }

/* Badge quantité ×N */
.c-count {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    margin-left: auto;
}

/* Badge exclusive */
.c-exclusive {
    background: rgba(255,215,0,0.15);
    color: #ffd700;
    border: 1px solid rgba(255,215,0,0.35);
}
/* ═══════════════════════════════════════
   BOUTON INFO + TOOLTIP COLLECTION
═══════════════════════════════════════ */

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(167, 40, 80, 0.6);
    background: rgba(167, 40, 80, 0.12);
    color: #e05a7a;
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
    vertical-align: middle;
}

.info-btn:hover {
    background: rgba(167, 40, 80, 0.28);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(167, 40, 80, 0.5);
    color: #fff;
    transform: scale(1.1);
}

.info-btn.active {
    background: linear-gradient(135deg, var(--accent), #c9305d);
    border-color: var(--accent);
    box-shadow: 0 0 14px rgba(167, 40, 80, 0.7);
    color: #fff;
}

.info-tooltip {
    margin-top: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(28, 38, 54, 0.98), rgba(55, 75, 105, 0.95));
    border: 1px solid rgba(167, 40, 80, 0.35);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(215, 233, 255, 0.85);
    line-height: 1.6;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(167, 40, 80, 0.08);
    animation: tooltipIn 0.18s ease;
    white-space: pre-line;
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ===== Pack opening: caption sous la carte (évite de masquer l’illustration) ===== */
.pack-caption{
  margin-top: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.pack-caption-name{
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(215,233,255,0.92);
  text-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.pack-caption-meta{
  font-size: 11px;
  font-weight: 700;
  color: rgba(215,233,255,0.55);
}

/* ===== Pack opening: NEW plus punchy + badges toujours côte à côte ===== */
.pack-badges{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  align-items: center;
}
.pack-badges .rarity-badge{
  position: relative !important;
  top: auto !important;
  right: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
}
.pack-badges .new-badge{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  transform: rotate(-8deg);
  box-shadow: 0 0 14px rgba(255,80,80,0.70), 0 0 34px rgba(255,80,80,0.35);
  animation: newBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both, newBadgePulse 1.4s ease-in-out infinite;
}
@keyframes newBadgePulse{
  0%,100%{ filter: brightness(1); }
  50%{ filter: brightness(1.25); }
}


.users-controls{
  display:flex;
  gap:10px;
  align-items:center;
  margin-bottom:14px;
}

.users-controls select{
  padding:8px 10px;
  background:rgba(215,233,255,0.05);
  border:1px solid rgba(215,233,255,0.15);
  border-radius:8px;
  color:#d7e9ff;
}

.badge-new{
  position:absolute;
  top:8px;
  left:8px;
  background:linear-gradient(135deg,#4caf50,#66bb6a);
  color:white;
  font-size:10px;
  font-weight:800;
  padding:3px 7px;
  border-radius:8px;
  box-shadow:0 0 10px rgba(76,175,80,0.7);
}


/* === TRI / FILTRES Utilisateurs (Admin) === */
.admin-user-sortbar{
  margin-top: 10px;
}
#userSortDirBtn{
  appearance: none;
  border: 1px solid rgba(215,233,255,0.12);
  background: rgba(215,233,255,0.04);
  color: rgba(215,233,255,0.85);
  border-radius: 10px;
  width: 34px;
  height: 30px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
#userSortDirBtn:hover{
  transform: translateY(-1px);
  background: rgba(215,233,255,0.07);
  border-color: rgba(215,233,255,0.18);
}

/* ═══════════════════════════════════════════════════════════════
   MODAUX MOBILE — full-screen bottom sheet
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* newClientModal — plein écran depuis le bas */
    #newClientModal > div {
        width: 100% !important;
        max-height: 92vh !important;
        border-radius: 20px 20px 0 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        margin: 0 !important;
    }

    /* editNewsModal — centré compact */
    #editNewsModal > div {
        width: 96vw !important;
        padding: 20px !important;
    }

    /* transmuteModal — plein écran bottom sheet */
    #transmuteModal > div:last-child {
        width: 100% !important;
        max-height: 90vh !important;
        border-radius: 20px 20px 0 0 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        margin: 0 !important;
    }

    /* Formulaires de shooting (générés dynamiquement) */
    #shootingModal > div {
        width: 96vw !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
        padding: 24px 16px !important;
        border-radius: 16px !important;
    }

    /* Tous les modaux génériques */
    [style*="position: fixed"][style*="align-items: center"] > div,
    [style*="position:fixed"][style*="align-items:center"] > div {
        max-width: 96vw !important;
    }

    /* Inputs et selects plus grands pour le toucher */
    input, select, textarea {
        font-size: 16px !important; /* évite le zoom auto iOS */
        border-radius: 10px;
    }

    /* Améliorer le scroll dans les contenus */
    .admin-panel {
        -webkit-overflow-scrolling: touch;
    }

    /* Shooting accordion sur mobile */
    .shooting-accordion-header {
        grid-template-columns: 70px 1fr auto auto !important;
    }

    /* Stats convention sur mobile */
    #conv-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* Barre de progression XP — cachée dans header, visible dans progression */
    #progressionSection .xp-bar-container,
    #progressionSection .xp-text { display: flex !important; }

    /* Notification repositionnée au-dessus de la bottom nav */
    .notification {
        bottom: calc(70px + env(safe-area-inset-bottom)) !important;
        top: auto !important;
    }
}

/* Fix iOS safe area sur iPhone avec notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .bottom-nav {
            padding-bottom: env(safe-area-inset-bottom);
        }
    }
}
/* ===== MOBILE UI v2 — Face client (max-width:768px) ===== */
    @media (max-width: 768px) {

      /* Base */
      body { padding: 10px !important; }
      .container { width: 100%; max-width: 100% !important; }
      .notification { left: 10px; right: 10px; top: 10px; width: auto; }

      /* Header : compact, stack, thumb-friendly */
      .app-header{
        padding: 14px 14px !important;
        border-radius: 18px !important;
        margin-bottom: 14px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
      }
      .user-info{
        width: 100%;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
      }
      .user-info h2{ font-size: 18px !important; }
      .user-stats{
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        align-items: stretch !important;
      }
      .level-display, .photon-balance{
        width: 100%;
        justify-content: center !important;
        padding: 10px 12px !important;
        font-size: 16px !important;
        border-radius: 16px !important;
      }
      /* Ensure the XP cluster wraps nicely */
      .app-header .user-stats > div[style*="max-width"]{
        grid-column: 1 / -1;
        max-width: 100% !important;
      }
      .xp-text{ font-size: 10px !important; text-align: center !important; }
      .logout-btn{ width: 100%; padding: 12px 14px !important; border-radius: 14px !important; }

      /* Sections : reduce padding and avoid double cards */
      .history-section,
      .shop-container,
      .level-container{
        padding: 16px !important;
        border-radius: 18px !important;
        margin-bottom: 14px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
      }
      #progressionSection .xp-bar-container {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .history-section h2{ font-size: 20px !important; margin-bottom: 16px !important; }

      /* Generic “cards” created inline with background + padding often overflow on mobile */
      [style*="padding: 40px;"][style*="border-radius: 20px;"]{
        padding: 18px !important;
        border-radius: 18px !important;
      }

      /* ===== HOME ===== */
      #homeSection h1{ font-size: 22px !important; line-height: 1.15 !important; }
      #homeSection p{ font-size: 14px !important; line-height: 1.55 !important; }
      #homeSection .btn{ width: 100% !important; }
      /* Force the main grid (2fr 1fr) into a single column */
      #homeSection > div > div[style*="grid-template-columns: 2fr 1fr"]{
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
      }
      /* “Bienvenue” CTAs stack */
      #homeSection > div > div:first-child > div[style*="display: flex"][style*="justify-content: center"]{
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
      }

      /* ===== SHOP ===== */
      .promo-section{ padding: 16px !important; border-radius: 18px !important; }
      .promo-section h3{ font-size: 18px !important; }
      .promo-input-group{ flex-direction: column !important; gap: 10px !important; }
      .promo-input-group input{ width: 100% !important; font-size: 16px !important; }
      .promo-btn{ width: 100% !important; }
      .collections-grid{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        justify-content: stretch !important;
      }
      .collection-item{ padding: 16px !important; border-radius: 16px !important; }
      .collection-item h3{ font-size: 16px !important; }

      /* ===== COLLECTION ===== */
      .cards-grid,
      .collection-grid,
      .my-cards-grid{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
      }
      #collectionSection [style*="padding: 30px;"]{ padding: 16px !important; }

      /* ===== PROGRESSION ===== */
      .level-badge{ font-size: 22px !important; padding: 10px 18px !important; }
      .level-title{ font-size: 16px !important; }
      .level-header{ flex-direction: column !important; align-items: flex-start !important; gap: 10px !important; }
      .reward-item{ padding: 12px 14px !important; border-radius: 14px !important; }
      .reward-description{ margin: 0 !important; font-size: 13px !important; }

      /* ===== REWARDS ===== */
      #rewardsSection [style*="padding: 30px;"]{ padding: 16px !important; }
      .reward-actions .btn{ width: 100% !important; }

      /* ===== REFERRAL ===== */
      #referralSection [style*="display: grid"][style*="grid-template-columns"]{
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
      }

      /* ===== HISTORY ===== */
      .history-item{
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
      }
      .history-amount{ font-size: 18px !important; }

      /* ===== MODALS (mobile full screen feel) ===== */
      #transmuteModal > div[style*="top:50%"][style*="transform:translate(-50%,-50%)"]{
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-height: 100vh !important;
        height: 100% !important;
        border-radius: 0 !important;
      }

      /* Avoid content hidden behind bottom nav */
      .content-section.active { padding-bottom: 86px !important; }
    }


/* =========================================================
   MOBILE SWIPE CAROUSEL (Boutique + Mes collections)
   - Applied only when JS adds .nx-carousel on .collections-grid
   ========================================================= */
@media (max-width: 768px){
  .collections-grid.nx-carousel{
    display:flex !important;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding: 6px 6px 14px;
    margin: 0 -6px;
  }
  .collections-grid.nx-carousel::-webkit-scrollbar{ display:none; }

  .collections-grid.nx-carousel .collection-item{
    flex: 0 0 86%;
    max-width: 86%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* Avoid hover jump on mobile */
  .collections-grid.nx-carousel .collection-item:hover{
    transform: none;
  }

  .nx-carousel-dots{
    display:flex;
    justify-content:center;
    align-items:center;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 4px;
  }
  .nx-carousel-dot{
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgba(215,233,255,0.22);
    background: rgba(215,233,255,0.12);
    cursor: pointer;
    padding: 0;
  }
  .nx-carousel-dot.active{
    background: var(--accent);
    border-color: rgba(167,40,80,0.75);
    box-shadow: 0 0 12px rgba(167,40,80,0.35);
    transform: scale(1.1);
  }
}

/* ===== Login help box (Mot de passe oublié) ===== */
.login-help-box{
    margin-top:14px;
    display:flex;
    gap:10px;
    align-items:flex-start;
    text-align:left;
    padding:12px 14px;
    border-radius:12px;
    background:rgba(124,199,255,0.06);
    border:1px solid rgba(124,199,255,0.18);
    font-size:13px;
    color:var(--secondary-3);
    line-height:1.5;
}

.login-help-box strong{
    color:var(--primary-light);
}

.login-help-icon{
    font-size:16px;
    margin-top:2px;
}

/* ════════════════════════════════════════════════════════
   MOB-HEADER — Header mobile fixe premium
   Masqué sur desktop, visible uniquement ≤ 768px
════════════════════════════════════════════════════════ */
.mob-header { display: none; }

@media (max-width: 768px) {

    /* Header desktop masqué sur mobile */
    .app-header  { display: none !important; }
    .nav-tabs    { display: none !important; }

    /* Header mobile fixe */
    .mob-header {
        display: flex !important;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 500;
        height: 62px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        background: rgba(6, 10, 20, 0.94);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid rgba(167, 40, 80, 0.22);
        box-shadow: 0 2px 24px rgba(0,0,0,0.55);
    }

    /* Trait accent gauche */
    .mob-header::before {
        content: '';
        position: absolute;
        top: 8px; bottom: 8px; left: 0;
        width: 3px;
        background: linear-gradient(to bottom, transparent, #a72850, #e05a7a, transparent);
        border-radius: 0 3px 3px 0;
    }

    /* ── Gauche : icône + titre section ── */
    .mob-header-left {
        display: flex;
        align-items: center;
        gap: 9px;
        flex: 1;
        min-width: 0;
    }

    .mob-header-icon {
        font-size: 20px;
        flex-shrink: 0;
        transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.15s;
    }
    .mob-header-icon.anim {
        transform: scale(0.5) rotate(-15deg);
        opacity: 0;
    }

    .mob-header-titles {
        display: flex;
        flex-direction: column;
        gap: 1px;
        min-width: 0;
    }

    .mob-header-name {
        font-family: 'Orbitron', sans-serif;
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 2px;
        color: #d7e9ff;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transition: opacity 0.14s, transform 0.14s;
    }
    .mob-header-name.anim { opacity: 0; transform: translateY(-6px); }

    .mob-header-sub {
        font-family: 'Rajdhani', sans-serif;
        font-size: 10px;
        font-weight: 600;
        color: rgba(150, 163, 181, 0.5);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Droite : niveau + XP + photons ── */
    .mob-header-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .mob-header-lvl {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
    }

    .mob-header-lvl-row {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .mob-header-lvl-star { font-size: 12px; }

    .mob-header-lvl-num {
        font-family: 'Orbitron', sans-serif;
        font-size: 18px;
        font-weight: 900;
        color: #e05a7a;
        line-height: 1;
        text-shadow: 0 0 14px rgba(224,90,122,0.55);
        transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    }

    .mob-header-xp-track {
        width: 56px;
        height: 3px;
        background: rgba(167, 40, 80, 0.18);
        border-radius: 2px;
        overflow: hidden;
    }

    .mob-header-xp-fill {
        height: 100%;
        background: linear-gradient(90deg, #a72850, #e05a7a);
        border-radius: 2px;
        box-shadow: 0 0 6px rgba(224,90,122,0.5);
        transition: width 0.7s cubic-bezier(0.22,1,0.36,1);
    }

    .mob-header-xp-text {
        font-family: 'Rajdhani', sans-serif;
        font-size: 9px;
        font-weight: 700;
        color: rgba(224, 90, 122, 0.6);
        letter-spacing: 0.3px;
    }

    .mob-header-sep {
        width: 1px;
        height: 32px;
        background: rgba(215, 233, 255, 0.08);
    }

    .mob-header-coins {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
    }

    .mob-header-coins-icon { font-size: 14px; line-height: 1; }

    .mob-header-coins-val {
        font-family: 'Orbitron', sans-serif;
        font-size: 14px;
        font-weight: 900;
        color: #ffd700;
        line-height: 1;
        text-shadow: 0 0 12px rgba(255,215,0,0.45);
        transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    }

    .mob-header-coins-label {
        font-family: 'Rajdhani', sans-serif;
        font-size: 9px;
        font-weight: 600;
        color: rgba(255, 215, 0, 0.45);
        text-transform: lowercase;
    }

    /* Compenser le header fixe */
    body { padding-top: 62px !important; }

    /* Promo code : bouton en dessous */
    .promo-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .promo-row input  { width: 100% !important; font-size: 16px !important; }
    .promo-row button { width: 100% !important; padding: 14px !important; }
}

/* ── Collection covers : plus grandes sur mobile (carousel) ── */
@media (max-width: 768px) {
    .collection-cover {
        height: 220px !important;
        margin-bottom: 12px !important;
    }
    .collection-cover img {
        height: 200px !important;
        width: auto !important;
        max-width: 90% !important;
        object-fit: contain !important;
        filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
    }
}

/* ── Bloc solde Photons (jaune) : compact sur mobile ── */
@media (max-width: 768px) {
    #collectionSection > div:first-child {
        padding: 12px 16px !important;
        margin-bottom: 16px !important;
        border-radius: 12px !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }
    /* Titre "MON SOLDE" */
    #collectionSection > div:first-child h3 {
        font-size: 11px !important;
        margin-bottom: 2px !important;
    }
    /* Montant en gros */
    #collectionSection > div:first-child > div:first-child > div {
        font-size: 22px !important;
    }
    #collectionSection > div:first-child > div:first-child > div span:last-child {
        font-size: 13px !important;
        margin-left: 4px !important;
    }
    /* Texte + bouton à droite */
    #collectionSection > div:first-child > div:last-child p {
        display: none !important;
    }
    #collectionSection > div:first-child > div:last-child .btn {
        padding: 8px 14px !important;
        font-size: 11px !important;
        white-space: nowrap;
    }
}

/* ════════════════════════════════════════════════════════
   BOOSTER ANIMATION — fix mobile complet
════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Overlay : flex colonne, tout centré, pas de débordement */
    #boosterAnimation {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 16px 0 24px !important;
        overflow: hidden !important;
    }

    /* cardsReveal : contient tout, centré */
    #cardsReveal {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    /* Compteur 1/3 au-dessus */
    .pack-counter {
        position: static !important;
        transform: none !important;
        margin-bottom: 18px !important;
        font-size: 13px !important;
    }

    /* Stage : largeur contenue, plus de débordement */
    .pack-stage {
        width: min(280px, 76vw) !important;
        position: relative !important;
    }

    /* Nav dots : sous la carte, dans le flux normal */
    .pack-nav {
        position: static !important;
        transform: none !important;
        margin-top: 20px !important;
        justify-content: center !important;
    }

    /* Bouton FERMER : en bas, pleine largeur */
    .close-animation {
        position: static !important;
        display: block !important;
        width: calc(min(280px, 76vw)) !important;
        margin-top: 24px !important;
        padding: 14px !important;
        font-size: 13px !important;
        text-align: center !important;
        border-radius: 12px !important;
    }
}

/* ── Fix badges NEW + rareté côte à côte ── */
.pack-badges {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
}
.pack-badges .new-badge,
.pack-badges .rarity-badge {
    flex-shrink: 0 !important;
    display: inline-flex !important;
}
/* Supprimer le petit titre Récompenses */
#panel-rewards > h2,
#panel-rewards > .section-title,
#panel-rewards > h3 {
    display: none;
}
/* =========================
   FIX lisibilité onglet Récompenses
   - certains messages sont injectés en .empty / .error par le JS
   - on force une couleur claire par défaut dans les cards
   ========================= */

.rewards-card{ color: rgba(215, 233, 255, 0.88); }

#rewardsSection .empty,
.rewards-card .empty{
    text-align: center;
    padding: 18px 10px;
    color: rgba(215, 233, 255, 0.70);
    border: 1px dashed rgba(215, 233, 255, 0.18);
    border-radius: 14px;
    background: rgba(28, 38, 54, 0.35);
}

#rewardsSection .error,
.rewards-card .error{
    text-align: center;
    padding: 18px 10px;
    color: rgba(255, 120, 160, 0.90);
    border: 1px dashed rgba(167, 40, 80, 0.35);
    border-radius: 14px;
    background: rgba(167, 40, 80, 0.10);
}

/* =========================================================
   PATCH — Fix badge rareté qui se colle au bouton "Fermer"
   (Booster reveal + modal zoom)
   ========================================================= */

/* Contenir les éléments positionnés (badge rareté) dans la carte reveal */
.revealed-card{
    position: relative;
}

/* Badge rareté au-dessus de la carte reveal, sans impacter le bouton */
.revealed-card .rarity-badge{
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
}

/* Bouton fermer toujours au-dessus de tout */
.close-animation{
    z-index: 50;
}

/* Sécurisation : la modal doit aussi être un contexte positionné */
.card-modal-content{
    position: relative;
}

/* =========================================================
   PATCH — Card modal: bouton Fermer en haut à droite
   + éviter chevauchement avec badges (rareté / NEW)
   ========================================================= */

.card-modal-content{
    position: relative; /* ancre .close-modal dans la carte zoom */
}

.card-modal .close-modal{
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4000;
}

/* Dans le zoom : on garde la rareté (utile), mais on évite le chevauchement avec le bouton Fermer */
.card-modal .rarity-badge{
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 3001;
}

/* NEW n'est pas indispensable en zoom : on le masque pour éviter de surcharger */
.card-modal .new-badge{
    display: none !important;
}


/* === FIX: pack badges layout (NEW left / rarity right) without overlap === */
.pack-badges{
  position:absolute;
  top:14px;
  left:14px;
  right:14px;          /* give full width so flex can space/push */
  display:flex;
  align-items:flex-start;
  gap:8px;
  justify-content:flex-start;
  z-index:50;
  pointer-events:none;
}
.pack-badges .new-badge,
.pack-badges .rarity-badge{
  position:relative !important; /* override old absolute rules */
  top:auto !important;
  left:auto !important;
  right:auto !important;
}
.pack-badges .rarity-badge{
  margin-left:auto; /* push to the right even if NEW missing */
}
/* === END FIX === */


/* ===== Profil : tableau de bord stats (compact) ===== */
.profile-stats-wrapper{
  background: rgba(55, 75, 105, 0.26);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(215,233,255,0.08);
}

.profile-stats-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.profile-section-title{
  font-family: 'Orbitron', sans-serif;
  color: var(--primary-light);
  margin:0;
  font-size: 18px;
}

.profile-section-sub{
  color: rgba(215,233,255,0.65);
  font-size: 12px;
}

.profile-stats-group{
  margin-top: 14px;
}

.profile-group-title{
  font-family: 'Orbitron', sans-serif;
  color: rgba(215,233,255,0.85);
  font-size: 13px;
  margin: 0 0 8px 2px;
  letter-spacing: 0.6px;
}

.stats-grid{
  display:grid;
  gap: 10px;
}

.stats-grid-compact{
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card{
  background: rgba(28, 38, 54, 0.55);
  border: 1px solid rgba(215,233,255,0.08);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.stat-card.stat-accent{
  border-color: rgba(167, 40, 80, 0.35);
  box-shadow: 0 0 0 1px rgba(167, 40, 80, 0.20), 0 8px 24px rgba(167, 40, 80, 0.08);
}

.stat-label{
  color: rgba(215,233,255,0.65);
  font-size: 11px;
  margin-bottom: 4px;
}

.stat-value{
  color: var(--primary-light);
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Mobile: cartes encore plus compactes */
@media (max-width: 520px){
  .profile-stats-wrapper{ padding: 14px; }
  .stats-grid-compact{ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .stat-card{ padding: 9px 10px; border-radius: 11px; }
  .stat-value{ font-size: 16px; }
}


/* ===== Profil : stats accordéon (mobile-friendly) ===== */
.stats-accordion{
  margin-top: 14px;
  border: 1px solid rgba(215,233,255,0.08);
  border-radius: 14px;
  background: rgba(28, 38, 54, 0.28);
  overflow: hidden;
}

.stats-accordion summary{
  list-style: none;
  cursor: pointer;
}

.stats-accordion summary::-webkit-details-marker{ display:none; }

.stats-accordion .profile-group-title{
  margin: 0;
  padding: 12px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}

.stats-accordion .profile-group-title::after{
  content: "▾";
  opacity: 0.7;
  font-size: 14px;
  transform: rotate(0deg);
  transition: transform 0.18s ease;
}

.stats-accordion[open] .profile-group-title::after{
  transform: rotate(180deg);
}

.stats-accordion > .stats-grid{
  padding: 0 12px 12px;
}

/* On desktop, keep the "accordion" always open & visually lighter */
@media (min-width: 769px){
  .stats-accordion{
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .stats-accordion .profile-group-title{
    padding: 0;
  }
  .stats-accordion .profile-group-title::after{ display:none; }
  .stats-accordion > .stats-grid{
    padding: 0;
  }
}


/* =========================================================
   FOOTER — Nexus (clean + lisible)
   ========================================================= */
.nexus-footer-main{
  margin-top: 60px;
  padding: 34px 18px;
  background: linear-gradient(135deg, rgba(28, 38, 54, 0.92) 0%, rgba(55, 75, 105, 0.70) 100%);
  border-top: 1px solid rgba(215, 233, 255, 0.10);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.25);
}

.nexus-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.nexus-footer-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.nexus-footer-logo{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(215,233,255,0.06);
  border: 1px solid rgba(215,233,255,0.10);
  box-shadow: 0 0 22px rgba(124,199,255,0.10);
  font-size: 18px;
}

.nexus-footer-title{
  font-family: 'Orbitron', sans-serif;
  color: var(--photon-glow);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(124,199,255,0.35);
}

.nexus-footer-subtitle{
  margin-top: 2px;
  color: rgba(215,233,255,0.65);
  font-size: 13px;
}

.nexus-footer-social{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.nexus-social-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  font-family: 'Orbitron', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(215,233,255,0.12);
  background: rgba(28,38,54,0.45);
  color: rgba(215,233,255,0.90);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nexus-social-btn:hover{
  transform: translateY(-2px);
  border-color: rgba(124,199,255,0.35);
  background: rgba(28,38,54,0.65);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}

.nexus-social-btn:visited{ color: rgba(215,233,255,0.90); }

.nexus-social-btn.insta{ border-color: rgba(255, 105, 180, 0.25); }
.nexus-social-btn.yt{ border-color: rgba(255, 70, 70, 0.25); }
.nexus-social-btn.site{ border-color: rgba(124,199,255,0.25); }
.nexus-social-btn.contact{ border-color: rgba(140, 220, 140, 0.25); }

.nexus-footer-credit{
  text-align: center;
  color: rgba(215,233,255,0.72);
  font-size: 13px;
}
.nexus-footer-credit strong{ color: rgba(215,233,255,0.95); }
.nexus-footer-small{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(150,163,181,0.72);
}

.legal-links{
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.legal-links a{
  color: rgba(215,233,255,0.68);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(215,233,255,0.10);
  background: rgba(0,0,0,0.18);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.legal-links a:hover{
  color: rgba(215,233,255,0.95);
  border-color: rgba(167,40,80,0.35);
  background: rgba(167,40,80,0.12);
  transform: translateY(-1px);
}

.legal-links a:visited{ color: rgba(215,233,255,0.68); }

.legal-links .sep{
  color: rgba(150,163,181,0.35);
  user-select: none;
}

@media (max-width: 520px){
  .nexus-footer-brand{ flex-direction: column; }
  .nexus-social-btn{ width: 100%; justify-content: center; }
  .legal-links{ gap: 8px; }
  .legal-links .sep{ display:none; }
}

/* =========================================================
   PATCH — Empêche les résidus "Récompense réclamée / Fermer"
   d'apparaître dans le footer quand l'overlay Booster n'est pas actif
   ========================================================= */
#boosterAnimation{ display:none; }
#boosterAnimation.active{ display:flex; }

#boosterAnimation:not(.active){
    pointer-events:none;
}

#boosterAnimation:not(.active) .close-animation,
#boosterAnimation:not(.active) #cardsReveal{
    display:none !important;
}


/* =========================================================
   NEXUS RETURN PORTAL — COMPACT
   ========================================================= */
.nexus-return-portal{
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(10,15,25,0.82);
    border: 1px solid rgba(124,199,255,0.16);
    color: #d7e9ff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.nexus-return-portal:hover{
    transform: translateY(-1px);
    border-color: rgba(124,199,255,0.3);
    box-shadow: 0 10px 28px rgba(0,0,0,0.28), 0 0 18px rgba(124,199,255,0.10);
    background: rgba(14,20,32,0.9);
}
.nexus-return-icon{
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #9fd6ff;
    flex-shrink: 0;
}
.nexus-return-text{
    display: flex;
    align-items: center;
}
.nexus-return-kicker{
    display: none;
}
.nexus-return-label{
    font-size: 12px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #d7e9ff;
}
@media (max-width: 640px){
    .nexus-return-portal{
        top: 10px;
        left: 10px;
        height: 38px;
        padding: 0 12px;
        gap: 8px;
    }

    .nexus-return-label{
        font-size: 11px;
    }
}
