* {
  box-sizing: border-box;
}

:root {
  --background: #f4f6fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #6b7280;
  --border: #dfe3eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 34%),
    var(--background);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 38px;
  background: var(--surface);
  border: 1px solid rgba(223, 227, 235, 0.85);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.logo {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h1 {
  margin: 4px 0 10px;
  font-size: clamp(1.8rem, 6vw, 2.3rem);
  line-height: 1.1;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-heading .eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

input.invalid {
  border-color: var(--danger);
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  padding: 6px;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.error-message {
  min-height: 16px;
  color: var(--danger);
  font-size: 0.78rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.checkbox input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.text-link,
.auth-switch a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.primary-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.form-status {
  min-height: 20px;
  margin: 0;
  color: var(--success);
  font-size: 0.88rem;
  text-align: center;
}

.auth-switch {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@media (max-width: 520px) {
  .auth-card {
    padding: 28px 22px;
    border-radius: 20px;
  }

  .label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

.site-footer {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px max(30px, calc((100vw - 1120px) / 2));
  border-top: 1px solid rgba(125,181,231,.2);
  background: #041427;
  color: #8fa5b8;
}

.site-footer > div {
  display: grid;
  gap: 4px;
}

.site-footer > div > span {
  color: white;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
}

.site-footer small {
  font-size: 9px;
}

.site-footer > a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b8c8d5;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.site-footer > a > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242,60,88,.55);
  border-radius: 50%;
  color: #f23c58;
}

.site-footer > a:hover {
  color: white;
}

@media (max-width: 720px) {
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 20px;
  }
}

/* Identité ONSIDE — Major League Soccer */
:root {
  --background: #06182e;
  --surface: #0a2444;
  --text: #f5f9fd;
  --muted: #9dafc2;
  --border: rgba(125, 181, 231, 0.25);
  --primary: #55b8ff;
  --primary-dark: #2f99ea;
  --danger: #ff6478;
  --success: #69d1ae;
  --shadow: 0 30px 90px rgba(0, 7, 18, 0.38);
}

body {
  background: #06182e;
  color: var(--text);
}

.auth-page {
  min-height: calc(100vh - 68px);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.025) 50%, transparent 50.1%),
    radial-gradient(circle at 12% 20%, rgba(85,184,255,.2), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(242,60,88,.15), transparent 25%),
    linear-gradient(145deg, #06182e, #0a2444 58%, #111b33);
}

.auth-page::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  left: -210px;
  bottom: -280px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.012);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, .92fr);
  width: min(1120px, 100%);
  min-height: 720px;
  overflow: hidden;
  border: 1px solid rgba(125,181,231,.2);
  border-radius: 28px 8px 28px 8px;
  background: rgba(5, 20, 39, .7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 48px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(85,184,255,.12), transparent 42%),
    linear-gradient(155deg, #0b3159, #091f3a 68%, #28192d);
}

.auth-story::after {
  content: "MLS";
  position: absolute;
  right: -28px;
  bottom: 55px;
  color: transparent;
  font-size: 190px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -16px;
  -webkit-text-stroke: 1px rgba(255,255,255,.09);
  transform: rotate(-8deg);
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: white;
  font-size: 1.45rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  text-decoration: none;
}

.auth-brand > span:first-child {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px 18px 9px 18px;
  color: #06182e;
  background: linear-gradient(135deg, #fff 0 46%, #55b8ff 46% 70%, #f23c58 70%);
}

.auth-brand > span:last-child,
.logo span {
  color: #f23c58;
}

.auth-story-copy {
  position: relative;
  z-index: 2;
  margin: auto 0 44px;
}

.auth-kicker {
  margin: 0 0 18px;
  color: #55b8ff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.auth-story h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  line-height: .94;
  letter-spacing: -.055em;
}

.auth-story h2 span {
  color: #f23c58;
}

.auth-story-copy > p:last-child {
  max-width: 470px;
  margin: 24px 0 0;
  color: #bfd0df;
  font-size: 1rem;
  line-height: 1.65;
}

.auth-league-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px 5px 16px 5px;
  background: rgba(3, 18, 35, .55);
}

.auth-league-card > div {
  padding: 18px;
  border-right: 1px solid rgba(255,255,255,.1);
}

.auth-league-card > div:last-child {
  border-right: 0;
}

.auth-league-card strong,
.auth-league-card span {
  display: block;
}

.auth-league-card strong {
  font-size: 1.55rem;
}

.auth-league-card span {
  margin-top: 5px;
  color: #8fa8bb;
  font-size: .65rem;
  text-transform: uppercase;
}

.auth-disclaimer {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  color: #718aa0;
  font-size: .66rem;
}

.auth-shell .auth-card,
.auth-page--login .auth-card {
  position: relative;
  z-index: 1;
  max-width: 500px;
  padding: 48px;
  color: var(--text);
  border-color: rgba(125,181,231,.2);
  border-radius: 0;
  background: rgba(7, 29, 55, .94);
  box-shadow: none;
}

.auth-page--login .auth-card {
  border-radius: 24px 8px 24px 8px;
  box-shadow: var(--shadow);
}

.logo {
  color: white;
  font-style: italic;
  letter-spacing: -.04em;
}

.auth-heading h1 {
  letter-spacing: -.04em;
}

.auth-heading .eyebrow {
  color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  color: var(--text);
  background: #0b2a4b;
  border-color: var(--border);
}

input::placeholder {
  color: #6f879d;
}

input:focus {
  box-shadow: 0 0 0 4px rgba(85,184,255,.12);
}

.primary-button {
  color: #06182e;
  background: linear-gradient(90deg, #55b8ff, #2f99ea);
}

.primary-button:hover {
  background: linear-gradient(90deg, #70c4ff, #46a9f1);
}

.checkbox input {
  accent-color: var(--primary);
}

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

  .auth-story {
    min-height: 350px;
    padding: 34px;
  }

  .auth-story-copy {
    margin: 70px 0 28px;
  }

  .auth-story h2 {
    font-size: 3.2rem;
  }

  .auth-shell .auth-card {
    max-width: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .auth-page {
    padding: 14px;
  }

  .auth-shell {
    border-radius: 20px 6px 20px 6px;
  }

  .auth-story {
    min-height: 300px;
    padding: 26px 22px;
  }

  .auth-story-copy {
    margin: 50px 0 24px;
  }

  .auth-story h2 {
    font-size: 2.55rem;
  }

  .auth-story-copy > p:last-child {
    font-size: .86rem;
  }

  .auth-league-card > div {
    padding: 13px 10px;
  }

  .auth-shell .auth-card,
  .auth-page--login .auth-card {
    padding: 30px 22px;
  }
}
