/* =====================================================================
   SE SPORT EVENTS — Authentification (login / inscription)
   Design fond noir, épuré
   ===================================================================== */

/* ----------------------------- BASE ----------------------------- */
.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--se-font-body);
  -webkit-font-smoothing: antialiased;
}

.auth-body--dark {
  background: #05070a;
  color: #e7ecf2;
}

/* ----------------------------- SHELL ----------------------------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  position: relative;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 184, 230, .12), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(34, 184, 230, .08), transparent 55%),
    #05070a;
}

/* ----------------------------- BOX ----------------------------- */
.auth-box {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem 2rem;
  background: #0a0d12;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  box-shadow:
    0 30px 60px -30px rgba(0, 0, 0, .8),
    inset 0 1px 0 rgba(255, 255, 255, .03);
}

.auth-box--wide {
  max-width: 520px;
}

/* Logo */
.auth-box__logo {
  display: block;
  width: 130px;
  margin: 0 auto 1.75rem;
  transition: transform var(--se-transition);
}
.auth-box__logo img {
  width: 100%;
  height: auto;
  display: block;
}
.auth-box__logo:hover { transform: translateY(-2px); }

/* Titre */
.auth-box__head {
  text-align: center;
  margin-bottom: 1.75rem;
}
.auth-box__title {
  font-family: var(--se-font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: #ffffff;
  margin: 0 0 .35rem;
}
.auth-box__subtitle {
  font-size: .82rem;
  color: #8a95a5;
  margin: 0;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Note de bas de carte */
.auth-box__foot {
  text-align: center;
  font-size: .85rem;
  color: #8a95a5;
  margin: 1.5rem 0 0;
}
.auth-box__foot a {
  color: var(--se-cyan);
  font-weight: 600;
  transition: color var(--se-transition);
}
.auth-box__foot a:hover { color: var(--se-cyan-2); }

/* ----------------------------- FORMULAIRE ----------------------------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: -.25rem 0 .25rem;
}

.auth-label {
  font-family: var(--se-font-display);
  font-size: .78rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: .02em;
}

.auth-label-link {
  font-size: .78rem;
  color: var(--se-cyan);
  font-weight: 600;
  transition: color var(--se-transition);
}
.auth-label-link:hover { color: var(--se-cyan-2); }

/* Inputs */
.auth-input {
  width: 100%;
  padding: .78rem .95rem;
  background: rgba(255, 255, 255, .03);
  border: 1.5px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  font-family: inherit;
  font-size: .9rem;
  color: #ffffff;
  transition: all var(--se-transition);
  outline: none;
}
.auth-input::placeholder { color: #5a6472; }
.auth-input:hover { border-color: rgba(255, 255, 255, .18); }
.auth-input:focus {
  border-color: var(--se-cyan);
  background: rgba(34, 184, 230, .04);
  box-shadow: 0 0 0 3px rgba(34, 184, 230, .15);
}
.auth-input.is-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* Input avec icône */
.auth-input-icon { position: relative; }
.auth-input-icon > i {
  position: absolute;
  left: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--se-cyan);
  font-size: .92rem;
  pointer-events: none;
}
.auth-input-icon .auth-input {
  padding-left: 2.5rem;
  padding-right: 2.7rem;
}

/* Toggle mot de passe */
.auth-toggle-pwd {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #5a6472;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--se-transition);
}
.auth-toggle-pwd:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--se-cyan);
}
.auth-toggle-pwd i { font-size: .95rem; }

/* Select */
.auth-select-wrap { position: relative; }
.auth-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  color: #ffffff;
}
.auth-select option { background: #0a0d12; color: #ffffff; }
.auth-select__caret {
  position: absolute;
  right: .95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #5a6472;
  font-size: .75rem;
  pointer-events: none;
}

/* Erreur */
.auth-error {
  font-size: .75rem;
  color: #f87171;
  font-weight: 500;
  min-height: 0;
}
.auth-error:empty { display: none; }

/* ----------------------------- CHECKBOX ----------------------------- */
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  cursor: pointer;
  font-size: .82rem;
  color: #8a95a5;
  padding: .1rem 0;
  user-select: none;
  line-height: 1.5;
}
.auth-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.auth-check__box {
  position: relative;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .03);
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  transition: all var(--se-transition);
}
.auth-check__box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #00151f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--se-transition);
  margin-bottom: 2px;
}
.auth-check input:checked ~ .auth-check__box {
  background: var(--se-cyan);
  border-color: var(--se-cyan);
}
.auth-check input:checked ~ .auth-check__box::after {
  transform: rotate(45deg) scale(1);
}
.auth-check input:focus-visible ~ .auth-check__box {
  box-shadow: 0 0 0 3px rgba(34, 184, 230, .25);
}
.auth-check__label { flex: 1; }
.auth-check__label a {
  color: var(--se-cyan);
  font-weight: 600;
}
.auth-check__label a:hover { text-decoration: underline; }

/* Le label "conditions" doit être multi-lignes */
form > .auth-check { align-items: flex-start; }
form > .auth-check .auth-check__box { margin-top: .15rem; }

/* ----------------------------- BOUTON SUBMIT ----------------------------- */
.auth-submit {
  margin-top: .5rem;
  padding: 1rem 1.4rem;
  font-size: .92rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.auth-submit__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 21, 31, .3);
  border-top-color: #00151f;
  border-radius: 50%;
  animation: authSpin .7s linear infinite;
}
.auth-submit.is-loading .auth-submit__label { display: none; }
.auth-submit.is-loading .auth-submit__spinner { display: inline-block; }

@keyframes authSpin { to { transform: rotate(360deg); } }

/* ----------------------------- FLASH MESSAGE ----------------------------- */
.auth-flash {
  padding: .85rem 1rem;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .55rem;
  animation: authFlash .35s ease;
}
.auth-flash--success {
  background: rgba(22, 163, 74, .12);
  border: 1px solid rgba(22, 163, 74, .35);
  color: #4ade80;
}
.auth-flash--error {
  background: rgba(220, 38, 38, .1);
  border: 1px solid rgba(220, 38, 38, .3);
  color: #f87171;
}
@keyframes authFlash {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------------- RETOUR AU SITE ----------------------------- */
.auth-back {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 500;
  color: #8a95a5;
  transition: all var(--se-transition);
}
.auth-back:hover {
  color: var(--se-cyan);
  transform: translateX(-3px);
}
.auth-back i { font-size: .85rem; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 575.98px) {
  .auth-shell { padding: 4rem 1rem 2rem; }
  .auth-box {
    padding: 2rem 1.3rem 1.6rem;
    border-radius: 16px;
  }
  .auth-box__logo { width: 110px; margin-bottom: 1.4rem; }
  .auth-box__title { font-size: 1.3rem; }
  .auth-row { grid-template-columns: 1fr; gap: .9rem; }
  .auth-back { top: 1rem; left: 1rem; }
}

@media (max-width: 400px) {
  .auth-box { padding: 1.75rem 1.1rem 1.4rem; }
}