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

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background: #eef1f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* ── Animations cercles ── */
@keyframes fd-float-a {
    0%, 100% { transform: translateY(0)    scale(1);    }
    50%       { transform: translateY(-20px) scale(1.07); }
}
@keyframes fd-float-b {
    0%, 100% { transform: translateY(0)   scale(1);    }
    50%       { transform: translateY(16px) scale(1.05); }
}
@keyframes fd-float-c {
    0%, 100% { transform: translateY(0)    scale(1);    }
    50%       { transform: translateY(-12px) scale(1.09); }
}

/* ── Cercles décoratifs ── */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    border: 3px solid rgba(11,79,108,.2);
    pointer-events: none;
}
body::before {
    width: 260px;
    height: 260px;
    top: -80px;
    right: -80px;
    animation: fd-float-a 5s ease-in-out infinite;
}
body::after {
    width: 180px; height: 180px;
    bottom: -40px; left: -40px;
    animation: fd-float-b 8s ease-in-out infinite 1.2s;
}

/* ── Card ── */
.login-card {
    display: flex;
    width: 100%;
    max-width: 860px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.12);
    position: relative;
    z-index: 1;
}

/* ── Panneau gauche ── */
.login-left {
    width: 320px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0b4f6c 0%, #06384d 100%);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.login-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    animation: fd-float-c 7s ease-in-out infinite 0.5s;
}
.login-left-logo {
    margin-bottom: 32px;
}
.login-left-logo img {
    width: 72px; height: 72px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.login-left-brand {
    max-width: 160px;
    height: auto;
    margin: 20px 0 8px;
    filter: brightness(0) invert(1);
}
.login-left h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.25;
}
.login-left p {
    font-size: .9rem;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    flex: 1;
}
.login-left-footer {
    margin-top: 40px;
    font-size: .78rem;
    color: rgba(255,255,255,.4);
    line-height: 1.6;
}
.login-left-footer a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    transition: color .15s;
}
.login-left-footer a:hover { color: #fff; }

/* ── Panneau droit ── */
.login-right {
    flex: 1;
    background: #fff;
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-right h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #1a2b35;
    margin-bottom: 32px;
}

/* ── Alertes ── */
.login-alert {
    background: #fff1f1;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.login-alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* ── Formulaire ── */
.login-form-group {
    margin-bottom: 20px;
}
.login-form-group label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #5a7080;
    margin-bottom: 7px;
}
.login-form-group label .req { color: #e53e3e; margin-left: 2px; }
.login-form-group input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #d0dde6;
    border-radius: 10px;
    font-size: .95rem;
    font-family: inherit;
    color: #1a2b35;
    background: #f8fbfd;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.login-form-group input:focus {
    border-color: #0b4f6c;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(11,79,108,.1);
}

/* ── Bouton submit ── */
.login-submit {
    width: 100%;
    padding: 14px;
    background: #0b4f6c;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-submit:hover {
    background: #06384d;
    transform: translateY(-1px);
}

/* ── Mot de passe oublié ── */
.login-forgot {
    text-align: right;
    margin-bottom: 16px;
}
.login-forgot a {
    font-size: .88rem;
    color: #5a7080;
    text-decoration: none;
}
.login-forgot a:hover {
    color: #0b4f6c;
    text-decoration: underline;
}
.login-desc {
    color: #5a7080;
    font-size: .95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.login-back {
    margin-top: 20px;
    font-size: .9rem;
}
.login-back a {
    color: #0b4f6c;
    text-decoration: none;
}
.login-back a:hover {
    text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 640px) {
    body {
        padding: 16px;
        align-items: flex-start;
        padding-top: 24px;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .login-card {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
        margin: 0 auto;
    }
    .login-left {
        width: 100%;
        padding: 24px 20px;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 16px;
    }
    .login-left-logo { margin-bottom: 0; flex-shrink: 0; }
    .login-left-logo img { width: 48px; height: 48px; border-radius: 10px; }
    .login-left-brand { display: none; }
    .login-left p { display: none; }
    .login-left-footer { margin-top: 0; text-align: right; flex: 1; }
    .login-left::after { display: none; }
    .login-right { padding: 28px 20px; }
}


/* Inscription : honeypot (invisible) + aide */
.login-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.login-hint { font-weight: 400; font-size: .8rem; color: #8aa0ae; }
