/* Page de connexion (templates/default/login.html.twig) — préfixe lg- pour ne pas croiser custom.css.
   L'accent vient de la couleur de thème du tenant (--accent posée sur .lg-shell), jaune POwR par défaut. */
.lg-shell {
    --accent: #ffd407;
    --lg-ink: #18181b;
    --lg-ink-soft: #3f3f46;
    --lg-muted: #71717a;
    --lg-paper: #fafafa;
    --lg-radius: 25px;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    background: var(--lg-paper);
    color: var(--lg-ink);
    font-size: 14px;
}

/* ---------- Panneau de gauche ---------- */
.lg-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(1400px 800px at 10% 120%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%),
        radial-gradient(1000px 600px at 110% -10%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 58%),
        #17171c;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
}
.lg-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .02em; }
.lg-brand .lg-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--lg-ink); }
.lg-hero h1 { font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-weight: 700; line-height: 1.2; max-width: 22ch; margin: 0 0 .9rem; color: rgba(255, 255, 255, .94); }
.lg-hero h1 em { font-style: normal; color: var(--accent); }
.lg-hero .lg-lead { font-size: 1rem; color: rgba(255, 255, 255, .66); max-width: 44ch; margin: 0; }
.lg-foot { display: flex; gap: 1.5rem; flex-wrap: wrap; color: rgba(255, 255, 255, .55); font-size: .8rem; }
.lg-foot span i { color: var(--accent); margin-right: .35rem; }

/* Scène animée */
.lg-scene { position: relative; height: 340px; margin: 1.5rem 0 1rem; }
.lg-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-sun { transform-origin: 470px 80px; animation: lg-breathe 7s ease-in-out infinite; }
.lg-rays { transform-origin: 470px 80px; animation: lg-spin 70s linear infinite; }
.lg-sweep { animation: lg-sweep 6s ease-in-out infinite; }
.lg-flow { stroke-dasharray: 4 10; animation: lg-flow 2s linear infinite; }
@keyframes lg-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes lg-spin { to { transform: rotate(360deg); } }
@keyframes lg-sweep { 0% { transform: translateX(-260px); } 55%, 100% { transform: translateX(420px); } }
@keyframes lg-flow { to { stroke-dashoffset: -28; } }

/* Puces flottantes */
.lg-chip {
    position: absolute;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, .9);
    border-radius: 999px;
    padding: .45rem .85rem .45rem .55rem;
    font-size: .78rem;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
    animation: lg-float 9s ease-in-out infinite;
}
.lg-chip .lg-ic { width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 85%, #fff); color: var(--lg-ink); display: grid; place-items: center; font-size: .85rem; }
.lg-chip strong { font-weight: 700; }
.lg-chip.lg-c1 { left: 2%; top: 6%; animation-delay: 0s; }
.lg-chip.lg-c2 { left: 42%; top: 0; animation-delay: -2.3s; }
.lg-chip.lg-c3 { left: 58%; bottom: 0; animation-delay: -4.1s; }
@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Carte de connexion ---------- */
.lg-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.25rem; }
.lg-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--lg-radius);
    box-shadow: 0 10px 40px rgba(24, 24, 27, .08), 0 1px 3px rgba(24, 24, 27, .06);
    padding: 2.25rem 2.25rem 1.75rem;
}
.lg-logo { display: block; max-width: 210px; max-height: 110px; margin: 0 auto 1.4rem; }
.lg-title { font-size: 1.45rem; font-weight: 800; margin: 0 0 .25rem; }
.lg-sub { color: var(--lg-muted); margin-bottom: 1.5rem; }

.lg-field { position: relative; margin-bottom: 1rem; }
.lg-field label { position: absolute; left: 3rem; top: .55rem; font-size: .72rem; font-weight: 600; color: var(--lg-muted); letter-spacing: .02em; margin: 0; }
.lg-field .lg-icon { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: var(--lg-muted); font-size: 1.05rem; }
.lg-field input {
    width: 100%;
    height: 58px;
    border: 1.5px solid #e4e4e7;
    border-radius: 16px;
    background: #fff;
    padding: 1.35rem 3rem 0 3rem;
    font-size: .98rem;
    color: var(--lg-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.lg-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
.lg-toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--lg-muted); padding: .35rem; border-radius: 10px; }
.lg-toggle:hover { color: var(--lg-ink); background: #f4f4f5; }

.lg-cta {
    width: 100%;
    border: 0;
    border-radius: 999px;
    height: 52px;
    font-weight: 700;
    font-size: 1rem;
    background: var(--accent);
    color: var(--lg-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent);
    transition: transform .12s, box-shadow .15s, filter .15s;
}
.lg-cta:hover { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 45%, transparent); }
.lg-cta i { transition: transform .15s; }
.lg-cta:hover i { transform: translateX(3px); }

.lg-help {
    margin-top: 1.25rem;
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--accent) 40%, #fff);
    border-radius: 16px;
    padding: .85rem 1rem;
    color: var(--lg-ink-soft);
    font-size: .85rem;
}
.lg-help a { color: var(--lg-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lg-help i { color: color-mix(in srgb, var(--accent) 70%, #ff6a00); margin-right: .35rem; }
.lg-card-foot { margin-top: 1.5rem; text-align: center; color: #a1a1aa; font-size: .75rem; }
.lg-card-foot .lg-designed { display: block; margin-top: .3rem; color: var(--lg-muted); font-weight: 600; letter-spacing: .02em; }
.lg-card-foot .lg-designed a { color: var(--lg-ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lg-card-foot .lg-designed a:hover { color: var(--lg-ink); text-decoration-color: var(--lg-ink); }

.lg-alert { border-radius: 16px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: .7rem .9rem; font-size: .88rem; margin-bottom: 1rem; display: flex; gap: .5rem; align-items: center; }

/* ---------- Étape 2 : choix du compte ---------- */
.lg-step { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lg-muted); margin-bottom: .75rem; }
.lg-step-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--lg-ink); display: grid; place-items: center; font-size: .75rem; }
/* Liste complète, sans borne de hauteur : la carte s'allonge et c'est la page qui défile. */
.lg-accounts { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.1rem; padding: 2px; }
.lg-account {
    position: relative;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem .95rem;
    border: 1.5px solid #e4e4e7;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    margin: 0;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.lg-account:hover { border-color: #d4d4d8; background: #fafafa; }
.lg-account input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.lg-avatar { flex: none; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 22%, #fff); color: var(--lg-ink); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.lg-account-text { display: flex; flex-direction: column; min-width: 0; }
.lg-account-text strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-account-text small { color: var(--lg-muted); font-size: .78rem; }
.lg-account-check { margin-left: auto; font-size: 1.15rem; color: #d4d4d8; transition: color .15s; }
.lg-account:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.lg-account:has(input:checked) .lg-account-check { color: var(--lg-ink); }
.lg-account:has(input:focus-visible) { outline: 2px solid var(--lg-ink); outline-offset: 2px; }
.lg-switch { margin-top: 1.1rem; text-align: center; color: var(--lg-muted); font-size: .85rem; }
.lg-switch a { color: var(--lg-ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Mobile : le panneau devient un bandeau ---------- */
@media (max-width: 991.98px) {
    .lg-shell { grid-template-columns: 1fr; }
    .lg-hero { padding: 1.5rem 1.25rem 2rem; border-radius: 0 0 32px 32px; margin-bottom: 1.25rem; }
    .lg-scene, .lg-foot { display: none; }
    .lg-hero h1 { font-size: 1.45rem; max-width: none; }
    .lg-panel { padding: 0 1rem 2rem; }
    .lg-card { padding: 1.75rem 1.4rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-sun, .lg-rays, .lg-sweep, .lg-flow, .lg-chip { animation: none; }
}
