/* ===== USER MANAGEMENT STYLES ===== */

/* Modale de credentials */
.credentials-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.credentials-modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

.credentials-modal.success .credentials-modal-content {
    max-width: 500px;
}

.credentials-modal h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.credentials-modal p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Affichage des credentials */
.credentials-display {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.credentials-display p {
    margin: 10px 0;
    color: #333;
}

.password-field {
    background: #ffe4b5;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.warning-message {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #856404;
    font-size: 14px;
}

.warning-message::before {
    content: '⚠️ ';
    font-size: 16px;
}

/* Checkbox personnalisé */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

/* Spinner de chargement */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Indicateur de session */
#session-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

/* Message d'erreur dans le formulaire */
#user-form-error {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    font-size: 14px;
    display: none;
    animation: shake 0.5s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Media queries */
@media (max-width: 480px) {
    .credentials-modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    #session-indicator {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 8px 15px;
    }
}