/* ============================================
   WORKHUB GAMIFICATION STYLES
   ============================================ */

/* Barre de progression */
.quest-progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    pointer-events: all;
}

.quest-progress-container {
    background: rgba(0, 0, 0, 0.9);
    border-top: 2px solid var(--color-accent-gold);
    position: relative;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.quest-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg,
        var(--color-accent-gold) 0%,
        var(--color-accent-red) 100%);
    transition: width 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0.3;
}

.quest-progress-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    flex: 1;
}

.quest-progress-text[style*="cursor: pointer"] {
    transition: all 0.3s ease;
}

.quest-progress-text[style*="cursor: pointer"]:hover {
    color: var(--color-accent-red);
    transform: scale(1.05);
}

.quest-icon {
    font-size: 1.2rem;
    animation: questIconBounce 2s ease-in-out infinite;
}

@keyframes questIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Journal de quêtes - Caché, remplacé par les tabs */
.quest-log {
    display: none;
}

/* Navigation tabs - Colorisation basée sur la progression */
.nav-links a.quest-completed {
    color: var(--color-accent-gold) !important;
    background: rgba(212, 175, 55, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-links a.quest-completed::after {
    width: 100% !important;
    background: var(--color-accent-red) !important;
}

/* Badges */
.badge-container {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    overflow-x: visible;
}

.badge-earned {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0;
    animation: badgePop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-fill-mode: forwards;
    flex-shrink: 0;
    position: relative;
}

.badge-earned.badge-restored {
    opacity: 1;
    animation: none;
}

@keyframes badgePop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--color-accent-gold);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
    transition: all 0.3s ease;
}


.badge-name {
    display: none;
}

.secret-badge .badge-icon {
    animation: secretPulse 2s ease-in-out infinite;
}

@keyframes secretPulse {
    0%, 100% {
        box-shadow: 0 5px 20px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 5px 30px rgba(212, 175, 55, 1),
                    0 0 40px rgba(196, 30, 58, 0.8);
    }
}

/* Notifications */
.quest-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    transform: translateX(400px);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: var(--color-accent-gold);
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-accent-gold);
    border-left: 3px solid var(--color-accent-gold);
}

.quest-notification.show {
    opacity: 0.9;
    transform: translateX(0);
}

/* Modal de célébration */
.celebration-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.celebration-modal.show {
    opacity: 1;
    pointer-events: all;
}

.celebration-content {
    background: linear-gradient(135deg,
        var(--color-background) 0%,
        var(--color-background-light) 100%);
    border: 4px solid var(--color-accent-gold);
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    position: relative;
    animation: celebrationPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes celebrationPop {
    0% {
        transform: scale(0) rotate(-10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.celebration-content h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-accent-gold);
    margin-bottom: 1rem;
}

.celebration-content p {
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.celebration-subtitle {
    font-style: italic;
    color: var(--color-accent-gold-light);
    font-size: 1rem !important;
}

.celebration-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.celebration-badge {
    font-size: 1.5rem;
    animation: celebrationBadgeBounce 1s ease-in-out infinite;
}

.celebration-badge:nth-child(1) { animation-delay: 0s; }
.celebration-badge:nth-child(2) { animation-delay: 0.1s; }
.celebration-badge:nth-child(3) { animation-delay: 0.2s; }
.celebration-badge:nth-child(4) { animation-delay: 0.3s; }
.celebration-badge:nth-child(5) { animation-delay: 0.4s; }
.celebration-badge:nth-child(6) { animation-delay: 0.5s; }

@keyframes celebrationBadgeBounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

/* Confettis */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--color-accent-gold);
    top: -10px;
    animation: confettiFall 5s linear forwards;
    z-index: 9999;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .quest-progress-container {
        height: 40px;
        padding: 0 10px;
        gap: 10px;
    }

    .badge-container {
        gap: 6px;
    }

    .badge-icon {
        width: 28px;
        height: 28px;
        font-size: 0.95rem;
    }

    .quest-progress-text {
        font-size: 0.75rem;
    }

    .quest-progress-text span:last-child {
        display: none;
    }

    .celebration-content {
        padding: 2rem;
        margin: 1rem;
    }

    .celebration-content h2 {
        font-size: 1.8rem;
    }

    .celebration-badge {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .quest-progress-container {
        padding: 0 5px;
        height: 35px;
        gap: 5px;
    }

    .badge-container {
        gap: 4px;
    }

    .badge-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
        border: 1px solid var(--color-accent-red);
    }

    .quest-progress-text {
        font-size: 0.65rem;
    }

    .quest-icon {
        font-size: 1rem;
    }
}

