/* ===================================
   Login Page Styles - CEP Sécurité
   =================================== */

/* Container Principal */
.login-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background avec gradient */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #e91e63 100%);
    z-index: 0;
}

.login-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

/* Contenu principal */
.login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Carte de connexion */
.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.6s ease-out;
}

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

/* En-tête de la carte */
.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.logo {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--bs-gray-900, #171717);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--bs-gray-500, #737373);
    margin-bottom: 0;
}

/* Alertes */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-danger {
    background-color: rgba(244, 67, 53, 0.1);
    color: var(--bs-danger, #F44335);
}

.alert-info {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--bs-info, #1A73E8);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Formulaire */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-gray-700, #404040);
    margin-bottom: 0.5rem;
}

.label-icon {
    width: 16px;
    height: 16px;
    color: var(--bs-primary, #e91e63);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--bs-gray-300, #d4d4d4);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background-color: var(--bs-gray-100, #f5f5f5);
}

.form-control:focus {
    outline: none;
    border-color: var(--bs-primary, #e91e63);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

.form-control::placeholder {
    color: var(--bs-gray-400, #a3a3a3);
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--bs-gray-500, #737373);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--bs-primary, #e91e63);
}

.password-toggle.active {
    color: var(--bs-primary, #e91e63);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

/* Options du formulaire */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.custom-control {
    display: flex;
    align-items: center;
}

.custom-control-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--bs-primary, #e91e63);
}

.custom-control-label {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--bs-gray-700, #404040);
    cursor: pointer;
    user-select: none;
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--bs-primary, #e91e63);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--bs-danger, #F44335);
    text-decoration: underline;
}

/* Bouton de connexion */
.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--bs-primary, #e91e63) 0%, var(--bs-danger, #F44335) 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.4);
}

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

.btn-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--bs-gray-200, #e5e5e5);
}

.footer-text {
    font-size: 0.875rem;
    color: var(--bs-gray-500, #737373);
    margin: 0;
}

/* Section info latérale */
.login-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: slideInRight 0.6s ease-out;
}

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

.info-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.info-icon svg {
    width: 28px;
    height: 28px;
    color: var(--bs-primary, #e91e63);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.info-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .login-content {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .login-info {
        display: none;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .login-card {
        background: var(--bs-gray-800, #262626);
    }
    
    .login-title {
        color: white;
    }
    
    .login-subtitle {
        color: var(--bs-gray-400, #a3a3a3);
    }
    
    .form-label {
        color: var(--bs-gray-300, #d4d4d4);
    }
    
    .form-control {
        background-color: var(--bs-gray-700, #404040);
        border-color: var(--bs-gray-600, #525252);
        color: white;
    }
    
    .form-control::placeholder {
        color: var(--bs-gray-500, #737373);
    }
    
    .custom-control-label {
        color: var(--bs-gray-300, #d4d4d4);
    }
    
    .login-footer {
        border-top-color: var(--bs-gray-700, #404040);
    }
}

/* Animations supplémentaires */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* États de chargement */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading .btn-text::after {
    content: '...';
    animation: pulse 1.5s ease-in-out infinite;
}
