/* accounts/css/login.css */
/* Thème aligné sur signup_form.css */

/* ====== Container & carte ====== */

.auth-container,
.game-signup-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--cg-bg);
}

.auth-card,
.game-signup-card {
  background: #0C111C;                /* même style que la carte signup */
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 600px;
  overflow: hidden;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Header ====== */

.auth-header {
  padding: 24px 30px 0;
  text-align: center;
}

.auth-header h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cg-content);
}

.auth-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--cg-muted);
}

/* ====== Formulaire ====== */

.auth-form,
.game-signup-form {
  padding: 24px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Message erreur global (copié du style signup) */
.auth-error {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
  padding: 12px 15px;
  border-radius: var(--border-radius);
  margin: 0 30px 16px;
  border-left: 4px solid var(--danger-color);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.5s ease;
  font-size: 0.9rem;
}

.auth-error i {
  font-size: 1.1rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ====== Groupes de champs (style proche de .game-form-group) ====== */

.form-group,
.game-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  margin-bottom: 16px;
  background: transparent;   /* plus de fond */
  border: none;              /* plus de bordure */
  border-radius: 0;          /* plus de radius sur le wrapper */
  padding: 0;                /* pas de padding, le texte est dehors */
}


.form-group label {
  font-size: 0.85rem;
  color: var(--cg-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}


.form-group label i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

/* Même style d’input que signup_form.css */
/* Même style d’input que signup_form.css */
.form-group input,
.game-form-group input {
  width: 100%;
  padding: 12px 15px;
  background-color: #020617;     /* fond de la case */
  border: 1px solid var(--cg-border);
  border-radius: 8px;           /* ⇐ ici tu choisis l’arrondi de la case */
  font-size: 1rem;
  color: var(--cg-content);
  transition: var(--transition);
}




/* Placeholder comme dans signup */
.form-group input::placeholder {
  color: #9ca3af;
}

/* Focus identique signup */
.form-group input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
  background-color: #020617;
}


/* Champ mot de passe avec icône */
.password-input {
  position: relative;
}

.password-input input {
  width: 100%;
  padding-right: 40px;
}

/* Bouton “œil” inspiré de .game-password-toggle */
.toggle-password,
.game-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--cg-muted);
  cursor: pointer;
  padding: 5px;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--primary-color);
}

/* ====== Options : remember + lien reset ====== */

.form-options,
.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-top: -4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: var(--cg-muted);
}

.remember-me input {
  width: auto;
  margin: 0;
}

.form-options a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

.form-options a:hover {
  text-decoration: underline;
}

/* ====== Bouton submit (copié de .game-signup-btn) ====== */

.auth-submit,
.game-signup-btn {
  width: 100%;
  padding: 15px;
  background-color: var(--primary-color);
  color: var(--cg-content);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-submit i {
  font-size: 1.1rem;
}

.auth-submit:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* ====== Footer (lien vers signup) ====== */

.auth-footer,
.game-signup-footer {
  text-align: center;
  margin-top: 18px;
  color: var(--cg-muted);
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ====== Responsive ====== */

@media (max-width: 768px) {
  .auth-card {
    max-width: 100%;
  }

  .auth-form {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 0;
  }

  .auth-form {
    padding: 18px;
  }

  .form-group input {
    padding: 12px 13px;
  }
}

.game-signup-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.game-signup-footer a:hover {
  text-decoration: underline;
}

/* Placeholder comme dans signup */
.form-group input::placeholder,
.game-form-group input::placeholder {
  color: #9ca3af;
}

/* Focus identique signup */
.form-group input:focus,
.game-form-group input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px #38bdf8;
  background-color: #020617;
}
