/* =========================================
   THÈME NOËL PRO - ROUGE, VERT & OR
   ========================================= */

/* --- Conteneur Principal --- */
.christmas-event-container {
    /* Fond sombre avec une teinte vert sapin très subtile */
    background: linear-gradient(180deg, #0f1f15 0%, #1a1a1d 100%);
    padding: 20px;
    border-radius: 12px;
    color: #ecf0f1;
    min-height: 600px;
    border: 1px solid #2d4033;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- Bannière d'En-tête --- */
.christmas-header-banner {
    /* Dégradé Rouge Riche et texture */
    background: linear-gradient(135deg, #8E0E00, #1F1C18);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 4px solid #f1c40f; /* Bordure Or */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Animation de neige en arrière-plan du header */
.christmas-header-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(4px 4px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
                      radial-gradient(4px 4px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
                      radial-gradient(4px 4px at 50px 160px, rgba(255, 255, 255, 0.8), transparent),
                      radial-gradient(4px 4px at 90px 40px, rgba(255, 255, 255, 0.8), transparent);
    background-size: 200px 200px;
    animation: snowAnim 10s linear infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes snowAnim {
    0% { background-position: 0 0; }
    100% { background-position: 0 200px; }
}

.christmas-header-banner h1 {
    margin: 0;
    font-size: 2.4em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.currency-display {
    background: rgba(0, 0, 0, 0.6);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 50px;
    margin-top: 15px;
    font-size: 1.1em;
    border: 1px solid #f1c40f;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
    position: relative;
    z-index: 1;
}

.candy-amount {
    color: #f1c40f;
    font-weight: bold;
    font-size: 1.3em;
}

/* --- Navigation (Onglets) --- */
.christmas-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
}

.christmas-nav-btn {
    background: #1e2b23; /* Vert très sombre */
    border: 1px solid #2d4033;
    color: #aaa;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.christmas-nav-btn:hover {
    background: #28382e;
    color: #fff;
    transform: translateY(-2px);
}

.christmas-nav-btn.active {
    background: linear-gradient(135deg, #c0392b, #8e44ad); /* Rappel du header */
    color: #fff;
    border-color: #e74c3c;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.4);
}

/* --- Grille des Missions --- */
.missions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.mission-category-card {
    background: rgba(255, 255, 255, 0.03); /* Glassmorphism léger */
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.mission-category-card h4 {
    margin-top: 0;
    border-bottom: 2px solid #27ae60; /* Souligné Vert Noël */
    padding-bottom: 10px;
    color: #f1c40f; /* Titre Or */
    font-size: 1.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.mission-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.mission-row:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.mission-icon {
    font-size: 1.4em;
    color: #27ae60; /* Icône verte */
    width: 40px;
    text-align: center;
    background: rgba(39, 174, 96, 0.1);
    padding: 8px;
    border-radius: 50%;
}

.mission-details {
    flex-grow: 1;
}

.mission-details strong { display: block; font-size: 0.95em; color: #fff; margin-bottom: 2px; }
.mission-details small { color: #bdc3c7; font-size: 0.85em; }

/* Barres de progression */
.mission-bar-bg {
    height: 20px; /* Épaissi de 8px à 20px pour contenir le texte */
    background: #111;
    border-radius: 10px; /* Arrondi ajusté */
    margin-top: 8px;
    width: 100%;
    overflow: hidden;
    border: 1px solid #333;
    position: relative; /* CRUCIAL : Garde le texte "0 / 50" à l'intérieur */
}

.mission-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 10px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

/* On s'assure que le texte est bien visible par-dessus le vert */
.mission-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85em;
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    white-space: nowrap;
    z-index: 2;
}

/* Boutons Missions */
.mission-btn {
    padding: 6px 12px;
    font-size: 0.85em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    min-width: 80px;
    transition: all 0.2s;
}

.mission-btn.claimable {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000;
    box-shadow: 0 0 8px rgba(241, 196, 15, 0.4);
    animation: pulseGold 1.5s infinite;
}

.mission-btn.claimed {
    background: transparent;
    border: 1px solid #27ae60;
    color: #27ae60;
    cursor: default;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

/* --- Boutique (Shop) --- */
.shop-section {
    margin-bottom: 40px;
}

.shop-section h3 {
    border-bottom: 2px solid #c0392b; /* Rouge */
    padding-bottom: 8px;
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.shop-section h3 i { color: #c0392b; }

.shop-grid, .badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.shop-card, .badge-card {
    background: linear-gradient(145deg, #252529, #1e1e22);
    border: 1px solid #333;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

/* Effet au survol des cartes */
.shop-card:hover, .badge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border-color: #555;
}

/* Bordure spéciale pour les items rares/noël */
.shop-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #c0392b, #27ae60);
    opacity: 0.7;
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #ecf0f1;
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.shop-card strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 1.1em;
}

.shop-card small {
    display: block;
    margin-bottom: 15px;
    color: #95a5a6;
    font-size: 0.9em;
    line-height: 1.4;
    flex-grow: 1;
}

/* Boutons d'achat */
.shop-btn {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%); /* Rouge Noël */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    transition: filter 0.2s;
    box-shadow: 0 4px 6px rgba(169, 50, 38, 0.3);
}

.shop-btn:hover {
    filter: brightness(1.2);
}

.shop-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

/* Badges spécifiques */
.badge-card .badge-icon {
    font-size: 3em;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px gold);
}

.badge-card.owned {
    border: 1px solid #f1c40f;
    background: rgba(241, 196, 15, 0.05);
}

.badge-card.owned::after {
    content: 'POSSÉDÉ';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    color: rgba(241, 196, 15, 0.2);
    font-size: 1.5em;
    font-weight: bold;
    pointer-events: none;
    border: 2px solid rgba(241, 196, 15, 0.2);
    padding: 5px 10px;
    border-radius: 5px;
}

/* --- BONUS QUOTIDIEN --- */
.daily-bonus-container {
    margin-bottom: 25px;
}

.daily-bonus-card {
    background: linear-gradient(90deg, #2c3e50, #000); /* Fond sombre */
    border: 2px solid #f1c40f; /* Bordure Or */
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.2);
    position: relative;
    overflow: hidden;
}

/* Effet brillant sur la carte */
.daily-bonus-card::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.bonus-icon {
    font-size: 3em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bonus-info {
    flex-grow: 1;
}

.bonus-info h3 {
    margin: 0 0 5px 0;
    color: #f1c40f; /* Or */
    text-transform: uppercase;
    font-size: 1.2em;
}

.bonus-info p {
    margin: 0;
    color: #bdc3c7;
    font-size: 0.9em;
}

.bonus-btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s;
    z-index: 2; /* Au-dessus de l'effet brillant */
    position: relative;
}

.bonus-btn.claimable {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 0 #219150;
}

.bonus-btn.claimable:active {
    transform: translateY(4px);
    box-shadow: none;
}

.bonus-btn.claimed {
    background: #34495e;
    color: #7f8c8d;
    cursor: default;
    border: 1px solid #7f8c8d;
}

/* Adaptation Mobile */
@media (max-width: 480px) {
    .daily-bonus-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    .bonus-action {
        width: 100%;
    }
    .bonus-btn {
        width: 100%;
    }
}



/* =========================================
   RESPONSIVE MOBILE (PETITS ÉCRANS < 480px)
   ========================================= */

@media (max-width: 480px) {

    /* 1. Conteneur plus compact */
    .christmas-event-container {
        padding: 10px;
        min-height: auto;
    }

    /* 2. Header adapté */
    .christmas-header-banner {
        padding: 15px 10px;
    }
    .christmas-header-banner h1 {
        font-size: 1.5em;
        line-height: 1.2;
    }
    .currency-display {
        font-size: 0.9em;
        padding: 6px 15px;
        margin-top: 10px;
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }

    /* --- MODIFICATION ICI --- */
    /* 3. Navigation (Onglets) : Empilés verticalement */
    .christmas-tabs {
        gap: 10px;
        flex-direction: column; /* Les met l'un au-dessus de l'autre */
    }
    
    .christmas-nav-btn {
        width: 100%; /* Prend toute la largeur disponible */
        padding: 12px 5px; /* Un peu plus de hauteur pour le doigt */
        font-size: 0.95em; /* Texte un peu plus grand pour la lisibilité */
        text-align: center;
        white-space: normal; /* Autorise le texte à passer à la ligne si vraiment trop long */
    }
    /* ------------------------ */

    /* 4. Grilles : Forcer une seule colonne */
    .missions-grid, 
    .shop-grid, 
    .badges-grid {
        grid-template-columns: 1fr !important; 
        gap: 15px;
    }

    /* 5. Cartes de Mission : Layout vertical */
    .mission-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .mission-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8em;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mission-details {
        width: 100%;
    }
    
    .mission-details strong {
        font-size: 1.1em;
        margin-bottom: 5px;
    }

    .mission-btn {
        width: 100%; 
        padding: 10px;
        font-size: 1em;
        margin-top: 5px;
    }

    /* 6. Cartes Boutique */
    .shop-card, .badge-card {
        padding: 15px;
    }
    .shop-btn {
        padding: 12px;
    }
}