/* Page connexion — même fond noir / dégradé que la landing (#010105, calques identiques) */

/* ══════════════════════════════════════════
   DA complète — tout aligner sur la landing
   (Geist Sans, pas de SF Pro / Alike serif)
   ══════════════════════════════════════════ */

/* Titre du formulaire */
body.auth-page-signin .signin-title,
body.auth-page-signup .signin-title,
body.auth-page-signin .auth-title,
body.auth-page-signup .auth-title {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

/* Sous-titre */
body.auth-page-signin .signin-subtitle,
body.auth-page-signup .signin-subtitle {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
}

/* Labels : Geist, pas uppercase */
body.auth-page-signin .auth-label,
body.auth-page-signup .auth-label {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: none;
    letter-spacing: 0;
}

/* Inputs */
body.auth-page-signin .auth-input,
body.auth-page-signup .auth-input {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9rem;
    border-radius: 0.625rem;
    border: 0.5px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: #fff;
    padding: 0.65rem 1rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}
body.auth-page-signin .auth-input:focus,
body.auth-page-signup .auth-input:focus {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.08);
    box-shadow: none;
    outline: none;
}
body.auth-page-signin .auth-input::placeholder,
body.auth-page-signup .auth-input::placeholder {
    color: rgba(255,255,255,0.28);
}

/* Forgot password */
body.auth-page-signin .auth-forgot-password,
body.auth-page-signup .auth-forgot-password {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255,255,255,0.45);
}

/* Séparateur "or" */
body.auth-page-signin .signin-sep,
body.auth-page-signup .signin-sep {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* Switch "Don't have an account?" */
body.auth-page-signin .auth-switch,
body.auth-page-signup .auth-switch {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
}
body.auth-page-signin .auth-switch-link,
body.auth-page-signup .auth-switch-link {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-weight: 600;
    color: #fff;
}

/* Legal */
body.auth-page-signin .auth-legal,
body.auth-page-signup .auth-legal {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.28);
}
body.auth-page-signin .auth-legal a,
body.auth-page-signup .auth-legal a {
    color: rgba(255,255,255,0.45);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Boutons style landing ── */

/* Submit = "Sign up for free" : blanc, texte noir, pill, glow */
body.auth-page-signin .auth-submit-btn,
body.auth-page-signup .auth-submit-btn {
    background: #fff;
    color: #000;
    border: 0.5px solid rgba(0, 0, 0, 0.2);
    border-radius: 9999px;
    height: 2.5rem;
    padding: 0 1.5rem;
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
    transition: background 0.15s ease, box-shadow 0.2s ease;
    transform: none;
}

body.auth-page-signin .auth-submit-btn:hover,
body.auth-page-signup .auth-submit-btn:hover {
    background: #e5e7eb;
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.28);
    transform: none;
}

/* Google = "Log in" : transparent, bordure blanche, pill */
body.auth-page-signin .auth-social-btn,
body.auth-page-signup .auth-social-btn {
    background: transparent;
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.9rem;
    font-weight: 400;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    transform: none;
}

body.auth-page-signin .auth-social-btn:hover,
body.auth-page-signup .auth-social-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: none;
}

/* ── Popup "Forgot password" — redesign DA ── */

/* Écrase l'ancienne DA cyan/bleu */
body.auth-page-signin .auth-popup,
body.auth-page-signup .auth-popup {
    background: rgba(12, 12, 16, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.5rem;
    padding: 2.5rem 2.25rem;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: none;
    overflow: visible;
}

/* Supprime le shimmer cyan et le halo rotatif */
body.auth-page-signin .auth-popup::before,
body.auth-page-signup .auth-popup::before,
body.auth-page-signin .auth-popup::after,
body.auth-page-signup .auth-popup::after {
    display: none;
}

/* Titre — Geist, pas Alike */
body.auth-page-signin .auth-popup-title,
body.auth-page-signup .auth-popup-title {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    text-align: left;
    color: #fff;
}

/* Description */
body.auth-page-signin .auth-popup-description,
body.auth-page-signup .auth-popup-description {
    font-family: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    text-align: left;
    margin: 0 0 1.5rem;
    line-height: 1.55;
}

/* Bouton fermer */
body.auth-page-signin .auth-popup-close,
body.auth-page-signup .auth-popup-close {
    top: 1.1rem;
    right: 1.1rem;
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.15s ease;
}

body.auth-page-signin .auth-popup-close:hover,
body.auth-page-signup .auth-popup-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
    box-shadow: none;
}

/* Bouton submit du popup — noir + blanc */
body.auth-page-signin .auth-popup .auth-submit-btn,
body.auth-page-signup .auth-popup .auth-submit-btn {
    background: #0a0a0a;
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 9999px;
    height: 2.5rem;
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: none;
    transition: background 0.15s ease;
    transform: none;
}

body.auth-page-signin .auth-popup .auth-submit-btn:hover,
body.auth-page-signup .auth-popup .auth-submit-btn:hover {
    background: #1a1a1a;
    box-shadow: none;
    transform: none;
}

html:has(body.auth-page-signin.landing-page),
html:has(body.auth-page-signup.landing-page) {
    background-color: #010105;
}

body.auth-page.auth-page-signin.landing-page,
body.auth-page.auth-page-signup.landing-page {
    background: transparent !important;
    color: var(--ruixen-fg, #fafafa);
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
}

/* html aussi transparent pour laisser le background-wrapper visible */
html:has(body.auth-page-signin),
html:has(body.auth-page-signup) {
    background: transparent !important;
}

/* Fond animé = même calque que l’index (via .landing-page + html:has dans styles.css) */
body.auth-page-signin .background-wrapper,
body.auth-page-signin .background-darken,
body.auth-page-signup .background-wrapper,
body.auth-page-signup .background-darken {
    display: block;
}

/* Rétablit le fond violet (écrasé par la règle landing-page neutre dans styles.css) */
/* ── Image de fond "ruixen moon" ── */
html:has(body.auth-page-signin) .background-wrapper,
html:has(body.auth-page-signup) .background-wrapper {
    background:
        url('https://pub-940ccf6255b54fa799a9b01050e6c227.r2.dev/ruixen_moon_2.png')
        center center / cover no-repeat fixed;
    animation: none;
}

/* Overlay noir flouté par-dessus l'image */
html:has(body.auth-page-signin) .background-wrapper::before,
html:has(body.auth-page-signup) .background-wrapper::before {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(48px);
    -webkit-backdrop-filter: blur(48px);
    filter: none;
}

html:has(body.auth-page-signin) .background-wrapper::after,
html:has(body.auth-page-signup) .background-wrapper::after {
    display: none;
}

/* Points au-dessus de background-darken (sinon masqués), sous le contenu (z-index 1 < header/main) */
.signin-bg {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#auth-dot-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* État « page courante » pour Se connecter */
body.auth-page-signin .site-header-nav__btn-login--here {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #333;
    background: rgba(31, 31, 31, 0.62);
    color: #a1a1aa;
    border-radius: 9999px;
    opacity: 1;
    cursor: default;
}

body.auth-page-signin .site-header-nav__drawer-auth .site-header-nav__btn-login--here {
    width: 100%;
    box-sizing: border-box;
}

/* Page inscription : « S'inscrire » = état courant (style discret, comme connexion sur signin) */
body.auth-page-signup .site-header-nav__btn-signup--here {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid #333;
    background: rgba(31, 31, 31, 0.62);
    color: #a1a1aa;
    border-radius: 9999px;
    opacity: 1;
    cursor: default;
}

body.auth-page-signup .site-header-nav__signup-wrap:has(.site-header-nav__btn-signup--here) .site-header-nav__signup-glow {
    display: none;
}

body.auth-page-signup .site-header-nav__drawer-auth .site-header-nav__btn-signup--here {
    width: 100%;
    box-sizing: border-box;
}

/* Contenu au-dessus du canvas */
.signin-main {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 7rem 1.25rem 2.5rem;
    box-sizing: border-box;
}

.signin-form-wrap {
    width: 100%;
    max-width: 24rem;
    margin: 0 auto;
}

.signin-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Même typo que la section #produit (.browse-header h2 + .hero-subtitle) */
.signin-title {
    font-family: var(--ruixen-display, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-weight: 600;
    font-size: clamp(1.55rem, 2.85vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--ruixen-fg, #fafafa);
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.42);
    margin: 0 0 0.75rem;
}

.signin-subtitle {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-weight: 400;
    font-size: clamp(0.75rem, 1.45vw, 0.875rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    max-width: 32rem;
    margin: 0 auto;
}

.signin-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Quick link Google — même esprit que le hero / glass */
.signin-social-btn.auth-google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ruixen-fg, #fafafa);
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.signin-social-btn.auth-google-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.signin-sep {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.signin-sep::before,
.signin-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.signin-sep span {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

body.auth-page-signin .auth-form,
body.auth-page-signup .auth-form {
    gap: 1rem;
}

body.auth-page-signin .auth-form-group,
body.auth-page-signup .auth-form-group {
    gap: 0.35rem;
}

body.auth-page-signin .auth-label,
body.auth-page-signup .auth-label {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(163, 163, 163, 0.95);
}

body.auth-page-signin .auth-input,
body.auth-page-signup .auth-input {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.875rem;
    border-radius: 9999px;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ruixen-fg, #fafafa);
    text-align: left;
}

body.auth-page-signin .auth-input::placeholder,
body.auth-page-signup .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

body.auth-page-signin .auth-input:focus,
body.auth-page-signup .auth-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

body.auth-page-signin .auth-submit-btn,
body.auth-page-signup .auth-submit-btn {
    margin-top: 0.35rem;
    border-radius: 9999px;
    padding: 0.85rem 1.5rem;
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    background: #fafafa;
    color: #0a0a0a;
    border: none;
}

body.auth-page-signin .auth-submit-btn:hover:not(:disabled),
body.auth-page-signup .auth-submit-btn:hover:not(:disabled) {
    background: rgba(250, 250, 250, 0.92);
    transform: none;
}

body.auth-page-signin .auth-submit-btn:disabled,
body.auth-page-signup .auth-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.auth-page-signin .auth-forgot-password,
body.auth-page-signup .auth-forgot-password {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

body.auth-page-signin .auth-forgot-password:hover,
body.auth-page-signup .auth-forgot-password:hover {
    color: rgba(255, 255, 255, 0.85);
}

body.auth-page-signin .auth-switch,
body.auth-page-signup .auth-switch {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: clamp(0.75rem, 1.45vw, 0.875rem);
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.35rem;
}

body.auth-page-signin .auth-switch-link,
body.auth-page-signup .auth-switch-link {
    color: var(--ruixen-fg, #fafafa);
    font-weight: 600;
}

body.auth-page-signin .auth-legal,
body.auth-page-signup .auth-legal {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.65rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.38);
    padding-top: 1.75rem;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

body.auth-page-signin .auth-legal a,
body.auth-page-signup .auth-legal a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: underline;
    transition: color 0.2s;
}

body.auth-page-signin .auth-legal a:hover,
body.auth-page-signup .auth-legal a:hover {
    color: rgba(255, 255, 255, 0.75);
}

body.auth-page-signin .auth-popup-overlay,
body.auth-page-signup .auth-popup-overlay {
    z-index: 2000;
    background: rgba(1, 1, 5, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.25rem;
}

/* Modal — glass / typo alignés sur .signin-title / .signin-subtitle / champs connexion */
body.auth-page-signin .auth-popup,
body.auth-page-signup .auth-popup {
    max-width: 24rem;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.75rem 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    animation: none;
}

body.auth-page-signin .auth-popup::before,
body.auth-page-signin .auth-popup::after,
body.auth-page-signup .auth-popup::before,
body.auth-page-signup .auth-popup::after {
    display: none;
}

body.auth-page-signin .auth-popup-title,
body.auth-page-signup .auth-popup-title {
    font-family: var(--ruixen-display, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-weight: 600;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--ruixen-fg, #fafafa);
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.42);
    margin: 0 0 0.65rem;
    text-align: center;
}

body.auth-page-signin .auth-popup-description,
body.auth-page-signup .auth-popup-description {
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-weight: 400;
    font-size: clamp(0.75rem, 1.45vw, 0.875rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.35rem;
    text-align: center;
}

body.auth-page-signin .auth-popup-form,
body.auth-page-signup .auth-popup-form {
    gap: 1rem;
}

body.auth-page-signin .auth-popup .auth-form-group,
body.auth-page-signup .auth-popup .auth-form-group {
    gap: 0.35rem;
}

body.auth-page-signin .auth-popup-close,
body.auth-page-signup .auth-popup-close {
    top: 0.875rem;
    right: 0.875rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.25rem;
    font-weight: 400;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

body.auth-page-signin .auth-popup-close:hover,
body.auth-page-signup .auth-popup-close:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Inputs / bouton : cohérents avec le formulaire principal (écrase les règles .auth-popup de auth.css) */
body.auth-page-signin .auth-popup .auth-input,
body.auth-page-signup .auth-popup .auth-input {
    border-radius: 9999px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ruixen-fg, #fafafa);
}

body.auth-page-signin .auth-popup .auth-input:focus,
body.auth-page-signup .auth-popup .auth-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

body.auth-page-signin .auth-popup .auth-submit-btn,
body.auth-page-signup .auth-popup .auth-submit-btn {
    margin-top: 0.25rem;
    border-radius: 9999px;
    padding: 0.85rem 1.5rem;
    font-family: var(--ruixen-ui, "Geist Sans", ui-sans-serif, system-ui, sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    background: #fafafa;
    color: #0a0a0a;
    border: none;
}

body.auth-page-signin .auth-popup .auth-submit-btn:hover:not(:disabled),
body.auth-page-signup .auth-popup .auth-submit-btn:hover:not(:disabled) {
    background: rgba(250, 250, 250, 0.92);
    transform: none;
    box-shadow: none;
}

@media (max-width: 639px) {
    .signin-main {
        padding-top: 6.5rem;
    }
}
