/* ==========================================
   WARSLIGUE — CSS PASSE BRAWL
   ========================================== */

/* ── Animation pulse du bouton ── */
@keyframes codeBtnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 203, 110, 0); }
    50%       { box-shadow: 0 0 0 6px rgba(253, 203, 110, 0.25); }
}

/* ── Notification Level Up ── */
@keyframes levelUpPop {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1) translateY(-80px);
    }
}

.battle-pass-level-up-notif {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
}

.battle-pass-level-up-notif.show {
    animation: levelUpPop 3.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.level-up-content {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 2rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6), 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #FFE55C;
}

.level-up-text {
    font-size: 2.5rem;
    font-weight: 900;
    color: #000;
    letter-spacing: 0.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.reward-text {
    font-size: 1.2rem;
    color: #8B4513;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* ── Notification récompense réclamée ── */
@keyframes rewardClaimedSlide {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.reward-claimed-notif {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2ECC71, #27AE60);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    box-shadow: 0 4px 20px rgba(46, 204, 113, 0.4);
}

.reward-claimed-notif.show {
    animation: rewardClaimedSlide 0.4s ease forwards;
}

/* ── Panel du Passe Brawl ── */
.battle-pass-panel-content {
    background: linear-gradient(160deg, #0F0F1E 0%, #1A1A2E 60%, #12102B 100%) !important;
    border-left: 2px solid rgba(253, 203, 110, 0.35) !important;
}

.battle-pass-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* ── Section Progression ── */
.battle-pass-progress-section {
    background: rgba(108, 92, 231, 0.08);
    border: 1.5px solid rgba(108, 92, 231, 0.25);
    border-radius: 16px;
    padding: 1.2rem;
}

.battle-pass-header-info {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.level-display {
    flex-shrink: 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.15), rgba(108, 92, 231, 0.15));
    border-radius: 14px;
    padding: 0.8rem 1.2rem;
    border: 1.5px solid rgba(253, 203, 110, 0.25);
}

.level-number {
    font-size: 2rem;
    font-weight: 900;
    color: #FDCB6E;
    line-height: 1;
}

.level-label {
    font-size: 0.75rem;
    color: rgba(248, 249, 250, 0.6);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
}

.progress-details {
    flex: 1;
}

.progress-bar-container {
    height: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ECC71, #27AE60);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.progress-text {
    font-size: 0.8rem;
    color: rgba(248, 249, 250, 0.65);
    font-weight: 600;
}

.premium-badge {
    flex-shrink: 0;
}

.premium-btn-unlock {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #FF3366, #CC0033);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: transform 0.2s, box-shadow 0.2s;
}

.premium-btn-unlock:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 51, 102, 0.4);
}

.premium-btn-unlock:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.premium-badge.premium-active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    padding: 0.6rem 1rem;
    border-radius: 10px;
}

.premium-badge.premium-active .premium-btn-unlock {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

/* ── Onglets ── */
.battle-pass-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
}

.bp-tab {
    flex: 1;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    color: rgba(248, 249, 250, 0.5);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bp-tab:hover {
    color: rgba(248, 249, 250, 0.75);
}

.bp-tab.active {
    color: #FDCB6E;
}

.bp-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FDCB6E;
}

/* ── Contenu onglets ── */
.battle-pass-tab-content {
    display: none;
    animation: tabFadeIn 0.3s ease;
}

.battle-pass-tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── ONGLET 1: Récompenses ── */
.rewards-track-container {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    gap: 0.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
    align-items: start;
}

/* Chaînes décoratives */
.rewards-chain {
    position: relative;
    width: 20px;
    display: flex;
    justify-content: center;
}

.chain-link {
    position: absolute;
    width: 8px;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #FFD700 0px,
        #FFD700 6px,
        transparent 6px,
        transparent 12px
    );
    border-radius: 4px;
    opacity: 0.6;
}

.left-chain .chain-link, .right-chain .chain-link {
    height: 2000px;
}

.rewards-chain-middle {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 2000px;
    background: linear-gradient(180deg, #FFD700, #FFA500, #FFD700);
    opacity: 0.5;
    transform: translateX(-50%);
}

/* Colonnes */
.rewards-column {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 160px;
}

.free-column {
    grid-column: 2;
}

.premium-column {
    grid-column: 4;
    grid-row: 1;
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.15), rgba(108, 92, 231, 0.1));
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.column-header.premium-header {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
}

.column-title {
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #F8F9FA;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.rewards-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Éléments récompense */
.reward-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9), rgba(15, 15, 30, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.8rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 90px;
    justify-content: space-between;
}

.reward-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.reward-item.locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: saturate(0.6);
    border-color: rgba(160, 160, 176, 0.15);
}

.reward-item.locked:hover {
    transform: none;
}

.reward-item.unlocked {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(108, 92, 231, 0.08));
    border-color: rgba(46, 204, 113, 0.4);
    color: rgba(248, 249, 250, 0.9);
}

.reward-item.unlocked:hover:not(.claimed) {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(46, 204, 113, 0.6);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.25);
}

.reward-item.premium-item {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 165, 0, 0.06));
    border-color: rgba(255, 215, 0, 0.25);
}

.reward-item.premium-item.unlocked {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.4);
}

.reward-item.premium-item.unlocked:hover:not(.claimed) {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.25);
}

.reward-item.locked-premium {
    opacity: 0.7;
    border-color: rgba(255, 215, 0, 0.2);
}

.reward-item.claimed {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(46, 204, 113, 0.04));
    border-color: rgba(46, 204, 113, 0.25);
    opacity: 0.65;
    cursor: default;
}

.reward-item.claimed:hover {
    transform: none;
}

.reward-item-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    position: relative;
}

.item-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.item-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    color: rgba(248, 249, 250, 0.85);
    word-break: break-word;
}

.item-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.item-premium-lock {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.item-claimed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    color: #2ECC71;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.8);
}

.level-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(160, 160, 176, 0.8);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 3;
}

.level-badge.premium-badge {
    color: rgba(255, 215, 0, 0.9);
    border-color: rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.08);
}

/* ── ONGLET 2: Quêtes ── */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.quest-item {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(162, 155, 254, 0.04));
    border: 2px solid rgba(108, 92, 231, 0.2);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.quest-item:hover {
    border-color: rgba(108, 92, 231, 0.4);
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(162, 155, 254, 0.08));
}

.quest-item.completed {
    border-color: rgba(46, 204, 113, 0.4);
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
}

.quest-item.claimed {
    opacity: 0.65;
    border-color: rgba(46, 204, 113, 0.25);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.quest-info {
    flex: 1;
}

.quest-name {
    font-size: 1rem;
    font-weight: 900;
    color: #F8F9FA;
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.quest-desc {
    font-size: 0.85rem;
    color: rgba(160, 160, 176, 0.75);
    margin-bottom: 0;
}

.quest-reward-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(162, 155, 254, 0.2), rgba(108, 92, 231, 0.15));
    border-radius: 10px;
    border: 1px solid rgba(162, 155, 254, 0.3);
    min-width: 80px;
    text-align: center;
}

.quest-xp-value {
    font-size: 1.1rem;
    font-weight: 900;
    color: #A29BFE;
}

.quest-xp-label {
    font-size: 0.65rem;
    color: rgba(162, 155, 254, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.quest-progress-container {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.quest-progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6C5CE7, #A29BFE);
    border-radius: 8px;
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px rgba(162, 155, 254, 0.5);
}

.quest-progress-text {
    font-size: 0.8rem;
    color: rgba(160, 160, 176, 0.7);
    min-width: 50px;
    text-align: right;
    font-weight: 700;
}

.btn-claim-quest {
    padding: 0.7rem 1.4rem;
    background: linear-gradient(135deg, #6C5CE7, #A29BFE);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-self: flex-start;
    box-shadow: 0 4px 16px rgba(162, 155, 254, 0.3);
}

.btn-claim-quest:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(162, 155, 254, 0.5);
}

.btn-claim-quest:active {
    transform: translateY(0);
}

.quest-claimed-badge {
    font-size: 1.4rem;
    color: #2ECC71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.8);
    align-self: flex-start;
}

/* ── Scrollbars personnalisées ── */
.rewards-grid::-webkit-scrollbar,
.quests-list::-webkit-scrollbar,
.battle-pass-body::-webkit-scrollbar {
    width: 8px;
}

.rewards-grid::-webkit-scrollbar-track,
.quests-list::-webkit-scrollbar-track,
.battle-pass-body::-webkit-scrollbar-track {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.1), rgba(253, 203, 110, 0.05));
    border-radius: 10px;
}

.rewards-grid::-webkit-scrollbar-thumb,
.quests-list::-webkit-scrollbar-thumb,
.battle-pass-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.4), rgba(162, 155, 254, 0.3));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.rewards-grid::-webkit-scrollbar-thumb:hover,
.quests-list::-webkit-scrollbar-thumb:hover,
.battle-pass-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.6), rgba(162, 155, 254, 0.5));
    background-clip: padding-box;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .rewards-track-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
        padding: 0.3rem;
    }

    .rewards-chain {
        display: none;
    }

    .rewards-chain-middle {
        display: none;
    }

    .free-column {
        grid-column: 1;
    }

    .premium-column {
        grid-column: 2;
        grid-row: 1;
    }

    .column-header {
        padding: 0.6rem;
    }

    .column-title {
        font-size: 0.8rem;
    }

    .reward-item {
        min-height: 80px;
        padding: 0.6rem;
    }

    .item-icon {
        font-size: 1.6rem;
    }

    .item-label {
        font-size: 0.7rem;
    }

    .level-badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
    }

    .battle-pass-header-info {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .progress-details {
        flex: 1 100%;
    }

    .battle-pass-tabs {
        margin: 0 -1.2rem;
        padding: 0 1.2rem;
    }

    .level-up-content {
        padding: 1.5rem 2rem;
    }

    .level-up-text {
        font-size: 1.8rem;
    }

    .premium-btn-unlock {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }

    .quest-item {
        padding: 1rem;
    }

    .quest-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: flex-start;
    }

    .quest-reward-badge {
        min-width: auto;
        align-self: flex-start;
    }

    .btn-claim-quest {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}
