/* Connexion et installation : les deux seules pages visibles sans session.
   Elles portent déjà l'identité du club (logo, couleurs) pour que l'application
   soit reconnaissable dès le premier écran. */

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

/* Panneau de marque : dégradé du club, logo en grand, ambiance sportive. */
.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-8);
  padding: var(--space-12) clamp(24px, 5vw, 64px);
  /* Voile sombre par-dessus le dégradé du club : le texte reste lisible quelles
     que soient les deux couleurs choisies, y compris un jaune vif. */
  background-color: var(--brand-primary);
  background-image: linear-gradient(180deg, rgb(6 10 18 / 0.55), rgb(6 10 18 / 0.45)),
    var(--brand-gradient);
  color: #ffffff;
}

/* Trame de terrain : cercles concentriques discrets, aucun asset à charger. */
.auth-brand::before {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.16;
}

.auth-brand::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.16;
}

.auth-brand-top,
.auth-brand-bottom {
  position: relative;
  z-index: 1;
}

.auth-brand .club-logo {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-xl);
  background: rgb(255 255 255 / 0.16);
  border: 1px solid rgb(255 255 255 / 0.28);
  box-shadow: none;
  color: #ffffff;
  font-size: var(--text-2xl);
}

.auth-brand h1 {
  margin-top: var(--space-6);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 0.95;
}

.auth-brand .club-meta {
  margin-top: var(--space-2);
  color: inherit;
  opacity: 0.85;
}

.auth-tagline {
  max-width: 30ch;
  margin-top: var(--space-4);
  font-size: var(--text-md);
  opacity: 0.9;
}

.auth-brand-bottom {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--gutter);
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--gutter);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-card h1 {
  font-size: var(--text-xl);
}

.subtitle {
  margin-bottom: var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.auth-card label {
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-card button[type="submit"] {
  margin-top: var(--space-6);
  min-height: 46px;
  width: 100%;
}

/* ------------------------------------------------------------ Installation --- */

.setup-card {
  max-width: 620px;
  padding: var(--space-8);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.setup-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.setup-section {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-5);
}

.setup-section label {
  margin-top: var(--space-3);
  margin-bottom: var(--space-1);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-section .field-row label {
  margin-top: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--space-2);
}

.category-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-inset);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}

.category-option:hover {
  border-color: var(--border-strong);
}

.category-option:has(input:checked) {
  border-color: var(--brand-primary);
  background: rgb(var(--brand-primary-rgb) / 0.14);
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    gap: var(--space-5);
    padding: var(--space-8) var(--gutter);
  }

  .auth-brand::before,
  .auth-brand::after {
    display: none;
  }

  .auth-brand h1 {
    margin-top: var(--space-4);
  }

  .auth-tagline,
  .auth-brand-bottom {
    display: none;
  }

  .auth-brand .club-logo {
    width: 72px;
    height: 72px;
  }
}
