/* =============================================
   STYLES POUR LE TOGGLE MOT DE PASSE
   ============================================= */

.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrapper input[type="password"],
.password-field-wrapper input[type="text"] {
    padding-right: 45px !important;
}

.togglePassword {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6c757d;
    font-size: 1.2rem;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
}

.togglePassword:hover {
    color: #0b6623;
}

.togglePassword:focus {
    outline: none;
    color: #0b6623;
}

/* =============================================
   STYLES POUR LE LOADER
   ============================================= */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-overlay.show {
    display: flex;
}

.loader-container {
    background: white;
    border-radius: 12px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Spinner circulaire */
.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0b6623;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    margin: 0;
}

.loader-text.secondary {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

/* =============================================
   STYLES POUR LES BOUTONS AVEC LOADER
   ============================================= */

button[type="submit"]:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Indicateur de chargement dans le bouton */
.btn-loading {
    position: relative;
}

.btn-loading .spinner-border {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* =============================================
   STYLES RESPONSIFS
   ============================================= */

@media (max-width: 576px) {
    .loader-container {
        padding: 30px 40px;
    }

    .spinner {
        width: 40px;
        height: 40px;
    }

    .loader-text {
        font-size: 1rem;
    }
}
