/* ------------------------------
   Variables & reset
--------------------------------- */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

:root {
    --bg-gradient: radial-gradient(circle at top, #1d4ed8 0, #0f172a 40%, #020617 100%);
    --card-bg: rgba(15, 23, 42, 0.95);
    --card-border: rgba(148, 163, 184, 0.35);
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --accent-strong: #2563eb;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --danger: #f97373;
    --radius-lg: 1.25rem;
    --shadow-soft: 0 22px 45px rgba(15, 23, 42, 0.7);
    --transition-fast: 0.18s ease-out;
}

/* Box sizing + base */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ------------------------------
   Background / global layout
--------------------------------- */

.bgIndex {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.16), transparent 60%),
        radial-gradient(circle at 100% 0%, rgba(244, 114, 182, 0.12), transparent 60%),
        var(--bg-gradient);
    color: var(--text-main);
    padding: 1.5rem;
}

/* ------------------------------
   Auth wrapper & card
--------------------------------- */

.auth-wrapper {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    padding: 2.75rem 2.5rem 2.25rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

/* Décor lumineux subtil sur la carte */

.auth-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    opacity: 0.12;
    background:
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.35), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(244, 114, 182, 0.35), transparent 55%);
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 1;
}

/* ------------------------------
   Titres / textes
--------------------------------- */

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-title {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.auth-subtitle {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: #f9fafb;
}

/* ------------------------------
   Formulaire
--------------------------------- */

.auth-form {
    margin-top: 1.5rem;
}

.auth-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

/* Inputs */

.auth-input {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    color: var(--text-main);
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    box-shadow: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.8);
}

.auth-input:focus {
    outline: none;
    background-color: rgba(15, 23, 42, 1) !important;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

/* Espace entre les champs */

.form-group + .form-group {
    margin-top: 1rem;
}

/* ------------------------------
   Bouton
--------------------------------- */

.auth-btn {
    margin-top: 1.8rem;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.9rem 1rem;
    background-image: linear-gradient(135deg, var(--accent-strong), #4f46e5);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.45);
    transition:
        transform 0.16s ease-out,
        box-shadow 0.16s ease-out,
        filter 0.16s ease-out;
}

.auth-btn:hover,
.auth-btn:focus {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.55);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
}

/* ------------------------------
   Erreur / feedback
--------------------------------- */

.auth-error {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(248, 113, 113, 0.45);
    background-color: rgba(248, 113, 113, 0.09);
    color: #fecaca;
}

/* ------------------------------
   Footer
--------------------------------- */

.auth-footer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer-text {
    margin-right: 0.3rem;
}

.auth-link {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.auth-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.1rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #4f46e5);
    transition: width var(--transition-fast);
}

.auth-link:hover::after {
    width: 100%;
}

/* ------------------------------
   Responsif
--------------------------------- */

@media (max-width: 576px) {
    .auth-card {
        padding: 2.1rem 1.6rem 2rem;
        border-radius: 1rem;
    }

    .auth-subtitle {
        font-size: 1.05rem;
    }

    .auth-btn {
        font-size: 0.8rem;
        padding-inline: 0.75rem;
    }
}
