@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

body {
  font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(17, 96, 224, 0.12), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(47, 123, 245, 0.16), transparent 25%),
    linear-gradient(180deg, #060a14, #0a1020);
  color: #e7edff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#stars-container {
  pointer-events: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
}

.star {
  position: absolute;
  background: radial-gradient(circle at 35% 35%, #ffffff, #d7f1ff 65%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 72%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 6px rgba(47, 123, 245, 0.55));
  opacity: 0;
  animation: star-fade 2.6s ease-in-out forwards;
}

@keyframes star-fade {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1) rotate(12deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.55) rotate(0deg);
  }
}

.login-container {
  background: rgba(255, 255, 255, 0.02);
  padding: 2.4rem 2.6rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 38px rgba(5, 12, 32, 0.55);
  width: 100%;
  max-width: 460px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 0.8rem;
}

.logo img {
  width: 40px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.logo h1 {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0;
}

h2 {
  font-weight: 800;
  font-size: 1.75rem;
  margin: 0.3rem 0;
}

.subtitle {
  color: #9ba7cc;
  margin-bottom: 1.4rem;
  font-weight: 600;
}

label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.login-box input[type="text"],
.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="tel"] {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: #e7edff;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.login-box input:focus {
  border-color: rgba(17, 96, 224, 0.9);
  background: rgba(255, 255, 255, 0.07);
}

.forgot {
  float: right;
  font-size: 0.86rem;
  color: #2f7bf5;
  text-decoration: none;
  font-weight: 600;
}

.forgot:hover {
  text-decoration: underline;
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin: 1rem 0;
  gap: 0.5rem;
  color: #e7edff;
  font-size: 0.95rem;
}

.checkbox-container input[type="checkbox"] {
  accent-color: #1160e0;
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(90deg, #1160e0, #2f7bf5);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  width: 100%;
  /* Ombre neutre et discrete. Un halo bleu sous le bouton principal de la page
     de connexion — la premiere que voit un visiteur — evoquait davantage une
     page d'accroche qu'un espace client. */
  transition: background 0.18s ease, filter 0.18s ease;
  box-shadow: 0 4px 12px rgba(3, 8, 20, 0.45);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

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

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(90deg, #1160e0, #2f7bf5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 0;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  transition: background 0.18s ease, filter 0.18s ease;
  margin-top: 0.8rem;
  box-shadow: 0 4px 12px rgba(3, 8, 20, 0.45);
  width: 100%;
}

.btn-discord:hover {
  filter: brightness(1.08);
}

.btn-discord:active {
  transform: scale(0.99);
}

.btn-discord .fa-discord {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.oauth-separator {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.oauth-separator::before,
.oauth-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.oauth-separator::before {
  left: 0;
}

.oauth-separator::after {
  right: 0;
}

.register {
  margin-top: 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: #c6d3f2;
  line-height: 1.45;
}

.register a {
  color: #2f7bf5;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.register a:hover {
  color: #a8f0ff;
  border-bottom-color: rgba(168, 240, 255, 0.65);
}

.btn-back {
  background: rgba(255, 255, 255, 0.04);
  color: #2f7bf5;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 1.2rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-back:hover {
  background: rgba(17, 96, 224, 0.15);
  color: #e7edff;
  transform: translateY(-1px);
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.password-wrapper input {
  display: block;
  width: 100%;
  padding: 12px 12px;
  padding-right: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: #e7edff;
}

.password-wrapper input:focus {
  border-color: rgba(17, 96, 224, 0.9);
  background: rgba(255, 255, 255, 0.07);
}

.toggle-password-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #d7deef;
  display: inline-grid;
  place-items: center;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  line-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, color 0.16s ease;
}

.toggle-password-btn:hover {
  background: transparent;
  color: #f2f6ff;
}

.password-wrapper.is-typing .toggle-password-btn {
  opacity: 1;
  pointer-events: auto;
}

.toggle-password-btn:focus-visible {
  outline: 2px solid rgba(47, 123, 245, 0.55);
  outline-offset: 2px;
}

.toggle-password-btn svg {
  width: 19px;
  height: 19px;
  display: block;
  pointer-events: none;
}

.is-hidden {
  display: none !important;
}

.spinner {
  margin: 0 auto;
  margin-top: 10px;
  width: 36px;
  height: 36px;
  border: 4px solid rgba(129, 140, 248, 0.2);
  border-top: 4px solid #2f7bf5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
  color: #f05454;
  font-weight: 700;
  margin-top: 0.5rem;
  min-height: 1.2em;
}

.full-width {
  width: 100%;
}
