/*
 * Pages de connexion JObiz IA (login, register, mot de passe) — style « nuit
 * dorée » assorti à la page d'accueil (18/11/2026). Mêmes classes lg-* / cp-*
 * que l'ancien auth-light.css (toujours utilisé par create.php) : seul le
 * <link> change dans les pages. Effets animés : assets/js/auth-fx.js.
 */
:root {
    --lg-bg: #0b0a08;
    --lg-bg2: #12100c;
    --lg-bg3: #1b1812;
    --lg-glass: rgba(255,255,255,.045);
    --lg-line: rgba(255,236,200,.12);
    --lg-line2: rgba(255,236,200,.2);
    --lg-ink: #f6efe2;
    --lg-ink2: #c9bea9;
    --lg-dim: #8d846f;
    --lg-gold: #f2b544;
    --lg-gold2: #ffd27a;
    --lg-gold-deep: #c88a1c;
    --lg-money: #3ddc97;
    --lg-danger: #ff8a7a;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--lg-bg); }
body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--lg-ink);
    background: var(--lg-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Fond animé (injecté par auth-fx.js) */
.fx-aurora { position: fixed; inset: -10%; z-index: 0; pointer-events: none; filter: blur(80px); opacity: .7; }
.fx-aurora span { position: absolute; border-radius: 50%; }
.fx-aurora .a1 { width: 620px; height: 620px; left: -5%; top: -10%; background: radial-gradient(circle, rgba(242,181,68,.5), transparent 65%); animation: fxDrift1 18s ease-in-out infinite; }
.fx-aurora .a2 { width: 520px; height: 520px; left: 30%; bottom: -15%; background: radial-gradient(circle, rgba(255,140,40,.28), transparent 65%); animation: fxDrift2 22s ease-in-out infinite; }
.fx-aurora .a3 { width: 460px; height: 460px; right: -5%; top: 20%; background: radial-gradient(circle, rgba(61,220,151,.14), transparent 65%); animation: fxDrift3 25s ease-in-out infinite; }
@keyframes fxDrift1 { 50% { transform: translate(140px, 80px) scale(1.15); } }
@keyframes fxDrift2 { 50% { transform: translate(-100px, -70px) scale(.9); } }
@keyframes fxDrift3 { 50% { transform: translate(-120px, 60px) scale(1.2); } }
.fx-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(var(--lg-line) 1px, transparent 1px), linear-gradient(90deg, var(--lg-line) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 60% 60% at 30% 40%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 60% at 30% 40%, #000 20%, transparent 75%); opacity: .45; }
.fx-sparks { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }
.fx-spot { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(500px circle at var(--sx, 70%) var(--sy, 40%), rgba(255,210,122,.09), transparent 60%); }

.lg-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

/* Colonne de gauche */
.lg-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem clamp(2rem, 5vw, 5rem);
}
a.lg-brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0; font-family: 'Sora', 'Inter', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 2.75rem; transition: opacity .2s; }
a.lg-brand:hover { opacity: .85; }
.lg-brand .jo { color: var(--lg-gold); }
.lg-brand .ia { margin-left: .45rem; font: 800 .62rem 'Inter', sans-serif; background: var(--lg-gold); color: #1b1203; border-radius: 6px; padding: 2px 6px; letter-spacing: .02em; }
.lg-hero h2 {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin: 0 0 1.1rem;
    max-width: 16ch;
    font-weight: 800;
    text-wrap: balance;
}
.lg-hero h2 em { font-style: normal; background: linear-gradient(100deg, var(--lg-gold2), var(--lg-gold) 45%, #ff9f43); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-hero p { color: var(--lg-ink2); font-size: 1.05rem; line-height: 1.65; max-width: 44ch; margin: 0 0 2.25rem; }
.lg-points { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; max-width: 42ch; }
.lg-points li { display: flex; align-items: center; gap: .8rem; font-size: .96rem; font-weight: 500; color: var(--lg-ink); opacity: 0; transform: translateX(-12px); animation: lgIn .6s cubic-bezier(.2,.8,.2,1) forwards; }
.lg-points li:nth-child(1) { animation-delay: .35s; }
.lg-points li:nth-child(2) { animation-delay: .5s; }
.lg-points li:nth-child(3) { animation-delay: .65s; }
.lg-points li:nth-child(4) { animation-delay: .8s; }
.lg-points i {
    width: 34px; height: 34px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(242,181,68,.1); border: 1px solid rgba(242,181,68,.22); color: var(--lg-gold); flex-shrink: 0;
}
@keyframes lgIn { to { opacity: 1; transform: none; } }
.lg-hero > * { animation: lgUp .8s cubic-bezier(.2,.8,.2,1) both; }
.lg-hero > h2 { animation-delay: .08s; }
.lg-hero > p { animation-delay: .18s; }
@keyframes lgUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Colonne du formulaire */
.lg-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}
.lg-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: rgba(22,19,14,.72);
    border: 1px solid var(--lg-line2);
    border-radius: 24px;
    padding: 2.4rem 2.1rem;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.3), 0 0 90px -40px rgba(242,181,68,.4);
    animation: lgCard .8s cubic-bezier(.2,.8,.2,1) .1s both;
    transform-style: preserve-3d;
    transition: transform .2s ease-out;
    isolation: isolate;
}
/* Bordure dorée animée */
.lg-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: 25px; z-index: -1; padding: 1px;
    background: conic-gradient(from var(--lg-ang, 0deg), transparent 0 20%, rgba(242,181,68,.85) 30%, transparent 40% 70%, rgba(61,220,151,.5) 80%, transparent 90%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    animation: lgSpin 7s linear infinite;
}
@property --lg-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes lgSpin { to { --lg-ang: 360deg; } }
@keyframes lgCard { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.lg-card h1 { font-family: 'Sora', 'Inter', sans-serif; font-size: 1.7rem; letter-spacing: -0.02em; margin: 0 0 .4rem; font-weight: 800; }
.lg-card .lg-sub { color: var(--lg-ink2); font-size: .94rem; margin: 0 0 1.6rem; }

.lg-alert {
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: .9rem;
    margin-bottom: 1.2rem;
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    animation: lgShake .45s ease;
}
.lg-alert-error { background: rgba(255,90,70,.1); color: var(--lg-danger); border: 1px solid rgba(255,120,100,.3); }
.lg-alert-success { background: rgba(61,220,151,.1); color: var(--lg-money); border: 1px solid rgba(61,220,151,.3); animation: lgUp .5s ease; }
@keyframes lgShake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.lg-field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.05rem; }
.lg-field label { font-size: .86rem; font-weight: 600; color: var(--lg-ink2); transition: color .2s; }
.lg-field:focus-within label { color: var(--lg-gold2); }
.lg-input {
    width: 100%;
    height: 50px;
    border: 1px solid var(--lg-line2);
    border-radius: 12px;
    padding: 0 1rem;
    font: inherit;
    font-size: .98rem;
    color: var(--lg-ink);
    background: rgba(255,255,255,.04);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-input::placeholder { color: #6f6757; }
.lg-input:hover { border-color: rgba(255,236,200,.3); }
.lg-input:focus { outline: none; border-color: var(--lg-gold); background: rgba(242,181,68,.05); box-shadow: 0 0 0 4px rgba(242,181,68,.16), 0 0 24px -6px rgba(242,181,68,.45); }
.lg-input:-webkit-autofill, .lg-input:-webkit-autofill:focus { -webkit-text-fill-color: var(--lg-ink); -webkit-box-shadow: 0 0 0 1000px #1d1a13 inset; caret-color: var(--lg-ink); }
select.lg-input { appearance: none; -webkit-appearance: none; }
select.lg-input option { background: #1b1812; color: var(--lg-ink); }
.lg-password { position: relative; }
.lg-password .lg-input { padding-right: 3rem; }
.lg-toggle {
    position: absolute; right: .45rem; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: none; background: none; border-radius: 10px;
    color: var(--lg-dim); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: color .2s, background .2s;
}
.lg-toggle:hover { color: var(--lg-ink); background: rgba(255,255,255,.06); }
.lg-toggle:focus-visible { outline: 2px solid var(--lg-gold); outline-offset: 1px; }

/* Indicateur de solidité du mot de passe (injecté par auth-fx.js sur l'inscription) */
.lg-strength { display: flex; gap: 5px; margin-top: .55rem; }
.lg-strength i { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); transition: background .3s; }
.lg-strength-label { font-size: .76rem; color: var(--lg-dim); margin-top: .35rem; min-height: 1em; }
.lg-match { font-size: .76rem; margin-top: .35rem; min-height: 1em; }

.lg-submit {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 52px;
    margin-top: .5rem;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--lg-gold2), var(--lg-gold) 55%, var(--lg-gold-deep));
    color: #1b1203;
    font: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 14px 34px -14px rgba(242,181,68,.8);
    transition: transform .2s, box-shadow .2s, filter .2s;
}
.lg-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: lgShine 3.4s ease-in-out infinite; }
@keyframes lgShine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.lg-submit:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(242,181,68,.95); }
.lg-submit:active { transform: translateY(0); }
.lg-submit:focus-visible { outline: 3px solid var(--lg-gold2); outline-offset: 3px; }
.lg-submit.is-loading { pointer-events: none; filter: saturate(.8); }
.lg-submit.is-loading .lg-label { opacity: 0; }
.lg-submit .lg-spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid rgba(27,18,3,.25); border-top-color: #1b1203; opacity: 0; animation: lgRot .7s linear infinite; }
.lg-submit.is-loading .lg-spin { opacity: 1; }
@keyframes lgRot { to { transform: rotate(360deg); } }
.lg-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.5); animation: lgRipple .6s ease-out forwards; pointer-events: none; }
@keyframes lgRipple { to { transform: scale(4); opacity: 0; } }

.lg-links { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .65rem; text-align: center; font-size: .92rem; color: var(--lg-dim); }
.lg-links a { color: var(--lg-ink); font-weight: 600; text-decoration: none; white-space: nowrap; background-image: linear-gradient(var(--lg-gold), var(--lg-gold)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s, color .2s; }
.lg-links a:hover { color: var(--lg-gold2); background-size: 100% 1px; }
.lg-divider { height: 1px; background: var(--lg-line); margin: 1.1rem 0 .2rem; }

/* Sélecteur de pays (country-picker.js) */
.cp-picker { position: relative; }
.cp-trigger {
    width: 100%; height: 50px;
    display: flex; align-items: center; justify-content: space-between; gap: .6rem;
    border: 1px solid var(--lg-line2); border-radius: 12px; padding: 0 1rem;
    background: rgba(255,255,255,.04); color: var(--lg-ink); font: inherit; font-size: .98rem; text-align: left; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.cp-trigger:hover { border-color: rgba(255,236,200,.3); }
.cp-trigger:focus-visible, .cp-trigger[aria-expanded="true"] { outline: none; border-color: var(--lg-gold); box-shadow: 0 0 0 4px rgba(242,181,68,.16); }
.cp-placeholder { color: #6f6757; }
.cp-caret { font-size: .8rem; color: var(--lg-dim); transition: transform .2s; }
.cp-trigger[aria-expanded="true"] .cp-caret { transform: rotate(180deg); }
.cp-panel {
    position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0;
    background: #17140f; border: 1px solid var(--lg-line2); border-radius: 14px;
    box-shadow: 0 24px 50px -10px rgba(0,0,0,.8); overflow: hidden;
    animation: lgUp .25s ease;
}
.cp-panel[hidden] { display: none; }
.cp-search { position: relative; padding: .6rem; border-bottom: 1px solid var(--lg-line); }
.cp-search i { position: absolute; left: 1.05rem; top: 50%; transform: translateY(-50%); color: var(--lg-dim); font-size: .85rem; }
.cp-search input {
    width: 100%; height: 40px; border: 1px solid var(--lg-line2); border-radius: 10px; padding: 0 .7rem 0 2.1rem;
    font: inherit; font-size: .92rem; color: var(--lg-ink); background: rgba(255,255,255,.04);
}
.cp-search input:focus { outline: none; border-color: var(--lg-gold); box-shadow: 0 0 0 3px rgba(242,181,68,.16); }
.cp-list { max-height: 300px; overflow-y: auto; padding: .3rem; }
.cp-group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lg-dim); padding: .6rem .6rem .3rem; }
.cp-item {
    width: 100%; display: flex; align-items: center; gap: .7rem; border: none; background: none;
    padding: .6rem .65rem; border-radius: 10px; font: inherit; font-size: .93rem; color: var(--lg-ink); cursor: pointer; text-align: left;
    transition: background .15s;
}
.cp-item:hover, .cp-item:focus-visible { background: rgba(242,181,68,.1); outline: none; }
.cp-item.active { font-weight: 700; background: rgba(242,181,68,.16); color: var(--lg-gold2); }
.cp-flag { font-size: 1.15rem; line-height: 1; }
.cp-item[hidden], .cp-group[hidden] { display: none; }

@media (max-width: 860px) {
    .lg-shell { grid-template-columns: 1fr; }
    .lg-hero { padding: 2rem max(1.25rem, env(safe-area-inset-left, 0px)) .5rem; }
    a.lg-brand { margin-bottom: 1.4rem; }
    .lg-hero p, .lg-points { display: none; }
    .lg-hero h2 { font-size: 1.75rem; margin-bottom: .5rem; }
    .lg-form-side { padding: 1.25rem 1rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
    .lg-card { padding: 1.9rem 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .lg-points li, .lg-hero > * { opacity: 1; transform: none; }
}
