/* Auth v2 – Design distinct (aucune ressemblance avec l’ancien) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@500;600;700;800&display=swap');

/* Couvre toute la page pour masquer le fond du layout */
.auth-v2 {
    position: fixed;
    inset: 0;
    z-index: 10;
    --auth-bg: #0c0a0f;
    --auth-bg-2: #16121c;
    --auth-surface: rgba(255, 255, 255, 0.04);
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-text: #f4f1f6;
    --auth-text-muted: #9b8fa8;
    --auth-accent: #c53030;
    --auth-accent-hover: #e53e3e;
    --auth-input-bg: rgba(255, 255, 255, 0.06);
    --auth-input-border: rgba(255, 255, 255, 0.1);
    --auth-card-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--auth-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(197, 48, 48, 0.2), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(120, 80, 160, 0.12), transparent),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(80, 60, 120, 0.1), transparent);
    color: var(--auth-text);
    position: relative;
    overflow-x: hidden;
}

.auth-v2 * {
    box-sizing: border-box;
}

/* Forme décorative */
.auth-v2__shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
}
.auth-v2__shape--1 { width: 320px; height: 320px; background: var(--auth-accent); top: -80px; right: -80px; opacity: 0.35; }
.auth-v2__shape--2 { width: 240px; height: 240px; background: #6b4b9e; bottom: 10%; left: -60px; }
.auth-v2__shape--3 { width: 160px; height: 160px; background: #3d2a5c; top: 40%; right: 5%; }

.auth-v2__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
}

.auth-v2__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    text-decoration: none;
    color: var(--auth-text);
}
.auth-v2__logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
}
.auth-v2__logo span {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.auth-v2__card {
    background: var(--auth-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--auth-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow: var(--auth-card-shadow);
}

.auth-v2__title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 1.75rem;
    color: var(--auth-text);
}

.auth-v2__alerts {
    margin-bottom: 1.25rem;
}

.auth-v2__form .form-group {
    margin-bottom: 1.25rem;
}

.auth-v2__form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    margin-bottom: 0.5rem;
}

.auth-v2__form input[type="text"],
.auth-v2__form input[type="email"],
.auth-v2__form input[type="password"],
.auth-v2__form input[type="tel"],
.auth-v2__form input.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-v2__form input::placeholder {
    color: var(--auth-text-muted);
    opacity: 0.8;
}
.auth-v2__form input:focus {
    outline: none;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.25);
}

.auth-v2__form .input-wrap {
    position: relative;
}
.auth-v2__form .input-wrap .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.1rem;
}
.auth-v2__form .input-wrap .toggle-password:hover {
    color: var(--auth-accent);
}

.auth-v2__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.auth-v2__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}
.auth-v2__checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-accent);
    cursor: pointer;
}
.auth-v2__forgot {
    font-size: 0.875rem;
    color: var(--auth-accent);
    text-decoration: none;
}
.auth-v2__forgot:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-v2__submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 1rem 1.5rem;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: #0c0a0f;
    background: var(--auth-accent);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.auth-v2__submit:hover {
    background: var(--auth-accent-hover);
    transform: translateY(-1px);
}
.auth-v2__submit:active {
    transform: translateY(0);
}

.auth-v2__divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--auth-text-muted);
    font-size: 0.8125rem;
}
.auth-v2__divider::before,
.auth-v2__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-v2__socials {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.auth-v2__social {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--auth-text);
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.auth-v2__social:hover {
    border-color: var(--auth-border);
    background: rgba(255, 255, 255, 0.08);
    color: var(--auth-text);
}
.auth-v2__social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-v2__switch {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.9375rem;
    color: var(--auth-text-muted);
}
.auth-v2__switch a {
    color: var(--auth-accent);
    font-weight: 500;
    text-decoration: none;
}
.auth-v2__switch a:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

.auth-v2__footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
}
.auth-v2__footer a {
    color: var(--auth-text-muted);
    text-decoration: none;
}
.auth-v2__footer a:hover {
    color: var(--auth-accent);
}

/* Grille 2 colonnes pour inscription */
.auth-v2__form .auth-v2__grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 480px) {
    .auth-v2__form .auth-v2__grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Checkbox CGU */
.auth-v2__form .auth-v2__terms {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
    cursor: pointer;
}
.auth-v2__form .auth-v2__terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--auth-accent);
    cursor: pointer;
}
.auth-v2__form .auth-v2__terms a {
    color: var(--auth-accent);
    text-decoration: none;
}
.auth-v2__form .auth-v2__terms a:hover {
    text-decoration: underline;
}

/* Erreurs de validation */
.auth-v2 .text-danger {
    color: #e8a0a0 !important;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}
.auth-v2 .invalid-feedback {
    color: #e8a0a0;
    font-size: 0.8125rem;
}
.auth-v2 .alert {
    border-radius: 14px;
    border: 1px solid var(--auth-border);
}

/* RTL */
.auth-v2[dir="rtl"] .auth-v2__form .input-wrap .toggle-password {
    right: auto;
    left: 1rem;
}
.auth-v2[dir="rtl"] .auth-v2__logo {
    flex-direction: row-reverse;
}
