/* =====================================================
   DJ ALEX RUBEN — Page de connexion (style SmartCoder)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Cinzel:wght@600;700&display=swap');

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2444 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #1a2233;
    -webkit-font-smoothing: antialiased;
}

/* ---------- CARTE ---------- */
.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2.25rem 1.75rem;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
}

/* ---------- LOGO ---------- */
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.75rem;
}

.login-logo-mark {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #D7B56D, #A88742);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: .25rem;
}

.login-logo-text {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #1e3a5f;
    text-transform: uppercase;
}

/* ---------- TITRES ---------- */
.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1e3a5f;
    margin-bottom: .35rem;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: .85rem;
    color: #6b7280;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* ---------- ALERTE ---------- */
.login-alert {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: .85rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

/* ---------- FORMULAIRE ---------- */
.login-form {
    text-align: left;
}

.login-form label {
    display: block;
    font-size: .78rem;
    font-weight: 700;
    color: #1e3a5f;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: .5rem;
    margin-top: 1rem;
}

.login-form input[type=text],
.login-form input[type=password] {
    width: 100%;
    padding: .9rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #1a2233;
    font-size: .95rem;
    font-family: inherit;
    transition: all .2s;
    outline: none;
}

.login-form input[type=text]:hover,
.login-form input[type=password]:hover {
    border-color: #cbd5e1;
}

.login-form input[type=text]:focus,
.login-form input[type=password]:focus {
    border-color: #1e3a5f;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.1);
}

.login-form input::placeholder {
    color: #9ca3af;
}

/* ---------- BOUTON ---------- */
.login-btn {
    display: block;
    width: 100%;
    margin-top: 1.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #152a47 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #152a47 0%, #0f2444 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.45);
}

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

/* ---------- FOOTER ---------- */
.login-footer {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
    font-size: .78rem;
    color: #94a3b8;
}

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

.login-footer a:hover {
    text-decoration: underline;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem 1.5rem;
    }
    .login-title { font-size: 1.25rem; }
    .login-logo-mark { font-size: 2rem; }
}

/* =====================================================
   FIX AUTOFILL CHROME — garder le fond uniforme
   ===================================================== */
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: #1a2233 !important;
    caret-color: #1a2233 !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #e2e8f0 !important;
}

/* =====================================================
   FIX AUTOFILL — Firefox
   ===================================================== */
.login-form input:autofill,
.login-form input:-moz-autofill {
    background-color: #f8fafc !important;
    color: #1a2233 !important;
    filter: none;
}