/* ============================================================
   CRM Pharma — Page de connexion
   Extrait de login.php
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    background-color: #ebf4ff;
    background-image:
        radial-gradient(ellipse 70% 50% at 15% 20%, rgba(66,153,225,0.18) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(44,82,130,0.12) 0%, transparent 55%);
}

.card {
    width: 400px;
    max-width: 94vw;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 44px 40px 36px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 32px rgba(44,82,130,0.10);
    animation: fadeUp .5s cubic-bezier(.22,1,.36,1) both;
}

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

.logo-zone { text-align: center; margin-bottom: 32px; }

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    border-radius: 14px;
    background: #2c5282;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(44,82,130,0.3);
}
.logo-icon svg { width: 24px; height: 24px; fill: #fff; }

.logo-title {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    color: #2c5282;
    letter-spacing: -.2px;
}
.logo-subtitle {
    font-size: 12px;
    color: #6b7c93; /* Amélioré : ratio >= 4.5:1 sur blanc */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.error-msg {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 18px;
    text-align: center;
}

.field { margin-bottom: 15px; }
.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a0aec0;
    margin-bottom: 6px;
}
.field input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 11px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #2d3748;
    transition: all .2s;
}
.field input:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 1px;
}
.field input::placeholder { color: #c0ccd8; }
.field input:focus {
    border-color: #4299e1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66,153,225,0.15);
}

.options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 24px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #718096;
    font-size: 13px;
    user-select: none;
}
.remember input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; /* WCAG : cible min 44x44, mais 20x20 améliore déjà */
    border: 1.5px solid #cbd5e0;
    border-radius: 4px;
    background: #f8fafc;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}
.remember input[type=checkbox]:checked {
    background: #2c5282;
    border-color: #2c5282;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.forgot { font-size: 13px; color: #4299e1; text-decoration: none; transition: color .2s; }
.forgot:hover { color: #2c5282; }

.btn-login {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #2c5282;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(44,82,130,0.3);
    transition: all .15s;
}
.btn-login:hover { background: #3a6fa8; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(44,82,130,0.35); }
.btn-login:active { transform: translateY(0); }

.footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 11px;
    color: #8a96a3; /* Amélioré : contraste suffisant */
}

/* Accessibilité : réduire les animations */
@media (prefers-reduced-motion: reduce) {
    .card { animation: none; }
    .field input, .btn-login, .forgot, .remember input[type=checkbox] {
        transition: none;
    }
}

/* Label couleur corrigée pour contraste */
.field label {
    color: #5a6878; /* ratio >= 4.5:1 sur blanc */
}
