/* ÉCHECS 3D — AUTHENTIFICATION — Éditorial / Luxe — version compacte */

.auth {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: radial-gradient(circle at 50% 30%, #221c14, #120f0b 75%);
  overflow-y: auto;
}

.auth__grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.auth__orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.auth__orbs .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4; }
.auth__orbs .orb--1 { width: 360px; height: 360px; background: radial-gradient(circle, #e6c98a, transparent 70%); top: -8%; left: -6%; }
.auth__orbs .orb--2 { width: 300px; height: 300px; background: radial-gradient(circle, #cdb6e0, transparent 70%); bottom: -8%; right: -4%; }

/* Carte — étroite & centrée */
.auth__card {
  position: relative; z-index: 2;
  width: 100%;
  max-width: 420px;
  margin: auto;
  text-align: center;
  background: rgba(26, 20, 16, 0.86);
  border: 1px solid rgba(224, 185, 111, 0.2);
  border-radius: 24px;
  padding: clamp(1.8rem, 5vw, 2.6rem);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth__home {
  position: absolute; top: 1rem; left: 1rem;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(224, 185, 111, 0.22);
  color: #e0b96f; cursor: pointer; font-size: 1.1rem;
  transition: background 0.2s, transform 0.2s;
}
.auth__home:hover { background: rgba(224, 185, 111, 0.16); transform: translateX(-2px); }

.auth__logo {
  width: 60px; height: 60px; margin: 0.2rem auto 0.9rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 185, 111, 0.2), transparent 70%);
  border: 1px solid rgba(224, 185, 111, 0.3);
}
.auth__crown { font-size: 1.9rem; color: #e0b96f; }

.auth__kicker {
  font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.24em;
  text-transform: uppercase; color: #b8924f; margin: 0 0 0.35rem;
}
.auth__title {
  font-family: 'Fraunces', serif; color: #faf6ee; font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.2rem); margin: 0 0 0.6rem;
}
.auth__title em { font-style: italic; color: #e0b96f; }
.auth__subtitle {
  color: rgba(250, 246, 238, 0.66); font-size: 0.9rem; line-height: 1.55;
  margin: 0 auto 1.5rem; max-width: 320px;
}

/* Onglets */
.auth__tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(224, 185, 111, 0.18);
  border-radius: 100px; padding: 4px; margin-bottom: 1.5rem;
}
.auth__tab {
  position: relative; z-index: 2; background: none; border: 0; cursor: pointer;
  padding: 0.7rem; font: inherit; font-size: 0.88rem; font-weight: 600;
  color: rgba(250, 246, 238, 0.6); border-radius: 100px; transition: color 0.3s;
}
.auth__tab.is-active { color: #1a1206; }
.auth__tab-glider {
  position: absolute; z-index: 1; top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  background: linear-gradient(135deg, #e0b96f, #b8924f); border-radius: 100px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.auth__tabs.signup .auth__tab-glider { transform: translateX(100%); }

/* Champs */
.auth__form { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
.auth__field { display: flex; flex-direction: column; gap: 0.35rem; }
.auth__label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em; color: rgba(250, 246, 238, 0.7); padding-left: 0.2rem; }

.auth__input-wrap { position: relative; display: flex; align-items: center; }
.auth__icon { position: absolute; left: 0.85rem; font-size: 0.95rem; opacity: 0.6; pointer-events: none; }
.auth__input-wrap input {
  width: 100%; padding: 0.8rem 0.9rem 0.8rem 2.5rem;
  background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(224, 185, 111, 0.22);
  border-radius: 13px; color: #faf6ee; font-size: 0.94rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth__input-wrap input:focus { outline: none; border-color: #e0b96f; box-shadow: 0 0 0 3px rgba(224, 185, 111, 0.15); }
.auth__input-wrap input::placeholder { color: rgba(250, 246, 238, 0.3); }

.auth__eye {
  position: absolute; right: 0.6rem; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: rgba(250, 246, 238, 0.5);
  transition: color 0.2s;
}
.auth__eye:hover { color: #e0b96f; }

.auth__strength { display: flex; align-items: center; gap: 0.6rem; padding: 0.2rem 0.2rem 0; }
.auth__strength-bar { flex: 1; height: 5px; border-radius: 100px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.auth__strength-bar i { display: block; height: 100%; width: 0; border-radius: 100px; transition: width 0.4s ease, background 0.4s; }
.auth__strength-label { font-size: 0.72rem; font-weight: 600; min-width: 48px; }
.auth__strength[data-level="1"] .auth__strength-bar i { width: 33%; background: #f0a8a4; }
.auth__strength[data-level="2"] .auth__strength-bar i { width: 66%; background: #e0b96f; }
.auth__strength[data-level="3"] .auth__strength-bar i { width: 100%; background: #7cc59a; }
.auth__strength[data-level="1"] .auth__strength-label { color: #f0a8a4; }
.auth__strength[data-level="2"] .auth__strength-label { color: #e0b96f; }
.auth__strength[data-level="3"] .auth__strength-label { color: #7cc59a; }

.auth__forgot {
  align-self: flex-end; background: none; border: 0; cursor: pointer;
  color: #b8924f; font-size: 0.82rem; font-family: inherit; padding: 0;
  transition: color 0.2s;
}
.auth__forgot:hover { color: #e0b96f; text-decoration: underline; }
.auth__forgot--center { align-self: center; margin-top: 0.4rem; }

.auth__error { color: #f0a8a4; font-size: 0.84rem; margin: 0; min-height: 1.1em; line-height: 1.4; }
.auth__error.is-ok { color: #7cc59a; }

.auth__submit {
  position: relative; margin-top: 0.3rem;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  background: linear-gradient(135deg, #e0b96f, #b8924f); color: #1a1206; border: 0;
  padding: 0.9rem; font-size: 0.96rem; font-weight: 700; font-family: inherit;
  border-radius: 13px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.auth__submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(224, 185, 111, 0.3); }
.auth__submit:disabled { opacity: 0.7; cursor: wait; }
.auth__spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(26, 18, 6, 0.3); border-top-color: #1a1206;
  animation: auth-spin 0.7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth__reset-intro { color: rgba(250, 246, 238, 0.66); font-size: 0.86rem; line-height: 1.55; margin: 0 0 0.4rem; text-align: left; }
.auth__legal { margin: 1.3rem 0 0; font-size: 0.72rem; color: rgba(250, 246, 238, 0.4); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .auth__card, .auth__orbs .orb, .auth__spinner { animation: none !important; }
  .auth__tab-glider { transition: none; }
}