@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rubik:wght@400;500;600;700&display=swap');
@font-face { font-family: "Horizon"; src: url('../fonts/horizon.otf') format('opentype'); }

* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Inter", "Rubik", sans-serif; }

/* ===== BACKGROUND — même que l'app ===== */
body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: url(../images/background-blur.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    color: #dde6f5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 106, 181, 0.38);
    pointer-events: none;
    z-index: 0;
}

/* ===== CARD ===== */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: rgba(10, 18, 32, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 44px 40px 36px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 146, 221, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== LOGO ===== */
.login-logo {
    position: relative;
    margin-bottom: 20px;
}

.login-logo img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 18px rgba(0, 146, 221, 0.5));
}

.login-logo::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: rgba(0, 146, 221, 0.12);
    border: 1px solid rgba(0, 146, 221, 0.2);
    z-index: 0;
}

/* ===== BRAND ===== */
.login-brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-brand h1 {
    font-family: "Horizon", serif;
    font-size: 32px;
    letter-spacing: 6px;
    color: #dde6f5;
    margin-bottom: 6px;
}

.login-sub {
    font-size: 12.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #4e6070;
    font-weight: 500;
}

/* ===== FORM ===== */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Error banner */
.login-error {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.28);
    border-left: 3px solid #e53e3e;
    border-radius: 10px;
    padding: 11px 14px;
    color: #fc8181;
    font-size: 15px;
    font-weight: 500;
}

.login-error svg { flex-shrink: 0; }

/* Field */
.login-field { display: flex; flex-direction: column; gap: 6px; }

.login-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #4e6070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 2px;
}

/* Input wrapper with icon */
.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrap .input-icon {
    position: absolute;
    left: 14px;
    color: #4e6070;
    pointer-events: none;
    transition: color 0.18s ease;
    flex-shrink: 0;
}

.login-input-wrap input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    font-size: 16px;
    color: #dde6f5;
    outline: none;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.login-input-wrap input::placeholder { color: #4e6070; }

.login-input-wrap input:focus {
    border-color: rgba(0, 146, 221, 0.6);
    background: rgba(0, 146, 221, 0.06);
    box-shadow: 0 0 0 3px rgba(0, 146, 221, 0.12);
}

.login-input-wrap input:focus + .input-icon,
.login-input-wrap:focus-within .input-icon {
    color: #0092DD;
}

/* Submit button */
.login-btn {
    margin-top: 4px;
    padding: 13px;
    background: #0092DD;
    color: #ffffff;
    border: none;
    border-radius: 11px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 4px 16px rgba(0, 146, 221, 0.35);
    width: 100%;
    letter-spacing: 0.2px;
}

.login-btn:hover {
    background: #0075b3;
    box-shadow: 0 6px 22px rgba(0, 146, 221, 0.5);
    transform: translateY(-1px);
}

.login-btn:active { transform: scale(0.98); }

/* ===== FOOTER NOTE ===== */
.login-footer {
    margin-top: 24px;
    font-size: 12.5px;
    color: rgba(78, 96, 112, 0.7);
    text-align: center;
    letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .login-card { padding: 34px 22px 28px; border-radius: 18px; }
    .login-brand h1 { font-size: 28px; letter-spacing: 5px; }
}
