/* ==========================================================================
   Avenix Business Suite — Page de connexion
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

/* Panneau de présentation --------------------------------------------------- */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 38px 48px 34px;
  background: var(--navy);
  color: #f8fafc;
  overflow: hidden;
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: 22px 22px;
  opacity: 0.6;
  pointer-events: none;
}

.auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-brand {
  align-self: flex-start;
  text-decoration: none;
}

.auth-brand .brand-mark {
  background: var(--blue);
}

.auth-brand .site-brand-name {
  color: #f8fafc;
}

.auth-brand .site-brand-name span {
  color: #8fa3bf;
}

.auth-visual-content {
  max-width: 520px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-eyebrow svg {
  width: 14px;
  height: 14px;
  color: #93c5fd;
}

.auth-visual-content h1 {
  margin-top: 22px;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.auth-visual-content p {
  margin-top: 18px;
  max-width: 430px;
  color: #a8b8ce;
  font-size: 14px;
  line-height: 1.7;
}

.auth-points {
  margin-top: 30px;
  display: grid;
  gap: 14px;
  list-style: none;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbe4f0;
  font-size: 13px;
  line-height: 1.5;
}

.auth-points li > span {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.32);
  color: #93c5fd;
}

.auth-points svg {
  width: 14px;
  height: 14px;
}

.auth-visual-foot {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #8fa3bf;
  font-size: 11.5px;
  font-weight: 500;
}

.auth-visual-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

/* Panneau formulaire -------------------------------------------------------- */
.auth-form-side {
  display: flex;
  flex-direction: column;
  padding: 26px 32px 24px;
  background: var(--bg);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.auth-back:hover {
  color: var(--text);
}

.auth-back svg {
  width: 15px;
  height: 15px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 34px 36px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.auth-brand-mobile {
  display: none;
  margin-bottom: 22px;
  text-decoration: none;
}

.auth-head h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text);
}

.auth-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.auth-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.auth-form .form-field {
  display: grid;
  gap: 7px;
}

.auth-form .form-field > label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.auth-input {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.auth-input > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--muted);
}

.auth-input .input {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.auth-input .input:focus {
  box-shadow: none;
}

.auth-reveal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.auth-reveal:hover {
  background: var(--surface-2);
  color: var(--text);
}

.auth-reveal svg {
  width: 16px;
  height: 16px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.auth-link {
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}

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

.auth-error {
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  height: 44px;
  justify-content: center;
  gap: 9px;
  font-size: 13px;
}

.auth-submit svg {
  width: 16px;
  height: 16px;
}

.auth-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.auth-divider span {
  padding: 0 12px;
}

.auth-demo {
  width: 100%;
  height: 42px;
  justify-content: center;
  gap: 9px;
  font-size: 12.5px;
}

.auth-demo svg {
  width: 15px;
  height: 15px;
}

.auth-legal {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-legal svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
  color: var(--success);
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  color: var(--muted);
  font-size: 11px;
}

.auth-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--text);
}

/* Responsive ---------------------------------------------------------------- */
@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-brand-mobile {
    display: inline-flex;
  }

  .auth-form-side {
    min-height: 100vh;
  }
}

@media (max-width: 560px) {
  .auth-form-side {
    padding: 18px 18px 20px;
  }

  .auth-card {
    padding: 26px 22px 24px;
    border-radius: var(--radius-lg);
  }

  .auth-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .auth-back {
    font-size: 11px;
  }
}