/* ============================================================================
   Nessalys Group — Gabarit de connexion UNIFIÉ (Operia / Facturo / Valoris)
   Design identique sur les 3 SaaS ; seule la couleur d'accent change via
   --acc / --acc-ink posés sur .ngl. Responsive desktop / tablette / mobile.
   ============================================================================ */
.ngl, .ngl * { box-sizing: border-box; }
.ngl {
  --acc: #6d4aff; --acc-ink: #2e1f6e;
  --ink: #0e1b28; --muted: #5c6b7a; --line: #e6e8ec; --field: #f7f8fa;
  min-height: 100dvh; display: grid; grid-template-columns: 1.05fr 0.95fr;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink); background: #fff;
}
/* L'app peut masquer l'écran de connexion via .hidden (ex. Valoris) — doit
   l'emporter sur display:grid quelle que soit la position des feuilles. */
.ngl.hidden { display: none !important; }
/* ---- Hero (gauche) ---- */
.ngl-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, var(--acc-ink), var(--acc));
}
.ngl-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(620px 320px at 85% -8%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(520px 280px at -8% 108%, rgba(255,255,255,.08), transparent 60%);
}
.ngl-hero > * { position: relative; z-index: 1; }
.ngl-back {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18); margin-bottom: 30px; transition: background .2s;
}
.ngl-back:hover { background: rgba(255,255,255,.20); }
.ngl-brand { display: flex; align-items: center; gap: 16px; }
/* Logo sans AUCUN fond (image transparente), mis en évidence. */
.ngl-mark { height: 58px; width: auto; display: block; flex: 0 0 auto; }
/* (ancien conteneur carré — conservé pour compat, plus utilisé) */
.ngl-logo {
  width: 54px; height: 54px; border-radius: 14px; background: #fff; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.ngl-logo img { width: 40px; height: 40px; object-fit: contain; }
.ngl-name { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(34px, 3.6vw, 46px); font-weight: 700; letter-spacing: -.025em; line-height: 1; color: #fff; }
.ngl-by { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.78); font-weight: 700; margin: 6px 0 0 2px; }
.ngl-h1 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: clamp(27px, 3vw, 37px); font-weight: 600; line-height: 1.16; letter-spacing: -.02em; margin: 34px 0 12px; max-width: 15ch; }
.ngl-h1 .ac { color: rgba(255,255,255,.72); }
.ngl-p { font-size: 14.5px; line-height: 1.65; color: rgba(255,255,255,.82); margin: 0 0 28px; max-width: 44ch; }
.ngl-feats { display: grid; gap: 15px; }
.ngl-feat { display: flex; gap: 13px; align-items: flex-start; }
.ngl-feat .fi { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 15px; flex: 0 0 auto; }
.ngl-feat h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.ngl-feat p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.72); line-height: 1.5; }
.ngl-badges { display: flex; flex-wrap: wrap; gap: 16px; color: rgba(255,255,255,.6); font-size: 12px; margin-top: 26px; }
.ngl-badges span { display: inline-flex; gap: 6px; align-items: center; }
/* ---- Formulaire (droite) ---- */
.ngl-formwrap { display: flex; align-items: center; justify-content: center; padding: 40px 30px; background: #fff; }
.ngl-card { width: 100%; max-width: 392px; }
.ngl-mbrand { display: none; align-items: center; gap: 13px; margin-bottom: 26px; }
.ngl-mbrand .ngl-mark { height: 42px; }
.ngl-mname { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 27px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.ngl-title { font-family: 'Space Grotesk', 'Inter', sans-serif; font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; color: var(--ink); }
.ngl-msub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.ngl-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 22px; }
.ngl-tab { position: relative; z-index: 1; background: none; border: none; padding: 11px 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: color .2s, background .2s, box-shadow .2s; }
.ngl-tab.active, .ngl-tab.on { color: var(--acc); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.ngl-field { margin-bottom: 16px; }
.ngl-flabel { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.ngl-link { color: var(--acc); background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; padding: 0; }
.ngl-inwrap { position: relative; display: flex; align-items: center; }
.ngl-ic { position: absolute; left: 14px; color: #9aa6b2; font-size: 13px; pointer-events: none; }
.ngl-inp { width: 100%; height: 46px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ngl-inp:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 18%, transparent); }
.ngl-eye { position: absolute; right: 8px; background: none; border: 0; cursor: pointer; color: #9aa6b2; padding: 6px; border-radius: 6px; display: flex; }
.ngl-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.ngl-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.ngl-check input { width: 16px; height: 16px; accent-color: var(--acc); }
.ngl-submit { width: 100%; height: 48px; border: 0; border-radius: 11px; background: var(--acc); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s, transform .1s; }
.ngl-submit:hover { filter: brightness(1.06); }
.ngl-submit:active { transform: translateY(1px); }
.ngl-alt { width: 100%; height: 46px; margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ngl-err { margin-top: 14px; padding: 11px 14px; background: #fdeaea; color: #b23636; border-radius: 10px; font-size: 13px; }
.ngl-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--muted); }
.ngl-foot a { color: var(--acc); font-weight: 600; text-decoration: none; }
/* ---- Responsive : tablette & mobile → colonne unique, hero masqué ---- */
@media (max-width: 900px) {
  .ngl { grid-template-columns: 1fr; }
  .ngl-hero { display: none; }
  .ngl-formwrap { min-height: 100dvh; padding: 32px 20px; }
  .ngl-mbrand { display: flex; }
}
@media (max-width: 420px) {
  .ngl-formwrap { padding: 24px 16px; }
  .ngl-title { font-size: 22px; }
}
