.onboarding-container {
    /*max-width: 1000px;*/
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    display: flex;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) {
    .onboarding-container {
        width: 90%;
    }
}

.onboarding-image {
    flex: 1;
    background: var(--gradient);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    overflow: hidden;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="white" stroke-width="0.5" /><circle cx="50" cy="50" r="20" fill="none" stroke="white" stroke-width="0.5" /></svg>');
    background-size: 150px;
}

.logo {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
}

.image-content {
    position: relative;
    z-index: 1;
    max-width: 300px;
}

.image-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.benefits {
    margin-top: 2rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-form {
    flex: 1;
    background: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.baid-ob-option-card {
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.baid-ob-option-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.baid-ob-option-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.baid-ob-option-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.option-title {
    font-weight: 600;
}

.option-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.info-box {
    padding: 1rem;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
    margin-bottom: 1.5rem;
}

.info-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.alternative-link {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.alternative-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.terms {
    margin-top: auto;
    font-size: 0.875rem;
    color: var(--text-light);
}

@media (max-width: 900px) {
    .onboarding-container {
        flex-direction: column;
        min-height: auto;
        border-radius: 1rem;
    }

    .onboarding-image,
    .onboarding-form {
        padding: 1.75rem 1.25rem;
    }

    .image-title {
        font-size: 1.5rem;
    }

    .form-title {
        font-size: 1.25rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .baid-ob-option-card {
        padding: 1.25rem;
    }

    .form-input {
        font-size: 16px; /* évite zoom auto iOS */
        min-height: 44px;
    }

    .action-button {
        width: 100%;
        min-height: 44px;
        padding: .85rem 1.5rem;
    }
}

/* ═══════════════════════════════════════════════════
   OVERLAY ONBOARDING EMPLOYÉ
═══════════════════════════════════════════════════ */

.baid-ob-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: baid-ob-fadein 0.4s ease;
}

.baid-ob-overlay--closing {
    animation: baid-ob-fadeout 0.5s ease forwards;
}

@keyframes baid-ob-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes baid-ob-fadeout {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.97); }
}

/* ── Carte centrale ── */
.baid-ob-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 520px;
    padding: 40px 40px 32px;
    position: relative;
    animation: baid-ob-slidein 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes baid-ob-slidein {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Indicateur de progression ── */
.baid-ob-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
}

.baid-ob-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: background 0.3s, width 0.3s;
}

.baid-ob-dot.active {
    background: var(--primary, #2563eb);
    width: 24px;
    border-radius: 4px;
}

/* ── Écrans ── */
.baid-ob-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: baid-ob-screen-in 0.3s ease;
}

.baid-ob-screen.active {
    display: flex;
}

.baid-ob-screen.leaving {
    animation: baid-ob-screen-out 0.25s ease forwards;
}

@keyframes baid-ob-screen-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes baid-ob-screen-out {
    from { opacity: 1; }
    to   { opacity: 0; transform: translateX(-20px); }
}

/* ── Illustration ── */
.baid-ob-illu {
    margin-bottom: 24px;
}

.baid-ob-illu-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 28px;
    color: #fff;
}

/* ── Textes ── */
.baid-ob-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.baid-ob-org {
    color: var(--primary, #2563eb);
    font-size: 1.1rem;
}

.baid-ob-text {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    max-width: 400px;
    margin-bottom: 0;
}

/* ── Modules (écran 2) ── */
.baid-ob-modules {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 24px;
    text-align: left;
}

.baid-ob-module {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
}

.baid-ob-module-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.baid-ob-module-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.baid-ob-module-body strong {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 600;
}

.baid-ob-module-body span {
    font-size: 0.8rem;
    color: #64748b;
}

/* ── Niveaux (écran 3) ── */
.baid-ob-levels {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 24px;
}

.baid-ob-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #475569;
    font-weight: 500;
}

.baid-ob-level-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.baid-ob-level-sep {
    color: #cbd5e1;
    font-size: 12px;
    margin-bottom: 16px;
}

/* ── Navigation / Boutons ── */
.baid-ob-nav {
    display: flex;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
    margin-top: 4px;
}

.baid-ob-btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.baid-ob-btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Bouton seul (écran 1) */
.baid-ob-screen[data-screen="1"] .baid-ob-btn-primary {
    margin-top: 24px;
    width: 100%;
    justify-content: center;
}

.baid-ob-btn-secondary {
    padding: 12px 18px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.baid-ob-btn-secondary:hover {
    background: #e2e8f0;
}

/* ── Page de rejoindre : champs côte à côte ── */
.baid-rejoindre-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.baid-rejoindre-password-wrap {
    position: relative;
}

.baid-rejoindre-password-wrap .baid-rejoindre-input {
    padding-right: 44px;
}

.baid-rejoindre-toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.baid-rejoindre-toggle-pwd:hover {
    color: #475569;
}

/* ── Highlight premier module post-onboarding ── */
@keyframes baid-ob-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.baid-ob-highlight {
    animation: baid-ob-pulse 1s ease 3;
    border-radius: 12px;
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

/* ── Bandeau "par où commencer" ── */
.baid-ob-action-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}

.baid-ob-action-banner.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.baid-ob-action-banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    margin-left: 4px;
    flex-shrink: 0;
}

/* ═══ Quickstart guide — carte sticky avec 3 actions cliquables ═══════
   Remplace l'ancien `.baid-ob-action-banner` qui auto-disparaissait.
   Apparaît bottom-right desktop, plein-largeur sticky bas mobile.
   Reste visible jusqu'au dismiss (ou clic sur une action). */
.baid-ob-quickstart {
    position: fixed;
    /* 80px = footer (~60px) + 20px de marge, évite le chevauchement */
    bottom: 80px;
    right: 24px;
    z-index: 9990;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(109, 40, 217, .22), 0 4px 12px rgba(0, 0, 0, .08);
    padding: 18px 18px 14px;
    transform: translateY(20px) scale(.95);
    opacity: 0;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .25s ease;
    pointer-events: none;
}
.baid-ob-quickstart.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}
.baid-ob-quickstart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.baid-ob-quickstart-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.2px;
    line-height: 1.2;
}
.baid-ob-quickstart-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    font-size: 13px;
    flex-shrink: 0;
}
.baid-ob-quickstart-close:hover {
    background: #f1f5f9;
    color: #475569;
}
.baid-ob-quickstart-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 12px;
    line-height: 1.4;
}
.baid-ob-quickstart-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.baid-ob-quickstart-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, transform .12s, background .15s;
    font-family: inherit;
}
.baid-ob-quickstart-action:hover,
.baid-ob-quickstart-action:focus-visible {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: translateX(2px);
    outline: none;
}
.baid-ob-quickstart-action:focus-visible {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .2);
}
.baid-ob-qs-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.baid-ob-qs-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}
.baid-ob-qs-arrow {
    color: #94a3b8;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}
.baid-ob-quickstart-action:hover .baid-ob-qs-arrow {
    color: #8b5cf6;
    transform: translateX(3px);
}

/* Mobile : sticky en bas, plein-largeur (au-dessus du footer + bottom-nav éventuelle) */
@media (max-width: 575.98px) {
    .baid-ob-quickstart {
        /* 90px = bottom-nav mobile (~60px) + footer + marge */
        bottom: 90px;
        right: 12px;
        left: 12px;
        width: auto;
        padding: 14px 14px 12px;
    }
}

/* Bandeau état vide nouveau membre — conservé tel quel */
.baid-ob-empty-banner {
    display: none;
    align-items: flex-start;
    gap: 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 20px 20px 20px 20px;
    margin: 20px 0;
    position: relative;
}

.baid-ob-empty-banner.visible {
    display: flex;
}

.baid-ob-empty-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.baid-ob-empty-banner-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: #1e40af;
}

.baid-ob-empty-banner-body strong {
    font-weight: 700;
    font-size: 0.95rem;
}

.baid-ob-empty-banner-body span {
    color: #3b82f6;
    line-height: 1.5;
}

.baid-ob-empty-banner-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #93c5fd;
    cursor: pointer;
    font-size: 13px;
}

/* ── Responsive overlay : très petit mobile (<360px) ── */
@media (max-width: 360px) {
    .baid-ob-overlay {
        padding: 8px;
    }
    .baid-ob-card {
        padding: 22px 14px 18px;
        max-height: 96vh;
        border-radius: 14px;
    }
    .baid-ob-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    .baid-ob-text,
    .baid-ob-subtitle {
        font-size: 13px;
        line-height: 1.5;
    }
    /* Réduit les modules grid sur très petits écrans */
    .baid-ob-modules {
        gap: 8px;
    }
    .baid-ob-module {
        padding: 10px;
        gap: 8px;
    }
    .baid-ob-module-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .baid-ob-module-name {
        font-size: 12px;
    }
    .baid-ob-module-desc {
        font-size: 11px;
    }
    /* Boutons plein-largeur en mode column-reverse pour ergonomie tactile */
    .baid-ob-btn-primary,
    .baid-ob-btn-secondary {
        font-size: 13px;
        padding: 10px 16px;
    }
    /* Quickstart guide : padding réduit */
    .baid-ob-quickstart {
        padding: 12px;
    }
    .baid-ob-quickstart-title {
        font-size: 14px;
    }
    .baid-ob-qs-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .baid-ob-qs-label {
        font-size: 12px;
    }
}

/* ── Responsive overlay ── */
@media (max-width: 480px) {
    .baid-ob-action-banner {
        white-space: normal;
        text-align: center;
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px 16px;
        bottom: 16px;
        width: calc(100% - 32px);
        left: 16px;
        transform: none;
        border-radius: 10px;
    }

    .baid-ob-action-banner.visible {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 560px) {
    .baid-ob-card {
        padding: 28px 20px 24px;
    }

    .baid-ob-title {
        font-size: 1.15rem;
    }

    .baid-ob-levels {
        gap: 4px;
    }

    .baid-ob-level-badge {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .baid-rejoindre-row {
        grid-template-columns: 1fr;
    }

    .baid-ob-nav {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .baid-ob-btn-primary,
    .baid-ob-btn-secondary {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .baid-ob-module {
        padding: 10px 12px;
        gap: 10px;
    }

    .baid-ob-module-body strong {
        font-size: 0.85rem;
    }
}