/* ============================================================
   onboarding.css — Modal d'onboarding post-inscription
   Thème sombre WorldOfMetal (rouge #8b0000 / #cc3300)
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────────── */
.onb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.onb-overlay.onb-visible {
    opacity: 1;
}

/* ── Modal ───────────────────────────────────────────────────── */
.onb-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    transition: transform 0.35s ease;
}

.onb-overlay.onb-visible .onb-modal {
    transform: translateY(0);
}

/* ── Barre de progression ────────────────────────────────────── */
.onb-progress-track {
    height: 4px;
    background: #222;
    flex-shrink: 0;
}

.onb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b0000, #cc3300);
    transition: width 0.45s ease;
}

.onb-step-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #666;
    padding: 8px 20px 0;
    text-align: right;
    flex-shrink: 0;
}

/* ── Corps (scrollable) ──────────────────────────────────────── */
.onb-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px 8px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.onb-body::-webkit-scrollbar { width: 4px; }
.onb-body::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* ── En-tête d'étape ─────────────────────────────────────────── */
.onb-header {
    margin-bottom: 18px;
}

.onb-title {
    font-family: 'Bebas Neue', 'Cinzel', serif;
    font-size: 1.6rem;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: 0.02em;
}

.onb-desc {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* ── Étape 1 — Grille de genres ──────────────────────────────── */
.onb-genres-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.onb-pill {
    padding: 7px 14px;
    border: 1px solid #333;
    border-radius: 20px;
    background: #1a1a1a;
    color: #bbb;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s;
    user-select: none;
    line-height: 1;
}

.onb-pill:hover {
    border-color: #8b0000;
    color: #fff;
}

.onb-pill--on {
    background: #8b0000;
    border-color: #cc3300;
    color: #fff;
    transform: scale(1.04);
}

/* ── Étape 2 — Recherche et liste de groupes ─────────────────── */
.onb-search-wrap {
    margin-bottom: 12px;
}

.onb-search-input {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.onb-search-input:focus {
    border-color: #8b0000;
}

.onb-search-input::placeholder { color: #555; }

.onb-groups-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;
}

.onb-loader,
.onb-empty {
    text-align: center;
    color: #555;
    font-size: 0.85rem;
    padding: 24px 0;
}

.onb-group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #181818;
    border: 1px solid #222;
    transition: background 0.15s;
}

.onb-group-item:hover { background: #1f1f1f; }

.onb-group-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.onb-group-img-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.onb-group-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.onb-group-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onb-group-genre {
    font-size: 0.73rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.onb-follow-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    border: 1px solid #333;
    border-radius: 16px;
    background: transparent;
    color: #aaa;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.onb-follow-btn:hover { border-color: #8b0000; color: #fff; }

.onb-follow-btn--on {
    background: #8b0000;
    border-color: #cc3300;
    color: #fff;
}

/* ── Étape 3 — Autocomplétion ville ──────────────────────────── */
.onb-city-wrap {
    position: relative;
}

.onb-city-input {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.onb-city-input:focus { border-color: #8b0000; }
.onb-city-input::placeholder { color: #555; }

.onb-city-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 10;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.onb-city-option {
    padding: 10px 14px;
    font-size: 0.87rem;
    color: #ccc;
    cursor: pointer;
    transition: background 0.12s;
}

.onb-city-option:hover { background: #2a2a2a; color: #fff; }
.onb-city-option + .onb-city-option { border-top: 1px solid #222; }

.onb-city-badge {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #cc3300;
    font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────── */
.onb-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px 18px;
    border-top: 1px solid #1e1e1e;
    flex-shrink: 0;
    gap: 12px;
}

.onb-btn-skip {
    background: none;
    border: none;
    color: #555;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.15s;
    white-space: nowrap;
}

.onb-btn-skip:hover { color: #999; }

.onb-btn-primary {
    flex: 1;
    max-width: 200px;
    padding: 11px 20px;
    background: linear-gradient(135deg, #8b0000, #cc3300);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.12s;
    letter-spacing: 0.02em;
}

.onb-btn-primary:hover:not(:disabled) { opacity: 0.88; transform: scale(1.01); }

.onb-btn-primary:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .onb-modal {
        max-height: 95vh;
        border-radius: 12px 12px 0 0;
        margin-top: auto;
    }

    .onb-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .onb-title { font-size: 1.35rem; }

    .onb-btn-primary { max-width: none; }
}
