/* Connexion admin : deux volets, fond médical, thème clair et sombre. */

body.vs-login-split {
    --login-hero-a: #0f766e;
    --login-hero-b: #14b8a6;
    --login-hero-c: #2dd4bf;
    --login-panel: #f3faf8;
    --login-accent: #0f766e;
    --login-accent-2: #14b8a6;
    --login-input: #ffffff;
    --login-input-text: #0f172a;
    --login-placeholder: #94a3b8;
    --login-muted: #64748b;
    --login-title: #0f766e;
    --login-alert-bg: #fef2f2;
    --login-alert-text: #b91c1c;
    --login-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.28' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M36 28h16v12h12v16H52v12H36V56H24V40h12z'/%3E%3Cpath d='M118 42c0-8 6-14 14-14 5 0 9 2 12 6 3-4 7-6 12-6 8 0 14 6 14 14 0 16-26 30-26 30S118 58 118 42z'/%3E%3Crect x='28' y='118' width='40' height='28' rx='4'/%3E%3Cpath d='M40 132h8l4-8 6 16 4-8h6'/%3E%3Crect x='118' y='118' width='44' height='18' rx='9' transform='rotate(-20 140 127)'/%3E%3Cpath d='M48 188c0-10 8-18 18-18s18 8 18 18'/%3E%3Cpath d='M48 188v8a14 14 0 0 0 28 0v-2'/%3E%3Ccircle cx='90' cy='198' r='6'/%3E%3Cpath d='M150 178l22 22M168 174l10 10M154 198l6-6'/%3E%3C/g%3E%3C/svg%3E");
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--login-panel) !important;
    background-image: none !important;
    color: var(--login-input-text);
    color-scheme: light;
}

html[data-vs-theme="dark"] body.vs-login-split,
body.vs-theme-dark.vs-login-split {
    --login-hero-a: #042f2e;
    --login-hero-b: #115e59;
    --login-hero-c: #0f766e;
    --login-panel: #0b1220;
    --login-accent: #5eead4;
    --login-accent-2: #2dd4bf;
    --login-input: #1e293b;
    --login-input-text: #f8fafc;
    --login-placeholder: #64748b;
    --login-muted: #94a3b8;
    --login-title: #5eead4;
    --login-alert-bg: rgba(127, 29, 29, 0.45);
    --login-alert-text: #fecaca;
    color-scheme: dark;
}

body.vs-login-split.vs-public-page::before,
body.vs-login-split.vs-auth-page::before {
    content: none;
}

.login-split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.login-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6.4rem 4.2rem 5rem;
    color: #fff;
    background:
        var(--login-pattern),
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.16), transparent 26%),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.1), transparent 22%),
        linear-gradient(160deg, var(--login-hero-a) 0%, var(--login-hero-b) 52%, var(--login-hero-c) 100%);
    background-size: 220px 220px, auto, auto, auto;
}

.login-hero__ecg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8%;
    width: 100%;
    height: 72px;
    opacity: 0.45;
    pointer-events: none;
}

.login-hero__brand,
.login-hero__copy {
    position: relative;
    z-index: 1;
}

.login-hero__brand {
    position: absolute;
    top: max(1.15rem, env(safe-area-inset-top));
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: calc(100% - 3rem);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.login-hero__name {
    min-width: 0;
    text-shadow: 0 1px 2px rgba(4, 47, 46, 0.28);
}

.login-hero__mark {
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.login-hero__brand--logo {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.login-hero:has(.login-hero__brand--logo) {
    padding-top: 8.75rem;
}

.login-hero__brand--logo .login-hero__name {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    opacity: 0.88;
}

.login-hero__brand--logo .login-hero__fallback {
    display: none;
}

.login-hero__brand--logo .login-hero__mark {
    width: auto;
    height: auto;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-hero__mark img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(15rem, 72vw);
    max-height: 4.25rem;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(4, 47, 46, 0.28));
}

.login-hero__copy {
    max-width: 34rem;
}

.login-hero__kicker {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.login-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(3rem, 5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 0.95;
    text-transform: uppercase;
}

.login-hero h1::after {
    content: "";
    display: block;
    width: 3.2rem;
    height: 3px;
    margin-top: 1.1rem;
    border-radius: 999px;
    background: #fff;
}

.login-hero__text {
    max-width: 26rem;
    margin: 1.35rem 0 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.login-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2rem;
    background-color: var(--login-panel);
    background-image: var(--vs-medical-tile);
    background-size: 220px 220px;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--login-panel);
    opacity: 0.9;
    pointer-events: none;
}

.login-toolbar {
    position: absolute;
    z-index: 2;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
}

.login-panel__inner {
    position: relative;
    z-index: 1;
    width: min(100%, 26rem);
}

.login-panel h2 {
    margin: 0;
    text-align: center;
    color: var(--login-title);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.login-panel__lead {
    margin: 0.55rem 0 1.8rem;
    text-align: center;
    color: var(--login-muted);
    font-size: 0.92rem;
}

.login-alert {
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.7rem;
    background: var(--login-alert-bg);
    color: var(--login-alert-text);
    font-size: 0.86rem;
}

.login-field {
    margin-bottom: 1rem;
}

.login-field label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--login-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.login-field input {
    width: 100%;
    height: 3rem;
    padding: 0 0.95rem;
    border: 0;
    border-left: 3px solid var(--login-accent);
    border-radius: 0.55rem;
    background: var(--login-input);
    color: var(--login-input-text);
    font: inherit;
    outline: none;
}

.login-field input::placeholder {
    color: var(--login-placeholder);
}

.login-field input:focus {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.login-links {
    display: flex;
    justify-content: flex-end;
    margin: 0.35rem 0 1.35rem;
}

.login-links a,
.login-legal a {
    color: var(--login-accent);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.login-links a:hover,
.login-legal a:hover {
    text-decoration: underline;
}

.login-submit {
    width: 100%;
    height: 3rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--login-accent), var(--login-accent-2));
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.28);
}

html[data-vs-theme="dark"] body.vs-login-split .login-submit,
body.vs-theme-dark.vs-login-split .login-submit {
    color: #042f2e;
}

.login-submit:hover {
    filter: brightness(1.06);
}

.login-submit:focus-visible,
.login-toolbar .vs-theme-toggle:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.45);
    outline-offset: 3px;
}

.login-legal {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--login-muted);
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .login-split {
        grid-template-columns: 1fr;
    }

    .login-hero {
        min-height: 17.5rem;
        padding: 6.2rem 1.25rem 2.2rem;
        justify-content: flex-end;
    }

    .login-hero:has(.login-hero__brand--logo) {
        min-height: 18.5rem;
        padding-top: 7.75rem;
    }

    .login-hero__brand--logo .login-hero__mark img {
        max-height: 3.4rem;
    }

    .login-hero h1 {
        font-size: 2.5rem;
    }

    .login-hero__text,
    .login-hero__ecg {
        display: none;
    }

    .login-panel {
        padding: 2.2rem 1.25rem 2.6rem;
    }
}
