/* Auth (connexion / inscription) — Simpliplay */

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-2);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.auth-visual {
  position: relative;
  display: none;
  overflow: hidden;
  padding: 2.5rem;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(249, 115, 22, 0.45), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(232, 93, 4, 0.35), transparent 50%),
    linear-gradient(155deg, #1c120c 0%, #2a160c 42%, #3d1f0c 100%);
}

.auth-visual-inner {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin: auto 0;
  animation: auth-rise 0.7s ease both;
}

.auth-visual h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-visual p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.auth-court {
  position: absolute;
  inset: auto -8% -18% 18%;
  width: 120%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  pointer-events: none;
  animation: auth-court 8s ease-in-out infinite;
}

.auth-court::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28%;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.auth-court::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(ellipse at top right, var(--color-bg-radial) 0%, transparent 45%),
    linear-gradient(165deg, var(--color-bg-1) 0%, var(--color-bg-2) 50%, var(--color-bg-3) 100%);
}

.auth-panel-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  animation: auth-rise 0.55s ease 0.08s both;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.auth-logo-wrap {
  position: relative;
  width: 3.75rem;
  height: 3.75rem;
  display: grid;
  place-items: center;
  animation: auth-logo-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-logo-glow {
  position: absolute;
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.55) 0%, transparent 70%);
  filter: blur(14px);
  animation: auth-logo-glow 2.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.auth-logo-slot,
.auth-logo-img {
  width: 3.75rem;
  height: 3.75rem;
}

.auth-logo-img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(232, 93, 4, 0.35));
}

.auth-logo-slot {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--color-accent), #c2410c);
  box-shadow: 0 10px 28px rgba(232, 93, 4, 0.28);
  animation: auth-logo-pop 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-logo-mark {
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.04em;
}

.auth-wordmark {
  margin: 0;
  font-size: clamp(1.85rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-text);
  animation: auth-rise 0.55s ease 0.18s both;
}

.auth-panel h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  letter-spacing: -0.02em;
  text-align: center;
}

.auth-lead {
  margin: 0 0 1.35rem;
  color: var(--color-muted);
  line-height: 1.45;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.auth-form input {
  font: inherit;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-input-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.auth-form select {
  font: inherit;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid var(--color-border-strong);
  background: var(--color-input-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.auth-sport {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.45rem;
}

.auth-sport legend {
  padding: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}

.auth-sport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.auth-sport-option {
  display: block;
  margin: 0;
  cursor: pointer;
}

.auth-sport-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.auth-sport-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 4.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 0.65rem;
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-input-bg);
  color: var(--color-text);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-sport-card i {
  font-size: 1.35rem;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

.auth-sport-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.auth-sport-option:hover .auth-sport-card {
  border-color: var(--color-accent-border);
  transform: translateY(-1px);
}

.auth-sport-option input:focus-visible + .auth-sport-card {
  box-shadow: 0 0 0 3px var(--color-accent-soft);
  border-color: var(--color-accent);
}

.auth-sport-option input:checked + .auth-sport-card {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.auth-sport-option input:checked + .auth-sport-card i {
  color: var(--color-accent);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.65rem;
  padding: 0.8rem 1.15rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  margin-top: 0.25rem;
  box-shadow: 0 8px 22px rgba(232, 93, 4, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 0.55rem;
  margin-bottom: 1rem;
  animation: auth-rise 0.35s ease both;
}
.flash-ok { background: var(--color-ok-soft); color: var(--color-ok-text); }
.flash-err { background: var(--color-danger-soft); color: var(--color-danger-text); }

.auth-alt {
  margin: 1.15rem 0 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  text-align: center;
}
.auth-alt a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-alt a:hover { text-decoration: underline; }

.auth-alt-form { margin-top: 1rem; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--color-muted);
  cursor: pointer;
  text-decoration: underline;
}

.auth-club-chip-form {
  margin: 0 0 1.25rem;
  display: flex;
  justify-content: center;
}
.auth-club-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--color-accent-border);
  background: var(--color-accent-soft);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.auth-club-chip:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.auth-club-chip-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.auth-club-chip-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 14rem;
}
.auth-club-chip-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-steps {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
  justify-content: center;
}
.auth-step-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--color-border-strong);
}
.auth-step-dot.is-active {
  width: 1.35rem;
  background: var(--color-accent);
}

.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
}
.password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--color-text);
  outline: none;
}
.password-checklist {
  list-style: none;
  margin: -0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
}
.password-checklist li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.password-checklist li::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.password-checklist li.is-pending { color: var(--color-muted); }
.password-checklist li.is-pending::before { background: var(--color-border-strong); }
.password-checklist li.is-ok { color: var(--color-ok-text); }
.password-checklist li.is-ok::before { background: var(--color-ok-text); }

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes auth-logo-pop {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: none; }
}
@keyframes auth-logo-enter {
  0% { opacity: 0; transform: scale(0.4) rotate(-18deg); }
  55% { opacity: 1; transform: scale(1.12) rotate(4deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes auth-logo-breath {
  0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
  40% { transform: translateY(-16px) scale(1.1) rotate(4deg); }
  70% { transform: translateY(-6px) scale(1.04) rotate(-2deg); }
}
@keyframes auth-logo-glow {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.25); }
}
@keyframes auth-court {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
  50% { transform: translateY(-10px) rotate(2deg); opacity: 1; }
}

/* —— Connexion : premiere impression —— */
.auth-body--login {
  background:
    radial-gradient(ellipse 70% 50% at 50% 12%, var(--color-bg-radial) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 85% 88%, rgba(232, 93, 4, 0.14), transparent 50%),
    linear-gradient(165deg, var(--color-bg-1) 0%, var(--color-bg-2) 45%, var(--color-bg-3) 100%);
}

.auth-login-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem 3rem;
}

.auth-panel--login {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 0;
  background: transparent;
  justify-content: center;
}

.auth-body--login .auth-panel-inner {
  animation: auth-rise 0.7s ease 0.35s both;
}

.auth-body--login .auth-logo-wrap {
  width: 8rem;
  height: 8rem;
  animation:
    auth-logo-enter 1s cubic-bezier(0.22, 1, 0.36, 1) both,
    auth-logo-breath 2.6s ease-in-out 1s infinite;
}

.auth-body--login .auth-logo-img {
  width: 8rem;
  height: 8rem;
}

.auth-body--login .auth-logo-glow {
  inset: -55%;
}

.auth-body--login .auth-wordmark {
  font-size: clamp(2rem, 6vw, 2.55rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.auth-body--login .auth-form {
  text-align: left;
}

.auth-body--login .btn-primary {
  width: 100%;
}

.pwd-icon { display: block; }
.password-toggle .pwd-icon[hidden] { display: none; }

.auth-back {
  margin: -0.5rem 0 1rem;
  font-size: 0.9rem;
}
.auth-back a {
  color: var(--color-muted);
  text-decoration: none;
}
.auth-back a:hover { color: var(--color-accent); }

.auth-body-nav .auth-panel {
  padding-bottom: 1.25rem;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
  .auth-visual {
    display: flex;
  }
  .auth-panel {
    padding: 3rem 3.5rem;
  }
  .auth-body-nav .auth-panel {
    padding-bottom: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel-inner,
  .auth-visual-inner,
  .auth-logo-slot,
  .auth-logo-wrap,
  .auth-logo-img,
  .auth-logo-glow,
  .auth-wordmark,
  .flash,
  .auth-court {
    animation: none !important;
  }
  .btn-primary:hover {
    transform: none;
  }
}
