/* Pages de connexion et d'inscription : thème sombre Bio.ax, formulaire à gauche, visuel à droite */
:root {
    --bg: #050508;
    --text: #f4f4f8;
    --muted: #9a9aae;
    --line: rgba(255, 255, 255, .1);
    --field: #101018;
    --ink: #0d0d16;          /* texte foncé sur fond blanc (bouton lecture du visuel) */
    --brand: #6366f1;
    --brand-2: #8b5cf6;
    --brand-soft: #a5b4fc;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Mise en page : formulaire à gauche, visuel à droite ── */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; min-height: 100dvh; }
.auth-side {
    display: flex; flex-direction: column; padding: 2rem 2.5rem;
    background:
        radial-gradient(70% 55% at 0% 0%, rgba(99, 102, 241, .14), transparent 70%),
        radial-gradient(60% 50% at 100% 100%, rgba(168, 85, 247, .08), transparent 70%),
        var(--bg);
}
.auth-logo {
    display: inline-flex; align-items: center; gap: .6rem; align-self: flex-start;
    color: var(--text); text-decoration: none;
    font: 700 1.35rem/1 'Space Grotesk', sans-serif; letter-spacing: -.02em;
}
.auth-logo img { width: 34px; height: 34px; border-radius: 10px; display: block; }
.auth-logo .accent { color: #00D2FF; } /* même bleu que le logo de l'app */

.auth-box { width: 100%; max-width: 25rem; margin: auto; padding: 2.5rem 0; }
.auth-title {
    margin: 0 0 .55rem; text-align: center;
    font: 700 clamp(1.9rem, 3vw, 2.45rem)/1.1 'Space Grotesk', sans-serif; letter-spacing: -.035em;
}
.auth-sub { margin: 0 0 2rem; text-align: center; color: var(--muted); font-size: 1rem; }

/* ── Boutons ── */
.auth-btn {
    display: flex; align-items: center; justify-content: center; gap: .65rem;
    width: 100%; height: 3.5rem; border-radius: 999px; cursor: pointer;
    font: 600 1rem/1 'Inter', sans-serif; text-decoration: none;
    transition: background .2s, border-color .2s, box-shadow .2s, transform .2s, color .2s;
}
.auth-btn-google { background: rgba(255, 255, 255, .04); border: 1.5px solid var(--line); color: var(--text); }
.auth-btn-google:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
.auth-btn-google svg { width: 20px; height: 20px; }
.auth-btn-primary {
    margin-top: .35rem; border: 0; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 24px -12px rgba(99, 102, 241, .8);
}
.auth-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 28px -12px rgba(99, 102, 241, .9); }
/* Gris tant que les deux champs ne sont pas remplis */
.auth-form:invalid .auth-btn-primary { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .35); box-shadow: none; transform: none; }
.auth-btn:focus-visible, .auth-eye:focus-visible, .auth-link:focus-visible { outline: 3px solid rgba(99, 102, 241, .45); outline-offset: 2px; }

.auth-or {
    display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0;
    color: #6f6f85; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
}
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ── Champs à étiquette flottante ── */
.auth-form { display: flex; flex-direction: column; gap: .85rem; }
.auth-field { position: relative; }
.auth-field input {
    width: 100%; height: 3.6rem; padding: 1.35rem 1rem .4rem;
    border: 1.5px solid var(--line); border-radius: 14px; background: var(--field);
    font: 500 1rem 'Inter', sans-serif; color: var(--text); outline: none;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth-field input:hover { border-color: rgba(255, 255, 255, .2); }
.auth-field input:focus { border-color: var(--brand); background: #14141e; box-shadow: 0 0 0 4px rgba(99, 102, 241, .22); }
.auth-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--field) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); }
.auth-field label {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
    color: #7c7c92; font-size: 1rem; pointer-events: none;
    transition: top .15s, font-size .15s, color .15s;
}
.auth-field input:focus + label,
.auth-field input:not(:placeholder-shown) + label,
.auth-field input:-webkit-autofill + label { top: 1.05rem; font-size: .72rem; font-weight: 600; color: var(--muted); }
.auth-field-pass input { padding-right: 3.4rem; }
.auth-eye {
    position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
    width: 2.6rem; height: 2.6rem; border: 0; border-radius: 50%; background: none;
    color: #7c7c92; cursor: pointer; font-size: 1rem;
}
.auth-eye:hover { background: rgba(255, 255, 255, .08); color: var(--text); }

.auth-link { color: var(--brand-soft); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-forgot { align-self: flex-end; font-size: .87rem; font-weight: 500; margin: -.1rem .2rem .15rem; }
.auth-switch { margin: 1.75rem 0 0; text-align: center; color: var(--muted); font-size: .93rem; }

.auth-alert {
    display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; padding: .85rem 1rem;
    border-radius: 14px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .28); color: #fca5a5; font-size: .9rem; line-height: 1.45;
}
.auth-alert i { margin-top: .15rem; }

/* ── Visuel de droite : collage d'une page Bio.ax ── */
.auth-art {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, .06);
    background:
        radial-gradient(55% 45% at 70% 22%, rgba(99, 102, 241, .38), transparent 70%),
        radial-gradient(50% 45% at 22% 85%, rgba(168, 85, 247, .26), transparent 70%),
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 44px 44px,
        #07070c;
}
.art-stage { position: relative; width: min(560px, 80%, 76vh); aspect-ratio: 5 / 6; container-type: inline-size; }
.art-stage > * { position: absolute; }
.art-float { animation: artFloat 7s ease-in-out infinite; }
.art-float.d1 { animation-delay: -1.5s; }
.art-float.d2 { animation-delay: -3s; }
.art-float.d3 { animation-delay: -4.5s; }
@keyframes artFloat { 50% { translate: 0 -1.8cqw; } }

.art-blob {
    left: 15%; top: 3%; width: 63%; height: 91%; border-radius: 50cqw 50cqw 6cqw 6cqw; transform: rotate(-3deg);
    background: linear-gradient(160deg, #6366f1 0%, #8b5cf6 55%, #a855f7 100%);
    box-shadow: 0 0 12cqw rgba(139, 92, 246, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.art-spark { width: 6cqw; height: 6cqw; color: #fff; }
.art-spark.s1 { right: 20%; top: 30%; }
.art-spark.s2 { left: 6%; top: 41%; width: 4cqw; height: 4cqw; color: var(--brand-soft); }
/* Cartes « verre » du thème Bio.ax */
.art-glass {
    background: rgba(15, 15, 24, .82); color: var(--text);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* Téléphone : page de Milo Vega */
.art-phone {
    left: 28%; top: 10%; width: 44%; aspect-ratio: 9 / 18.5; padding: 1.2cqw;
    background: #05070b; border-radius: 6.5cqw; transform: rotate(2deg);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 5cqw 9cqw -3cqw rgba(0, 0, 0, .75);
}
.art-screen {
    position: relative; height: 100%; overflow: hidden; border-radius: 5.4cqw;
    background: #05070b; color: #fff; display: flex; flex-direction: column; align-items: center;
}
.art-hero { position: relative; width: 100%; height: 47%; }
.art-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, #05070b 98%); }
.art-name { position: relative; margin-top: -3.5cqw; display: flex; align-items: center; gap: 1cqw; font: 700 4.4cqw/1 'Space Grotesk', sans-serif; letter-spacing: .02em; }
.art-name img { width: 3.4cqw; height: 3.4cqw; display: block; }
.art-icons { display: flex; gap: 2.6cqw; margin: 2cqw 0 2.6cqw; color: var(--brand-soft); font-size: 3cqw; }
.art-btn {
    width: 84%; margin-bottom: 1.6cqw; padding: 2.2cqw 2.4cqw; border-radius: 2.4cqw;
    display: flex; align-items: center; gap: 1.8cqw; font-size: 2.6cqw; font-weight: 600;
    background: rgba(99, 102, 241, .12); border: 1px solid rgba(129, 140, 248, .35);
}
.art-btn i { width: 3cqw; text-align: center; color: var(--brand-soft); }
.art-url { margin: auto 0 3cqw; font-size: 2.2cqw; opacity: .45; }

/* Vidéo live */
.art-live { left: 0; top: 2%; width: 42%; border-radius: 4cqw; overflow: hidden; background: #000; transform: rotate(-5deg); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 4cqw 8cqw -3cqw rgba(0, 0, 0, .7); }
.art-live img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.art-live-badge { position: absolute; left: 3cqw; top: 3cqw; padding: .8cqw 1.8cqw; border-radius: 999px; background: #ef4444; color: #fff; font-size: 2.2cqw; font-weight: 700; letter-spacing: .06em; }
.art-live-ctrl { position: absolute; left: 3cqw; right: 3cqw; bottom: 3cqw; display: flex; align-items: center; gap: 2cqw; }
.art-live-ctrl span:first-child { width: 7.5cqw; height: 7.5cqw; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 2.6cqw; }
.art-live-ctrl span:last-child { flex: 1; height: 1.2cqw; border-radius: 999px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.art-live-ctrl span:last-child::before { content: ''; display: block; width: 55%; height: 100%; background: #fff; }

/* Réseaux sociaux */
.art-circles { right: 0; top: 4%; display: flex; flex-direction: column; gap: 2.6cqw; }
.art-circles span {
    width: 15cqw; height: 15cqw; border-radius: 50%; display: grid; place-items: center;
    font-size: 6.4cqw; box-shadow: 0 3cqw 6cqw -2cqw rgba(0, 0, 0, .6);
}
.art-circles .ig { color: #f472b6; }
.art-circles .yt { color: #f87171; }
.art-circles .sp { color: #4ade80; }

/* Pastille bio.ax/milo */
.art-pill {
    left: -3%; top: 55%; display: flex; align-items: center; gap: 2cqw;
    padding: 2.4cqw 4.6cqw 2.4cqw 2.4cqw; border-radius: 999px;
    font: 700 4.2cqw/1 'Space Grotesk', sans-serif; transform: rotate(-4deg);
    box-shadow: 0 3cqw 7cqw -2cqw rgba(0, 0, 0, .6);
}
.art-pill em { font-style: normal; color: #818cf8; }
.art-pill > span { max-width: 52cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-pill img { width: 7.4cqw; height: 7.4cqw; border-radius: 2cqw; display: block; }

/* Statistiques */
.art-stats {
    left: -4%; bottom: 2%; width: 35%; padding: 3cqw; border-radius: 4cqw; transform: rotate(-3deg);
    box-shadow: 0 4cqw 8cqw -3cqw rgba(0, 0, 0, .65);
}
.art-stats-top { display: flex; align-items: center; justify-content: space-between; }
.art-stats-top i { font-size: 3.2cqw; color: var(--brand-soft); }
.art-chip { padding: .7cqw 1.6cqw; border-radius: 999px; background: rgba(34, 197, 94, .15); color: #4ade80; font-size: 2.4cqw; font-weight: 700; }
.art-spark-line { position: static; display: block; width: 100%; height: 11cqw; margin: 1.6cqw 0 2cqw; }
.art-src { display: flex; align-items: center; gap: 1.6cqw; margin-top: 1.4cqw; font-size: 2.5cqw; }
.art-src i { width: 3cqw; text-align: center; color: #8a8aa0; }
.art-src b { flex: 1; height: 1.3cqw; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.art-src b::before { content: ''; display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: inherit; }

/* Produit */
.art-product {
    right: 1%; bottom: 2%; width: 30%; padding: 2cqw 2cqw 2.6cqw; border-radius: 4.5cqw; transform: rotate(5deg);
    box-shadow: 0 4cqw 8cqw -3cqw rgba(0, 0, 0, .65);
}
.art-product img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3cqw; }
.art-product small { display: block; margin-top: 1.8cqw; font-size: 2.4cqw; font-weight: 600; color: var(--muted); }
.art-product strong { display: block; margin-top: .6cqw; font: 700 4.6cqw/1 'Space Grotesk', sans-serif; }

@media (prefers-reduced-motion: reduce) { .art-float { animation: none; } }
@media (max-width: 960px) {
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
}
@media (max-width: 480px) {
    .auth-side { padding: 1.25rem 1.25rem 2rem; }
    .auth-box { padding-top: 2rem; }
}

/* ── Popup compte bloqué ── */
.auth-modal {
    position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 1rem;
    background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.auth-modal.is-open { display: flex; }
.auth-modal-card { position: relative; width: 100%; max-width: 26rem; padding: 2rem; border-radius: 24px; background: #0f0f17; border: 1px solid rgba(239, 68, 68, .2); text-align: center; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); }
.auth-modal-close { position: absolute; top: .9rem; right: .9rem; width: 2.4rem; height: 2.4rem; border: 0; border-radius: 50%; background: none; color: #7c7c92; font-size: 1.15rem; cursor: pointer; }
.auth-modal-close:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.auth-modal-icon { width: 4rem; height: 4rem; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .25); color: #f87171; font-size: 1.5rem; }
.auth-modal h3 { margin: 0 0 .75rem; font: 700 1.35rem 'Space Grotesk', sans-serif; }
.auth-modal p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; line-height: 1.55; }
.auth-modal-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.25rem; }
.auth-btn-insta { border: 0; color: #fff; background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.auth-btn-mail { border: 1.5px solid var(--line); color: var(--text); background: rgba(255, 255, 255, .04); }
.auth-btn-mail:hover { background: rgba(255, 255, 255, .08); }

/* ── Inscription : assistant en 2 étapes ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.auth-step { display: none; }
.auth-step.active { display: block; animation: authStepIn .35s ease-out; }
@keyframes authStepIn { from { opacity: 0; transform: translateY(12px); } }

.auth-progress { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-bottom: 1.1rem; }
.auth-progress span { width: 2.2rem; height: .3rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.auth-progress span.on { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.auth-progress small { margin-left: .45rem; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .04em; }

/* Champ du lien : préfixe bio.ax/ fixe */
.auth-handle {
    display: flex; align-items: center; height: 3.6rem; padding: 0 1rem;
    border: 1.5px solid var(--line); border-radius: 14px; background: var(--field);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth-handle:hover { border-color: rgba(255, 255, 255, .2); }
.auth-handle:focus-within { border-color: var(--brand); background: #14141e; box-shadow: 0 0 0 4px rgba(99, 102, 241, .22); }
.auth-handle label { color: var(--muted); font: 600 1.1rem 'Space Grotesk', sans-serif; cursor: text; user-select: none; }
.auth-handle input {
    flex: 1; min-width: 0; height: 100%; padding: 0 0 0 .1rem; border: 0; background: none; outline: none;
    color: var(--text); font: 700 1.1rem 'Space Grotesk', sans-serif; text-transform: lowercase;
}
.auth-handle input::placeholder { color: #4b4b5e; font-weight: 600; }

.auth-handle.error, .auth-field.error input { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .15); }
.auth-hint { margin: .6rem .2rem 0; color: #6f6f85; font-size: .82rem; }
.auth-handle.error ~ .auth-hint { display: none; }
.auth-error { display: none; align-items: center; gap: .5rem; margin: .6rem .2rem 0; color: #f87171; font-size: .88rem; font-weight: 500; }
.auth-error.is-visible { display: flex; }
.auth-step .auth-btn-primary { margin-top: 1.25rem; }
/* Gris tant que l'étape n'est pas complète */
.auth-step:has(:invalid) .auth-btn-primary:not(.is-loading) { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .35); box-shadow: none; transform: none; }
.auth-field[hidden] { display: none; }

/* Rappel du lien choisi (clic = retour à l'étape 1) */
.auth-chip {
    display: flex; align-items: center; gap: .55rem; width: fit-content; max-width: 100%; margin: -1rem auto 1.5rem;
    padding: .4rem .85rem .4rem .4rem; border: 1px solid rgba(129, 140, 248, .35); border-radius: 999px;
    background: rgba(99, 102, 241, .1); color: var(--text); font: 700 .95rem 'Space Grotesk', sans-serif; cursor: pointer;
    transition: background .2s;
}
.auth-chip:hover { background: rgba(99, 102, 241, .2); }
.auth-chip:focus-visible { outline: 3px solid rgba(99, 102, 241, .45); outline-offset: 2px; }
.auth-chip img { width: 24px; height: 24px; border-radius: 7px; display: block; flex-shrink: 0; }
.auth-chip > span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-chip em { font-style: normal; color: #818cf8; }
.auth-chip i { margin-left: .1rem; color: var(--brand-soft); font-size: .72rem; }

.auth-fields { display: flex; flex-direction: column; gap: .85rem; }
.cf-turnstile { margin-top: 1rem; min-height: 65px; }
.auth-legal { margin: 1rem 0 0; text-align: center; color: #6f6f85; font-size: .8rem; line-height: 1.55; }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--text); }

/* Bouton en chargement */
.btn-spinner { display: none; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: authSpin .8s linear infinite; }
.auth-btn.is-loading { cursor: wait; opacity: .85; }
.auth-btn.is-loading .btn-text, .auth-btn.is-loading .btn-icon { display: none; }
.auth-btn.is-loading .btn-spinner { display: block; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* Écran « compte créé » */
.auth-done { text-align: center; }
.auth-done-icon {
    width: 4.5rem; height: 4.5rem; margin: 0 auto 1.4rem; border-radius: 50%; display: grid; place-items: center;
    color: #fff; font-size: 1.8rem; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 0 0 8px rgba(99, 102, 241, .12), 0 18px 40px -12px rgba(139, 92, 246, .7);
}
.auth-note {
    display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1.5rem; padding: 1rem; text-align: left;
    border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); font-size: .9rem; line-height: 1.5;
}
.auth-note i { margin-top: .15rem; color: var(--brand-soft); font-size: 1.1rem; }
@media (prefers-reduced-motion: reduce) { .auth-step.active { animation: none; } .btn-spinner { animation-duration: 2s; } }
