/**
 * STYLES POUR LA RÉCUPÉRATION DE MOT DE PASSE
 * 
 * Styling des modales et formulaires pour :
 * - Demande de réinitialisation (email)
 * - Vérification du code
 * - Définition du nouveau mot de passe
 * 
 * @version 1.0.0
 * @date 2025-12-03
 */

/* ========== LIEN "MOT DE PASSE OUBLIÉ" ========== */

.forgot-password-link {
    display: block;
    background: none;
    border: none;
    color: var(--primary, #4A90E2);
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    margin-top: 0.5rem;
    padding: 0;
    transition: color 0.2s;
}

.forgot-password-link:hover {
    color: var(--primary-dark, #5568d3);
    text-decoration: underline;
}

.forgot-password-link:active {
    color: var(--primary-dark, #5568d3);
}

/* ========== CODE TIMER ========== */

.code-timer {
    background: #f0f0f0;
    border-left: 4px solid var(--primary, #4A90E2);
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #333;
}

.code-timer strong {
    color: var(--primary, #4A90E2);
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 1.1rem;
}

/* ========== PASSWORD STRENGTH INDICATOR ========== */

#newPasswordStrength {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 1.2rem;
    display: flex;
    align-items: center;
}

#newPasswordStrength strong {
    margin-left: 0.3rem;
}

/* ========== ÉTAPES DE RÉINITIALISATION ========== */

.form-step {
    animation: fadeIn 0.3s ease-in-out;
}

.form-step[data-step="2"] {
    display: none;
}

.form-step[data-step="3"] {
    display: none;
}

.form-step.active {
    display: block;
}

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

/* ========== RESPONSIVE ========== */

@media (max-width: 480px) {
    .code-timer {
        font-size: 0.85rem;
        padding: 0.6rem;
    }

    .forgot-password-link {
        font-size: 0.8rem;
    }

    #newPasswordStrength {
        font-size: 0.8rem;
    }
}

/* ========== ANIMATIONS POUR NOTIFICATIONS ========== */

.notification {
    animation: slideIn 0.3s ease-out;
}

.notification.error {
    background-color: #f8d7da;
    color: #721c24;
}

.notification.success {
    background-color: #d4edda;
    color: #155724;
}

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

/* ========== PASSWORD INPUT WITH TOGGLE ========== */

.password-input {
    display: flex;
    position: relative;
}

.password-input input {
    flex: 1;
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle:active {
    opacity: 0.5;
}

/* ========== STEP DESCRIPTION ========== */

.step-desc {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* ========== FORM ACTIONS RESPONSIVES ========== */

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
    min-height: 2.5rem;
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions button {
        width: 100%;
    }
}
