/* ==========================================================================
   1. STRUCTURE GLOBALE & POLICE
   ========================================================================== */
body {
    background-color: #0b0813;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    margin: 0;
    padding: 0;
    display: block;
    /* On enlève le flex d'ici pour libérer le header */
    min-height: 100vh;
}

.btn-reglement {
            background: rgba(6, 182, 212, 0.8);
            color: white;
            padding: 12px 24px;
            border-radius: 50px;
            text-decoration: none;
            font-family: 'Rajdhani', sans-serif;
            font-weight: 700;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            transition: transform 0.3s ease, background 0.3s ease;
            border: 1px solid #06b6d4;
        }

.subathon-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 20px;
    margin: 80px auto 0 auto;
    /* Ajoute une marge en haut pour pas qu'il colle le header, et 'auto' sur les côtés pour le centrer */
    box-sizing: border-box;
}

.subathon-actions {
            position: fixed;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            gap: 15px;
            z-index: 998;
            width: 300px;
        }

        .subathon-actions a {
            position: relative;
            /* Écrase le fixed de base */
            bottom: auto;
            left: auto;
            transform: none;
            /* Reset */
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            width: 100%;
            text-align: center;
        }

/* ==========================================================================
   2. EN-TÊTE & COMPTEUR RETRO-NEON
   ========================================================================== */

.subathon-date-header {
    font-size: 1.1rem;
    letter-spacing: 4px;
    color: rgba(138, 43, 226, 0.7);
    margin-bottom: 5px;
}

.btn-reglement:hover {
            background: #06b6d4;
            transform: scale(1.05);
        }

.subathon-main-title {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-top: 0;
    margin-bottom: 40px;
    text-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
}

.countdown-boxes {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.time-box-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.box-digits {
    display: flex;
    gap: 5px;
}

.digit {
    background: rgba(15, 12, 28, 0.8);
    border: 2px solid #8A2BE2;
    border-radius: 8px;
    font-size: 3rem;
    font-weight: bold;
    padding: 10px 20px;
    color: #a855f7;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4), inset 0 0 10px rgba(138, 43, 226, 0.2);
    min-width: 45px;
    display: inline-block;
    text-align: center;
}

.box-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
}

/* ==========================================================================
   SYSTÈME DE PROGRESSION DES PALIERS
   ========================================================================== */

.progress-system-container {
    margin: 60px auto;
    max-width: 800px;
    width: 100%;
    padding: 30px;
    background: rgba(15, 12, 28, 0.6);
    border: 2px solid #8A2BE2;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

.amount-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.amount-input-section label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #a855f7;
    letter-spacing: 1px;
}

.amount-display {
    padding: 15px 30px;
    background: rgba(10, 8, 20, 0.8);
    border: 2px solid #8A2BE2;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.amount-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #06b6d4;
    letter-spacing: 2px;
    display: inline-block;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.update-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-style: italic;
}

.progress-display-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-tier-info,
.next-tier-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tier-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.tier-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #06b6d4;
}

.tier-amount {
    font-size: 1.1rem;
    color: #a855f7;
    font-weight: 700;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.progress-bar-background {
    width: 100%;
    height: 30px;
    background: rgba(10, 8, 20, 0.8);
    border: 2px solid #8A2BE2;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8A2BE2 0%, #06b6d4 100%);
    transition: width 0.5s ease-out;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: white;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    font-size: 1rem;
}

.percentage {
    display: inline-block;
    background: rgba(10, 8, 20, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
}

.remaining-info {
    text-align: center;
    padding: 10px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.remaining-text {
    font-size: 0.95rem;
    color: #a855f7;
    font-weight: 600;
}

.coming-soon-text {
    font-size: 4rem;
    font-weight: 900;
    color: #8A2BE2;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.8), 0 0 40px rgba(138, 43, 226, 0.4);
    animation: pulse 1.5s infinite alternate;
    width: 100%;
    margin-top: 20px;
}

/* ==========================================================================
   3. ARRIÈRE-PLANS VIDÉO
   ========================================================================== */

#bg-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -100;
    object-fit: cover;
    opacity: 0.4;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.4;
}

.video-background iframe {
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   4. STRUCTURE DU TABLEAU DES OBJECTIFS
   ========================================================================== */

.table-separator {
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
    line-height: 0.1em;
    margin: 40px 0 30px;
    text-align: center;
}

.table-separator span {
    background: #0b0813;
    padding: 0 15px;
    color: rgba(138, 43, 226, 0.8);
    font-size: 0.9rem;
    letter-spacing: 3px;
}

.objectives-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

/* Base d'une ligne d'objectif */
.objective-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Éléments internes génériques */
.obj-step {
    background: rgba(15, 12, 28, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 20px;
    text-align: center;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.obj-num {
    font-size: 1.4rem;
    font-weight: 700;
    margin-right: 15px;
    color: rgba(255, 255, 255, 0.6);
}

.obj-text {
    flex-grow: 1;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #ffffff;
    margin-right: 20px;
}

.obj-content {
    flex: 1;
    min-width: 0;
    margin-right: 20px;
}

.obj-title {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 1px;
    color: #ffffff;
}

.obj-description {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1.05rem;
    line-height: 1.35;
}

.obj-val {
    font-size: 1.4rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    min-width: 160px;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}

.obj-step.small-box {
    font-size: 1rem;
    /* Écriture un peu plus petite */
    padding: 4px 10px;
    /* Moins de vide autour du texte/chiffre */
    border-width: 1.5px;
    /* Bordure plus fine pour rester proportionnel */
    margin-right: 15px;
    /* Un peu moins d'espace avec le titre */
}

/* ==========================================================================
   5. ÉTATS & STATUTS LOGIQUES (MODIFICATEURS)
   ========================================================================== */

/* --- DE BASE / À FAIRE (.standard-step) --- */
.standard-step {
    border-color: rgba(255, 255, 255, 0.1);
}

/* --- EN COURS / PALIER ATTEINT (.current-step) --- */
.current-step {
    border-color: #06b6d4;
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.current-step .obj-step {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
    color: #06b6d4;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4), inset 0 0 5px rgba(6, 182, 212, 0.2);
}

.current-step .obj-text,
.current-step .obj-title,
.current-step .obj-num,
.current-step .obj-val {
    color: #06b6d4;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

/* --- GRISÉ / LOCK / NON ATTEINT (.locked-step) --- */
.locked-step {
    border-color: rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.35;
}

.locked-step .obj-step {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.4);
}

.locked-step i {
    margin-right: 8px;
}

/* --- TERMINÉ / VALIDÉ (.completed-step) --- */
.completed-step {
    border-color: rgba(138, 43, 226, 0.4);
    background: rgba(138, 43, 226, 0.02);
    opacity: 0.8;
}

.completed-step .obj-step {
    border-color: #8A2BE2;
    color: #a855f7;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.3);
}

.completed-step .obj-text {
    color: rgba(255, 255, 255, 0.7);
}

.completed-step .obj-title {
    color: rgba(255, 255, 255, 0.82);
}

.completed-step .obj-num,
.completed-step .obj-val {
    color: #a855f7;
}

/* --- DÉFI RATÉ / ÉCHOUÉ (.failed-step) --- */
.failed-step {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.failed-step .obj-step {
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.failed-step .obj-text,
.failed-step .obj-title,
.failed-step .obj-num,
.failed-step .obj-val {
    color: #ef4444;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

.failed-step i {
    margin-right: 8px;
}

/* --- ANNULÉ AVEC TOOLTIP (.canceled-step) --- */
.canceled-step {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.05);
}

.canceled-step .obj-step {
    border-color: #f97316;
    color: #f97316;
}

.canceled-step .obj-text,
.canceled-step .obj-title,
.canceled-step .obj-num {
    color: #f97316;
}

.btn-disabled {
    background: #271a10;
    color: #f97316;
    border: 1px solid #f97316;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: not-allowed;
    font-weight: bold;
    font-family: inherit;
}

/* --- PALIER MYSTÈRE (.mystery-step) --- */
.mystery-step {
    border-color: #d946ef;
    background: rgba(217, 70, 239, 0.05);
    animation: pulseGlow 2s infinite alternate;
}

.mystery-step .obj-step {
    border-color: #d946ef;
    color: #d946ef;
}

.mystery-step .obj-text,
.mystery-step .obj-title,
.mystery-step .obj-num,
.mystery-step .obj-val {
    color: #d946ef;
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.6);
}

.mystery-step i {
    margin-right: 8px;
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.03);
        opacity: 1;
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 5px rgba(217, 70, 239, 0.2);
    }

    100% {
        box-shadow: 0 0 15px rgba(217, 70, 239, 0.5);
    }
}

/* ==========================================================================
   7. INFOBULLE (TOOLTIP) EN PUR CSS
   ========================================================================== */

.btn-canceled-tooltip {
    position: relative;
    display: inline-block;
}

.btn-canceled-tooltip::after {
    content: attr(data-reason);
    position: absolute;
    bottom: 125%;
    right: 0;
    background: #1e1b4b;
    color: #fff;
    border: 1px solid #f97316;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(10px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.btn-canceled-tooltip:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* --- GRAND CADRE MOINS LARGE, PLUS PETIT ET CENTRÉ --- */
.objective-row.small-row {
    max-width: 80%;
    /* Réduit la largeur du cadre à 80% (ajuste le % si tu veux plus ou moins large) */
    margin: 0 auto;
    /* Force le centrage horizontal parfait */
    padding: 8px 15px;
    /* Garde la hauteur compacte */
}

/* On réduit proportionnellement le titre à l'intérieur */
.small-row .obj-text {
    font-size: 1.3rem;
}

/* On réduit la valeur à droite */
.small-row .obj-val {
    font-size: 1.1rem;
}

/* La petite case s'adapte elle aussi pour aller avec le mini cadre */
.small-row .obj-step {
    font-size: 0.9rem;
    padding: 3px 8px;
    border-width: 1.5px;
    margin-right: 15px;
}

.btn-historique {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    /* On initialise l'échelle à 1 */

    background: rgba(138, 43, 226, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* On applique la transition sur le transform global */
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 998;
}

.btn-historique:hover {
    background: #8A2BE2;
    /* On garde le translateX pour qu'il reste centré, et on ajoute le zoom */
}

@media (max-width: 650px) {
    .objective-row {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        padding: 14px;
    }

    .obj-step {
        margin-right: 0;
    }

    .obj-content {
        flex-basis: calc(100% - 58px);
        margin-right: 0;
    }

    .obj-title {
        font-size: 1.3rem;
    }

    .obj-description {
        font-size: 1rem;
    }

    .obj-val {
        width: 100%;
        min-width: 0;
        text-align: left;
        padding-left: 58px;
    }
}