/* =====================================================
   CONNEXION / INSCRIPTION
   Héros rouge rayé coupé en biais à gauche, formulaire à droite.
   Mobile : héros en haut (330px), panneau qui le chevauche dessous.
   ===================================================== */
.auth-page main.auth { max-width: none; margin: 0; padding: 0; }
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.m-only { display: none; }

/* ---------- Héros ---------- */
.auth-hero { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding: 48px 56px; overflow: hidden;
  background-color: var(--red); color: #fff; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.auth-slogan { margin-top: 72px; font-weight: 900; font-size: 58px; line-height: 1.02; text-shadow: 0 4px 0 var(--border); }
.auth-slogan span { color: var(--accent); }
.auth-tagline { margin-top: 20px; font-weight: 700; font-size: 18px; line-height: 1.45; max-width: 420px; }

/* Scène des combattants : dessinée à 600×245 puis mise à l'échelle selon la place */
.auth-stage { position: absolute; left: 56px; bottom: 40px; width: 600px; height: 245px; transform-origin: 0 100%; pointer-events: none; }
.plat { position: absolute; border-radius: 50%; background: radial-gradient(ellipse at 50% 40%, var(--plat1) 0 30%, var(--plat2) 31% 62%, var(--plat3) 63%);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .18), inset 0 -6px 0 rgba(0, 0, 0, .12); }
.plat.p1 { left: 0; bottom: 0; width: 210px; height: 56px; }
.plat.p2 { left: 190px; bottom: 30px; width: 230px; height: 60px; }
.plat.p3 { left: 400px; bottom: 0; width: 200px; height: 54px; }
.fighter { position: absolute; animation: fighterIn .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.fighter.f1 { left: 48px; bottom: 24px; width: 110px; height: 170px; animation-delay: .05s; }
.fighter.f2 { left: 245px; bottom: 58px; width: 120px; height: 185px; }
.fighter.f3 { left: 448px; bottom: 24px; width: 104px; height: 160px; animation-delay: .1s; }
.fighter .aura { position: absolute; inset: -6% -14% 0; border-radius: 50% 50% 40% 40%; background: radial-gradient(ellipse at 50% 60%, var(--tc), transparent 65%); opacity: .55; }
.fighter .sil { position: absolute; inset: 0; color: rgba(28, 22, 46, .78); }
:root[data-theme=dark] .fighter .sil { color: rgba(6, 8, 22, .85); }
/* Vraie image du perso : posée sur la plateforme, un peu plus large que la silhouette */
.fighter img { position: absolute; left: 50%; bottom: 0; width: 150%; height: 115%; transform: translateX(-50%); object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .28)); }
@keyframes fighterIn { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Côté formulaire ---------- */
.auth-side { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-side .theme-btn { position: absolute; top: 24px; right: 28px; z-index: 3; }
.auth-card { width: 420px; max-width: 100%; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; }
#auth-form { display: flex; flex-direction: column; gap: 18px; }
#auth-form.shake { animation: formShake .4s; }
@keyframes formShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.auth-gift { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent); color: var(--on-accent);
  border: 3px solid var(--border); font-weight: 800; font-size: 14px; line-height: 1.3; }
.auth-gift .gem { border: 2px solid var(--border); }
.auth-gift .gem .ic { width: 16px; height: 16px; color: #1aa6e8; }
.auth-gift b { font-weight: 900; }

.field-hint { display: block; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.35; }
.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.pw-toggle:hover { color: var(--text); background: var(--line); }
.pw-toggle.on { color: var(--red); }
.pw-toggle .ic { width: 22px; height: 22px; }
.pw-meter { height: 8px; border-radius: 999px; background: var(--panel-2); border: 2px solid var(--border); margin: 2px 0 6px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }

.auth-error { min-height: 20px; margin: -6px 0 -10px; color: var(--red); font-weight: 800; font-size: 14px; }
.auth-error:empty { min-height: 0; margin: 0 0 -18px; }
.auth-submit { width: 100%; margin-top: 6px; }
.auth-submit.loading { opacity: .7; cursor: wait; }
.auth-hint { text-align: center; font-weight: 700; font-size: 13px; }

/* Déjà connecté */
.auth-logged { padding: 14px 16px; border-radius: 14px; background: var(--panel-2); border: 3px solid var(--border); }
.auth-logged p { margin: 0 0 10px; font-weight: 700; }
.auth-logged-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.auth-logged .btn-sm { text-decoration: none; }
.auth-logged .btn:not(.btn-primary) { background: var(--panel-3); color: var(--text); }

/* Écrans de bureau plus étroits ou plus bas : la scène rétrécit */
@media (max-width: 1100px) and (min-width: 721px) {
  .auth-hero { padding: 40px 36px; }
  .auth-slogan { font-size: 46px; margin-top: 56px; }
  .auth-stage { left: 36px; transform: scale(.68); }
  .auth-side { padding: 32px 24px; }
}
@media (max-height: 780px) and (min-width: 721px) {
  .auth-slogan { margin-top: 40px; font-size: 50px; }
  .auth-stage { bottom: 24px; transform: scale(.72); }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .auth { display: block; padding-bottom: 24px; }
  .d-only { display: none; }
  .m-only { display: inline; }
  .auth-hero { height: 330px; min-height: 0; padding: 20px 20px 0; clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
  .auth-hero .logo-halo { width: 28px; height: 28px; border-width: 4px; }
  .auth-hero .logo-halo::after { height: 36px; width: 6px; }
  .auth-hero .logo-word { font-size: 20px; }
  .auth-slogan { margin-top: 22px; font-size: 36px; line-height: 1.05; text-shadow: 0 3px 0 var(--border); padding-right: 48px; }
  .auth-tagline { display: none; }
  .auth-stage { left: 50%; bottom: 34px; transform: translateX(-50%) scale(.57); transform-origin: 50% 100%; }
  .auth-side { display: block; padding: 0; position: static; }
  .auth-side .theme-btn { top: 14px; right: 20px; width: 40px; height: 40px; }
  .auth-card { width: auto; margin: -14px 16px 0; padding: 20px; gap: 14px; position: relative; z-index: 2; }
  #auth-form { gap: 14px; }
  .auth-error:empty { margin-bottom: -14px; }
  .auth-gift { gap: 10px; padding: 10px 12px; font-size: 13px; }
  .auth-gift .d-only { display: none; }
  .auth-submit.btn-lg { font-size: 20px; }
  .auth-hint { display: none; }
}
@media (max-width: 360px) {
  .auth-slogan { font-size: 32px; }
  .auth-stage { transform: translateX(-50%) scale(.5); }
}
