/* ============================================================
   NOVIABOT — Onboarding Beta Overlay
   Apparaît au scroll avant la section pricing
============================================================ */

/* Overlay d'onboarding */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* z-index > #betaGateOverlay (10000) — retour OAuth Twitch / gate ne doit pas recouvrir */
.onboarding-overlay.active {
    opacity: 1;
    pointer-events: all;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    box-sizing: border-box;
    max-height: 100dvh;
    overflow: hidden;
}

/* Bloquer le scroll de la page derrière */
body:has(.onboarding-overlay.active) {
    overflow: hidden !important;
}

/* Container d'onboarding — dans le flux flex (plus de position fixed centrée qui coupe la nav sur mobile) */
.onboarding-container {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: min(800px, 92vw);
    max-width: 800px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 120px);
    overflow: hidden;
    background: rgba(26, 0, 51, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    padding: 2rem 2.5rem 1.5rem;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

/* Zone scrollable (contenu des étapes) */
.ob-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

/* Scrollbar personnalisée */
.ob-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.ob-scroll-area::-webkit-scrollbar-track {
    background: rgba(26, 0, 51, 0.3);
    border-radius: 10px;
}

.ob-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    border-radius: 10px;
}

.ob-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.7);
}

/* Sélecteur de langue */
.ob-lang-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    flex-shrink: 0;
    position: relative;
}

/* Bouton aide ? */
.ob-help-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.15);
    color: rgba(168, 85, 247, 0.9);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ob-help-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
    border-color: rgba(168, 85, 247, 0.8);
}

/* Popup aide — position fixe pour ne pas créer de scroll */
.ob-help-popup {
    position: fixed;
    z-index: 10001;
    background: rgba(20, 5, 40, 0.97);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    padding: 0.8rem;
    min-width: 220px;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.ob-help-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ob-help-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.4rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ob-help-option:hover {
    background: rgba(168, 85, 247, 0.15);
    color: #fff;
}

.ob-help-icon {
    font-size: 1rem;
}

.ob-lang-btn {
    padding: 0.35rem 0.7rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s ease, border-color 0.2s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ob-lang-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.ob-lang-btn.active {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.onboarding-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.ob-logo-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: 0;
}

.ob-logo-title .nov { color: #b978f7; }
.ob-logo-title .ia { color: #18e7ff; }
.ob-logo-title .bot { color: #b978f7; }

.onboarding-header p {
    color: #999;
    font-size: 0.95rem;
}

/* Étapes progress */
.steps-progress {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 1px;
    margin-bottom: 2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.steps-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    transition: width 0.4s ease;
}

/* Contenu des étapes */
.ob-step-content {
    display: none;
}

.ob-step-content.active {
    display: block;
    animation: obFadeIn 0.3s ease;
}

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

.ob-step-content h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

/* Boutons de connexion */
/* Social items */
.ob-social-item {
    width: 100%;
    margin-bottom: 0.6rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}
.ob-social-item:hover {
    border-color: rgba(24, 231, 255, 0.5);
}
.ob-social-item.connected {
    border-color: #18e7ff;
}
.ob-social-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    color: #fff;
    transition: background 0.2s;
}
.ob-social-row:hover {
    background: rgba(24, 231, 255, 0.06);
}
.ob-social-item.connected .ob-social-row {
    color: #18e7ff;
}
.ob-social-label {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}
.ob-social-handle {
    font-size: 0.8rem;
    color: #18e7ff;
    opacity: 0.9;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ob-social-item.connected .ob-social-handle::before {
    content: '✓ ';
}
.ob-social-input {
    display: none;
    padding: 0 1rem 0.85rem;
    gap: 0.5rem;
    flex-direction: column;
}
.ob-social-item.editing .ob-social-input {
    display: flex;
}
.ob-social-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 6px;
    color: #fff;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.ob-social-input input:focus {
    border-color: #18e7ff;
}
.ob-social-input input::placeholder {
    color: rgba(255,255,255,0.3);
}
.ob-social-input select {
    background: rgba(22, 8, 40, 0.96);
    border: 1px solid rgba(185, 120, 247, 0.35);
    border-radius: 8px;
    color: #f3e8ff;
    padding: 0.58rem 0.75rem;
    font-size: 0.83rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
}
.ob-social-input select:focus {
    border-color: #18e7ff;
    box-shadow: 0 0 0 1px rgba(24, 231, 255, 0.28);
}
.ob-social-input select option {
    background: #1a0033;
    color: #f3e8ff;
}
.ob-social-save {
    background: rgba(24, 231, 255, 0.15);
    border: 1px solid rgba(24, 231, 255, 0.4);
    color: #18e7ff;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.ob-social-save:hover {
    background: rgba(24, 231, 255, 0.25);
}
.ob-social-close {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.18);
    color: rgba(255,255,255,0.85);
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    cursor: pointer;
}
.ob-social-close:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.1);
}
.ob-row-remove-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}
.ob-row-remove-btn:hover {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(248, 113, 113, 0.13);
    color: #fecaca;
}
.ob-row-remove-btn.disabled,
.ob-row-remove-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.ob-channel-hint {
    display: block;
    padding: 0.1rem 0.15rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
}
.ob-channel-hint span {
    color: rgba(210, 191, 255, 0.62);
    font-size: 0.69rem;
    line-height: 1.3;
}

/* Legacy connect btn (Discord) */
.ob-connect-btn {
    width: 100%;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ob-connect-btn:hover {
    color: #18e7ff;
}

.ob-connect-btn.connected {
    color: #18e7ff;
}

.ob-connect-btn.connected::after {
    content: ' ✓';
    color: #18e7ff;
}

.ob-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Beta intro */
.beta-intro {
    text-align: center;
}

.beta-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #a855f7, #18e7ff);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.beta-badge-simple {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.beta-features {
    margin-top: 1.5rem;
    text-align: left;
}

.beta-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

.beta-feature-item strong {
    color: #fff;
    display: block;
    margin-bottom: 0.3rem;
}

.beta-feature-item p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* Section Modo Twitch */
.mod-section {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 15px;
    animation: obSlideDown 0.3s ease;
}

.mod-section.show {
    display: block;
}

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

.mod-section h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.mod-section p {
    color: #999;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.mod-command-box {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    color: #18e7ff;
    font-size: 0.95rem;
    text-align: center;
}

.mod-actions {
    display: flex;
    gap: 0.8rem;
}

.mod-btn {
    flex: 1;
    padding: 0.9rem;
    background: rgba(145, 70, 255, 0.2);
    border: 1px solid rgba(145, 70, 255, 0.5);
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.mod-btn:hover {
    background: rgba(145, 70, 255, 0.3);
    border-color: #9146ff;
}

.mod-btn.primary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.mod-btn.primary:hover {
    color: #18e7ff;
    border-color: #18e7ff;
    background: rgba(24, 231, 255, 0.08);
}

/* Emotes grid (onboarding step 3) */
.ob-emotes-loading {
    text-align: center; padding: 1rem; color: #888; font-size: 0.85rem;
}
.ob-emotes-active-login {
    margin: 0.35rem 0 0.5rem;
    padding: 0.35rem 0.55rem;
    border-radius: 7px;
    border: 1px solid rgba(24, 231, 255, 0.35);
    background: rgba(24, 231, 255, 0.12);
    color: #b9f7ff;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.ob-emotes-grid {
    display: flex; flex-direction: column;
    gap: 0.5rem; max-height: 320px; overflow-y: auto;
    padding: 0.3rem;
}
.ob-emote-item {
    display: flex; flex-direction: column; gap: 0.35rem;
    padding: 0.5rem 0.6rem; border-radius: 8px;
    background: rgba(145, 70, 255, 0.08);
    border: 1px solid rgba(145, 70, 255, 0.2);
    transition: all 0.2s; user-select: none;
}
.ob-emote-item:hover {
    background: rgba(145, 70, 255, 0.15);
    border-color: rgba(145, 70, 255, 0.4);
}
.ob-emote-item.checked {
    background: rgba(145, 70, 255, 0.2);
    border-color: rgba(145, 70, 255, 0.5);
}
.ob-emote-row {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
}
.ob-emote-check {
    width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0;
    border: 2px solid rgba(145, 70, 255, 0.4);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 0.7rem;
}
.ob-emote-item.checked .ob-emote-check {
    background: #9146ff; border-color: #9146ff; color: #fff;
}
.ob-emote-img {
    width: 22px; height: 22px; object-fit: contain; flex-shrink: 0;
    border-radius: 3px; image-rendering: pixelated;
}
.ob-emote-name {
    font-size: 0.82rem; color: #ddd; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; font-weight: 500;
}
.ob-emote-item.checked .ob-emote-name { color: #fff; }
.ob-emote-context-input {
    width: 100%; padding: 0.3rem 0.5rem; border-radius: 5px;
    border: 1px solid rgba(145, 70, 255, 0.25);
    background: rgba(0,0,0,0.3); color: #ccc; font-size: 0.72rem;
    outline: none; transition: border-color 0.2s;
    font-family: inherit;
}
.ob-emote-context-input::placeholder { color: #666; font-style: italic; }
.ob-emote-context-input:focus {
    border-color: #9146ff; background: rgba(0,0,0,0.5); color: #fff;
}
/* Event tags row */
.ob-emote-events {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px;
}
.ob-emote-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.ob-event-group {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(24, 231, 255, 0.35);
    background: rgba(24, 231, 255, 0.1);
    color: #9cefff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
}
.ob-event-group:hover {
    background: rgba(24, 231, 255, 0.2);
    border-color: rgba(24, 231, 255, 0.55);
    color: #d9fbff;
}
.ob-event-tag {
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.74rem; font-weight: 650; letter-spacing: 0.01em;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22);
    color: #ddd; cursor: pointer; transition: all 0.2s; user-select: none;
    white-space: nowrap;
}
.ob-event-tag:hover { color: #fff; border-color: rgba(145, 70, 255, 0.6); background: rgba(145, 70, 255, 0.22); }
.ob-event-tag.active {
    color: #fff; background: rgba(145, 70, 255, 0.5);
    border-color: rgba(145, 70, 255, 0.85);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.ob-dock-note {
    margin-top: 0.3rem;
}
.ob-dock-note span {
    display: block;
    color: rgba(206, 188, 243, 0.65);
    font-size: 0.74rem;
}
/* Signature row */
.ob-emote-sig-row {
    display: flex; align-items: center; gap: 0.5rem; margin-top: 2px;
}
.ob-emote-sig-label {
    display: flex; align-items: center; gap: 0.3rem; cursor: pointer;
    font-size: 0.7rem; color: #a78bfa; white-space: nowrap;
}
.ob-emote-sig-label input[type="checkbox"] {
    width: 14px; height: 14px; accent-color: #9146ff; cursor: pointer;
}
.ob-emote-sig-hint {
    font-size: 0.65rem; color: #666; font-style: italic;
}
.ob-emotes-hint {
    color: #888; font-size: 0.75rem; text-align: center;
    margin: 0.6rem 0 0.3rem; line-height: 1.4;
}
.ob-emotes-actions {
    display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.4rem;
}
.ob-emotes-select-btn {
    padding: 0.3rem 0.8rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05); color: #aaa; cursor: pointer;
    font-size: 0.72rem; transition: all 0.2s;
}
.ob-emotes-select-btn:hover {
    background: rgba(255,255,255,0.1); color: #fff;
}
.ob-emotes-none {
    text-align: center; padding: 0.8rem; color: #888; font-size: 0.82rem;
}

/* Social hint (pastille ?) */
.ob-social-hint-btn {
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(29, 185, 84, 0.25); color: #1DB954;
    font-size: 0.7rem; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; flex-shrink: 0;
    border: 1px solid rgba(29, 185, 84, 0.4);
    transition: all 0.2s;
}
.ob-social-hint-btn:hover {
    background: rgba(29, 185, 84, 0.4);
}
.ob-social-hint {
    padding: 0.7rem 0.9rem;
    background: rgba(29, 185, 84, 0.08);
    border: 1px solid rgba(29, 185, 84, 0.2);
    border-radius: 8px; margin-top: 0.5rem;
}
.ob-hint-steps {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.78rem; color: #ccc; padding: 0.25rem 0;
    line-height: 1.4;
}
.ob-hint-steps strong { color: #1DB954; }
.ob-hint-step {
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(29, 185, 84, 0.3); color: #fff;
    font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Discord Beta section */
.discord-beta-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 15px;
}

.discord-beta-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.discord-beta-header h4 {
    color: #fff;
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.discord-beta-header p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* Toggles */
.ob-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    margin-bottom: 0.8rem;
}

.ob-toggle-info h4 {
    color: #fff;
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.ob-toggle-info p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

.ob-toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.ob-toggle-switch input {
    display: none;
}

.ob-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 26px;
    transition: 0.3s;
}

.ob-toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: #666;
    border-radius: 50%;
    transition: 0.3s;
}

.ob-toggle-switch input:checked + .ob-toggle-slider {
    background: rgba(24, 231, 255, 0.3);
}

.ob-toggle-switch input:checked + .ob-toggle-slider::before {
    transform: translateX(24px);
    background: #18e7ff;
}

/* Config options */
.config-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}
.config-option {
    flex: 1;
    padding: 1.5rem 1rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.config-option:hover {
    border-color: #18e7ff;
    background: rgba(26, 0, 51, 0.6);
}
.config-option.selected {
    border-color: #18e7ff;
    background: rgba(24, 231, 255, 0.1);
}
.config-option h4 {
    color: #fff;
    margin-bottom: 0.5rem;
}
.config-option p {
    color: #999;
    font-size: 0.85rem;
    margin: 0;
}

/* Panneau NOVIATRON / Config */
.ob-config-panel {
    margin-top: 1.2rem;
    padding: 1.2rem;
    background: rgba(15, 5, 30, 0.6);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 12px;
}
.ob-noviatron-hero {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.ob-noviatron-steps {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-bottom: 1.2rem;
}
.ob-noviatron-step {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.ob-noviatron-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: rgba(24, 231, 255, 0.15);
    border: 1px solid rgba(24, 231, 255, 0.4);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    color: #18e7ff;
}
.ob-noviatron-step strong {
    color: #fff;
    font-size: 0.9rem;
}
.ob-noviatron-step p {
    color: #999;
    font-size: 0.8rem;
    margin: 2px 0 0;
}
.ob-noviatron-dl {
    display: block;
    text-align: center;
    margin: 1.2rem auto 0.6rem;
    padding: 14px 36px;
    background: linear-gradient(135deg, #b978f7, #18e7ff);
    border: none;
    border-radius: 12px;
    color: #0a0320;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: filter 0.2s, transform 0.2s;
    box-shadow: 0 4px 20px rgba(24, 231, 255, 0.2), 0 2px 8px rgba(185, 120, 247, 0.15);
    max-width: 320px;
}
.ob-noviatron-dl:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(24, 231, 255, 0.3), 0 3px 12px rgba(185, 120, 247, 0.2);
}
.ob-noviatron-info {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

/* Identity options (étape profil) */
.identity-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1rem 0;
}
.identity-option {
    padding: 1rem 1.2rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.identity-option:hover {
    border-color: #18e7ff;
    background: rgba(26, 0, 51, 0.6);
}
.identity-option.selected {
    border-color: #18e7ff;
    background: rgba(24, 231, 255, 0.1);
}
.identity-option h4 {
    color: #fff;
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
}
.identity-option p {
    color: #999;
    font-size: 0.8rem;
    margin: 0;
}

/* Résultat scan */
.ob-scan-result-ok {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    color: #6ee7b7;
}
.ob-scan-result-err {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    color: #fca5a5;
}

/* Écran de finalisation */
.completion-content {
    text-align: center;
    padding: 1.5rem 0;
}

.completion-content h3 {
    font-size: 1.8rem;
    color: #18e7ff;
    margin-bottom: 1rem;
}

.completion-list {
    text-align: left;
    margin: 1.5rem 0;
}

.completion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: rgba(26, 0, 51, 0.4);
    border-radius: 8px;
}

.completion-item-icon {
    width: 24px;
    height: 24px;
    background: #18e7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Toggle OBS / Streamlabs */
.ob-software-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid rgba(168, 85, 247, 0.2);
}
.ob-sw-btn {
    flex: 1;
    padding: 0.55rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}
.ob-sw-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}
.ob-sw-btn.active {
    background: rgba(168, 85, 247, 0.25);
    color: #fff;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Intégration OBS */
.obs-integration h3 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.panel-url-box {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.url-copy-container {
    display: flex;
    gap: 0.5rem;
}

.panel-url-input {
    flex: 1;
    padding: 0.8rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    color: #18e7ff;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.copy-url-btn {
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-url-btn:hover {
    color: #18e7ff;
    border-color: #18e7ff;
    background: rgba(24, 231, 255, 0.08);
}

.obs-instructions {
    margin: 1.5rem 0;
}

.obs-step {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    background: rgba(26, 0, 51, 0.4);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
}

.obs-step-number {
    width: 36px;
    height: 36px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    flex-shrink: 0;
}

.obs-step-content {
    flex: 1;
}

.obs-step-content h4 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.obs-step-content p {
    color: #999;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.obs-step-content strong {
    color: #18e7ff;
}

.obs-action-btn {
    padding: 0.6rem 1rem;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.obs-action-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
    transform: translateY(-2px);
}

.obs-hint {
    display: flex;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    border-radius: 6px;
    margin-top: 0.8rem;
}

.obs-hint span {
    color: #ffc107;
    font-size: 0.85rem;
    line-height: 1.4;
}

.obs-hint.success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.obs-hint.success span {
    color: #4caf50;
}

.config-field {
    padding: 0.6rem;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 8px;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.field-label {
    color: #999;
    font-size: 0.8rem;
    min-width: 90px;
}

.config-field code {
    flex: 1;
    padding: 0.4rem;
    background: rgba(26, 0, 51, 0.6);
    border-radius: 6px;
    color: #18e7ff;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.obs-alternative {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(10, 10, 10, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 10px;
}

.obs-alternative h4 {
    color: #18e7ff;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.obs-alternative p {
    color: #999;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.obs-alternative ol {
    margin-left: 1.5rem;
    color: #999;
    line-height: 1.8;
}

.obs-alternative li {
    margin-bottom: 0.4rem;
}

/* Navigation — dans le flux flex sous la carte (toujours visible, safe-area) */
.step-navigation {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    flex: 0 0 auto;
    width: min(800px, 92vw);
    max-width: 800px;
    display: flex;
    gap: 0.65rem;
    z-index: 10051;
    padding-bottom: max(2px, env(safe-area-inset-bottom));
    align-items: stretch;
}

.ob-nav-btn {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.85rem, 3.2vw, 1.1rem);
    cursor: pointer;
    transition: color 0.2s ease;
    border-radius: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-nav-btn:hover:not(:disabled) {
    color: #18e7ff;
}

.ob-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.ob-nav-btn.primary {
    color: #fff;
    font-weight: 600;
    white-space: normal;
    text-align: center;
    hyphens: auto;
}

.ob-nav-btn.primary:hover:not(:disabled) {
    color: #18e7ff;
}

.skip-text {
    color: #666;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .onboarding-overlay.active {
        justify-content: flex-end;
    }

    .onboarding-container {
        padding: 1.25rem 1.1rem 1rem;
        width: min(800px, 96vw);
        max-width: 96vw;
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 108px);
    }
    .step-navigation {
        width: min(800px, 96vw);
        max-width: 96vw;
    }

    .config-options {
        flex-direction: column;
    }

    .steps-progress {
        height: 2px;
    }

    .obs-step {
        flex-direction: column;
        gap: 0.8rem;
    }

    .config-field {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-label {
        min-width: auto;
    }

    .mod-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .step-navigation {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .ob-nav-btn.primary {
        grid-column: 1 / -1;
        order: 3;
        padding: 12px 10px;
        font-size: 1rem;
    }
    .ob-nav-btn:not(.primary) {
        white-space: normal;
        text-align: center;
        font-size: 0.88rem;
        padding: 10px 6px;
    }
}

@media (max-width: 500px) {
    .url-copy-container {
        flex-direction: column;
    }

    .copy-url-btn {
        width: 100%;
        justify-content: center;
    }

    .onboarding-header h2 {
        font-size: 1.4rem;
    }

    .ob-lang-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }
}

/* Bouton "Lancer NOVIATRON" (déjà installé) */
.ob-noviatron-launch {
    display: inline-block;
    padding: 10px 28px;
    background: transparent;
    border: 2px solid rgba(24, 231, 255, 0.4);
    border-radius: 10px;
    color: #18e7ff;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.ob-noviatron-launch:hover {
    background: rgba(24, 231, 255, 0.1);
    border-color: #18e7ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(24, 231, 255, 0.15);
}

/* Bannière config déjà remplie */
.ob-config-filled {
    background: rgba(76, 255, 141, 0.06);
    border: 1px solid rgba(76, 255, 141, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 12px 0 6px;
}
