:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1d4ed8;
    --auth-slate: #64748b;
    --auth-dark: #0f172a;
    --auth-surface: #ffffff;
    --auth-border: #e2e8f0;
    --auth-light: #f8fafc;
    --auth-radius: 12px;
    --auth-radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.auth-body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    color: var(--auth-dark);
    background: var(--auth-light);
}

.auth-page {
    display: flex;
    min-height: 100vh;
}

/* Panneau gauche — présentation */
.auth-hero {
    flex: 1;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 55%, #2563eb 100%);
    color: #f8fafc;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.auth-hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 280px;
    height: 280px;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 50%;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.auth-brand-icon {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #93c5fd;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
}

.auth-brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-brand-sub {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.auth-hero h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.auth-hero-lead {
    font-size: 16px;
    line-height: 1.65;
    color: #cbd5e1;
    margin-bottom: 32px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0;
}

.auth-features li i {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 15px;
}

.auth-hero-footer {
    margin-top: 48px;
    font-size: 12px;
    color: #64748b;
}

/* Panneau droit — formulaire */
.auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--auth-light);
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-form-header p {
    font-size: 15px;
    color: var(--auth-slate);
}

.auth-alert {
    padding: 12px 14px;
    border-radius: var(--auth-radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-alert--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.auth-field {
    margin-bottom: 20px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--auth-dark);
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    background: var(--auth-surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auth-field-error {
    font-size: 13px;
    color: #dc2626;
    margin-top: 6px;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--auth-slate);
    cursor: pointer;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

.auth-link {
    font-size: 14px;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}

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

.auth-submit {
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--auth-primary);
    border: none;
    border-radius: var(--auth-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}

.auth-submit:hover {
    background: var(--auth-primary-dark);
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-footer {
    margin-top: 28px;
    text-align: center;
    font-size: 14px;
    color: var(--auth-slate);
}

/* Responsive */
@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-hero {
        padding: 36px 28px;
        min-height: auto;
    }

    .auth-hero h1 {
        font-size: 1.5rem;
    }

    .auth-features {
        gap: 12px;
    }

    .auth-hero-footer {
        margin-top: 28px;
    }

    .auth-panel {
        padding: 32px 20px 48px;
    }
}

@media (max-width: 480px) {
    .auth-hero {
        padding: 28px 20px;
    }

    .auth-brand {
        margin-bottom: 24px;
    }

    .auth-features li i {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .auth-submit {
        min-height: 48px;
        font-size: 15px;
    }

    .auth-field input {
        min-height: 48px;
        font-size: 16px;
    }
}

/* Écran de choix invité / admin */
.role-choice-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.role-choice-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 20px;
    border: 2px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: var(--auth-surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.role-choice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.role-choice-card--admin:hover {
    border-color: var(--auth-primary);
}

.role-choice-card--guest:hover {
    border-color: #059669;
}

.role-choice-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.role-choice-card--admin .role-choice-icon {
    background: #eff6ff;
    color: var(--auth-primary);
}

.role-choice-card--guest .role-choice-icon {
    background: #ecfdf5;
    color: #059669;
}

.role-choice-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--auth-dark);
}

.role-choice-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--auth-slate);
}

.role-choice-action {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-primary);
}

.role-choice-card--guest .role-choice-action {
    color: #059669;
}
