:root {
    --bg: #0a0b14;
    --panel: #181729;
    --panel-soft: #1c1a36;
    --panel-border: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --muted: #94a3b8;
    --field-bg: #ffffff;
    --field-text: #0f172a;
    --button-gradient: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    --button-secondary: #334155;
    --pill: #1e293b;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.page-shell {
    width: min(1740px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 40px;
    background: rgba(21, 20, 43, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--panel-border);
    border-left: 1px solid var(--panel-border);
    border-right: 1px solid var(--panel-border);
    border-radius: 0 0 24px 24px;
    margin-top: 0;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
    position: relative;
    z-index: 10;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}




.nav-logo-slot {
    width: 180px;
    min-height: 32px;
    display: flex;
    align-items: center;
}

.nav-logo-slot img {
    max-height: 32px;
    width: auto;
}

.topbar-actions {
    display: flex;
    gap: 16px;
}

.topbar-button {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    background: #4353ff;
    border: none;
    transition: all 0.3s ease;
}

.topbar-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.topbar-button.secondary {
    background: #cf70f1;
}

.topbar-button.return-admin-btn {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-button.return-admin-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    opacity: 1;
}

.main {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 60px);
    padding-top: 30px;
}

.login-card {
    width: min(1000px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    padding: 40px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: 0 0 50px rgba(99, 102, 241, 0.1);
    position: relative;
    overflow: hidden;
}

/* Blur/Glow Border effect */
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(45deg, rgba(99, 102, 241, 0.5), transparent, rgba(207, 112, 241, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.showcase {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.title-large-slot {
    width: 100%;
    max-width: 440px;
    margin-bottom: 20px;
}

.visual-slot {
    border-radius: 18px;
    overflow: hidden;
}

.visual-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}

.form-side {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 0;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-top: 4px;
}

.form-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--button-secondary);
    border-radius: 10px;
    color: #f3f5ff;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
}

.back-link:hover {
    background: #475569;
}

.field-group {
    margin-bottom: 24px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 500;
}

.field-input {
    width: 100%;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    background: var(--button-gradient);
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
    margin-top: 10px;
}

.submit-button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.submit-button:disabled,
.resend-button:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
}

.button-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 999px;
    animation: buttonSpin 0.75s linear infinite;
    flex: 0 0 16px;
}

.is-loading .button-spinner {
    display: inline-block;
}

@keyframes buttonSpin {
    to {
        transform: rotate(360deg);
    }
}

/* OTP Styling */
.otp-container {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    margin: 20px 0 32px;
}

.otp-input {
    width: 48px;
    height: 60px;
    background: #334155;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.otp-input:focus {
    background: #475569;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.otp-separator {
    width: 12px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1100px) {
    .login-card {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    .visual-slot { display: none; }
}

@media (max-width: 600px) {
    .page-shell {
        width: 100%;
    }

    .topbar {
        padding: 10px 16px;
        border-radius: 0;
        gap: 12px;
    }

    .nav-logo-slot {
        width: 140px;
    }

    .nav-logo-slot img {
        max-height: 26px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .topbar-button {
        padding: 8px 14px;
        font-size: 12px;
    }

    .login-card {
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 20px 14px;
        gap: 20px;
    }

    .login-card::before {
        display: none;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .back-link {
        font-size: 12px;
        padding: 5px 10px;
    }

    .field-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .field-input {
        height: 44px;
        font-size: 14px;
        border-radius: 10px;
    }

    .submit-button {
        height: 44px;
        font-size: 14px;
        border-radius: 10px;
    }

    .otp-container {
        gap: 6px;
        justify-content: center;
        margin: 16px 0 24px;
    }

    .otp-input {
        width: 36px;
        height: 46px;
        font-size: 18px;
        border-radius: 10px;
    }

    .otp-separator {
        width: 8px;
    }

    .otp-timer {
        font-size: 12px;
    }

    .resend-button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .connected-account {
        padding: 12px;
        gap: 10px;
    }

    .connected-account-photo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .connected-account-label {
        font-size: 0.78rem;
        margin-bottom: 4px;
    }

    .connected-account-name {
        font-size: 0.9rem;
    }

    .connected-account-email {
        font-size: 0.82rem;
        margin-bottom: 10px;
    }

    .connected-account-button {
        height: 42px;
        font-size: 14px;
    }

    .login-separator {
        font-size: 0.75rem;
        margin: 2px 0 16px;
    }

    .signup-floatbox,
    .login-floatbox {
        padding: 10px 12px;
        font-size: 0.82rem;
        border-radius: 8px;
    }
}





/* OTP - destinataire du code */
.otp-sent-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 22px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    border-left: 3px solid #6366f1;
    border-radius: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.otp-sent-hint i {
    margin-top: 2px;
    color: #6366f1;
}

.otp-sent-hint strong {
    color: #fff;
    word-break: break-all;
}

/* OTP Timer & Resend Button */
.otp-footer {
    margin-top: 10px;
    text-align: center;
    min-height: 40px;
}

.otp-timer {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.otp-timer span {
    color: #6366f1;
    font-weight: 700;
}

.resend-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: #f3f5ff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resend-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.resend-button:active {
    transform: translateY(0);
}

.resend-button i {
    font-size: 16px;
    color: #6366f1;
}

.swal-floabox-popup,
.swal2-popup.swal-floabox-popup {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    background: rgba(24, 23, 41, 0.98) !important;
    color: #f8fafc !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 0 30px rgba(99, 102, 241, 0.16) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.swal-floabox-popup .swal2-title {
    color: #ffffff !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
}

.swal-floabox-popup .swal2-html-container {
    color: #cbd5e1 !important;
}

.swal-floabox-popup .swal2-confirm {
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--button-gradient) !important;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.28) !important;
    font-weight: 700 !important;
}

.swal-floabox-popup .swal2-timer-progress-bar {
    background: #6366f1 !important;
}

.d-none {
    display: none !important;
}
