/* ============================================================
   /connexion et /entreprise (connexion, inscription) — version simple : formulaire centré sur fond blanc, sans image.
   Sans header ni footer. Clair / sombre via les tokens de style.css.
   ============================================================ */
.particles { display: none; }
html:has(.lx), body:has(.lx) { scrollbar-width: none; -ms-overflow-style: none; }
html:has(.lx)::-webkit-scrollbar, body:has(.lx)::-webkit-scrollbar { display: none; }
body:has(.lx) { background: var(--surface-1); }
.lx { height: 100vh; height: 100dvh; overflow: hidden; border-top: 6px solid #000; box-sizing: border-box; background: var(--surface-1); }
:root[data-theme="dark"] .lx { border-top-color: #fff; }

/* Formulaire */
.lx-main { display: flex; flex-direction: column; height: 100%; overflow-y: auto; scrollbar-width: none; padding: clamp(.8rem, 2vh, 1.4rem) clamp(1.1rem, 4vw, 3rem) clamp(.8rem, 2vh, 1.6rem); background: var(--surface-1); color: var(--tx-1); }
.lx-top { display: flex; justify-content: space-between; align-items: center; }
.lx-back { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--tx-1); }
.lx-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.lx-back svg, .lx-back i { width: 16px; height: 16px; }
.lx-theme { position: static; width: 40px; height: 40px; border: 1px solid var(--line-1); background: transparent; color: var(--tx-1); }
.lx-main::-webkit-scrollbar { display: none; }
.lx-box { width: 100%; max-width: 440px; margin: auto; padding: clamp(.75rem, 2.5vh, 2rem) 0 .5rem; }
.lx-box.is-wide { max-width: 600px; }
.lx-head { text-align: center; }
.lx-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line-1); margin-bottom: clamp(1rem, 3vh, 2rem); }
.lx-tabs a { padding: clamp(.55rem, 1.4vh, .85rem) 0; text-align: center; font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tx-1); opacity: .55; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: opacity .2s ease; }
.lx-tabs a:hover { opacity: .85; }
.lx-tabs a.is-on { opacity: 1; border-bottom-color: var(--tx-1); }
.lx-head h1 { font-family: var(--font-display); font-size: clamp(1.6rem, min(3vw, 4.4vh), 2.4rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--tx-1); }
.lx-head p { margin-top: .55rem; font-size: 1rem; line-height: 1.55; color: var(--tx-1); }
.lx-alert { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.4rem; padding: .85rem 1rem; font-size: .9rem; line-height: 1.45; border-left: 4px solid; }
.lx-alert svg, .lx-alert i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.lx-alert.is-error { border-color: #b91c1c; background: rgba(185,28,28,.07); color: var(--tx-1); }
.lx-alert.is-ok { border-color: #15803d; background: rgba(21,128,61,.08); color: var(--tx-1); }
.lx-form { display: grid; gap: clamp(.7rem, 1.8vh, 1.1rem); margin-top: clamp(1rem, 2.6vh, 1.6rem); }
.lx-two { display: grid; grid-template-columns: 1fr; gap: clamp(.7rem, 1.8vh, 1.1rem); }
.lx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.7rem, 1.6vh, 1rem) 1rem; }
.lx-grid .lx-span { grid-column: 1 / -1; }
.lx-field { display: grid; gap: .45rem; min-width: 0; }
.lx-label { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tx-1); }
.lx-label small { font-weight: 600; letter-spacing: 0; text-transform: none; }
.lx-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.lx-forgot { font-size: .8rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--tx-1); text-decoration: underline; text-underline-offset: 3px; }
.lx-control { display: flex; align-items: center; gap: .65rem; min-height: clamp(44px, 6vh, 54px); padding: 0 .9rem; border: 1px solid var(--line-1); border-bottom: 2px solid var(--tx-1); background: var(--section-alt-bg); transition: border-color .2s ease, background .2s ease; }
.lx-control:focus-within { background: var(--surface-1); border-color: var(--tx-1); }
.lx-control > svg, .lx-control > i { width: 18px; height: 18px; flex: none; color: var(--tx-1); }
.lx-control input, .lx-control select { flex: 1; min-width: 0; height: clamp(42px, 5.8vh, 52px); border: 0; outline: 0; background: transparent; color: var(--tx-1); font: inherit; font-size: 1rem; }
.lx-control input::placeholder { color: var(--tx-1); opacity: .45; }
.lx-eye { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; color: var(--tx-1); cursor: pointer; }
.lx-eye svg, .lx-eye i { width: 18px; height: 18px; }
.lx-hint { font-size: .8rem; line-height: 1.45; color: var(--tx-1); }
.lx-check { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--tx-1); cursor: pointer; }
.lx-check input { width: 18px; height: 18px; accent-color: #000; }
:root[data-theme="dark"] .lx-check input { accent-color: #fff; }
.lx-submit { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: clamp(46px, 6.4vh, 56px); margin-top: .35rem; border: 0; cursor: pointer; background: #000; color: #fff; font: inherit; font-size: .9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; transition: opacity .2s ease, transform .1s ease; }
.lx-submit:hover { opacity: .88; }
.lx-submit:active { transform: scale(.99); }
.lx-submit svg, .lx-submit i { width: 18px; height: 18px; }
:root[data-theme="dark"] .lx-submit { background: #fff; color: #000; }
.lx-switch { text-align: center; font-size: .9rem; color: var(--tx-1); }
.lx-switch a { font-weight: 800; color: var(--tx-1); text-decoration: underline; text-underline-offset: 3px; }
.lx-wa[hidden] { display: none; }
.lx-divider { display: flex; align-items: center; gap: .9rem; margin: clamp(.7rem, 2vh, 1.3rem) 0 clamp(.5rem, 1.5vh, 1rem); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--tx-1); }
.lx-divider::before, .lx-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-1); }
.lx-alt { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: clamp(42px, 5.6vh, 50px); border: 1px solid var(--tx-1); background: transparent; color: var(--tx-1); font: inherit; font-weight: 700; cursor: pointer; }
.lx-alt svg, .lx-alt i { width: 18px; height: 18px; }
.lx-wa-error { margin-top: .6rem; font-size: .85rem; color: #b91c1c; }
.lx-company { display: flex; align-items: center; gap: .9rem; margin-top: clamp(.9rem, 2.4vh, 1.6rem); padding: clamp(.6rem, 1.6vh, 1rem) 1.1rem; border: 1px solid var(--line-1); color: var(--tx-1); transition: border-color .2s ease, background .2s ease; }
.lx-company:hover { border-color: var(--tx-1); background: var(--section-alt-bg); }
.lx-company-ico { width: 40px; height: 40px; display: grid; place-items: center; background: #000; color: #fff; flex: none; }
:root[data-theme="dark"] .lx-company-ico { background: #fff; color: #000; }
.lx-company-ico svg, .lx-company-ico i { width: 19px; height: 19px; }
.lx-company > span:nth-child(2) { flex: 1; display: grid; gap: .15rem; }
.lx-company strong { font-size: .92rem; }
.lx-company small { font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
.lx-company > svg:last-child, .lx-company > i:last-child { width: 18px; height: 18px; }
.lx-secure { display: flex; align-items: center; justify-content: center; gap: .45rem; margin-top: clamp(.8rem, 2.4vh, 1.75rem); font-size: .8rem; color: var(--tx-1); }
.lx-secure svg, .lx-secure i { width: 15px; height: 15px; }

.lx-control select { width: 0; border: 0; outline: 0; background: transparent; color: var(--tx-1); font: inherit; font-size: 1rem; appearance: none; cursor: pointer; }
.lx-control select option { color: #000; background: #fff; }
.lx-check-terms { align-items: flex-start; line-height: 1.45; }

/* Mobile et petits écrans : la page défile (barre masquée) */
@media (max-width: 640px), (max-height: 560px) {
    .lx { height: auto; min-height: 100dvh; overflow: visible; }
    .lx-main { height: auto; overflow: visible; }
}
@media (max-width: 640px) {
    .lx-grid { grid-template-columns: 1fr; }
    .lx-box { padding-top: 1.25rem; }
}
.lx-alts { display: flex; gap: .6rem; }
.lx-alts > * { flex: 1; min-width: 0; }
.lx-alts .lx-alt { text-decoration: none; }


/* ============================================================
   NOUVELLE APPARENCE — écran partagé (connexion / inscription)
   Gauche : panneau de marque bleu nuit. Droite : formulaire modernisé.
   ============================================================ */
.lx { --lx-navy: linear-gradient(140deg, #061a3a 0%, #0b2552 50%, #04326d 100%); --lx-ink: #0b2552; --lx-line: #d7dbe1; --lx-soft: #6b7280; --lx-field: #f7f8fa; }
:root[data-theme="dark"] .lx { --lx-ink: #cfe0ff; --lx-line: rgba(255,255,255,.16); --lx-soft: rgba(255,255,255,.6); --lx-field: rgba(255,255,255,.04); }
.lx { border-top: 0; }
.lx.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }

/* Panneau de marque */
.lx-aside {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
    padding: clamp(1.5rem, 4vh, 3rem) clamp(1.75rem, 4vw, 3.5rem);
    background: var(--lx-navy); color: #fff;
}
.lx-aside::before, .lx-aside::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.lx-aside::before { width: 520px; height: 520px; right: -220px; top: -200px; background: radial-gradient(circle, rgba(61,155,255,.28) 0%, transparent 65%); }
.lx-aside::after  { width: 420px; height: 420px; left: -180px; bottom: -200px; background: radial-gradient(circle, rgba(251,191,36,.16) 0%, transparent 65%); }
.lx-aside-brand { display: flex; align-items: center; gap: .85rem; }
.lx-aside-logo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.45); }
.lx-aside-logo img { width: 48px; height: 48px; object-fit: contain; }
.lx-aside-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.lx-aside-body { max-width: 440px; }
.lx-aside h2 { font-family: var(--font-display); font-size: clamp(1.8rem, min(3vw, 5vh), 2.6rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; color: #fff; }
.lx-aside p { margin-top: .9rem; font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,.82); }
.lx-aside ul { list-style: none; margin: clamp(1.25rem, 3.5vh, 2.25rem) 0 0; padding: 0; display: grid; gap: .85rem; }
.lx-aside li { display: flex; align-items: center; gap: .8rem; font-size: .95rem; color: rgba(255,255,255,.92); }
.lx-aside li svg, .lx-aside li i { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,.1); color: #fbbf24; }
.lx-aside-foot { font-size: .78rem; color: rgba(255,255,255,.55); }

/* Formulaire */
.lx-main { background: var(--surface-1); }
.lx-back { color: var(--lx-ink); }
.lx-tabs { grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 0; border-radius: 12px; background: #eef1f5; }
:root[data-theme="dark"] .lx-tabs { background: rgba(255,255,255,.06); }
.lx-tabs a { margin: 0; padding: .7rem 0; border: 0; border-radius: 9px; opacity: 1; color: var(--lx-soft); font-size: .78rem; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.lx-tabs a:hover { color: var(--lx-ink); }
.lx-tabs a.is-on { background: var(--surface-1); color: var(--lx-ink); box-shadow: 0 2px 10px -4px rgba(11,37,82,.35); }
.lx-head h1 { color: var(--tx-1); }
.lx-head p { color: var(--lx-soft); }
.lx-label { font-size: .72rem; color: var(--lx-soft); }
.lx-forgot { color: var(--lx-ink); }
.lx-control { border: 1px solid var(--lx-line); border-radius: 10px; background: var(--lx-field); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.lx-control:focus-within { border-color: #0b2552; background: var(--surface-1); box-shadow: 0 0 0 3px rgba(11,37,82,.14); }
:root[data-theme="dark"] .lx-control:focus-within { border-color: #9db8e6; box-shadow: 0 0 0 3px rgba(157,184,230,.2); }
.lx-control > svg, .lx-control > i { color: var(--lx-soft); }
.lx-check input { accent-color: #0b2552; }
.lx-submit { border-radius: 10px; letter-spacing: .06em; }
.lx-alt { border: 1px solid var(--lx-line); border-radius: 10px; color: var(--lx-ink); transition: border-color .2s ease, background .2s ease; }
.lx-alt:hover { border-color: #0b2552; background: rgba(11,37,82,.05); }
.lx-divider { color: var(--lx-soft); font-size: .7rem; }
.lx-company { border: 1px solid var(--lx-line); border-radius: 12px; }
.lx-company:hover { border-color: #0b2552; background: rgba(11,37,82,.04); }
.lx-company-ico, :root[data-theme="dark"] .lx-company-ico { border-radius: 10px; background: var(--lx-navy); color: #fff; }
.lx-switch a { color: var(--lx-ink); }
.lx-secure { color: var(--lx-soft); }
.lx-alert { border-radius: 10px; border-left-width: 4px; }

/* Tablette / téléphone : panneau de marque réduit à un bandeau en haut */
@media (max-width: 960px) {
    .lx.has-aside { grid-template-columns: 1fr; height: auto; min-height: 100dvh; overflow: visible; }
    .lx.has-aside .lx-main { height: auto; overflow: visible; }
    .lx-aside { flex-direction: row; align-items: center; justify-content: flex-start; padding: 1rem 1.25rem; gap: 1rem; }
    .lx-aside-body, .lx-aside-foot { display: none; }
    .lx-aside-logo { width: 46px; height: 46px; border-radius: 12px; }
    .lx-aside-logo img { width: 38px; height: 38px; }
}


/* ============================================================
   VERSION SIMPLE — fond blanc, logo centré, formulaire épuré
   ============================================================ */
.lx.is-simple { display: block; }
.lx-logo { display: block; width: 72px; margin: 0 auto clamp(.75rem, 2.2vh, 1.4rem); }
.lx-logo img { width: 100%; height: auto; display: block; }
.is-simple .lx-tabs { background: transparent; padding: 0; border-bottom: 1px solid var(--lx-line); border-radius: 0; gap: 0; }
.is-simple .lx-tabs a { border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; box-shadow: none; }
.is-simple .lx-tabs a.is-on { background: transparent; box-shadow: none; border-bottom-color: #0b2552; }
.is-simple .lx-control { background: var(--surface-1); }
.is-simple .lx-submit { box-shadow: none; }
.is-simple .lx-submit:hover { box-shadow: none; transform: none; }
/* Lien compagnie : simple ligne de texte */
.is-simple .lx-company { justify-content: center; gap: .35rem; padding: 0; border: 0; background: none; text-align: center; }
.is-simple .lx-company:hover { background: none; }
.is-simple .lx-company-ico, .is-simple .lx-company > svg:last-child, .is-simple .lx-company > i:last-child { display: none; }
.is-simple .lx-company > span:nth-child(2) { flex: none; display: block; font-size: .88rem; color: var(--lx-soft); }
.is-simple .lx-company strong { font-weight: 600; }
.is-simple .lx-company small { margin-left: .3rem; font-size: .88rem; font-weight: 700; color: var(--lx-ink); }
.is-simple .lx-secure { font-size: .76rem; }
.is-simple .lx-company { flex-wrap: wrap; min-width: 0; }
.is-simple .lx-company > span:nth-child(2) { min-width: 0; max-width: 100%; white-space: normal; }
.is-simple .lx-company small { display: inline-block; margin-left: 0; }
.is-simple .lx-company strong { margin-right: .3rem; }


/* Version épurée : champs sans étiquettes, moins de texte */
.lx-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lx-row .lx-check { margin: 0; }
.lx-row .lx-forgot { font-size: .85rem; }
.lx-tabs + .lx-form, .lx-tabs + .lx-alert { margin-top: 1.5rem; }


/* Mot de passe oublié */
.fx-state { display: grid; justify-items: center; gap: .6rem; margin-top: 1.4rem; text-align: center; }
.fx-ico { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #eef3fb; color: #0b2552; animation: fxPop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.fx-ico svg, .fx-ico i { width: 28px; height: 28px; }
.fx-ico.is-ok { background: #dcfce7; color: #15803d; }
@keyframes fxPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.fx-state h1 { margin: .3rem 0 0; font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; color: var(--tx-1); }
.fx-state p { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--lx-soft, #6b7280); }
.fx .lx-form { margin-top: 1.5rem; }
.fx-btn { display: flex; align-items: center; justify-content: center; margin-top: 1.6rem; text-decoration: none; }
.fx-again { display: block; margin-top: 1rem; text-align: center; font-size: .88rem; font-weight: 700; color: var(--tx-1); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .fx-ico { background: rgba(157,184,230,.12); color: #9db8e6; }
:root[data-theme="dark"] .fx-ico.is-ok { background: rgba(74,222,128,.12); color: #86efac; }

/* Mobile : le bloc reste centré verticalement dans l'écran */
@media (max-width: 640px), (max-height: 560px) {
    .lx.is-simple .lx-main { min-height: 100vh; min-height: 100dvh; box-sizing: border-box; }
    .lx.is-simple .lx-box { margin: clamp(1.5rem, 8vh, 4rem) auto auto; padding-bottom: 2.5rem; }
}

/* Ordinateur : le bloc remonte (moins de vide en haut) */
@media (min-width: 641px) and (min-height: 561px) {
    .lx.is-simple .lx-box { margin: clamp(1.5rem, 7vh, 4.5rem) auto auto; }
}


/* Réinitialisation du mot de passe */
.fx-ico.is-bad { background: #fee2e2; color: #b91c1c; }
:root[data-theme="dark"] .fx-ico.is-bad { background: rgba(248,113,113,.12); color: #fca5a5; }
.fx-match { display: grid; place-items: center; width: 26px; height: 26px; margin-left: auto; flex: none; border-radius: 50%; background: #16a34a; color: #fff; opacity: 0; transform: scale(.5); transition: opacity .2s ease, transform .2s ease; }
.fx-match svg, .fx-match i { width: 15px; height: 15px; stroke-width: 3; }
.lx-control.is-match .fx-match { opacity: 1; transform: none; }
.lx-control.is-match { border-color: #16a34a; }


/* ============================================================
   Inscription compagnie : 2 étapes (compagnie → accès)
   ============================================================ */
.cx .lx-box { max-width: 480px; }
.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cx-steps { list-style: none; display: flex; align-items: center; gap: .75rem; margin: 1.5rem 0 0; padding: 0; }
.cx-st { display: flex; align-items: center; gap: .5rem; flex: none; color: var(--lx-soft, #6b7280); }
.cx-st span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--lx-line, #d7dbe1); font-size: .82rem; font-weight: 800; transition: all .25s ease; }
.cx-st b { font-size: .85rem; font-weight: 700; }
.cx-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--lx-line, #d7dbe1); overflow: hidden; }
.cx-bar i { display: block; height: 100%; width: 0; background: #0b2552; transition: width .35s ease; }
.cx-steps[data-step="1"] .cx-st[data-for="1"], .cx-steps[data-step="2"] .cx-st { color: var(--tx-1); }
.cx-steps[data-step="1"] .cx-st[data-for="1"] span, .cx-steps[data-step="2"] .cx-st[data-for="2"] span { border-color: #0b2552; background: #0b2552; color: #fff; }
.cx-steps[data-step="2"] .cx-st[data-for="1"] span { border-color: #16a34a; background: #16a34a; color: #fff; font-size: 0; }
.cx-steps[data-step="2"] .cx-st[data-for="1"] span::before { content: "✓"; font-size: .85rem; }
.cx-steps[data-step="2"] .cx-bar i { width: 100%; }
.cx-form { margin-top: 1.25rem; }
.cx-panel { display: flex; flex-direction: column; gap: .85rem; margin: 0; padding: 0; border: 0; min-width: 0; animation: cxIn .3s ease both; }
.cx-panel[hidden] { display: none; }
@keyframes cxIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.cx-two { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.cx-terms span { font-size: .82rem; color: var(--lx-soft, #6b7280); }
.cx-actions { display: flex; gap: .6rem; }
.cx-actions .lx-submit { flex: 1; }
.cx-back { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: 0 1rem; border: 1px solid var(--lx-line, #d7dbe1); border-radius: 10px;
    background: transparent; color: var(--tx-1); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.cx-back svg, .cx-back i { width: 17px; height: 17px; }
.cx-back:hover { border-color: #0b2552; }
.cx .lx-control select { flex: 1; }
:root[data-theme="dark"] .cx-bar i, :root[data-theme="dark"] .cx-steps .cx-st span { }
@media (max-width: 520px) {
    .cx-two { grid-template-columns: 1fr; }
    .cx-back span { display: none; }
    .cx-st b { font-size: .8rem; }
}
.cx-two > .lx-field, .cx-two .lx-control, .cx-two input { min-width: 0; }
.cx-two .lx-control input { width: 100%; }
.cx .lx-control select:invalid { color: var(--lx-soft, #6b7280); }
.cx .lx-control select option { color: var(--tx-1, #111827); }
.cx-actions { align-items: stretch; } .cx-actions .lx-submit { margin-top: 0; }
