@charset "UTF-8";
/* ==========================================================================
   Connexion (connexion.php) et choix du personnage (oauth/choose-character.php).
   Deux colonnes sur ordinateur : panneau de marque sombre (carte de Los
   Santos en filigrane + services Eyefind) et carte d'action ; sur téléphone,
   le panneau devient un bandeau compact au-dessus de la carte.
   Couleurs des services : --cl-light / --cl-dark posées en ligne par
   changelog_service() (includes/changelog.php).
   ========================================================================== */

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* --- Panneau de marque ---------------------------------------------------- */
.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px clamp(32px, 5vw, 72px);
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(26, 115, 232, 0.35), transparent 60%),
    radial-gradient(70% 60% at 100% 100%, rgba(225, 48, 108, 0.28), transparent 60%),
    radial-gradient(60% 50% at 90% 10%, rgba(251, 188, 5, 0.18), transparent 60%),
    #0e1014;
  color: #f1f3f4;
}
/* Carte de Los Santos en filigrane (ordinateur uniquement : l'image n'est
   jamais téléchargée sur téléphone, la règle étant dans le media query). */
@media (min-width: 901px) {
  .auth-hero::before {
    content: "";
    position: absolute;
    inset: -10%;
    background: url("../../uploads/lsmaap.png") center / cover no-repeat;
    opacity: 0.13;
    filter: grayscale(0.4);
    transform: rotate(-4deg);
    pointer-events: none;
  }
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 16, 20, 0) 40%, rgba(14, 16, 20, 0.75));
  pointer-events: none;
}
.auth-hero > * {
  position: relative;
  z-index: 1;
}
.auth-hero-logo {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 40px;
}
.auth-hero-logo img {
  height: 58px;
  width: auto;
}
.auth-hero-title {
  max-width: 520px;
  margin: 0 0 16px;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}
.auth-hero-title span {
  background: linear-gradient(90deg, #8ab4f8, #f28bb5 55%, #fdd663);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-hero-lead {
  max-width: 460px;
  margin: 0 0 36px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(241, 243, 244, 0.72);
}
.auth-apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.auth-app {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 600;
  color: #e8eaed;
}
.auth-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(var(--cl-dark), 0.18);
  color: rgb(var(--cl-dark));
}
.auth-app-icon svg {
  width: 17px;
  height: 17px;
}

/* --- Colonne d'action ------------------------------------------------------ */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 48px 24px;
}
.auth-card {
  width: min(420px, 100%);
}
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--link-tint);
  color: var(--link);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-card h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.auth-sub {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Alertes */
.auth-alert {
  display: flex;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 14px;
  line-height: 1.5;
}
.auth-alert svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.auth-alert strong {
  display: block;
  margin-bottom: 2px;
}

/* Bouton GTA World : bouton de marque, sombre dans les deux thèmes */
.auth-gtaw-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px 12px 14px;
  border: 1px solid rgba(253, 214, 99, 0.45);
  border-radius: 16px;
  background: linear-gradient(135deg, #1c1f26, #111318);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  transition: transform 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.auth-gtaw-btn:hover {
  border-color: #fdd663;
  box-shadow: 0 14px 30px -14px rgba(253, 214, 99, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}
.auth-gtaw-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}
.auth-gtaw-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 64px;
  height: 40px;
  padding: 4px 6px;
  box-sizing: border-box;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.auth-gtaw-logo img {
  max-width: 100%;
  max-height: 100%;
}
.auth-gtaw-label {
  flex: 1;
  min-width: 0;
}
.auth-gtaw-label small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}
.auth-gtaw-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #fdd663;
  transition: transform 0.15s var(--ease);
}
.auth-gtaw-btn:hover .auth-gtaw-arrow {
  transform: translateX(3px);
}

/* Étapes */
.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
  counter-reset: auth-step;
}
.auth-steps-title {
  margin: 0 0 -2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.auth-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}
.auth-step::before {
  counter-increment: auth-step;
  content: counter(auth-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.auth-step small {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-safe {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-safe svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--success);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-back:hover {
  color: var(--text);
  text-decoration: none;
}

.auth-footnote {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.auth-footnote a {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- Choix du personnage ---------------------------------------------------- */
.auth-characters {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}
.auth-character {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), transform 0.15s var(--ease);
}
.auth-character:hover {
  border-color: var(--border-hover);
}
.auth-character input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.auth-character-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--auth-hue) 70% 58%), hsl(calc(var(--auth-hue) + 40) 75% 45%));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px -6px hsl(var(--auth-hue) 70% 40%);
}
.auth-character-text {
  flex: 1;
  min-width: 0;
}
.auth-character-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
}
.auth-character-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}
.auth-character-check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--border-hover);
  border-radius: 50%;
  color: transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.auth-character-check svg {
  width: 14px;
  height: 14px;
}
.auth-character:has(input:checked) {
  border-color: var(--link);
  background: var(--link-tint);
}
.auth-character:has(input:checked) .auth-character-check {
  border-color: var(--link);
  background: var(--link);
  color: var(--bg);
}
.auth-character:has(input:focus-visible) {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.auth-character-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
/* Personnage déjà joué (changement depuis le menu) : visible, pas choisissable. */
.auth-character-current {
  cursor: default;
  opacity: 0.7;
}
.auth-character-current:hover {
  border-color: var(--border);
}
.auth-character-tag {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--link-tint);
  color: var(--link);
  font-size: 12px;
  font-weight: 600;
}
/* Héritage des données d'avant les espaces par personnage (une seule fois). */
.auth-explain {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--link-tint);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
}
.auth-explain strong {
  font-weight: 600;
}
.auth-back {
  display: block;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: var(--link);
  color: var(--bg);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.auth-submit strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

/* Texte réservé aux lecteurs d'écran. */
.auth-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Tablette / téléphone ---------------------------------------------------- */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    min-height: 100vh;
  }
  .auth-hero {
    padding: 26px 20px 24px;
    text-align: center;
    align-items: center;
  }
  .auth-hero-logo {
    align-self: center;
    margin-bottom: 14px;
  }
  .auth-hero-logo img {
    height: 44px;
  }
  .auth-hero-title {
    margin-bottom: 16px;
    font-size: 24px;
  }
  .auth-hero-lead {
    display: none;
  }
  .auth-apps {
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  .auth-app {
    padding: 0;
    border: 0;
    background: none;
    backdrop-filter: none;
  }
  .auth-app-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .auth-app-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
  .auth-panel {
    justify-content: flex-start;
    padding: 28px 20px 32px;
  }
  .auth-card h1 {
    font-size: 25px;
  }
  .auth-sub {
    margin-bottom: 22px;
    font-size: 14.5px;
  }
  .auth-steps {
    margin-top: 24px;
    padding-top: 18px;
  }
}
/* Téléphone : "Continuer avec GTA World" tient sur une ligne. */
@media (max-width: 440px) {
  .auth-gtaw-btn {
    gap: 12px;
    padding: 12px 14px 12px 12px;
    font-size: 15px;
  }
  .auth-gtaw-logo {
    width: 52px;
    height: 36px;
  }
  .auth-gtaw-label {
    white-space: nowrap;
  }
  .auth-gtaw-label small {
    white-space: normal;
  }
}
@media (max-width: 360px) {
  .auth-app-icon {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-gtaw-btn,
  .auth-gtaw-arrow,
  .auth-character,
  .auth-submit {
    transition: none;
  }
  .auth-gtaw-btn:hover,
  .auth-submit:hover {
    transform: none;
  }
}
