/**
 * Zoho CRM - Page de connexion personnalisée
 */

/* Container principal */
.zoho-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 40px 20px;
}

/* Boîte de connexion */
.zoho-login-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

/* Header */
.zoho-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.zoho-login-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 20px;
}

.zoho-login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.zoho-login-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #fff;
}

.zoho-login-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.zoho-login-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Avatar pour utilisateur connecté */
.zoho-login-avatar {
    margin-bottom: 15px;
}

.zoho-login-avatar img {
    border-radius: 50%;
    border: 3px solid #667eea;
}

/* Formulaire */
.zoho-login-form {
    margin: 0;
}

.zoho-login-form .zoho-form-group {
    margin-bottom: 20px;
}

.zoho-login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 8px;
}

.zoho-login-form label .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #667eea;
}

.zoho-login-form .zoho-form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.zoho-login-form .zoho-form-control:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.zoho-login-form .zoho-form-control::placeholder {
    color: #aaa;
}

/* Wrapper mot de passe avec toggle */
.zoho-password-wrapper {
    position: relative;
}

.zoho-password-wrapper .zoho-form-control {
    padding-right: 50px;
}

.zoho-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #999;
    transition: color 0.2s;
}

.zoho-password-toggle:hover {
    color: #667eea;
}

.zoho-password-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Remember me */
.zoho-remember-me {
    margin-bottom: 25px !important;
}

.zoho-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
}

.zoho-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

/* Bouton de connexion */
.zoho-btn-login {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.zoho-btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.zoho-btn-login:active {
    transform: translateY(0);
}

.zoho-btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.zoho-btn-block {
    width: 100%;
}

/* Loader dans le bouton */
.zoho-btn-loader {
    display: flex;
    align-items: center;
}

.zoho-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Message d'erreur/succès */
.zoho-login-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoho-login-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.zoho-login-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.zoho-login-message .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Footer */
.zoho-login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.zoho-forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.zoho-forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* État connecté */
.zoho-logged-in .zoho-login-header {
    margin-bottom: 25px;
}

.zoho-logged-in .zoho-login-header p {
    color: #666;
    margin: 10px 0 0 0;
}

.zoho-login-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.zoho-login-actions .zoho-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.zoho-login-actions .zoho-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.zoho-login-actions .zoho-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.zoho-login-actions .zoho-btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
}

.zoho-login-actions .zoho-btn-secondary:hover {
    background: #eee;
    color: #333;
}

.zoho-login-actions .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 480px) {
    .zoho-login-box {
        padding: 30px 25px;
        margin: 0 10px;
    }
    
    .zoho-login-header h2 {
        font-size: 20px;
    }
    
    .zoho-login-form .zoho-form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .zoho-btn-login {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Animation d'entrée */
.zoho-login-box {
    animation: fadeInUp 0.5s ease;
}

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