/* Pages de connexion et d'inscription - meme style que la vitrine (css/landing.css).
   Tout est sous body.auth pour ne jamais toucher au reste du site. */

@font-face { font-family:"Press Start 2P"; font-weight:400; font-display:swap;
  src:url("/assets/fonts/landing/press-start-2p-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-weight:600; font-display:swap;
  src:url("/assets/fonts/landing/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-weight:800; font-display:swap;
  src:url("/assets/fonts/landing/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family:"Nunito"; font-weight:900; font-display:swap;
  src:url("/assets/fonts/landing/nunito-latin-900-normal.woff2") format("woff2"); }

:root {
  --au-ink:#2b2140; --au-yellow:#ffcc33; --au-violet:#7a3cff; --au-green:#3bd16f; --au-green-dark:#1f9e4d;
  --au-red:#d62839; --au-cream:#fff3d6; --au-sky1:#7fc8ff; --au-sky2:#bfe6ff; --au-blue:#d9f1ff; --au-pink:#ff8fc7;
}
body.auth { margin:0; min-height:100vh; position:relative; overflow-x:hidden; color:var(--au-ink);
  background:linear-gradient(var(--au-sky1), var(--au-sky2) 60%, var(--au-cream));
  font-family:"Nunito", system-ui, sans-serif; font-weight:600; }
body.auth * { box-sizing:border-box; }
body.auth a { color:var(--au-violet); font-weight:800; }
.auth .pixfont { font-family:"Press Start 2P", "Courier New", monospace; }
.auth .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* --- barre du haut --- */
.auth-nav { position:relative; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 18px; background:#fff; border-bottom:3px solid var(--au-ink); }
.auth-nav img { height:34px; width:auto; display:block; image-rendering:pixelated; }
body.auth .auth-back { color:var(--au-ink); text-decoration:none; font-size:14px; }

/* --- decor : ciel, nuages, sol, scenes --- */
.auth-sky { position:fixed; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.auth-cloud { position:absolute; left:-260px; height:auto; opacity:.95; animation:au-drift linear infinite; }
.auth-cloud.c1 { top:80px;  width:220px; animation-duration:46s; animation-delay:-6s; }
.auth-cloud.c2 { top:190px; width:150px; animation-duration:62s; animation-delay:-30s; opacity:.85; }
.auth-cloud.c3 { top:130px; width:180px; animation-duration:54s; animation-delay:-44s; }
@keyframes au-drift { from { left:-260px; } to { left:100%; } }
.auth-floor { position:absolute; left:-10%; right:-10%; bottom:-40px; height:230px; border-top:3px solid var(--au-ink);
  background:repeating-linear-gradient(30deg, rgba(43,33,64,.18) 0 2px, transparent 2px 34px),
             repeating-linear-gradient(-30deg, rgba(43,33,64,.18) 0 2px, transparent 2px 34px),
             linear-gradient(#9be36b, #6cc24a); }
.auth-scene { position:absolute; bottom:40px; width:230px; height:auto; image-rendering:pixelated; animation:au-bob 4s ease-in-out infinite; }
.auth-scene.l { left:2%; }
.auth-scene.r { right:2%; animation-delay:-2s; }
@keyframes au-bob { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }

/* --- fenetre --- */
.auth-main { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; padding:24px 16px 120px; }
.auth-logo img { display:block; width:240px; max-width:70vw; height:auto; filter:drop-shadow(4px 4px 0 rgba(43,33,64,.35)); }
.auth-win { width:100%; max-width:380px; margin-top:10px; background:#fff; border:3px solid var(--au-ink); box-shadow:6px 6px 0 var(--au-ink); animation:au-pop .35s ease-out both; }
@keyframes au-pop { from { transform:translateY(16px) scale(.97); opacity:0; } to { transform:none; opacity:1; } }
.auth-bar { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:9px 12px; background:var(--au-yellow); border-bottom:3px solid var(--au-ink); }
.auth-bar h1 { margin:0; font-size:11px; font-weight:400; line-height:1.4; }
body.auth .auth-x { color:var(--au-ink); text-decoration:none; font-weight:900; font-size:16px; }
.auth-body { padding:16px; }

/* --- champs --- */
.auth-form fieldset { border:0; margin:0; padding:0; min-width:0; }
.auth-form label { display:block; margin:12px 0 4px; font-weight:900; font-size:14px; }
.auth-form label:first-of-type { margin-top:0; }
.auth-form input { width:100%; padding:10px 12px; font:inherit; font-weight:700; color:var(--au-ink); background:#fffaf0; border:3px solid var(--au-ink); border-radius:0; outline:none; }
.auth-form input:focus { box-shadow:0 0 0 3px var(--au-yellow); }
.auth-form input.bad { border-color:var(--au-red); }
.auth-form input.good { border-color:var(--au-green-dark); }
.auth-pass { position:relative; }
.auth-pass input { padding-right:48px; }
.auth-eye { position:absolute; top:3px; right:3px; bottom:3px; width:42px; border:0; background:transparent; cursor:pointer; font-size:18px; }
.auth-eye[aria-pressed="true"] { opacity:.55; }
.auth-err { margin:4px 0 0; font-size:13px; font-weight:800; color:var(--au-red); }
.auth-err:empty { display:none; }
.auth-err.ok { color:var(--au-green-dark); }
.auth-help { margin:4px 0 0; font-size:12px; font-weight:700; color:#6b6080; }
.auth-help.center { text-align:center; }
.auth-links { margin:12px 0 0; text-align:center; font-size:14px; }
.auth-msg { margin:0 0 12px; padding:10px 12px; border:3px solid var(--au-ink); font-weight:800; font-size:14px; }
.auth-msg.err { background:#ffe1e1; }
.auth-msg.ok { background:#d9ffe5; }

/* --- boutons pixel (s'enfoncent au clic, comme sur la vitrine) --- */
.auth-btn { display:block; width:100%; margin-top:16px; padding:12px; font:inherit; font-weight:900; font-size:16px; color:var(--au-ink); background:#fff; border:3px solid var(--au-ink); box-shadow:0 5px 0 var(--au-ink); cursor:pointer; transition:transform .08s, box-shadow .08s, filter .15s; }
.auth-btn:hover { filter:brightness(1.06); transform:translateY(-1px); box-shadow:0 6px 0 var(--au-ink); }
a.auth-btn { text-align:center; text-decoration:none; color:var(--au-ink); }
.auth-maint { margin:0 0 12px; font-weight:900; font-size:18px; text-align:center; }
.auth-btn:active { transform:translateY(5px); box-shadow:0 0 0 var(--au-ink); }
.auth-btn:disabled { cursor:wait; filter:grayscale(.4); transform:none; box-shadow:0 5px 0 var(--au-ink); }
.auth-btn.g { background:var(--au-green); }
.auth-row { display:flex; gap:10px; }
.auth-row .auth-btn { flex:1; }
body.auth button:focus-visible, body.auth a:focus-visible { outline:3px solid var(--au-violet); outline-offset:2px; }

/* --- inscription : etapes, sexe, looks --- */
.auth-steps { display:flex; gap:6px; margin-bottom:14px; }
.auth-steps i { flex:1; height:10px; border:2px solid var(--au-ink); background:#fff; }
.auth-steps i.on { background:var(--au-green); }
.auth-tabs { display:flex; gap:8px; margin-bottom:12px; }
.auth-tab { flex:1; padding:9px; font:inherit; font-weight:900; font-size:15px; color:var(--au-ink); background:#fff; border:3px solid var(--au-ink); cursor:pointer; }
.auth-tab.f[aria-pressed="true"] { background:var(--au-pink); }
.auth-tab.m[aria-pressed="true"] { background:var(--au-sky1); }
.auth-looks { display:flex; gap:10px; justify-content:center; }
.auth-look { display:flex; align-items:flex-end; justify-content:center; width:96px; height:130px; padding:0; overflow:hidden; background:var(--au-blue); border:3px solid var(--au-ink); cursor:pointer; }
.auth-look[hidden] { display:none; }
.auth-look img { display:block; image-rendering:pixelated; margin-bottom:-4px; }
.auth-look:hover img { animation:au-hop .4s ease-out; }
.auth-look[aria-pressed="true"] { background:#ffe58a; box-shadow:0 0 0 3px var(--au-yellow); }
@keyframes au-hop { 50% { transform:translateY(-8px); } }

/* --- telephone --- */
@media (max-width:600px) {
  .auth-nav { padding:8px 16px; }
  .auth-nav img { height:28px; }
  body.auth .auth-back { font-size:13px; }
  .auth-cloud.c2, .auth-cloud.c3, .auth-scene.r { display:none; }
  .auth-cloud { width:110px; }
  .auth-scene.l { width:150px; left:-20px; bottom:20px; }
  .auth-main { padding:18px 16px 150px; }
  .auth-body { padding:14px; }
  .auth-looks { gap:8px; }
  .auth-look { width:30%; height:112px; }
}

/* --- animations reduites a la demande du systeme --- */
@media (prefers-reduced-motion: reduce) {
  .auth-cloud { animation:none; }
  .auth-cloud.c1 { left:6%; } .auth-cloud.c2 { left:70%; } .auth-cloud.c3 { left:38%; }
  .auth-scene, .auth-win, .auth-look:hover img { animation:none; }
  .auth-btn { transition:none; }
}

/* Icones dessinees (a la place des emoji) */
.myr-svg { display:inline-block; width:1.1em; height:1.1em; vertical-align:-.18em; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.myr-svg .f { fill:currentColor; }
