/* Doxa — Login page styles (dark + neon) */

/* 1) Page layout and background */
body.auth-login {
  min-height: 100dvh;
  margin: 0;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #1A1A2E;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(245, 12, 160, 0.05), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(0, 255, 198, 0.05), transparent 40%);
  color: #F1F1F1;
  box-sizing: border-box;
  overflow-y: auto;
}

/* Keep existing particles if present */
.auth-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

/* Wrapper */
.login-container { position: relative; z-index: 1; width: 100%; padding: 1rem; }
.auth-wrapper { width: 100%; max-width: 540px; margin-inline: auto; }

/* 2) Logo */
.auth-logo { display: block; text-align: center; margin-bottom: 2rem; }
.auth-logo img { max-width: 120px; height: auto; margin-inline: auto; filter: drop-shadow(0 0 8px rgba(245, 12, 160, 0.4)); }

/* 3) Card / form container */
.auth-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2rem 2.5rem;
  box-shadow: 0 0 20px rgba(0, 255, 198, 0.10);
  backdrop-filter: blur(8px);
  max-width: 420px;
  margin: auto;
  box-sizing: border-box;
  overflow: hidden; /* empêche le débordement du bouton */
}

.auth-header { text-align: center; margin-bottom: 1.25rem; }
.auth-header h1 { font-family: 'Orbitron', ui-rounded, system-ui, sans-serif; letter-spacing: .06em; }
.auth-sub { color: #B0B0C3; margin-top: .25rem; }

/* 4) Inputs */
.auth-form { display: flex; flex-direction: column; }
.auth-form .input-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }
.auth-form label { font-size: .95rem; color: #F1F1F1; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: transparent;
  color: #F1F1F1;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-form input { background-color: transparent !important; }
.auth-form input::placeholder { color: #B0B0C3; }
.auth-form input:focus {
  border-color: #00FFC6;
  box-shadow: 0 0 0 2px rgba(0, 255, 198, 0.15), 0 0 8px rgba(0, 255, 198, 0.6);
}

/* Validation states (used by auth-validation.js) */
.auth-form input.is-valid { border-color: #00FFC6; box-shadow: 0 0 8px rgba(0, 255, 198, 0.45); }
.auth-form input.is-invalid { border-color: #F50CA0; box-shadow: 0 0 8px rgba(245, 12, 160, 0.35); }

.auth-feedback { font-size: .9rem; margin-top: .25rem; }
.auth-feedback[data-state="error"] { color: #ff75c0; }
.auth-feedback[data-state="success"] { color: #00FFC6; }

/* 5) Actions and buttons */
.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
}

.auth-link { color: #00FFC6; text-decoration: none; font-size: 0.9rem; }
.auth-link:hover { text-decoration: underline; }

.btn-auth.primary {
  font-family: 'Orbitron', ui-rounded, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #F1F1F1;
  background: linear-gradient(90deg, #F50CA0, #951ABE);
  box-shadow: 0 0 18px rgba(245, 12, 160, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  width: fit-content;
  margin: 0 auto;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-auth.primary:hover {
  box-shadow: 0 0 28px rgba(245, 12, 160, 0.6);
  transform: translateY(-1px);
}
.btn-auth.primary:active {
  transform: translateY(0);
}


/* Loading spinner hooks (auth-validation.js) */
.btn-auth.is-loading { cursor: progress; }
.btn-auth .btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-auth.google {
  background: #ffffff;
  color: #3c3c3c;
  border: none;
  font-family: 'Exo 2', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: fit-content;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  cursor: pointer;
  margin: 0 auto;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-auth.google:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}
.btn-auth.google:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* 6) Divider */
.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .75rem;
  color: #B0B0C3;
  margin: 1.5rem 0;
}
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: rgba(255,255,255,0.18); }
.auth-divider span { white-space: nowrap; }

/* 7) Footer */
.auth-footer { text-align: center; margin-top: 1rem; color: #B0B0C3; }
.auth-footer-links { text-align: center; margin-top: 1rem; }

/* 8) Responsive */
@media (max-width: 400px) {
  .auth-card { padding: 1.25rem 1rem; border-radius: 14px; }
  .auth-actions { grid-template-columns: 1fr; }
}

/* Small viewport height: avoid vertical overflow by aligning to top */
@media (max-height: 700px) {
  body.auth-login { justify-content: flex-start; padding-top: 2rem; }
}

/* ── Responsive mobile ───────────────────────────────────────── */
@media (max-width: 480px) {
  body.auth-login { padding: 1.5rem 0; }

  .auth-card {
    padding: 1.75rem 1.25rem;
    border-radius: 14px;
  }

  /* Boutons pleine largeur sur mobile */
  .btn-auth.primary,
  .btn-auth.google {
    width: 100%;
    justify-content: center;
  }

  /* Logo légèrement plus petit */
  .auth-logo img { max-width: 96px; }
}

/* Checkbox légale — CGU / opt-in (signup) */
.input-group--checkbox { flex-direction: row; align-items: flex-start; gap: 0; margin-bottom: 0.75rem; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #B0B0C3;
  line-height: 1.5;
  user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  accent-color: #00FFC6;
  margin-top: 3px;
  cursor: pointer;
}
.checkbox-label a { color: #00FFC6; }
.field-hint { font-size: 0.78rem; color: #7070a0; font-weight: 400; }
