/* ============================================
   BADGES.CSS - Système de badges et events
   Badges, modal badge, events, collections
   ============================================ */

/* =====================================
   BADGES MINI-CARDS (V21.8)
   ===================================== */

.badges-mini-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: var(--spacing-lg);
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--gray-light);
}

.badges-mini-cards .mini-card {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 12px 4px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.badges-mini-cards .mini-card:hover {
    border-color: var(--gray-light);
}

.badges-mini-cards .mini-card.active.card-performance {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.badges-mini-cards .mini-card.active.card-competition {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.badges-mini-cards .mini-card.active.card-engagement {
    border-color: #0891b2;
    background: rgba(8, 145, 178, 0.1);
}

.badges-mini-cards .mini-card.active.card-specialization {
    border-color: var(--secondary-color);
    background: rgba(247, 147, 26, 0.1);
}

.badges-mini-cards .mini-card.active.card-events {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.badges-mini-cards .mini-card-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.badges-mini-cards .mini-card-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

/* Glow par catégorie - subtil */
.badges-mini-cards .card-performance .mini-card-value.glow {
    color: #00d4ff;
    text-shadow: 0 0 3px rgba(0, 212, 255, 0.5);
}

.badges-mini-cards .card-competition .mini-card-value.glow {
    color: #ffd700;
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.5);
}

.badges-mini-cards .card-engagement .mini-card-value.glow {
    color: #0891b2;
    text-shadow: 0 0 3px rgba(8, 145, 178, 0.5);
}

.badges-mini-cards .card-specialization .mini-card-value.glow {
    color: var(--secondary-color);
    text-shadow: 0 0 3px rgba(247, 147, 26, 0.5);
}

.badges-mini-cards .card-events .mini-card-value.glow {
    color: #ff4757;
    text-shadow: 0 0 3px rgba(255, 71, 87, 0.5);
}

.badges-mini-cards .mini-card-label {
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1.2;
}

/* Badges Detail */
.badges-detail {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.badges-detail.performance,
.badges-detail.competition,
.badges-detail.engagement,
.badges-detail.specialization,
.badges-detail.events {
    /* Pas de bordure gauche - plus d'espace pour les badges */
}

.badges-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    font-size: 15px;
}

.badges-detail-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Badges Header Row */
.badges-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.badges-header-row h3 {
    margin: 0;
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
}

.badges-total-inline {
    font-size: 14px;
    color: var(--text-secondary);
}

.badges-total-inline span {
    color: #00d4ff;
    font-weight: 700;
}

/* =====================================
   BADGES - SYSTÈME DE BADGES (existant)
   ===================================== */

/* En-tête des badges */
.badges-header {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.badges-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.badges-counter {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Filtres de badges (ancien - gardé pour compatibilité) */
.badges-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    justify-content: center;
}

.badge-filter {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.badge-filter.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Grille de badges - Format cartes */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

/* Desktop: garder 2 colonnes pour des badges plus larges */
@media (min-width: 768px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Item de badge - Format Trading Card */
.badge-item {
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.9), rgba(10, 14, 23, 0.95));
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Effet holographique de fond */
.badge-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.badge-item:hover::before {
    opacity: 1;
    animation: holographic 1.5s ease infinite;
}

@keyframes holographic {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

/* Badge débloqué */
.badge-item.unlocked {
    cursor: pointer;
}

.badge-item.unlocked[data-rarity="common"] {
    border-color: var(--rarity-common);
    box-shadow: 0 4px 20px rgba(107, 114, 128, 0.2);
}

.badge-item.unlocked[data-rarity="rare"] {
    border-color: var(--rarity-rare);
    box-shadow: 0 4px 25px rgba(0, 212, 255, 0.3),
                inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.badge-item.unlocked[data-rarity="epic"] {
    border-color: var(--rarity-epic);
    box-shadow: 0 4px 25px rgba(139, 92, 246, 0.3),
                inset 0 0 30px rgba(139, 92, 246, 0.05);
}

.badge-item.unlocked[data-rarity="legendary"] {
    border-color: var(--rarity-legendary);
    box-shadow: 0 4px 30px rgba(247, 147, 26, 0.4),
                inset 0 0 40px rgba(247, 147, 26, 0.08);
    animation: legendaryPulse 3s ease-in-out infinite;
}

@keyframes legendaryPulse {
    0%, 100% {
        box-shadow: 0 4px 30px rgba(247, 147, 26, 0.4),
                    inset 0 0 40px rgba(247, 147, 26, 0.08);
    }
    50% {
        box-shadow: 0 4px 40px rgba(247, 147, 26, 0.6),
                    inset 0 0 50px rgba(247, 147, 26, 0.12);
    }
}

.badge-item.unlocked:hover {
    transform: translateY(-8px) rotateX(5deg);
}

.badge-item.unlocked[data-rarity="rare"]:hover {
    box-shadow: 0 8px 35px rgba(0, 212, 255, 0.5),
                inset 0 0 40px rgba(0, 212, 255, 0.1);
}

.badge-item.unlocked[data-rarity="epic"]:hover {
    box-shadow: 0 8px 35px rgba(139, 92, 246, 0.5),
                inset 0 0 40px rgba(139, 92, 246, 0.1);
}

.badge-item.unlocked[data-rarity="legendary"]:hover {
    box-shadow: 0 8px 45px rgba(247, 147, 26, 0.7),
                inset 0 0 50px rgba(247, 147, 26, 0.15);
    animation: none;
}

/* Badge verrouillé */
.badge-item.locked {
    opacity: 0.6;
    border-color: rgba(107, 114, 128, 0.3);
    background: linear-gradient(145deg, rgba(17, 24, 39, 0.5), rgba(10, 14, 23, 0.6));
}

.badge-item.locked:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

.badge-item.locked .badge-image {
    /* Pas de filtre - l'image locked.svg est déjà grise */
    opacity: 1;
}

/* Icône du badge - Grande image centrée */
.badge-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
}

.badge-image {
    width: 130px;
    height: 130px;
    object-fit: cover;
    transition: all 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    border-radius: 12px;
}

/* Effet brillant pour badges débloqués */
.badge-item.unlocked .badge-image {
    animation: cardShine 4s ease-in-out infinite;
}

@keyframes cardShine {
    0%, 100% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)) brightness(1.15);
    }
}

.badge-item.unlocked:hover .badge-image {
    transform: scale(1.15);
}

/* Contenu texte du badge */
.badge-content {
    text-align: center;
}

/* Nom du badge */
.badge-name {
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Description du badge */
.badge-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    min-height: 36px;
}

/* Rareté du badge */
.badge-rarity {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 10px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Couleurs par rareté */
.badge-item[data-rarity="common"] .badge-rarity {
    background: rgba(107, 114, 128, 0.3);
    color: var(--rarity-common);
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.badge-item[data-rarity="rare"] .badge-rarity {
    background: rgba(0, 212, 255, 0.2);
    color: var(--rarity-rare);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.badge-item[data-rarity="epic"] .badge-rarity {
    background: rgba(139, 92, 246, 0.2);
    color: var(--rarity-epic);
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.badge-item[data-rarity="legendary"] .badge-rarity {
    background: rgba(247, 147, 26, 0.2);
    color: var(--rarity-legendary);
    border: 1px solid rgba(247, 147, 26, 0.5);
}

/* Animation de déblocage */
@keyframes badgeUnlock {
    0% {
        transform: scale(0.5) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.badge-item.just-unlocked {
    animation: badgeUnlock 0.6s ease;
}


/* =====================================
   MODAL BADGE - Affichage détaillé
   ===================================== */

.badge-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.badge-modal.active {
    display: flex;
}

.badge-modal-content {
    background: linear-gradient(145deg, #1a2332, #0d1117);
    border-radius: 24px;
    padding: var(--spacing-xl);
    max-width: 360px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 3px solid transparent;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Bordure couleur selon rareté */
.badge-modal-content[data-rarity="common"] {
    border-color: var(--rarity-common);
}

.badge-modal-content[data-rarity="rare"] {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.badge-modal-content[data-rarity="epic"] {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.3);
}

.badge-modal-content[data-rarity="legendary"] {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 80px rgba(247, 147, 26, 0.4);
}

.badge-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.badge-modal-close:hover {
    color: var(--white);
    transform: rotate(90deg);
}

.badge-modal-image {
    width: 280px;
    height: 280px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    border-radius: 16px;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
    transition: all 0.3s ease;
}

.badge-modal-content:hover .badge-modal-image {
    transform: translateY(-5px);
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.5));
}

/* Glow selon rareté au hover */
.badge-modal-content[data-rarity="rare"]:hover .badge-modal-image {
    filter: drop-shadow(0 12px 30px rgba(0, 212, 255, 0.4));
}

.badge-modal-content[data-rarity="epic"]:hover .badge-modal-image {
    filter: drop-shadow(0 12px 30px rgba(139, 92, 246, 0.4));
}

.badge-modal-content[data-rarity="legendary"]:hover .badge-modal-image {
    filter: drop-shadow(0 12px 35px rgba(247, 147, 26, 0.5));
}

.badge-modal-content.locked .badge-modal-image {
    /* Pas de filtre - l'image locked.svg est déjà grise */
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.badge-modal-content.locked:hover .badge-modal-image {
    transform: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
}

.badge-modal-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-modal-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.badge-modal-rarity {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
}

.badge-modal-content[data-rarity="common"] .badge-modal-rarity {
    background: rgba(107, 114, 128, 0.3);
    color: var(--rarity-common);
}

.badge-modal-content[data-rarity="rare"] .badge-modal-rarity {
    background: rgba(0, 212, 255, 0.2);
    color: var(--rarity-rare);
}

.badge-modal-content[data-rarity="epic"] .badge-modal-rarity {
    background: rgba(139, 92, 246, 0.2);
    color: var(--rarity-epic);
}

.badge-modal-content[data-rarity="legendary"] .badge-modal-rarity {
    background: rgba(247, 147, 26, 0.2);
    color: var(--rarity-legendary);
}

.badge-modal-date {
    font-size: 0.85rem;
    color: var(--success-color);
    margin-top: var(--spacing-sm);
}

.badge-modal-locked-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: var(--spacing-sm);
}

/* Responsive pour badges */
@media (max-width: 768px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .badge-image {
        width: 100px;
        height: 100px;
    }
    
    .badge-name {
        font-size: 0.8rem;
    }
    
    .badge-description {
        font-size: 0.7rem;
        min-height: 32px;
    }
    
    .badge-rarity {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    
    .badges-filters {
        gap: 6px;
    }
    
    .badge-filter {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .badge-modal-content {
        padding: var(--spacing-md);
    }
    
    .badge-modal-image {
        width: 200px;
        height: 200px;
    }
    
    .badge-modal-name {
        font-size: 1.1rem;
    }
    
    .badge-modal-description {
        font-size: 0.85rem;
    }
}

/* Empty state */
.badges-grid .loading-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}


/* ============================================
   ÉVÉNEMENTS SAISONNIERS - CALENDRIER
   ============================================ */

/* ----------------
   BANNER D'ÉVÉNEMENT
   ---------------- */
.event-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--background-card) 0%, #1a2332 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.event-banner.banner-hiding {
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.event-banner-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.event-banner-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

.event-banner-text {
    color: var(--text-color);
    font-size: 0.9rem;
}

.event-banner-text strong {
    color: var(--primary-color);
}

.event-banner-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: var(--transition);
}

.event-banner-close:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

/* Ajuster le body quand le banner est visible */
body.has-event-banner {
    padding-top: 70px;
}

/* ----------------
   ONGLET EVENT
   ---------------- */
#event-tab {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(247, 147, 26, 0.2) 100%);
    border: 1px solid var(--primary-color);
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    }
}

/* ----------------
   CONTENU ÉVÉNEMENT
   ---------------- */
.event-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.event-header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.event-ended-message {
    background: rgba(247, 147, 26, 0.1);
    border: 1px solid var(--secondary-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.event-progress-summary {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.event-progress-summary span {
    background: var(--background-card);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

/* ----------------
   GRILLE CALENDRIER
   ---------------- */
.event-calendar-grid {
    display: grid;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

/* ----------------
   CASES DU CALENDRIER
   ---------------- */
.calendar-cell {
    aspect-ratio: 1;
    background: var(--background-card);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid var(--gray-light);
    transition: var(--transition);
    overflow: hidden;
}

.calendar-day-number {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.calendar-badge {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.calendar-mystery {
    font-size: 2rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

/* Case disponible (cliquable) */
.calendar-cell.available {
    cursor: pointer;
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.calendar-cell.available:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

/* Case réclamée */
.calendar-cell.claimed {
    border-color: var(--success-color);
    background: linear-gradient(135deg, var(--background-card) 0%, rgba(16, 185, 129, 0.1) 100%);
    cursor: pointer;
}

.calendar-cell.claimed:hover {
    transform: scale(1.03);
}

/* Case manquée */
.calendar-cell.missed {
    border-color: var(--error-color);
    opacity: 0.6;
}

.calendar-cell.missed .calendar-badge {
    filter: grayscale(100%);
}

.calendar-cell.missed::after {
    content: '✕';
    position: absolute;
    font-size: 1.5rem;
    color: var(--error-color);
    opacity: 0.8;
}

/* Case verrouillée */
.calendar-cell.locked {
    opacity: 0.5;
    border-color: var(--gray-light);
}

/* Animation d'ouverture */
.calendar-cell.opening {
    animation: cellOpen 0.5s ease forwards;
}

@keyframes cellOpen {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1); }
}

/* Bordures par rareté */
.calendar-cell.rarity-common.claimed {
    border-color: var(--rarity-common);
}

.calendar-cell.rarity-rare.claimed {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.calendar-cell.rarity-epic.claimed {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.calendar-cell.rarity-legendary.claimed {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 15px rgba(247, 147, 26, 0.4);
    animation: legendaryGlow 2s infinite;
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(247, 147, 26, 0.6);
    }
}

/* ----------------
   BONUS DE COMPLÉTION
   ---------------- */
.event-completion-bonus {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--background-card);
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.event-completion-bonus.claimed {
    border-color: var(--rarity-legendary);
    background: linear-gradient(135deg, var(--background-card) 0%, rgba(247, 147, 26, 0.1) 100%);
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.3);
}

.completion-badge {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.completion-badge.locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

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

.completion-info strong {
    color: var(--secondary-color);
}

.completion-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ----------------
   ANIMATION D'ÉTOILES
   ---------------- */
.stars-container {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.star-particle {
    position: absolute;
    font-size: 1.2rem;
    animation: starExplode 0.8s ease-out forwards;
    animation-delay: var(--delay);
}

@keyframes starExplode {
    0% {
        transform: translate(0, 0) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(
            calc(cos(var(--angle)) * 80px),
            calc(sin(var(--angle)) * 80px)
        ) scale(1);
        opacity: 0;
    }
}

/* Fallback pour navigateurs sans support de cos/sin */
.star-particle:nth-child(1) { transform: translate(80px, 0); }
.star-particle:nth-child(2) { transform: translate(69px, 40px); }
.star-particle:nth-child(3) { transform: translate(40px, 69px); }
.star-particle:nth-child(4) { transform: translate(0, 80px); }
.star-particle:nth-child(5) { transform: translate(-40px, 69px); }
.star-particle:nth-child(6) { transform: translate(-69px, 40px); }
.star-particle:nth-child(7) { transform: translate(-80px, 0); }
.star-particle:nth-child(8) { transform: translate(-69px, -40px); }
.star-particle:nth-child(9) { transform: translate(-40px, -69px); }
.star-particle:nth-child(10) { transform: translate(0, -80px); }
.star-particle:nth-child(11) { transform: translate(40px, -69px); }
.star-particle:nth-child(12) { transform: translate(69px, -40px); }

/* Animation simplifiée pour tous les navigateurs */
@keyframes starExplodeSimple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(1) translateY(-50px);
        opacity: 0;
    }
}

.star-particle {
    animation: starExplodeSimple 0.8s ease-out forwards;
}

/* ----------------
   MODAL DE RÉCOMPENSE
   ---------------- */
.reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reward-modal.show {
    opacity: 1;
}

.reward-modal-content {
    background: var(--background-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    max-width: 320px;
    width: 90%;
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-primary);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.reward-modal.show .reward-modal-content {
    transform: scale(1);
}

.reward-modal-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.reward-badge-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: var(--spacing-sm);
    animation: badgeReveal 0.5s ease;
}

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

.reward-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.reward-points {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--success-color);
}

.reward-rarity {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.reward-rarity.rarity-common {
    background: rgba(107, 114, 128, 0.2);
    color: var(--rarity-common);
}

.reward-rarity.rarity-rare {
    background: rgba(0, 212, 255, 0.2);
    color: var(--rarity-rare);
}

.reward-rarity.rarity-epic {
    background: rgba(139, 92, 246, 0.2);
    color: var(--rarity-epic);
}

.reward-rarity.rarity-legendary {
    background: rgba(247, 147, 26, 0.2);
    color: var(--rarity-legendary);
}

.completion-reward {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-light);
}

.completion-reward h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

.master-badge-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
}

.bonus-points {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.modal-close-btn {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary-color);
    color: var(--background);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}


/* ----------------
   SOUS-ONGLETS BADGES
   ---------------- */
.badges-sub-tabs {
    display: flex;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    background: var(--background);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-light);
}

.badges-sub-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badges-sub-tab:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.badges-sub-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--background);
}

.badges-subtab-content {
    display: none;
}

.badges-subtab-content.active {
    display: block;
}

/* ----------------

   COLLECTIONS
   ---------------- */
.collections-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.collections-header h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.collections-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.collections-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.collections-empty p {
    margin-bottom: var(--spacing-sm);
}

.collection-group {
    margin-bottom: var(--spacing-md);
}

.collection-group h3 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-xs);
    border-bottom: 1px solid var(--gray-light);
}

.collection-event {
    background: var(--background-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.collection-event:hover {
    background: var(--background-card-hover);
}

.collection-event-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    flex-wrap: nowrap;
}

.collection-event-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.collection-event-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
    min-width: 0;
}

.collection-event-stats {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.collection-event-badges {
    padding: 8px;
    padding-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--gray-light);
}

.collection-badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.collection-badge {
    width: calc((100% - 18px) / 4);
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-card);
    border: 2px solid var(--gray-light);
    cursor: pointer;
    transition: transform 0.2s ease;
    box-sizing: border-box;
}

.collection-badge:hover {
    transform: scale(1.05);
}

.collection-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.collection-badge.claimed {
    border-color: var(--success-color);
}

.collection-badge.missed {
    opacity: 0.4;
}

.collection-badge.missed img {
    filter: grayscale(100%);
}

.collection-badge.rarity-common.claimed {
    border-color: var(--rarity-common);
}

.collection-badge.rarity-rare.claimed {
    border-color: var(--rarity-rare);
}

.collection-badge.rarity-epic.claimed {
    border-color: var(--rarity-epic);
}

.collection-badge.rarity-legendary.claimed,
.collection-badge.master {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 10px rgba(247, 147, 26, 0.3);
}

/* ----------------

   RESPONSIVE ÉVÉNEMENTS
   ---------------- */
@media (max-width: 768px) {
    .event-banner {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }
    
    .event-banner-close {
        position: absolute;
        top: var(--spacing-xs);
        right: var(--spacing-xs);
    }
    
    .event-calendar-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .calendar-cell {
        min-height: 60px;
    }
    
    .calendar-day-number {
        font-size: 0.6rem;
    }
    
    .calendar-mystery {
        font-size: 1.5rem;
    }
    
    .event-completion-bonus {
        flex-direction: column;
        text-align: center;
    }
    
    .badges-sub-tabs {
        justify-content: center;
    }
}


/* =====================================
   CORRECTIONS COSMÉTIQUES - SESSION 11
   ===================================== */

/* Fix: Rareté centrée dans la GRILLE de badges */
.badge-item .badge-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

/* Fix: Forcer le centrage du badge-content */
.badge-item .badge-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    text-align: center !important;
}

/* Fix: Centrer la rareté */
.badge-item .badge-rarity {
    display: inline-block !important;
    text-align: center !important;
}

/* Fix: Common et Legendary plus petits pour tenir dans la case */
.badge-item[data-rarity="common"] .badge-rarity,
.badge-item[data-rarity="legendary"] .badge-rarity {
    font-size: 0.55rem !important;
    padding: 3px 6px !important;
    letter-spacing: 0 !important;
}

/* Fix: Forcer le centrage du contenu badge */

/* Fix: Texte tronqué dans la modal badge */
.badge-modal-name {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
    padding: 0 var(--spacing-sm);
}

/* Fix: Centrer correctement la rareté dans la modal */
.badge-modal-rarity {
    display: block;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Fix: Réduire l'image modal pour mieux afficher le texte sur mobile */
@media (max-width: 480px) {
    .badge-modal-image {
        width: 150px;
        height: 150px;
    }
    
    .badge-modal-content {
        max-width: 300px;
        padding: var(--spacing-md);
    }
    
    .badge-modal-name {
        font-size: 1rem;
    }
}

/* =====================================
   SÉLECTEUR D'AVATAR - Grille uniforme
   ===================================== */

/* Grille des avatars de niveau */
#avatarLevelsGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: var(--spacing-md);
}

/* Grille des badges comme avatars */
#avatarBadgesGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

/* Option d'avatar - carrés parfaits */
.avatar-level-option,
.avatar-badge-option {
    position: relative;
    background: transparent;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    padding-bottom: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.avatar-level-option:hover,
.avatar-badge-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.avatar-level-option.selected,
.avatar-badge-option.selected,
.avatar-level-option.current {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.avatar-level-option img,
.avatar-badge-option img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-level-option .level-name,
.avatar-badge-option .badge-name {
    display: none;
}

/* Avatar VIP */
.avatar-vip-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: linear-gradient(145deg, rgba(247, 147, 26, 0.1), rgba(247, 147, 26, 0.05));
    border-radius: var(--radius-md);
    border: 2px solid var(--rarity-legendary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-md);
}

.avatar-vip-option:hover,
.avatar-vip-option.selected {
    background: linear-gradient(145deg, rgba(247, 147, 26, 0.2), rgba(247, 147, 26, 0.1));
    box-shadow: 0 0 20px rgba(247, 147, 26, 0.4);
}

.avatar-vip-option img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-xs);
}

.avatar-vip-option .vip-name {
    font-size: 0.9rem;
    color: var(--rarity-legendary);
    font-weight: 600;
}

/* Message si pas de badges */
.no-badges-message {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-md);
}

/* Responsive pour le sélecteur d'avatar */
@media (max-width: 480px) {
    #avatarLevelsGrid,
    #avatarBadgesGrid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
}

/* =====================================
   BADGE UNLOCK MODAL - Célébration
   ===================================== */

/* Overlay */
.badge-unlock-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    animation: badgeOverlayFadeIn 0.3s ease;
}

.badge-unlock-overlay.active {
    display: flex;
}

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

/* Particles Container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-400px) scale(0);
        opacity: 0;
    }
}

/* Rays Container (for legendary) */
.rays-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    opacity: 0;
    animation: raysAppear 0.5s ease 0.3s forwards;
}

@keyframes raysAppear {
    to { opacity: 1; }
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 250px;
    background: linear-gradient(to top, transparent, var(--rarity-legendary));
    transform-origin: bottom center;
    opacity: 0.4;
    animation: rayPulse 2s ease-in-out infinite;
}

@keyframes rayPulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.8); }
    50% { opacity: 0.5; transform: scaleY(1); }
}

/* Modal Content */
.badge-unlock-modal {
    position: relative;
    background: linear-gradient(145deg, #1a2332, #0d1117);
    border-radius: 24px;
    padding: var(--spacing-xl) var(--spacing-lg);
    max-width: 380px;
    width: 90%;
    text-align: center;
    border: 3px solid var(--gray-light);
    animation: badgeModalBounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

@keyframes badgeModalBounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Border colors by rarity */
.badge-unlock-modal[data-rarity="common"] {
    border-color: var(--rarity-common);
}

.badge-unlock-modal[data-rarity="rare"] {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.4), inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.badge-unlock-modal[data-rarity="epic"] {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.4), inset 0 0 30px rgba(139, 92, 246, 0.05);
}

.badge-unlock-modal[data-rarity="legendary"] {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 80px rgba(247, 147, 26, 0.5), inset 0 0 40px rgba(247, 147, 26, 0.08);
    animation: badgeModalBounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
               badgeLegendaryGlow 2s ease-in-out infinite 0.5s;
}

@keyframes badgeLegendaryGlow {
    0%, 100% {
        box-shadow: 0 0 80px rgba(247, 147, 26, 0.5), inset 0 0 40px rgba(247, 147, 26, 0.08);
    }
    50% {
        box-shadow: 0 0 100px rgba(247, 147, 26, 0.7), inset 0 0 50px rgba(247, 147, 26, 0.12);
    }
}

/* Close Button */
.badge-unlock-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-unlock-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: rotate(90deg);
}

/* Header */
.badge-unlock-header {
    margin-bottom: var(--spacing-md);
}

.badge-unlock-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.badge-unlock-emoji {
    font-size: 28px;
    animation: badgeEmojiPop 0.6s ease 0.3s both;
}

@keyframes badgeEmojiPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Flip Card Container */
.flip-card-container {
    perspective: 1000px;
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-md);
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    border: 3px solid var(--gray-light);
}

.flip-card-back {
    transform: rotateY(180deg);
}

.flip-card-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Glow on back face by rarity */
.badge-unlock-modal[data-rarity="rare"] .flip-card-back {
    border-color: var(--rarity-rare);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.badge-unlock-modal[data-rarity="epic"] .flip-card-back {
    border-color: var(--rarity-epic);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

.badge-unlock-modal[data-rarity="legendary"] .flip-card-back {
    border-color: var(--rarity-legendary);
    box-shadow: 0 0 40px rgba(247, 147, 26, 0.5);
}

/* Image shine effect after flip */
.flip-card.flipped .flip-card-back img {
    animation: badgeImageShine 1.5s ease 0.8s;
}

@keyframes badgeImageShine {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
    100% { filter: brightness(1); }
}

/* Badge Info */
.badge-unlock-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: badgeTextFadeIn 0.4s ease 1s forwards;
}

.badge-unlock-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    opacity: 0;
    animation: badgeTextFadeIn 0.4s ease 1.1s forwards;
}

@keyframes badgeTextFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-unlock-rarity {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: badgeRarityPop 0.4s ease 1.2s forwards;
}

@keyframes badgeRarityPop {
    0% { opacity: 0; transform: scale(0.5); }
    60% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.badge-unlock-modal[data-rarity="common"] .badge-unlock-rarity {
    background: rgba(107, 114, 128, 0.3);
    color: var(--rarity-common);
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.badge-unlock-modal[data-rarity="rare"] .badge-unlock-rarity {
    background: rgba(0, 212, 255, 0.2);
    color: var(--rarity-rare);
    border: 1px solid rgba(0, 212, 255, 0.5);
}

.badge-unlock-modal[data-rarity="epic"] .badge-unlock-rarity {
    background: rgba(139, 92, 246, 0.2);
    color: var(--rarity-epic);
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.badge-unlock-modal[data-rarity="legendary"] .badge-unlock-rarity {
    background: rgba(247, 147, 26, 0.2);
    color: var(--rarity-legendary);
    border: 1px solid rgba(247, 147, 26, 0.5);
}

/* Counter */
.badge-unlock-counter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    opacity: 0;
    animation: badgeTextFadeIn 0.4s ease 1.3s forwards;
}

.badge-unlock-counter span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Action Button */
.badge-unlock-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: badgeButtonFadeIn 0.4s ease 1.4s forwards;
}

@keyframes badgeButtonFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.badge-unlock-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.badge-unlock-btn:active {
    transform: scale(0.98);
}

/* "Suivant" button style */
.badge-unlock-btn.next {
    background: linear-gradient(135deg, var(--gray-light), #4b5563);
}

.badge-unlock-btn.next:hover {
    box-shadow: 0 8px 25px rgba(75, 85, 99, 0.4);
}

/* Responsive */
@media (max-width: 480px) {
    .badge-unlock-modal {
        padding: var(--spacing-lg) var(--spacing-md);
        max-width: 340px;
    }

    .flip-card-container {
        width: 160px;
        height: 160px;
    }

    .badge-unlock-name {
        font-size: 1.2rem;
    }

    .badge-unlock-description {
        font-size: 0.85rem;
    }
    
    /* Reduce particles on mobile */
    .particles-container {
        opacity: 0.7;
    }
}

/* =====================================
   MODAL BADGE COLLECTION (vue en grand)
   ===================================== */
.collection-badge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
}

.collection-badge-modal.active {
    display: flex;
}

.collection-badge-modal-content {
    background: var(--background-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    padding-top: 50px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.collection-badge-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 24px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

.collection-badge-modal-close:hover {
    color: var(--white);
}

.collection-badge-modal-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.collection-badge-modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.collection-badge-modal-image-container img.missed-badge {
    filter: grayscale(100%);
    opacity: 0.5;
}

.collection-badge-modal-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--white);
}

.collection-badge-modal-info .badge-rarity {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
}

.badge-rarity.rarity-common {
    background: rgba(107, 114, 128, 0.2);
    color: var(--rarity-common);
}

.badge-rarity.rarity-rare {
    background: rgba(0, 212, 255, 0.2);
    color: var(--rarity-rare);
}

.badge-rarity.rarity-epic {
    background: rgba(139, 92, 246, 0.2);
    color: var(--rarity-epic);
}

.badge-rarity.rarity-legendary {
    background: rgba(247, 147, 26, 0.2);
    color: var(--rarity-legendary);
}

.collection-badge-modal-info .badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-status.claimed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.badge-status.missed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}
