/* Styles modernes pour login.php - Style Dashboard */

/* Carte de connexion moderne */
.modern-login-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    background: white;
    max-width: 400px;
    margin: 0 auto;
}

.modern-login-card .auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 0 30px 0;
    text-align: center;
    border-bottom: none;
}

.modern-login-card .auth-header img {
    height: 140px;
    transition: all 0.3s ease;
}

.modern-login-card .auth-header img:hover {
    transform: scale(1.05);
}

.modern-login-card .auth-content {
    padding: 0px 30px 30px 30px;
    background: white;
}

/* Conteneur des messages */
.message-container {
    margin-bottom: 25px;
}

/* Alertes modernes */
.modern-alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.modern-alert i {
    margin-right: 10px;
    font-size: 16px;
    margin-top: 2px;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fcc419 100%);
    color: #212529;
}

/* Formulaire moderne */
.modern-login-form {
    margin-top: 20px;
}

.modern-login-form .form-group {
    margin-bottom: 25px;
}

/* Labels modernes */
.modern-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-label i {
    margin-right: 8px;
    color: #667eea;
    font-size: 16px;
}

/* Champs d'entrée modernes */
.modern-input {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
    width: 100%;
    box-sizing: border-box;
}

/* Conteneur pour le champ mot de passe avec bouton */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container .modern-input {
    padding-right: 50px;
    width: 100%;
}

/* Bouton d'affichage/masquage du mot de passe */
.password-toggle-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.password-toggle-btn:hover {
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.1);
}

.password-toggle-btn:focus {
    outline: none;
    color: #667eea;
    background-color: rgba(102, 126, 234, 0.2);
}

.password-toggle-btn.active {
    color: #667eea;
}

.modern-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.modern-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Styles de base pour les boutons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Bouton de connexion moderne */
.btn.modern-login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.modern-login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.modern-login-btn:active {
    transform: translateY(-1px);
}

.modern-login-btn i {
    margin-right: 10px;
    font-size: 18px;
}

/* Container d'authentification */
.auth {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.modern-login-card {
    animation: fadeInUp 0.8s ease-out;
}

.modern-alert {
    animation: slideIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-login-card {
        margin: 10px;
        border-radius: 15px;
    }
    
    .modern-login-card .auth-header {
        padding: 20px;
    }
    
    .modern-login-card .auth-header img {
        height: 100px !important;
    }
    
    .modern-login-card .auth-content {
        padding: 30px 20px;
    }
    
    .modern-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .modern-login-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .modern-label {
        font-size: 13px;
    }
    
    .password-toggle-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .password-input-container .modern-input {
        padding-right: 45px;
    }
}

@media (max-width: 480px) {
    .auth {
        padding: 10px;
    }
    
    .modern-login-card .auth-header {
        padding: 15px;
    }
    
    .modern-login-card .auth-content {
        padding: 25px 15px;
    }
    
    .modern-alert {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* Amélioration de l'accessibilité */
.modern-input:focus,
.modern-login-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Effet de chargement pour le bouton */
.modern-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Style pour les messages d'erreur de validation HTML5 */
.modern-input:invalid {
    border-color: #ff6b6b;
}

.modern-input:invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Amélioration de l'apparence générale */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Suppression des styles par défaut du thème */
.auth .card {
    background: transparent;
    border: none;
    box-shadow: none;
}

.auth .auth-header {
    background: transparent;
    border: none;
}

.auth .auth-content {
    background: transparent;
}
