/* tpl_gaming — com_users pages (login, logout, registration, reset, remind).
   Loaded only by html/com_users overrides; template.css forms section stays the fallback. */
.gx-auth {
  --gx-focus: var(--accent);
  --gx-field-line: color-mix(in srgb, var(--text-muted) 70%, var(--surface)); /* ≥ 3:1 against the field/card */
  max-width: 1000px; margin-inline: auto;
  padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0;
}
[data-theme="dark"] .gx-auth { --gx-focus: color-mix(in srgb, var(--accent) 50%, #fff); } /* accent alone is < 3:1 on dark surfaces */
.gx-auth--single { max-width: 540px; }
.gx-auth :focus-visible { outline: 3px solid var(--gx-focus); outline-offset: 2px; }

/* ---------- card: form + pitch ---------- */
.gx-auth__card {
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 6px 0 var(--accent), var(--shadow); overflow: hidden;
}
@media (min-width: 860px) {
  .gx-auth:not(.gx-auth--single) .gx-auth__card { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .gx-auth__pitch { order: -1; }
}
.gx-auth__main { padding: clamp(1.25rem, 5vw, 2.75rem); min-width: 0; }
.gx-auth__title { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: .35rem; }
.gx-auth__lead { margin: 0 0 1.5rem; color: var(--text-muted); font-size: 1.05rem; }

.gx-auth__pitch {
  display: flex; flex-direction: column; justify-content: center; gap: 1.1rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  color: var(--on-accent);
  background:
    radial-gradient(circle at 2px 2px, color-mix(in srgb, var(--on-accent) 16%, transparent) 1.5px, transparent 0) 0 0 / 20px 20px,
    var(--accent);
}
.gx-auth__pitch-title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.1rem); color: inherit; }
.gx-auth__art {
  width: min(260px, 75%); aspect-ratio: 3 / 2; margin-inline: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 160'%3E%3Cg fill='none' stroke='%2317142b' stroke-width='4' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath fill='%23fff' d='M96 50a12 12 0 0 1 2-24 17 17 0 0 1 32-4 13 13 0 0 1 10 28z'/%3E%3Cpath d='M119 30v13m-6-6 6 6 6-6'/%3E%3Cpath fill='%23ffc53d' d='M60 72h120a30 30 0 0 1 30 30v8a26 26 0 0 1-47 15l-7-9H84l-7 9a26 26 0 0 1-47-15v-8a30 30 0 0 1 30-30z'/%3E%3Cpath fill='%2317142b' stroke='none' d='M62 88h10v10h10v10H72v10H62v-10H52V98h10z'/%3E%3Ccircle cx='170' cy='94' r='7' fill='%23ff4d8d'/%3E%3Ccircle cx='186' cy='108' r='7' fill='%23fff'/%3E%3Cpath d='M106 96h8m12 0h8'/%3E%3Cpath fill='%23fff' stroke-width='3' d='M34 24l5 10 10 5-10 5-5 10-5-10-10-5 10-5z'/%3E%3Cpath fill='%23ffc53d' stroke-width='3' d='M206 26l4 8 8 4-8 4-4 8-4-8-8-4 8-4z'/%3E%3Crect x='190' y='62' width='12' height='12' rx='3' fill='%23ff4d8d' stroke-width='3' transform='rotate%2812 196 68%29'/%3E%3Crect x='20' y='70' width='10' height='10' rx='3' fill='%23fff' stroke-width='3' transform='rotate%28-14 25 75%29'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 6px 0 rgb(0 0 0 / .18));
  animation: gx-float 4s ease-in-out infinite;
}
.gx-auth__art--small { width: 132px; margin: 0 0 1rem; filter: none; }
@keyframes gx-float { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.gx-auth__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; font-weight: 600; font-size: 1.05rem; }
.gx-auth__perks li { display: flex; gap: .7rem; align-items: flex-start; }
.gx-auth__perks li::before {
  content: ""; flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6.5' fill='none' stroke='%2317142b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: 0 2px 0 rgb(0 0 0 / .25);
}
@media (max-width: 859px) {
  .gx-auth__art { width: 170px; }
}

/* ---------- fields ---------- */
.gx-auth fieldset { margin: 0; }
.gx-auth .control-group { margin-bottom: 1.1rem; }
.gx-auth .control-label label, .gx-auth .form-label { font-weight: 700; margin-bottom: .35rem; }
.gx-auth .form-control {
  min-height: 48px; font-size: 1rem; /* ≥ 16px: no iOS zoom */
  border-color: var(--gx-field-line); background: var(--bg);
}
.gx-auth .form-control:focus {
  border-color: var(--gx-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gx-focus) 35%, transparent);
}
.gx-auth .text-muted { color: var(--text-muted); }
.gx-auth .small { font-size: .9rem; display: block; margin-bottom: .35rem; }
.gx-auth meter { display: block; width: 100%; height: 10px; margin-top: .5rem; }
.gx-auth .field-spacer label { font-weight: 400; color: var(--text-muted); }
.gx-auth .red, .gx-auth .star { color: var(--danger); }

/* password + show/hide toggle (core passwordview.js swaps .icon-eye / .icon-eye-slash; no icon font here) */
.gx-auth .input-group { gap: 0; flex-wrap: nowrap; }
.gx-auth .input-group .form-control { flex: 1 1 auto; min-width: 0; border-start-end-radius: 0; border-end-end-radius: 0; }
.gx-auth .input-group .input-password-toggle {
  width: 52px; min-height: 48px; padding: 0; margin: 0;
  border: 2px solid var(--gx-field-line); border-inline-start: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg); color: var(--text); box-shadow: none; transform: none;
}
.gx-auth .input-group .input-password-toggle:hover { color: var(--link); }
.gx-auth .input-password-toggle .icon-eye, .gx-auth .input-password-toggle .icon-eye-slash {
  display: block; width: 22px; height: 22px; margin: auto; background: currentColor;
  -webkit-mask: var(--gx-eye) center / contain no-repeat; mask: var(--gx-eye) center / contain no-repeat;
}
.gx-auth .icon-eye { --gx-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.gx-auth .icon-eye-slash { --gx-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); }

/* errors (core validate.js adds .invalid + .form-control-feedback) */
.gx-auth label.invalid { color: var(--danger); }
.gx-auth .form-control.invalid { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--bg)); }
.gx-auth .input-group:has(.invalid) .input-password-toggle { border-color: var(--danger); }
.gx-auth .form-control-feedback { display: block; margin-top: .35rem; color: var(--danger); font-weight: 600; font-size: .95rem; }

/* remember me + forgot password */
.gx-auth__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 1rem; margin: -.4rem 0 1rem; }
.gx-auth .form-check { min-height: 44px; display: flex; align-items: center; gap: .6rem; }
.gx-auth .form-check-input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.gx-auth .form-check-label { font-weight: 500; cursor: pointer; }
.gx-auth__forgot, .gx-auth__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------- actions ---------- */
.gx-auth .gx-auth__submit { width: 100%; min-height: 54px; font-size: 1.3rem; } /* beats template.css `button.btn` */
.gx-auth__actions { display: grid; gap: .75rem; }
.gx-auth__actions .btn { width: 100%; min-height: 48px; }
.gx-auth__or {
  display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0;
  color: var(--text-muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em;
}
.gx-auth__or::before, .gx-auth__or::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.gx-auth__extra + .gx-auth__extra { margin-top: .5rem; }
.gx-auth__extra .btn {
  width: 100%; min-height: 48px; padding: .55rem 1.2rem; gap: .6rem;
  font: 700 1rem/1.2 var(--font-body); border-color: var(--gx-field-line);
}
.gx-auth__extra .btn svg, .gx-auth__extra .btn img { width: 1.4em; height: 1.4em; fill: currentColor; flex: 0 0 auto; }
.gx-auth__links { margin: .75rem 0 0; text-align: center; }

/* "Pas encore de compte ? Crée-en un" / "Déjà un compte ?" */
.gx-auth__switch {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem;
  margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--sun) 24%, var(--surface)); color: var(--text);
}
.gx-auth__switch p { margin: 0; font: 1.25rem/1.2 var(--font-display); }
.gx-auth__switch .btn {
  flex: 1 0 auto; max-width: 100%;
  background: var(--surface); color: var(--text); border-color: var(--text);
  box-shadow: 0 3px 0 var(--text);
}
.gx-auth__switch .btn:hover { transform: translateY(-1px); }
.gx-auth__switch .btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--text); }
@media (min-width: 480px) { .gx-auth__switch .btn { flex: 0 0 auto; } }

.gx-auth .login-description, .gx-auth .logout-description { margin-bottom: 1.25rem; }
.gx-auth .login-image, .gx-auth .logout-image { border-radius: var(--radius); }
