:root {
    --auth-ink: #23292f;
    --auth-ink-deep: #161a1e;
    --auth-teal: #0d9488;
    --auth-teal-dark: #0f766e;
    --auth-surface: #f3f5f7;
    --auth-card: #ffffff;
    --auth-border: #e5e9ee;
    --auth-muted: #64748b;
    --auth-text: #0f172a;
    --auth-error: #dc2626;
    --auth-success: #059669;
    --auth-radius: 1.15rem;
    --auth-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

.auth-screen {
    min-height: 100vh;
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, sans-serif;
    color: var(--auth-text);
    background: var(--auth-surface);
}

.auth-screen * {
    box-sizing: border-box;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(320px, 42%) 1fr;
    min-height: 100vh;
}

/* ——— Panneau marque ——— */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.75rem 2.75rem 2rem;
    color: #fff;
    background:
        radial-gradient(ellipse at 12% 18%, rgba(13, 148, 136, 0.28), transparent 48%),
        radial-gradient(ellipse at 90% 88%, rgba(13, 148, 136, 0.16), transparent 42%),
        linear-gradient(165deg, #23292f 0%, #1a1f24 48%, #14181c 100%);
    overflow: hidden;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at 40% 30%, #000 20%, transparent 75%);
    pointer-events: none;
}

.auth-brand__inner,
.auth-brand__footer {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3.25rem;
    color: #fff;
    text-decoration: none;
}

.auth-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
    font-size: 1.35rem;
}

.auth-logo__text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.auth-brand__eyebrow {
    display: inline-block;
    margin-bottom: 0.85rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #99f6e4;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-brand__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.7rem, 2.4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    max-width: 18ch;
}

.auth-brand__lead {
    margin: 0 0 2rem;
    max-width: 32rem;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;
}

.auth-brand__features {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-brand__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0;
    font-size: 0.9375rem;
    font-weight: 500;
}

.auth-brand__features i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    flex-shrink: 0;
    border-radius: 0.45rem;
    background: rgba(13, 148, 136, 0.2);
    color: #5eead4;
    font-size: 1rem;
}

.auth-brand__footer {
    margin-top: 2.5rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ——— Panneau formulaire ——— */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.auth-main__inner {
    width: 100%;
    max-width: 440px;
    animation: authRise 0.45s ease-out;
}

@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo--mobile {
    display: none;
    margin-bottom: 1.5rem;
    color: var(--auth-ink);
}

.auth-logo--mobile .auth-logo__text {
    color: var(--auth-ink);
}

.auth-card {
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 2.15rem 2rem 1.85rem;
}

.auth-title {
    margin: 0 0 0.4rem;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--auth-ink);
}

.auth-subtitle {
    margin: 0 0 1.5rem;
    color: var(--auth-muted);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
    padding: 0.8rem 0.95rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.auth-alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1.1rem;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-alert--info {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
}

.auth-field {
    margin-bottom: 1.05rem;
}

.auth-field label,
.auth-screen .form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-ink);
}

.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 0.9rem;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.15rem;
    pointer-events: none;
    z-index: 2;
}

.auth-screen .form-control {
    height: 48px !important;
    width: 100%;
    padding: 0.65rem 2.75rem 0.65rem 2.65rem !important;
    border: 1.5px solid var(--auth-border) !important;
    border-radius: 0.7rem !important;
    background: #fff !important;
    color: var(--auth-text) !important;
    font-size: 0.9375rem !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-screen .form-control::placeholder {
    color: #94a3b8 !important;
}

.auth-screen .form-control:focus {
    border-color: var(--auth-teal) !important;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12) !important;
    outline: none;
}

.auth-screen .form-control.is-invalid {
    border-color: #f87171 !important;
}

.auth-toggle-pass {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 0.45rem;
    cursor: pointer;
}

.auth-toggle-pass:hover,
.auth-toggle-pass:focus {
    color: var(--auth-ink);
    background: #f1f5f9;
}

.auth-screen .invalid-feedback {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--auth-error);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.15rem 0 1.25rem;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--auth-text);
    cursor: pointer;
}

.auth-check input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--auth-teal);
    cursor: pointer;
}

.auth-link {
    color: var(--auth-teal-dark);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-teal);
    text-decoration: underline;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 48px;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #23292f 0%, #1a1f24 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 18px rgba(35, 41, 47, 0.28);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover,
.auth-submit:focus {
    color: #fff;
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(35, 41, 47, 0.34);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit i {
    font-size: 1.15rem;
}

.auth-back {
    display: flex;
    justify-content: center;
    margin-top: 1.15rem;
}

.auth-back .auth-link,
.auth-back button.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.auth-hint {
    margin: -0.35rem 0 1.15rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.7rem;
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    color: var(--auth-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.auth-hint strong {
    color: var(--auth-ink);
    font-weight: 600;
}

.auth-legal {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.78rem;
}

.auth-verify-text {
    margin: 0 0 1.25rem;
    color: var(--auth-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ——— Responsive ——— */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-logo--mobile {
        display: inline-flex;
    }

    .auth-main {
        min-height: 100vh;
        padding: 1.5rem 1rem 2rem;
        background:
            radial-gradient(ellipse at top, rgba(13, 148, 136, 0.08), transparent 40%),
            var(--auth-surface);
    }

    .auth-card {
        padding: 1.65rem 1.25rem 1.5rem;
    }
}

@media (max-width: 420px) {
    .auth-title {
        font-size: 1.35rem;
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
