/* ===========================
   STYLES SPÉCIFIQUES LOGIN
   Page de connexion Publiscreen
   =========================== */

/* Variables couleurs pour la page de login */
:root {
    --color-accent: #fbb040;
}

body {
    background: #004874;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* Container principal */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Carte de login */
.login-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #fbb040;
}

/* Header avec logo */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 280px;
    height: auto;
    max-height: 60px;
    margin-bottom: 24px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #004874;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Formulaire */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #004874;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Focus sur les champs */
.form-group:focus-within .form-label {
    color: var(--color-accent);
}

/* Lien création de compte */
.create-account {
    margin-bottom: 32px;
    text-align: center;
}

.create-account-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.create-account-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.create-account-link:hover {
    text-decoration: underline;
}

/* Bouton de connexion */
.login-btn {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    background: var(--color-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.login-btn:hover {
    background: #f28a0b;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages d'erreur et succès */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Footer */
.login-footer {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid #e1e5e9;
}

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

.login-footer a {
    color: #004874;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    color: #fbb040;
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Effet de focus visible pour l'accessibilité */
.form-input:focus-visible,
.login-btn:focus-visible,
.remember-checkbox input:focus-visible + .checkmark {
    outline: 2px solid #fbb040;
    outline-offset: 2px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    body {
        padding: 20px;
    }
    
    .login-card {
        padding: 32px 24px;
        margin: 20px 0;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0 16px;
    }
    
    .login-card {
        padding: 24px 20px;
    }
    
    .login-logo {
        width: 240px;
    }
}
