﻿/* Page Login.aspx : carte de connexion en deux volets (marque à gauche, formulaire à droite).
   Mêmes couleurs que les pages de comptabilité (bandeau bleu ciel, accents indigo). */

:root {
    --lg-text: #0f172a;
    --lg-text-2: #475569;
    --lg-muted: #64748b;
    --lg-border: #cbd5e1;
    --lg-focus: #4f46e5;
    --lg-hero: linear-gradient(150deg, #0c4a6e 0%, #075985 30%, #0369a1 65%, #0284c7 100%);
    --lg-submit: linear-gradient(180deg, #6366f1, #4338ca);
    --lg-radius: 18px;
}

.lg-body {
    min-height: 100vh;
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--lg-text);
    background:
        radial-gradient(1100px 520px at 0% -8%, rgba(59, 130, 246, .20), transparent 60%),
        radial-gradient(900px 480px at 100% 0%, rgba(168, 85, 247, .16), transparent 58%),
        radial-gradient(800px 600px at 50% 100%, rgba(6, 182, 212, .14), transparent 60%),
        linear-gradient(180deg, #f1f5f9, #e8eef6);
    background-attachment: fixed;
}

.lg-i {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lg-shell {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.lg-card {
    display: grid;
    grid-template-columns: 5fr 6fr;
    width: 100%;
    max-width: 880px;
    overflow: hidden;
    border-radius: var(--lg-radius);
    background: #fff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .06),
        0 30px 60px -24px rgba(30, 58, 138, .45),
        0 12px 24px -12px rgba(15, 23, 42, .25);
}

/* ---------- Volet marque ---------- */

.lg-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 44px 36px;
    overflow: hidden;
    color: #fff;
    background: var(--lg-hero);
}

.lg-brand::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(253, 224, 71, .35), transparent 70%);
}

.lg-brand-logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}

.lg-brand-logo .lg-i {
    width: 28px;
    height: 28px;
    color: #fde047;
}

.lg-brand-name {
    margin: 28px 0 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: .12em;
}

.lg-brand-text {
    margin: 0;
    max-width: 260px;
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    line-height: 1.5;
}

.lg-brand-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: auto 0 0;
    padding-top: 40px;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}

/* ---------- Volet formulaire ---------- */

.lg-form-side {
    padding: 44px 44px 32px;
}

.lg-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
}

.lg-subtitle {
    margin: 0 0 24px;
    color: var(--lg-text-2);
    font-size: 14px;
}

.lg-field {
    margin-bottom: 18px;
}

.lg-label {
    display: block;
    margin-bottom: 6px;
    color: var(--lg-text);
    font-size: 13px;
    font-weight: 600;
}

.lg-input-wrap {
    position: relative;
}

.lg-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--lg-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.lg-input.form-control {
    height: 46px;
    max-width: none;
    padding-left: 44px;
    border: 1px solid var(--lg-border);
    border-radius: 12px;
    font-size: 15px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
}

.lg-input.form-control:focus {
    border-color: var(--lg-focus);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .18);
}

.lg-input-wrap:focus-within .lg-input-icon {
    color: var(--lg-focus);
}

.lg-input-pwd.form-control {
    padding-right: 48px;
}

.lg-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--lg-muted);
    transform: translateY(-50%);
    cursor: pointer;
}

.lg-toggle:hover {
    background: #eef2ff;
    color: var(--lg-focus);
}

.lg-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .35);
}

.lg-caps {
    margin: 6px 0 0;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
}

.lg-submit.btn {
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: 0;
    border-radius: 12px;
    background: var(--lg-submit);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .3),
        inset 0 -2px 0 rgba(0, 0, 0, .18),
        0 10px 20px -8px rgba(79, 70, 229, .8);
    transition: transform .12s ease, filter .12s ease;
}

.lg-submit.btn:hover,
.lg-submit.btn:focus-visible {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.lg-submit.btn:active {
    transform: translateY(1px);
}

.lg-submit.btn.is-loading,
.lg-submit.btn:disabled {
    color: #fff;
    opacity: .85;
    cursor: progress;
}

/* ---------- Messages ---------- */

.lg-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.lg-alert .lg-i {
    margin-top: 1px;
}

.lg-alert.is-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.lg-alert.is-info {
    border-color: #bae6fd;
    background: #f0f9ff;
    color: #075985;
}

.lg-alert.is-error .lg-ico-info,
.lg-alert.is-info .lg-ico-error {
    display: none;
}

.lg-legal {
    margin: 24px 0 0;
    color: var(--lg-muted);
    font-size: 12px;
    text-align: center;
}

.lg-copy {
    margin: 20px 0 0;
    color: var(--lg-muted);
    font-size: 12px;
}

/* ---------- Petits écrans ---------- */

@media (max-width: 767px) {
    .lg-card {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .lg-brand {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 20px 24px;
    }

    .lg-brand-logo {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .lg-brand-name {
        margin: 0;
        font-size: 22px;
    }

    .lg-brand-text,
    .lg-brand-foot {
        display: none;
    }

    .lg-form-side {
        padding: 28px 24px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-submit.btn {
        transition: none;
    }
}
