:root {
    --bg: #f5f8fb;
    --accent: #2fb6d6;
    --muted: #9fbddb;
    --text: #1c3f63;
}

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

body.login-page {
    margin: 0;
    font-family: Inter, system-ui, Arial, sans-serif;
    /* couleur de secours + image de fond centrée en cover */
    background-color: var(--bg);
    background-image: url('../images/br.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: clamp(8px, 1.8vw, 18px);
    overflow-x: hidden;
}

.login-hero {
    display: flex;
    max-width: 960px;
    width: min(960px, 100%);
    box-sizing: border-box;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.hero-illustration {
    /* plus large à gauche, avec grand arrondi à droite pour l'effet "panneau" */
    flex: 1.2;
    min-width: 360px;
    background: linear-gradient(180deg, #5ea0ef 0%, #4a7fd6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    color: #fff;
    /* grand arrondi droit pour imiter l'image */
    border-radius: 24px 140px 140px 24px;
}

.hero-illustration h1 {
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    text-align: center;
}

.hero-illustration p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 22px 0;
    text-align: center;
}


/* subtitle and tagline inside the illustration panel */

.hero-illustration .site-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    margin: 8px 0 6px 0;
}

.hero-illustration .site-tagline {
    background: #ffffff;
    color: #163a57;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    margin-top: 8px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(15, 34, 63, 0.06);
}


/* bouton d'inscription dans le panneau d'illustration (style outline blanc) */

.hero-illustration .register-btn {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.85);
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 700;
}

.login-card {
    flex: 1;
    padding: 48px 56px;
    background: #fff;
    /* arrondir le côté droit pour correspondre à l'image */
    border-radius: 0 18px 18px 0;
    display: flex;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;
}

.login-card .card-inner {
    width: 100%;
    min-width: 0;
}

.card-inner h3 {
    font-size: 28px;
    margin: 0 0 22px 0;
    color: #163a57;
    font-weight: 700;
}

.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.field span.muted {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

.input-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 8px;
    border: 1px solid #eef6fb;
    background: #f7fbfd;
    min-height: 32px;
    width: 100%;
}

.input-pill input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    min-width: 0;
    font-size: 11px;
    color: var(--text);
    padding: 0;
}

.input-icon {
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9fbddb;
}


/* Make the icon easier to tap/click and keyboard accessible */

.input-icon {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.input-icon:focus {
    outline: 2px solid rgba(47, 182, 214, 0.18);
}

.input-icon.showing svg path,
.input-icon.showing svg rect {
    stroke: #2f87d6;
    fill: #2f87d6;
}

.password-toggle-btn {
    position: relative;
    border: none;
    background: transparent;
    width: 28px;
    height: 28px;
    padding: 0;
}

.password-toggle-btn .icon-eye {
    width: 18px;
    height: 18px;
}

.password-toggle-btn.showing .icon-eye path,
.password-toggle-btn.showing .icon-eye circle {
    stroke: #2f87d6;
}


/* Hidden state: show a slash across the eye icon. */

.password-toggle-btn::after {
    content: '';
    position: absolute;
    top: 13px;
    left: 5px;
    width: 18px;
    height: 2px;
    background: #9fbddb;
    border-radius: 2px;
    transform: rotate(-28deg);
    opacity: 0.95;
    pointer-events: none;
}

.password-toggle-btn.showing::after {
    opacity: 0;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
}

.btn.pill {
    padding: 12px 36px;
    border-radius: 28px;
    background: linear-gradient(180deg, #4aa0e6, #2f87d6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: block;
    margin: 18px auto 0 auto;
    min-width: 140px;
    text-align: center;
    font-weight: 600;
}

.login-note {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--muted);
}

.socials {
    text-align: center;
    margin-top: 12px;
}

.socials button {
    margin: 0 8px;
    padding: 8px;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #e3edf6;
    background: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.socials button svg {
    width: 20px;
    height: 20px;
}


/* logo shown above the login button */

.login-logo {
    max-width: 110px;
    height: auto;
    display: inline-block;
}


/* Responsive overrides for login page */

@media (max-width: 900px) {
    body.login-page {
        align-items: flex-start;
    }
    .login-hero {
        flex-direction: column;
        padding: 24px;
        max-width: 720px;
        margin: 0 auto;
    }
    .hero-illustration {
        min-width: auto;
        flex: none;
        width: 100%;
        border-radius: 12px;
        padding: 28px 20px;
    }
    .hero-illustration h1 {
        font-size: 36px;
    }
    .hero-illustration p,
    .hero-illustration .site-subtitle {
        font-size: 14px;
    }
    .login-card {
        width: 100%;
        padding: 24px;
        border-radius: 12px;
        align-items: stretch;
    }
    .login-card .card-inner {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .actions {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .actions a,
    .actions label {
        font-size: 12px;
    }
    .login-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    /* hide the illustration on very small screens to prioritize the form */
    .hero-illustration {
        display: none;
    }
    .login-hero {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        border-radius: 14px;
    }
    .login-card {
        border-radius: 12px;
        padding: 14px;
    }
    .hero-illustration h1 {
        font-size: 28px;
    }
    .card-inner h3 {
        font-size: 22px;
    }
    .btn.pill {
        padding: 10px 20px;
        min-width: auto;
        width: 100%;
    }
    body.login-page {
        padding: 8px;
        background-position: top;
    }
    .socials {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .socials button {
        margin: 0;
    }
}