/* ==========================================================================
   Lynxia — Page de connexion (thème sombre aligné sur lynxia.css)
   ========================================================================== */

:root {
  --lx-bg: #12141c;
  --lx-bg-card: #1e222d;
  --lx-bg-input: #151823;
  --lx-border: rgba(255, 255, 255, 0.08);
  --lx-border-strong: rgba(255, 255, 255, 0.16);
  --lx-text: #f3f4f8;
  --lx-text-2: #97a0b8;
  --lx-text-3: #6b7385;
  --lx-accent: #7c6cf0;
  --lx-blue: #4f7df3;
  --lx-red: #ef4444;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body.lx-login {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--lx-text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(124, 108, 240, 0.22), transparent 60%),
    radial-gradient(800px 500px at 90% 95%, rgba(79, 125, 243, 0.18), transparent 60%),
    var(--lx-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.lx-card {
  width: 100%;
  max-width: 420px;
  background: var(--lx-bg-card);
  border: 1px solid var(--lx-border);
  border-radius: 18px;
  padding: 40px 36px 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  position: relative;
  overflow: hidden;
}

.lx-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lx-accent), var(--lx-blue));
}

.lx-logo {
  display: block;
  height: 44px;
  width: auto;
  margin: 0 auto 28px;
}

.lx-card h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}

.lx-subtitle {
  margin: 0 0 28px;
  text-align: center;
  color: var(--lx-text-2);
  font-size: 0.95rem;
}

.lx-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

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

.lx-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lx-text-2);
}

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

.lx-input-wrap > .lx-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lx-text-3);
  font-size: 0.9rem;
  pointer-events: none;
  transition: color 0.2s;
}

.lx-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 40px;
  background: var(--lx-bg-input);
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  color: var(--lx-text);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lx-input-wrap input:hover { border-color: var(--lx-border-strong); }

.lx-input-wrap input:focus {
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.25);
}

.lx-input-wrap:focus-within > .lx-icon { color: var(--lx-accent); }

.lx-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--lx-text-3);
  cursor: pointer;
}

.lx-toggle:hover { color: var(--lx-text); background: rgba(255, 255, 255, 0.05); }

.lx-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 22px;
  font-size: 0.86rem;
}

.lx-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lx-text-2);
  cursor: pointer;
  user-select: none;
}

.lx-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  background: var(--lx-bg-input);
  border: 1px solid var(--lx-border-strong);
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.lx-check input:checked {
  background: var(--lx-accent);
  border-color: var(--lx-accent);
}

.lx-check input:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.lx-check input:focus-visible { box-shadow: 0 0 0 3px rgba(124, 108, 240, 0.35); }

.lx-link {
  color: var(--lx-accent);
  text-decoration: none;
  font-weight: 500;
}

.lx-link:hover { text-decoration: underline; }

.lx-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--lx-accent), var(--lx-blue));
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 12px 24px -10px rgba(124, 108, 240, 0.7);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}

.lx-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 16px 28px -10px rgba(124, 108, 240, 0.8);
}

.lx-btn:active { transform: translateY(0); }

.lx-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lx-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 18px;
  color: var(--lx-text-3);
  font-size: 0.8rem;
}

.lx-divider::before, .lx-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--lx-border);
}

.lx-signup {
  text-align: center;
  color: var(--lx-text-2);
  font-size: 0.9rem;
}

.lx-signup button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--lx-accent);
  cursor: pointer;
}

.lx-signup button:hover { text-decoration: underline; }

.lx-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--lx-text-3);
}

@media (max-width: 480px) {
  .lx-card { padding: 32px 22px 26px; border-radius: 14px; }
}
