/* =================================================================
   STEP 5 - PAGE DE SUCCÈS
   Design simple et épuré avec cohérence graphique
   ================================================================= */

/* Card de succès */
.moodia-card--success {
    text-align: center;
    padding: var(--spacing-3xl);
    position: relative;
    overflow: hidden;
}

/* =================================================================
   CONFETTIS ANIMATION
   Animation de fond CSS pour un effet supplémentaire
   ================================================================= */
.moodia-card--success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, #10b981 3px, transparent 3px),
        radial-gradient(circle, var(--color-primary) 3px, transparent 3px),
        radial-gradient(circle, #f59e0b 3px, transparent 3px),
        radial-gradient(circle, #ef4444 3px, transparent 3px),
        radial-gradient(circle, #8b5cf6 3px, transparent 3px),
        radial-gradient(circle, #ec4899 3px, transparent 3px);
    background-size: 20% 20%, 25% 25%, 22% 22%, 18% 18%, 23% 23%, 21% 21%;
    background-position: 10% 20%, 40% 10%, 70% 15%, 25% 30%, 85% 25%, 55% 35%;
    opacity: 0;
    pointer-events: none;
    animation: confettiExplosion 4s ease-out forwards;
    z-index: 0;
    filter: blur(0.5px);
}

.moodia-card--success::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(16, 185, 129, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    pointer-events: none;
    animation: successGlow 2s ease-out forwards;
    z-index: 0;
}

@keyframes confettiExplosion {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.5) rotate(0deg);
    }
    15% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(45deg);
    }
    100% {
        opacity: 0;
        transform: translateY(500px) scale(2) rotate(180deg);
    }
}

@keyframes successGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* S'assurer que le contenu est au-dessus des confettis */
.moodia-card--success > * {
    position: relative;
    z-index: 1;
}

/* =================================================================
   ICÔNE DE SUCCÈS
   ================================================================= */
.success-icon-modern {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-xl) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    animation: successIconBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.success-icon-modern::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    animation: successIconPulse 2s ease-out infinite;
}

.success-icon-modern svg {
    filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
    position: relative;
    z-index: 1;
}

@keyframes successIconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    70% {
        transform: scale(0.9) rotate(-5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes successIconPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* =================================================================
   TITRES
   ================================================================= */
.success-title-modern {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    margin: 0 0 var(--spacing-sm) 0;
    font-family: var(--font-secondary);
    animation: titleSlideUp 0.6s ease-out 0.3s both;
}

.success-subtitle {
    font-size: 1rem;
    color: var(--color-gray-dark);
    margin: 0 0 var(--spacing-3xl) 0;
    animation: titleSlideUp 0.6s ease-out 0.5s both;
}

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

/* =================================================================
   BOUTON PRINCIPAL MOODLE
   ================================================================= */
.moodia-card--success .btn--large {
    margin-bottom: var(--spacing-2xl);
    animation: buttonFadeIn 0.6s ease-out 0.7s both;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.moodia-card--success .btn--large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(12, 129, 228, 0.3);
}

/* S'assurer que le texte reste blanc au hover */
.moodia-card--success .btn--primary {
    color: var(--color-white);
}

.moodia-card--success .btn--primary:hover {
    color: var(--color-white);
}

@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* =================================================================
   ACTIONS SECONDAIRES
   ================================================================= */
.success-actions-secondary {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: buttonFadeIn 0.6s ease-out 0.9s both;
}

.success-actions-secondary .btn {
    transition: transform 0.2s ease;
}

.success-actions-secondary .btn:hover {
    transform: translateY(-2px);
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
    .moodia-card--success {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .success-title-modern {
        font-size: 1.5rem;
    }

    .success-subtitle {
        font-size: 0.875rem;
    }

    .success-actions-secondary {
        flex-direction: column;
    }

    .success-actions-secondary .btn {
        width: 100%;
    }
}
