.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px); /* Effet de flou sur le fond */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e2e8f0;
    border-top: 5px solid var(--primary); /* Ton bleu #2c69e5 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-content p {
    font-weight: 600;
    color: var(--text);
    margin: 0;
}


/** CSS SUCESS */

/* --- OVERLAY DE FOND --- */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* --- CARTE DE MESSAGE --- */
.success-card {
    background: white;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

/* --- ANIMATION DU CHECKMARK --- */
.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 0 auto 20px;
    box-shadow: inset 0px 0px 0px #22c55e;
    animation: fill-green .4s ease-in-out .4s forwards, scale-up .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: stroke-draw 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 100; /* Valeur augmentée pour couvrir tout le tracé */
    stroke-dashoffset: 100;
    stroke: #22c55e;
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
    /* L'animation commence après le dessin du cercle */
    animation: stroke-draw 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* --- KEYFRAMES --- */
@keyframes stroke-draw {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fill-green {
    100% {
        box-shadow: inset 0px 0px 0px 40px #22c55e;
    }
}

@keyframes scale-up {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- TEXTES ET BOUTON --- */
.success-card h3 {
    color: #0f172a;
    margin: 10px 0;
    font-weight: 800;
}

.success-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.btn-success-close {
    background: #2c69e5;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
    cursor: pointer;
}