:root {
    --bg-main: #09090b;
    --bg-card: #141417;
    --bg-hover: #222227;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --gold: #fbbf24;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    width: 240px;
    background: #0c0c0e;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 6px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    padding: 11px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
    cursor: pointer;
    transition: 0.15s;
    border: none;
    background: none;
    width: 100%;
}

.sidebar a:hover,
.sidebar a.active {
    background: var(--bg-hover);
    color: var(--text-main);
}

.sidebar a.active i { color: var(--primary); }

/* 🔴 Lien LIVE de la sidebar */
.sidebar a.sidebar-live {
    color: #ef4444;
    font-weight: 800;
}

.sidebar a.sidebar-live i { color: #ef4444; }

.sidebar a.sidebar-live:hover {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

/* ── MAIN CONTAINER ─────────────────────────────────────── */
.app-container {
    flex-grow: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 240px);
}

header {
    background: rgba(9,9,11,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

main { padding: 28px 4%; flex-grow: 1; }

/* ── BOUTONS ────────────────────────────────────────────── */
.btn {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }

/* ── 🎨 HERO DÉCOUVRIR ──────────────────────────────────── */
.feed-hero {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 28px;
    overflow: hidden;
}

.feed-hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(400px circle at 8% 0%, rgba(99,102,241,0.18), transparent 55%),
        radial-gradient(420px circle at 95% 100%, rgba(251,191,36,0.09), transparent 55%);
    pointer-events: none;
}

.feed-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #f4f4f5 40%, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.feed-title i { color: var(--primary); -webkit-text-fill-color: var(--primary); }

.feed-publish-btn {
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.92rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 22px rgba(99,102,241,0.35);
}

.feed-publish-btn:hover { box-shadow: 0 8px 30px rgba(99,102,241,0.55); transform: translateY(-2px); }

/* ── GRILLE VIDÉOS ──────────────────────────────────────── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.video-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.25s cubic-bezier(.3,1,.4,1), box-shadow 0.25s, border-color 0.25s;
    animation: cardIn 0.4s ease backwards;
}

/* Apparition en cascade des cartes */
.video-card:nth-child(1) { animation-delay: 0.03s; }
.video-card:nth-child(2) { animation-delay: 0.07s; }
.video-card:nth-child(3) { animation-delay: 0.11s; }
.video-card:nth-child(4) { animation-delay: 0.15s; }
.video-card:nth-child(5) { animation-delay: 0.19s; }
.video-card:nth-child(6) { animation-delay: 0.23s; }
.video-card:nth-child(7) { animation-delay: 0.27s; }
.video-card:nth-child(8) { animation-delay: 0.31s; }

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

.video-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 18px 44px rgba(0,0,0,0.6), 0 0 0 1px rgba(99,102,241,0.35);
    border-color: rgba(99,102,241,0.5);
}

.thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.thumbnail img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.video-card:hover .thumbnail img { transform: scale(1.06); }

/* Dégradé en bas de la miniature pour la lisibilité */
.thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0,0,0,0.45));
    pointer-events: none;
}

.video-info { padding: 14px 16px 16px; }

.v-title {
    font-weight: 700;
    font-size: 0.96rem;
    margin-bottom: 9px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.v-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 6px;
}

.v-meta b { color: #c7d2fe; transition: color 0.15s; }
.v-meta b:hover { color: var(--primary); text-decoration: underline; }

/* Avatar du créateur sur la carte */
.v-channel-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
}

/* Durée / stats en overlay sur la miniature */
.v-views-pill {
    position: absolute;
    bottom: 8px; right: 8px;
    z-index: 2;
    background: rgba(0,0,0,0.78);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── 🎬 PRÉVISUALISATION 5s AU SURVOL ─────────────────── */
.preview-badge {
    position: absolute;
    bottom: 8px; left: 8px;
    z-index: 3;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
    animation: previewBadgeIn 0.25s ease;
}

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

.preview-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255,255,255,0.15);
    z-index: 4;
    pointer-events: none;
}

.preview-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 5s linear;
}

.exclusive-badge {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.82);
    color: var(--gold);
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: bold;
    backdrop-filter: blur(4px);
}

/* ── 🔴 GRILLE CRÉATEURS LIVE ──────────────────────────── */
.creators-live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.creator-live-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
    position: relative;
}

.creator-live-card:hover { transform: translateY(-4px); }

.creator-live-card.is-live {
    border-color: rgba(239,68,68,0.55);
    box-shadow: 0 0 18px rgba(239,68,68,0.15);
}

.creator-live-card.is-live:hover { box-shadow: 0 6px 26px rgba(239,68,68,0.3); }
.creator-live-card.is-offline:hover { border-color: var(--primary); }

.creator-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
}

.creator-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: 3px solid var(--border);
}

.is-live .creator-avatar {
    border-color: #ef4444;
    animation: livePulse 1.6s infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}

.is-offline .creator-avatar {
    filter: grayscale(0.85);
    opacity: 0.75;
}

.creator-status-badge {
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.62rem;
    font-weight: 900;
    padding: 2px 9px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.4px;
}

.creator-status-badge.live {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 2px 10px rgba(239,68,68,0.5);
}

.creator-status-badge.offline {
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.creator-live-card .c-name {
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creator-live-card .c-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── COMMUNAUTÉ ─────────────────────────────────────────── */
.community-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex-grow: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.chat-bubble {
    background: var(--bg-hover);
    padding: 10px 13px;
    border-radius: 8px;
}

.chat-user { font-weight: bold; color: var(--primary); font-size: 0.88rem; }
.chat-time { font-size: 0.75rem; color: var(--text-muted); margin-left: 6px; }
.chat-text { margin-top: 4px; font-size: 0.92rem; word-break: break-word; }

.chat-footer {
    padding: 10px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.chat-footer input {
    flex-grow: 1;
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
}

.chat-footer input:focus { border-color: var(--primary); }

/* ── STATS / DASHBOARD ──────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 { font-size: 1.7rem; color: var(--primary); margin-bottom: 4px; }
.stat-card p { color: var(--text-muted); font-size: 0.88rem; }

/* ── MODALS ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #0f0f12;
    border: 1px solid var(--border);
    padding: 28px;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0,0,0,0.7);
    position: relative;
}

.input-group { margin-bottom: 14px; }

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.modal input,
.modal select,
.modal textarea {
    width: 100%;
    padding: 11px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus { border-color: var(--primary); }
.modal textarea { height: 80px; resize: vertical; }
.close-modal { position: absolute; top: 16px; right: 18px; cursor: pointer; color: var(--text-muted); font-size: 1rem; }

/* ── 🏆 MODAL DES NIVEAUX ──────────────────────────────── */
.level-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    opacity: 0;
    animation: levelRowIn 0.4s ease forwards;
}

@keyframes levelRowIn {
    from { opacity: 0; transform: translateX(-14px); }
    to { opacity: 1; transform: translateX(0); }
}

.level-row.level-unlocked {
    border-color: color-mix(in srgb, var(--lvl-color) 45%, transparent);
    background: color-mix(in srgb, var(--lvl-color) 7%, var(--bg-hover));
}

.level-row.level-current {
    border-width: 2px;
    border-color: var(--lvl-color);
    box-shadow: 0 0 16px color-mix(in srgb, var(--lvl-color) 30%, transparent);
}

.level-row.level-locked { opacity: 0; filter: grayscale(0.4); }

.level-icon-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.level-unlocked .level-icon-wrap {
    border-color: var(--lvl-color);
}

/* ✓ pastille verte animée sur les niveaux débloqués */
.level-check {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
    animation: checkPop 0.45s cubic-bezier(.3,2.2,.5,1) backwards;
    animation-delay: inherit;
}

@keyframes checkPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.level-lock {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-card);
}

/* ── BADGES ─────────────────────────────────────────────── */
.badge-item {
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
}

/* ── 🔥 MUR DE POPULARITÉ ──────────────────────────────── */
.popularity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.pop-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
}

.pop-card h3 {
    font-size: 1rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.pop-row:last-child { border-bottom: none; }
.pop-row:hover { background: rgba(255,255,255,0.02); }

.pop-empty {
    color: var(--text-muted);
    font-size: 0.86rem;
    padding: 10px 0;
}

/* ── 🎮 MISSIONS ───────────────────────────────────────── */
.mission-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: 0.2s;
}

.mission-card:hover { border-color: var(--primary); }

.mission-claimed { opacity: 0.65; }
.mission-claimed:hover { border-color: var(--border); }

.mission-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: rgba(99,102,241,0.14);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* ── 👤 ICÔNE PROFIL (header, remplace le logo) ───────── */
.profile-icon-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: 0.15s;
    overflow: hidden;
    padding: 0;
}

.profile-icon-btn:hover {
    border-color: var(--gold);
    transform: scale(1.06);
    box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

.profile-icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-icon-letter {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
}

/* ── ☰ SIDEBAR CATÉGORIES MODERNE ──────────────────────── */
.cats-burger {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.18s;
}

.cats-burger:hover {
    background: #f97316;
    border-color: #f97316;
    color: #fff;
    box-shadow: 0 0 14px rgba(249,115,22,0.4);
}

.cats-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.cats-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.cats-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #0d0d0d;
    border-right: 1px solid #1f1f1f;
    z-index: 1200;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(.25,1,.35,1);
    overflow-y: auto;
    scrollbar-width: thin;
    box-shadow: 8px 0 40px rgba(0,0,0,0.6);
}

.cats-sidebar.open { transform: translateX(0); }

.cats-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px 14px;
    position: sticky;
    top: 0;
    background: #0d0d0d;
    z-index: 2;
}

.cats-sidebar-title {
    color: #fff;
    font-weight: 900;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cats-sidebar-title i { color: #f97316; }

.cats-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #1a1a1a;
    color: #aaa;
    cursor: pointer;
    transition: 0.15s;
}

.cats-close:hover { background: #f97316; color: #fff; }

.cats-section { padding: 8px 14px 22px; }

.cats-section-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 10px 8px 8px;
    letter-spacing: 0.2px;
}

/* Séparateur ORANGE sous le titre de section */
.cats-divider {
    height: 3px;
    width: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #f97316, rgba(249,115,22,0.15));
    margin: 0 0 10px;
}

.cats-link {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s, padding-left 0.15s, color 0.15s;
    user-select: none;
}

.cats-link:hover {
    background: #1a1a1a;
    padding-left: 20px;
    color: #f97316;
}

.cats-link.active {
    background: rgba(249,115,22,0.14);
    color: #f97316;
    border-left: 3px solid #f97316;
}

@media (max-width: 768px) {
    .cats-sidebar { width: min(82vw, 300px); }
}

/* ── 🗂️ BARRE DE CATÉGORIES (header) ──────────────────── */
.categories-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.cat-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: 0.15s;
}

.cat-arrow:hover { background: var(--bg-hover); color: var(--text-main); }

.cat-caret { font-size: 0.6rem; opacity: 0.6; margin-left: 2px; }

.categories-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-grow: 1;
    min-width: 0;
    padding: 2px 0;
    scroll-behavior: smooth;
}

/* ── 🗂️ PANNEAU SOUS-CATÉGORIES (menu déroulant empilé) ── */
.subcats-panel {
    position: sticky;
    top: 61px;
    z-index: 99;
    background: rgba(9,9,11,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 4%;
    animation: subcatsIn 0.18s ease;
}

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

/* Les sous-catégories sont CÔTE À CÔTE horizontalement (1 → 10) */
.subcats-scroll {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.subcat-chip {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.83rem;
    cursor: pointer;
    transition: 0.13s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.subcat-chip:hover {
    color: var(--text-main);
    background: var(--bg-hover);
    border-color: var(--primary);
}

.subcat-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.categories-bar::-webkit-scrollbar { display: none; }

.cat-chip {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cat-chip:hover { background: var(--bg-hover); color: var(--text-main); }

.cat-chip.active {
    background: var(--text-main);
    color: var(--bg-main);
    border-color: var(--text-main);
}

.cat-chip.cat-live { color: #ef4444; border-color: rgba(239,68,68,0.4); }
.cat-chip.cat-live.active { background: #ef4444; color: #fff; border-color: #ef4444; }

/* 📸 Onglet STORY en ORANGE */
.cat-chip.cat-story {
    color: #f97316;
    border-color: rgba(249,115,22,0.55);
    background: linear-gradient(135deg, rgba(249,115,22,0.14), rgba(244,63,94,0.07));
    font-weight: 800;
}

.cat-chip.cat-story:hover {
    background: linear-gradient(45deg, #f97316, #f43f5e);
    color: #fff;
    border-color: #f97316;
    box-shadow: 0 0 14px rgba(249,115,22,0.5);
}

/* 👑 Bouton VIP → offres.html */
.cat-chip.cat-vip {
    color: var(--gold);
    border-color: rgba(251,191,36,0.5);
    background: linear-gradient(135deg, rgba(251,191,36,0.12), rgba(251,191,36,0.04));
}

.cat-chip.cat-vip:hover {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    box-shadow: 0 0 14px rgba(251,191,36,0.45);
}

.live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    animation: blink 1.2s infinite;
}

.cat-chip.cat-live.active .live-dot { background: #fff; }

/* ── 🌐 SÉLECTEUR DE LANGUE ───────────────────────────── */
.lang-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: 0.12s;
    white-space: nowrap;
}

.lang-option:hover { background: var(--bg-hover); }
.lang-option.active { color: var(--primary); font-weight: bold; }

@media (max-width: 768px) {
    .categories-bar { max-width: 45vw; }
    #lang-btn span { display: none; }
}

/* ── 📱 MODE IMMERSIF SHORTS ───────────────────────────── */
/* Quand on regarde un Short : tout est rogné, seule la vidéo reste */
body.shorts-immersive .sidebar,
body.shorts-immersive .mobile-nav,
body.shorts-immersive header,
body.shorts-immersive .subcats-panel {
    display: none !important;
}

body.shorts-immersive .app-container {
    margin-left: 0 !important;
    width: 100% !important;
}

body.shorts-immersive main {
    padding: 0 !important;
}

body.shorts-immersive #shorts-view {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #000;
    padding: 0;
    margin: 0;
}

/* Cache le titre/onglets de la page shorts en immersif */
body.shorts-immersive #shorts-view > div:first-child {
    position: fixed;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 510;
    margin: 0 !important;
    background: transparent;
}

body.shorts-immersive #shorts-view h2 { display: none; }

body.shorts-immersive .shorts-scroller {
    height: 100vh !important;
    min-height: 100vh !important;
    max-width: min(56vh, 100vw);
    border-radius: 0;
}

/* Bouton de sortie du mode immersif */
.shorts-exit-btn {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 520;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.shorts-exit-btn:hover { background: rgba(99,102,241,0.8); transform: scale(1.08); }
body.shorts-immersive .shorts-exit-btn { display: flex; }

/* ── 📱 SHORTS (style TikTok) ──────────────────────────── */
.shorts-scroller {
    height: calc(100vh - 220px);
    min-height: 480px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    border-radius: 16px;
    background: #000;
    max-width: 480px;
    margin: 0 auto;
    scrollbar-width: none;
}

.shorts-scroller::-webkit-scrollbar { display: none; }

.short-card {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.short-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
}

.short-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 16px;
    pointer-events: none;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.75));
}

.short-info { pointer-events: auto; max-width: 75%; color: #fff; }

.short-actions {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.short-action-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 46px;
    border-radius: 12px;
    padding: 9px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    transition: 0.15s;
    backdrop-filter: blur(6px);
}

.short-action-btn i { font-size: 1.1rem; }
.short-action-btn:hover { background: rgba(255,255,255,0.25); }
.short-action-btn.liked { color: #ef4444; }
.short-action-btn.liked i { color: #ef4444; }

.short-comments-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    max-height: 60%;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.shorts-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.short-mini {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    border: 1px solid var(--border);
    transition: transform 0.15s;
}

.short-mini:hover { transform: scale(1.03); }

.short-mini-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff;
}

/* ── 🎬 GALERIE VIDÉOS ADMIN ───────────────────────────── */
.admin-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.admin-video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.18s;
}

.admin-video-card:hover { border-color: var(--primary); transform: translateY(-2px); }

.admin-video-card.selected {
    border: 2px solid #ef4444;
    box-shadow: 0 0 14px rgba(239,68,68,0.3);
}

.admin-video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.admin-video-thumb img,
.admin-video-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-check {
    position: absolute;
    top: 7px; left: 7px;
    z-index: 2;
    width: 22px; height: 22px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.5);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: 0.15s;
}

.admin-video-card.selected .admin-check {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.admin-type-pill {
    position: absolute;
    top: 7px; right: 7px;
    z-index: 2;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

/* ── 🔍 RECHERCHE NATURELLE ────────────────────────────── */
.nl-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 22px;
    transition: border-color 0.15s;
}

.nl-search-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 16px rgba(99,102,241,0.2); }

.nl-search-wrap input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.92rem;
}

/* ── 📸 STORIES ─────────────────────────────────────────── */
.stories-bar {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: 18px;
    scrollbar-width: none;
}

.stories-bar::-webkit-scrollbar { display: none; }
.stories-bar:empty { display: none; }

.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 0.15s;
}

.story-bubble:hover { transform: scale(1.06); color: var(--text-main); }

.story-ring {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-ring.unseen { background: linear-gradient(45deg, #f97316, #ef4444, #8b5cf6, #6366f1); }
.story-ring.seen { background: var(--border); }
.story-ring.add { background: var(--bg-hover); border: 2px dashed var(--primary); color: var(--primary); font-size: 1.2rem; }

.story-ring img, .story-initial {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.3rem;
    border: 3px solid var(--bg-main);
}

/* ── 📸 FLOWGRAM (mini Instagram) ──────────────────────── */
:root { --insta-orange: #f97316; }

.insta-shell { max-width: 540px; margin: 0 auto; }

.insta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 2px 14px;
}

.insta-logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, #f97316, #f43f5e, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
}

/* 🔴 Bouton "Lancer un live" (profil FlowGram) */
.insta-golive-btn {
    font-size: 0.78rem;
    background: linear-gradient(45deg, #ef4444, #f43f5e);
    border: none;
    color: #fff;
    font-weight: 800;
    gap: 6px;
}

.insta-golive-btn:hover { box-shadow: 0 0 16px rgba(239,68,68,0.55); transform: translateY(-1px); }
.insta-golive-btn .live-dot { background: #fff; }

/* ➕ Pastille plus sur la bulle "Ta story" (quand pas de story) */
.story-add-plus {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--insta-orange, #f97316);
    color: #fff;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
}

/* 🔴 Bouton LIVE du header FlowGram */
.insta-live-btn {
    color: #ef4444;
    border-color: rgba(239,68,68,0.5);
    font-weight: 800;
    font-size: 0.8rem;
    gap: 6px;
}

.insta-live-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239,68,68,0.5);
}

.insta-live-btn:hover .live-dot { background: #fff; }

.insta-tabs {
    display: flex;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.insta-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.15s;
}

.insta-tab.active {
    color: var(--insta-orange);
    border-bottom-color: var(--insta-orange);
}

.insta-feed { display: flex; flex-direction: column; gap: 22px; }

.insta-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.insta-post-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
}

.insta-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.insta-avatar-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f97316, #f43f5e);
    color: #fff;
    font-weight: 800;
    width: 34px; height: 34px;
    border-radius: 50%;
}

.insta-post-img {
    background: #000;
    cursor: pointer;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.insta-post-img img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
}

.insta-post-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 4px;
}

.insta-action {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.15s;
}

.insta-action:hover { transform: scale(1.15); }
.insta-action.liked { color: #f43f5e; }
.insta-action.pop { animation: likePop 0.35s cubic-bezier(.3,2.4,.5,1); }

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.insta-caption { padding: 4px 14px 10px; font-size: 0.88rem; line-height: 1.5; }
.insta-comments { padding: 0 14px 14px; }
.insta-comment { font-size: 0.84rem; padding: 3px 0; }

/* Profil insta */
.insta-profile-head {
    display: flex;
    gap: 22px;
    align-items: center;
    padding: 14px 6px 22px;
    flex-wrap: wrap;
}

.insta-profile-avatar {
    width: 84px; height: 84px;
    min-width: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--insta-orange);
    padding: 2px;
}

.insta-stats {
    display: flex;
    gap: 22px;
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.insta-stats b { color: var(--text-main); }

.insta-follow-btn {
    font-size: 0.8rem;
    background: linear-gradient(45deg, #f97316, #f43f5e);
    border: none;
    color: #fff;
    font-weight: 800;
}

.insta-follow-btn.following {
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.insta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.insta-grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.insta-grid-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}

.insta-grid-item:hover img { transform: scale(1.07); }

.insta-grid-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.18s;
}

.insta-grid-item:hover .insta-grid-overlay { opacity: 1; }

/* ── 🔍 CAMÉRA AGRANDIE (Watch Party) ──────────────────── */
.wp-cam-expand {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wp-cam-expand-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    max-width: min(720px, 94vw);
    width: 100%;
}

.wp-cam-expand-box img {
    width: 100%;
    display: block;
    image-rendering: auto;
}

.wp-cam-screen { cursor: zoom-in; }

/* ── 📜 FEED STORIES (style Instagram, scroll vertical) ── */
.storyfeed-scroll {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 480px;
    margin: 0 auto;
}

.storyfeed-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.storyfeed-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.storyfeed-card.seen { opacity: 0.75; }

.storyfeed-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.storyfeed-new {
    font-size: 0.62rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 9px;
    background: linear-gradient(45deg, #f97316, #ef4444);
    color: #fff;
    letter-spacing: 0.5px;
}

.storyfeed-preview {
    position: relative;
    aspect-ratio: 4/5;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.storyfeed-preview img,
.storyfeed-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.storyfeed-textbg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e1b4b, #4c1d95, #312e81);
}

.storyfeed-caption {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    background: rgba(0,0,0,0.5);
    padding: 7px 14px;
    border-radius: 10px;
    max-width: 88%;
    backdrop-filter: blur(4px);
}

.storyfeed-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.storyfeed-playhint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    background: rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.18s;
}

.storyfeed-card:hover .storyfeed-playhint { opacity: 1; }

.storyfeed-playhint i {
    width: 54px; height: 54px;
    background: rgba(99,102,241,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}

/* ── Visionneuse de story ── */
.story-viewer {
    width: min(420px, 94vw);
    height: min(78vh, 740px);
    background: #0c0c0e;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.story-progress-row { display: flex; gap: 4px; padding: 10px 12px 6px; }

.story-seg {
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255,255,255,0.25);
}

.story-seg.done { background: #fff; }
.story-seg.active { background: var(--primary); animation: segFill 6s linear; transform-origin: left; }

@keyframes segFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.story-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px 10px;
    color: #fff;
    font-size: 0.85rem;
    gap: 8px;
}

.story-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    padding: 10px;
    gap: 14px;
    overflow: hidden;
}

.story-text-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1e1b4b, #4c1d95, #312e81);
}

.story-caption {
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
    background: rgba(0,0,0,0.35);
    padding: 8px 16px;
    border-radius: 12px;
    max-width: 90%;
}

.story-poll, .story-countdown {
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px 18px;
    color: #fff;
    width: 84%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.story-poll-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 9px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.13s;
}

.story-poll-btn:hover { background: var(--primary); border-color: var(--primary); }

.story-poll-result {
    position: relative;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 8px 12px;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.story-poll-result .fill {
    position: absolute;
    inset: 0;
    background: rgba(99,102,241,0.45);
    border-radius: 10px;
    transition: width 0.5s;
}

.story-poll-result span, .story-poll-result b { position: relative; z-index: 1; }

.story-nav {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 6px;
    pointer-events: none;
}

.story-nav button {
    pointer-events: auto;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
}

.story-nav button:disabled { opacity: 0.25; }

/* ── ▶ CONTINUER À REGARDER ───────────────────────────── */
#continue-watching:empty { display: none; }

.cw-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    scrollbar-width: thin;
}

.cw-card {
    flex-shrink: 0;
    width: 210px;
    cursor: pointer;
    transition: transform 0.15s;
}

.cw-card:hover { transform: translateY(-3px); }

.cw-thumb {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

.cw-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cw-time {
    position: absolute;
    bottom: 8px; left: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 5px;
}

.cw-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(255,255,255,0.2);
}

.cw-progress div { height: 100%; background: #ef4444; }

.cw-title {
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

/* ── 🗺️ CARTE DU CONTENU ──────────────────────────────── */
.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.map-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: 0.15s;
}

.map-card:hover { border-color: var(--primary); }

/* ── 🎬 WATCH PARTY ────────────────────────────────────── */
.wp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.wp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: 0.18s;
}

.wp-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.wp-card.wp-full { opacity: 0.6; }

.wp-members-pill {
    font-size: 0.7rem;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.4);
}

.wp-members-pill.full {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border-color: rgba(239,68,68,0.4);
}

.wp-room {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 980px) {
    .wp-room { grid-template-columns: 1fr; }
}

.wp-player-zone {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    min-height: 200px;
}

/* ── 📷 CAMÉRAS WATCH PARTY ────────────────────────────── */
.wp-cams-row {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.wp-cam-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 120px;
}

.wp-cam-screen {
    width: 120px;
    height: 90px;
    border-radius: 12px;
    background: #000;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wp-cam-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-cam-tile.cam-on .wp-cam-screen {
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,0.3);
}

.wp-cam-tile.cam-declined .wp-cam-screen {
    border-color: rgba(239,68,68,0.5);
    opacity: 0.5;
}

.wp-cam-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.wp-cam-tile.cam-on .wp-cam-name { color: #22c55e; }

.wp-cam-mic { font-size: 0.65rem; }

.wp-mute-btn {
    font-size: 0.65rem;
    padding: 3px 9px;
    margin-top: 2px;
}

.wp-mute-btn.muted {
    color: #ef4444;
    border-color: #ef4444;
}

.wp-cam-ask {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 0.88rem;
    animation: subcatsIn 0.25s ease;
}

.wp-chat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-chat-messages {
    flex-grow: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── 🎤 MESSAGES VOCAUX ────────────────────────────────── */
#wp-voice-btn.recording {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    animation: recPulse 1.2s infinite;
}

@keyframes recPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 0 7px rgba(239,68,68,0); }
}

.wp-voice-recording {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(239,68,68,0.1);
    border-top: 1px solid rgba(239,68,68,0.35);
    font-size: 0.8rem;
    color: #ef4444;
    font-weight: 700;
}

.wp-rec-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #ef4444;
    animation: blink 1s infinite;
}

.wp-voice-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 18px;
    padding: 6px 12px;
    width: fit-content;
}

.wp-voice-play {
    width: 30px; height: 30px;
    min-width: 30px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.wp-voice-play:hover { background: var(--primary-hover); transform: scale(1.08); }

.wp-voice-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 18px;
}

.wp-voice-wave span {
    width: 3px;
    border-radius: 2px;
    background: var(--primary);
    opacity: 0.65;
}

.wp-voice-wave span:nth-child(1) { height: 6px; }
.wp-voice-wave span:nth-child(2) { height: 12px; }
.wp-voice-wave span:nth-child(3) { height: 17px; }
.wp-voice-wave span:nth-child(4) { height: 9px; }
.wp-voice-wave span:nth-child(5) { height: 15px; }
.wp-voice-wave span:nth-child(6) { height: 7px; }
.wp-voice-wave span:nth-child(7) { height: 13px; }
.wp-voice-wave span:nth-child(8) { height: 5px; }

.wp-voice-wave.playing span {
    animation: waveBounce 0.7s infinite ease-in-out alternate;
}

.wp-voice-wave.playing span:nth-child(2n) { animation-delay: 0.15s; }
.wp-voice-wave.playing span:nth-child(3n) { animation-delay: 0.3s; }

@keyframes waveBounce {
    from { transform: scaleY(0.5); }
    to { transform: scaleY(1.25); }
}

/* ── 👮 ADMIN ──────────────────────────────────────────── */
.admin-badge {
    display: none;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0 5px;
    margin-left: 4px;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ── MOBILE ─────────────────────────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #0c0c0e;
    border-top: 1px solid var(--border);
    z-index: 99;
    justify-content: space-around;
    padding: 12px 0;
}

.mobile-nav a {
    color: var(--text-muted);
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.mobile-nav a.active { color: var(--primary); }

@media (max-width: 900px) {
    .community-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    .app-container { margin-left: 0; width: 100%; }
    main { padding-bottom: 80px; }
    .video-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
}

@media (max-width: 480px) {
    .video-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
