:root {
    --bg: #09090b;
    --surface: #141418;
    --surface-hover: #1e1e24;
    --border: #25252c;
    --brand-red: #e50914;
    --brand-red-hover: #c80812;
    --brand-yellow: #fbbf24;
    --brand-yellow-soft: rgba(251, 191, 36, 0.14);
    --text: #ffffff;
    --text-soft: #e4e4e7;
    --muted: #9ca3af;
}

/* Défilement fluide global + barre de défilement auto-masquée style NetPlex */
html {
    scroll-behavior: smooth;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
html.is-scrolling {
    scrollbar-color: rgba(229, 9, 20, 0.8) transparent;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}
html.is-scrolling ::-webkit-scrollbar-thumb,
.actor-bubble:hover::-webkit-scrollbar-thumb,
.actor-bio:hover::-webkit-scrollbar-thumb,
.jf-genre-checklist:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.88) 0%, rgba(251, 191, 36, 0.88) 100%);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--brand-red) 0%, var(--brand-yellow) 100%) !important;
}

* { box-sizing: border-box; font-family: system-ui, -apple-system, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text); padding-bottom: 4.5rem; overflow-x: hidden; }

/* Barre de navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.2rem;
    background: #050507;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.8rem;
}
.brand-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.15s ease;
}
.brand-logo-link:hover .brand-logo-img {
    transform: scale(1.03);
}
.nav-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    padding: 0.5rem 0.95rem;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.15s;
}
.nav-btn:hover { background: var(--surface); color: var(--text); }
.nav-btn.active {
    background: var(--surface);
    color: var(--text);
    border-bottom: 2px solid var(--brand-red);
}

.label-mobile { display: none; }
.label-desktop { display: inline; }
.status-pill { padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.84rem; font-weight: 700; white-space: nowrap; }
.status-pill.online { background: rgba(34,197,94,0.14); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.status-pill.maintenance { background: var(--brand-yellow-soft); color: var(--brand-yellow); border: 1px solid rgba(251,191,36,0.35); }
.status-pill.updating { background: rgba(255,255,255,0.1); color: var(--text); border: 1px solid rgba(255,255,255,0.25); }
.status-pill.offline { background: rgba(229,9,20,0.16); color: #f87171; border: 1px solid rgba(229,9,20,0.35); }

.container { max-width: 1440px; margin: 2rem auto; padding: 0 2rem; position: relative; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.section-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.2rem 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.section-heading::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.15em;
    background: linear-gradient(to bottom, var(--brand-red), var(--brand-yellow));
    border-radius: 99px;
    flex-shrink: 0;
}

/* Accueil Hero */
.hero {
    background: radial-gradient(circle at top right, rgba(229, 9, 20, 0.14), transparent 55%),
                radial-gradient(circle at bottom left, rgba(251, 191, 36, 0.08), transparent 50%),
                var(--surface);
    padding: 2.2rem 2.5rem;
    border-radius: 14px;
    margin-bottom: 2.2rem;
    border: 1px solid var(--border);
}
.hero h1 { margin: 0 0 0.5rem 0; font-size: 1.9rem; color: var(--text); }
.hero h1 span { color: var(--brand-red); }
.hero p { margin: 0 0 1.4rem 0; color: var(--text-soft); font-size: 1.05rem; }

.btn-primary {
    background: var(--brand-red);
    color: var(--text);
    border: none;
    padding: 0.7rem 1.35rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: background 0.15s, transform 0.15s;
}
.btn-primary:hover { background: var(--brand-red-hover); transform: translateY(-1px); }

.btn-notif-active {
    background: var(--brand-yellow-soft);
    color: var(--brand-yellow);
    border: 1px solid rgba(251, 191, 36, 0.45);
    padding: 0.7rem 1.35rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-available {
    background: #0d2b18;
    color: #4ade80;
    border: 1px solid #22c55e;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}
.btn-available:hover { background: #22c55e; color: #052e16; }

/* En-tête Catalogue */
.naka-header { margin-bottom: 1.6rem; }
.naka-title { font-size: 2.1rem; font-weight: 800; margin: 0 0 0.3rem 0; letter-spacing: -0.5px; color: var(--text); }
.naka-subtitle { color: var(--muted); margin: 0 0 1.2rem 0; font-size: 0.95rem; }
.naka-search-wrapper { position: relative; max-width: 520px; }
.naka-search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: color 0.2s ease; }
.naka-search-input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1rem 0.8rem 2.6rem;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.naka-search-input:focus {
    outline: none;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

/* Barre de contrôles Catalogue */
.naka-controls-wrapper { position: relative; margin-bottom: 1.6rem; }
.naka-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.naka-segmented { display: inline-flex; background: var(--surface); padding: 4px; border-radius: 10px; border: 1px solid var(--border); gap: 2px; }
.naka-seg-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 0.45rem 1rem;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.naka-seg-btn:hover { color: var(--text); }
.naka-seg-btn.active { background: var(--brand-red); color: var(--text); }

.naka-tools { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }

/* Curseur de zoom périodique */
.naka-zoom-box {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    border-radius: 9px;
    color: var(--muted);
}
.naka-zoom-box input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 105px;
    height: 4px;
    background: repeating-linear-gradient(
        to right,
        #52525e 0px,
        #52525e 2px,
        #26262e 2px,
        #26262e calc(100% / 6)
    );
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
.naka-zoom-box input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-yellow);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
    transition: transform 0.15s ease;
}
.naka-zoom-box input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.naka-zoom-box input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: var(--brand-yellow);
    cursor: pointer;
}

.naka-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 0.9rem;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.naka-pill-btn svg { pointer-events: none; color: var(--muted); }
.naka-pill-btn:hover { background: var(--surface-hover); border-color: #3f3f4a; }
.naka-pill-btn.active { background: var(--surface-hover); border-color: var(--brand-yellow); color: var(--brand-yellow); }
.naka-total-count { font-size: 0.88rem; color: var(--muted); margin-left: 0.25rem; white-space: nowrap; }
.naka-total-count strong { color: var(--text); transition: opacity 0.2s ease; }

/* Popovers */
.naka-popover { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; background: #16161b; border: 1px solid #30303a; border-radius: 12px; padding: 1.2rem; box-shadow: 0 20px 45px rgba(0,0,0,0.9); }
.naka-popover-sort { width: 280px; }
.naka-popover-filters { width: 100%; max-width: 540px; }
.naka-popover-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.7rem; color: var(--text); }
.jf-popover-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.jf-link-btn { background: none; border: none; color: var(--brand-yellow); cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.mobile-only-close { display: none; }
.jf-radio-list { display: flex; flex-direction: column; gap: 0.2rem; }
.jf-radio { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.5rem; border-radius: 7px; font-size: 0.88rem; color: var(--text-soft); cursor: pointer; }
.jf-radio:hover { background: #23232b; }
.jf-radio input { accent-color: var(--brand-red); }
.jf-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.jf-label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; font-weight: 600; }

/* Liste de genres à cocher */
.jf-genre-checklist { display: flex; flex-direction: column; gap: 0.2rem; max-height: 220px; overflow-y: auto; background: #0d0d10; border: 1px solid var(--border); border-radius: 8px; padding: 0.45rem; }
.jf-checkbox-item { display: flex; align-items: center; gap: 0.65rem; padding: 0.45rem 0.55rem; border-radius: 6px; font-size: 0.88rem; color: var(--text-soft); cursor: pointer; }
.jf-checkbox-item:hover { background: #1c1c22; color: var(--text); }
.jf-checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand-yellow); cursor: pointer; margin: 0; }

/* Grille d'affiches par paliers + animations smooth de recherche */
.naka-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.35rem 1.05rem;
    transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.naka-grid.is-filtering {
    opacity: 0.35;
    transform: translateY(4px);
}
.catalog-zoom-grid[data-cols="9"] { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 0.9rem 0.75rem; }
.catalog-zoom-grid[data-cols="8"] { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 1.05rem 0.85rem; }
.catalog-zoom-grid[data-cols="7"] { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1.2rem 0.95rem; }
.catalog-zoom-grid[data-cols="6"] { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.35rem 1.05rem; }
.catalog-zoom-grid[data-cols="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem 1.2rem; }
.catalog-zoom-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.7rem 1.4rem; }
.catalog-zoom-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.65rem; }

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

.naka-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transform-origin: center top;
    will-change: transform, opacity;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.naka-card.card-enter {
    animation: cardReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.naka-card:hover { transform: translateY(-4px); }
.naka-poster-box {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.2s;
}
.naka-card:hover .naka-poster-box { border-color: rgba(251, 191, 36, 0.5); }
.naka-poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}
.naka-card:hover .naka-poster-box img { transform: scale(1.04); }
.naka-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,5,7,0.9) 0%, transparent 45%);
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
}
.naka-card:hover .naka-poster-overlay { opacity: 1; }
.naka-card-title {
    margin: 0.55rem 0 0.15rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.naka-card-meta {
    font-size: 0.76rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Badges de statut opaques et lisibles */
.req-status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 5;
    padding: 0.36rem 0.55rem;
    border-radius: 7px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-align: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tmdb-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.req-status-badge.sent,
.tmdb-status-pill.sent {
    background: #141418;
    color: #ffffff;
    border: 1.5px solid #52525b;
}
.req-status-badge.waiting,
.tmdb-status-pill.waiting {
    background: #1c1d24;
    color: #e4e4e7;
    border: 1.5px solid #71717a;
}
.req-status-badge.downloading,
.tmdb-status-pill.downloading {
    background: #271c05;
    color: #fbbf24;
    border: 1.5px solid #f59e0b;
}
.req-status-badge.failed,
.tmdb-status-pill.failed {
    background: #2b090c;
    color: #fca5a5;
    border: 1.5px solid #e50914;
}

/* LÉGENDE DES ÉTATS FIXÉE TOUT À GAUCHE DE L'ÉCRAN (HORS ALIGNEMENT DU CONTENEUR) */
.status-legend-box {
    position: fixed;
    left: 1.25rem;
    top: 5.5rem;
    width: 245px;
    z-index: 40;
    background: rgba(20, 20, 24, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
}
.status-legend-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.status-legend-title::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--brand-yellow);
    border-radius: 99px;
}
.status-legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.status-legend-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.38rem;
    background: #0d0d10;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.7rem;
    border-radius: 9px;
}
.status-legend-item .tmdb-status-pill {
    width: 100%;
    justify-content: center;
    font-size: 0.73rem;
    padding: 0.34rem 0.5rem;
}
.status-legend-desc {
    font-size: 0.76rem;
    color: var(--text-soft);
    line-height: 1.35;
}

/* Sur écrans moyens où l'écran n'est pas assez large pour coller la boîte hors du conteneur sans chevauchement */
@media (max-width: 1920px) and (min-width: 851px) {
    #tab-demandes .demandes-content-area {
        margin-left: 255px;
    }
}

@media (max-width: 850px) {
    .status-legend-box {
        position: static;
        width: 100%;
        margin-bottom: 1.5rem;
    }
}

/* PAGE FICHE MÉDIA COMPLÈTE */
.detail-close-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
    transition: background 0.15s, border-color 0.15s;
}
.detail-close-btn:hover { background: var(--surface-hover); border-color: var(--brand-yellow); }

.detail-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    filter: blur(2px);
}
.detail-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #09090b 25%, rgba(9,9,11,0.75) 100%);
}
.detail-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 2.2rem;
    padding: 2.2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.detail-poster {
    width: 240px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 35px rgba(0,0,0,0.85);
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.detail-info { flex: 1; min-width: 260px; }
.detail-title { font-size: 2.1rem; font-weight: 800; margin: 0 0 0.6rem 0; color: var(--text); }
.detail-meta-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; color: var(--text-soft); font-size: 0.92rem; margin-bottom: 1.1rem; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.3rem; }
.btn-play-jellyfin {
    background: var(--brand-red);
    color: var(--text);
    text-decoration: none;
    padding: 0.85rem 1.8rem;
    border-radius: 9px;
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.4);
    transition: transform 0.15s, background 0.15s;
}
.btn-play-jellyfin:hover { background: var(--brand-red-hover); transform: translateY(-2px); }

.detail-section { margin-top: 2rem; }
.detail-section h3 {
    font-size: 1.2rem;
    margin: 0 0 0.9rem 0;
    color: var(--text);
    border-left: 3px solid var(--brand-yellow);
    padding-left: 0.7rem;
}
.detail-synopsis { color: var(--text-soft); line-height: 1.65; font-size: 0.98rem; background: var(--surface); padding: 1.3rem; border-radius: 12px; border: 1px solid var(--border); }

.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 1rem; }
.cast-card { background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); text-align: center; transition: transform 0.18s, border-color 0.18s; }
.cast-card.clickable { cursor: pointer; }
.cast-card.clickable * { pointer-events: none; }
.cast-card.clickable:hover { transform: translateY(-4px); border-color: var(--brand-yellow); }
.cast-card img { width: 100%; height: 170px; object-fit: cover; display: block; background: #0d0d10; }
.cast-info { padding: 0.6rem 0.5rem; }
.cast-name { font-weight: 700; font-size: 0.83rem; color: var(--text); margin-bottom: 0.2rem; }
.cast-char { font-size: 0.75rem; color: var(--muted); }

.trailer-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); background: #000; }
.trailer-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* BULLE ACTEUR QUASI PLEIN ÉCRAN AVEC FOND FLOUTÉ */
.actor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(5, 5, 8, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.actor-backdrop.visible { opacity: 1; }
.actor-bubble {
    width: 94vw;
    max-width: 1240px;
    height: 90vh;
    background: rgba(20, 20, 25, 0.94);
    border: 1px solid #32323d;
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.92);
    padding: 2.2rem 2.5rem;
    overflow-y: auto;
    position: relative;
}
.actor-close-btn {
    position: sticky;
    top: 0;
    float: right;
    z-index: 10;
    background: var(--brand-red);
    color: var(--text);
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.45);
    transition: background 0.15s, transform 0.15s;
}
.actor-close-btn:hover { background: var(--brand-red-hover); transform: scale(1.04); }

.actor-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    clear: both;
}
.actor-photo {
    width: 190px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    border: 2px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}
.actor-meta { flex: 1; min-width: 240px; }
.actor-meta h2 { margin: 0 0 0.4rem 0; font-size: 2rem; color: var(--text); }
.actor-birth { color: var(--brand-yellow); font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.actor-bio {
    color: var(--text-soft);
    line-height: 1.68;
    font-size: 0.96rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.5rem;
    white-space: pre-line;
}
.actor-section h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    color: var(--text);
    border-left: 3px solid var(--brand-yellow);
    padding-left: 0.7rem;
}
.actor-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.2rem 1rem;
}

/* FOIRE AUX QUESTIONS (ACCORDÉON) */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.faq-item:hover {
    border-color: #363640;
}
.faq-item.open {
    border-color: rgba(251, 191, 36, 0.45);
    background: #17171c;
}
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 1.1rem 1.35rem;
    font-size: 0.98rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-question:hover {
    color: var(--brand-yellow);
}
.faq-chevron {
    color: var(--muted);
    flex-shrink: 0;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--brand-yellow);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-answer p {
    margin: 0;
    padding: 0 1.35rem 1.2rem 1.35rem;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.65;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.9rem;
}
.faq-answer code {
    background: #0d0d10;
    color: var(--brand-yellow);
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    border: 1px solid var(--border);
}

/* Autres onglets & résultats TMDb animés */
.genre-tag { background: #0d0d10; color: var(--text-soft); font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 5px; border: 1px solid var(--border); }
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: var(--surface); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border); }
.card h3 { margin-top: 0; color: var(--text); border-left: 3px solid var(--brand-red); padding-left: 0.65rem; }
.search-bar, .form-input { width: 100%; padding: 0.75rem; background: #0d0d10; border: 1px solid var(--border); color: var(--text); border-radius: 8px; margin-bottom: 0.8rem; font-size: 16px; }
.search-bar:focus, .form-input:focus { outline: none; border-color: var(--brand-yellow); }

.tmdb-list {
    transition: opacity 0.22s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.tmdb-list.is-filtering {
    opacity: 0.35;
    transform: translateY(4px);
}
.tmdb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 0.65rem;
    border: 1px solid var(--border);
    gap: 1rem;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease;
}
.tmdb-item.card-enter {
    animation: cardReveal 0.34s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.tmdb-item:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.45);
    background: var(--surface-hover);
}

.debug-dock { position: fixed; bottom: 0; left: 0; right: 0; background: #050507; border-top: 1px solid var(--brand-red); padding: 0.6rem 1.5rem; display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; z-index: 99; flex-wrap: wrap; }
.debug-dock button { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 0.3rem 0.6rem; border-radius: 5px; cursor: pointer; }

/* =========================================================
   ADAPTATION RESPONSIVE MOBILE & TABLETTE
   ========================================================= */
@media (max-width: 1100px) {
    .naka-grid, .catalog-zoom-grid[data-cols] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    body { padding-bottom: 5.5rem; }

    .navbar {
        padding: 0.85rem 1rem;
        gap: 0.65rem;
    }
    .brand-logo-link {
        order: 1;
    }
    .brand-logo-img {
        height: 30px;
    }
    .status-pill {
        order: 2;
        font-size: 0.78rem;
        padding: 0.28rem 0.7rem;
    }
    .label-desktop { display: none; }
    .label-mobile { display: inline; }

    .nav-links {
        order: 3;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 0.4rem;
        overflow: visible;
    }
    .nav-btn {
        font-size: 0.8rem;
        padding: 0.55rem 0.4rem;
        text-align: center;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.06);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 3 boutons sur la 1ère ligne (2 colonnes chacun = 6) */
    .nav-links .nav-btn:nth-child(1),
    .nav-links .nav-btn:nth-child(2),
    .nav-links .nav-btn:nth-child(3) {
        grid-column: span 2;
    }
    /* 2 boutons sur la 2ème ligne (3 colonnes chacun = 6) */
    .nav-links .nav-btn:nth-child(4),
    .nav-links .nav-btn:nth-child(5) {
        grid-column: span 3;
    }
    .nav-btn.active {
        background: var(--surface);
        border-color: rgba(229, 9, 20, 0.45);
        border-bottom: 2px solid var(--brand-red);
    }

    .container {
        margin: 1.15rem auto;
        padding: 0 1rem;
    }

    .hero {
        padding: 1.35rem 1.2rem;
        margin-bottom: 1.5rem;
    }
    .hero h1 { font-size: 1.45rem; }
    .hero p { font-size: 0.94rem; margin-bottom: 1.1rem; }
    .hero-actions .btn-primary,
    .hero-actions .btn-notif-active,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .section-heading { font-size: 1.12rem; margin-bottom: 0.95rem; }

    .naka-title { font-size: 1.65rem; }
    .naka-subtitle { font-size: 0.88rem; margin-bottom: 0.9rem; }
    .naka-search-input { font-size: 16px; }

    .naka-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .naka-segmented {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    .naka-seg-btn { text-align: center; padding: 0.5rem 0.4rem; }

    .naka-zoom-box { display: none; }
    .naka-tools {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }
    .naka-pill-btn {
        width: 100%;
        justify-content: space-between;
        padding: 0.55rem 0.75rem;
        font-size: 0.84rem;
    }
    .naka-total-count {
        grid-column: 1 / -1;
        margin-left: 0;
        text-align: right;
        font-size: 0.82rem;
    }

    .mobile-only-close { display: inline-block; }
    .naka-popover {
        position: fixed;
        left: 0.75rem;
        right: 0.75rem;
        top: auto;
        bottom: 0.75rem;
        width: auto;
        max-width: none;
        max-height: 78vh;
        overflow-y: auto;
        z-index: 250;
        border-radius: 16px;
        padding: 1.15rem;
    }

    .naka-grid,
    .catalog-zoom-grid[data-cols] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.75rem;
    }
    .naka-card-title { font-size: 0.84rem; }
    .naka-card-meta { font-size: 0.72rem; }
    .req-status-badge {
        font-size: 0.68rem;
        padding: 0.28rem 0.4rem;
        top: 6px;
        left: 6px;
        right: 6px;
    }

    .tmdb-item {
        flex-direction: column;
        align-items: stretch;
        padding: 0.85rem;
        gap: 0.8rem;
    }
    .tmdb-item .btn-primary,
    .tmdb-item .btn-available,
    .tmdb-item .tmdb-status-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .detail-hero-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.35rem 1.1rem;
        gap: 1.2rem;
    }
    .detail-poster {
        width: 165px;
    }
    .detail-info {
        min-width: 0;
        width: 100%;
    }
    .detail-title { font-size: 1.5rem; }
    .detail-meta-row,
    .detail-genres {
        justify-content: center;
    }
    .btn-play-jellyfin {
        width: 100%;
        font-size: 0.98rem;
        padding: 0.8rem 1.2rem;
    }
    .detail-synopsis {
        padding: 1rem;
        font-size: 0.92rem;
    }
    .cast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
    .cast-card img { height: 155px; }

    .actor-backdrop { padding: 0.5rem; }
    .actor-bubble {
        width: 100%;
        height: 94vh;
        padding: 1.2rem 1rem;
        border-radius: 16px;
    }
    .actor-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    .actor-photo { width: 135px; }
    .actor-meta { min-width: 0; width: 100%; }
    .actor-meta h2 { font-size: 1.45rem; }
    .actor-bio {
        text-align: left;
        max-height: 200px;
        font-size: 0.9rem;
    }
    .actor-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem 0.75rem;
    }

    .split-grid { grid-template-columns: 1fr; gap: 1rem; }
    .card { padding: 1.15rem; }
    .faq-question {
        padding: 0.95rem 1rem;
        font-size: 0.9rem;
    }
    .faq-answer p {
        padding: 0.75rem 1rem 1rem 1rem;
        font-size: 0.86rem;
    }

    .debug-dock {
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
        justify-content: center;
    }
}

/* Barre intuitive de tri & filtrage des demandes en cours */
.req-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 1rem;
}
.req-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.req-mini-search {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.48rem 0.85rem;
    border-radius: 9px;
    font-size: 0.86rem;
    width: 200px;
    transition: border-color 0.2s ease;
}
.req-mini-search:focus {
    outline: none;
    border-color: var(--brand-yellow);
}
.req-sort-select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.48rem 0.85rem;
    border-radius: 9px;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
}
.req-sort-select:focus {
    outline: none;
    border-color: var(--brand-yellow);
}
.req-status-pills-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.req-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}
.req-filter-pill:hover {
    background: var(--surface-hover);
    color: var(--text);
}
.req-filter-pill .pill-count {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}
.req-filter-pill.active {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #ffffff;
}
.req-filter-pill.active.downloading {
    background: #271c05;
    border-color: #f59e0b;
    color: #fbbf24;
}
.req-filter-pill.active.waiting {
    background: #1c1d24;
    border-color: #a1a1aa;
    color: #ffffff;
}
.req-filter-pill.active.sent {
    background: #18181f;
    border-color: #71717a;
    color: #ffffff;
}
.req-filter-pill.active.failed {
    background: #2b090c;
    border-color: #e50914;
    color: #fca5a5;
}
@media (max-width: 768px) {
    .req-toolbar {
        width: 100%;
    }
    .req-mini-search, .req-sort-select, .req-type-seg {
        width: 100%;
    }
}


/* Animations changement de statut en direct sur les demandes */
@keyframes statusBadgePop {
    0% { transform: scale(0.78); filter: brightness(1.6); }
    45% { transform: scale(1.1); filter: brightness(1.3); }
    75% { transform: scale(0.96); }
    100% { transform: scale(1); filter: brightness(1); }
}
@keyframes statusCardPulse {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.75); border-color: var(--brand-yellow); }
    60% { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); border-color: var(--brand-yellow); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}
.req-status-badge.status-updated {
    animation: statusBadgePop 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.naka-poster-box.status-updated-box {
    animation: statusCardPulse 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}


/* === BULLES DE NOTIFICATION TOAST ANIMÉES NETPLEX === */
#netplex-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 390px;
    width: calc(100vw - 32px);
    pointer-events: none;
}

.netplex-toast {
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(20, 20, 24, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #25252c;
    border-radius: 14px;
    padding: 14px 16px;
    color: #f4f4f5;
    font-size: 0.91rem;
    line-height: 1.45;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.72);
    cursor: pointer;
    transform: translateX(120%) scale(0.95);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.netplex-toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.netplex-toast.hide {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
}

.netplex-toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    margin-top: 1px;
}

.netplex-toast.success .netplex-toast-icon {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.netplex-toast.error .netplex-toast-icon {
    background: rgba(229, 9, 20, 0.18);
    color: #f87171;
    border: 1px solid rgba(229, 9, 20, 0.4);
}

.netplex-toast.info .netplex-toast-icon {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.netplex-toast-body {
    flex: 1;
    padding-right: 4px;
}

.netplex-toast-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: #ffffff;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
}

.netplex-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: netplexToastTimer 5s linear forwards;
}

.netplex-toast.success .netplex-toast-progress {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}
.netplex-toast.error .netplex-toast-progress {
    background: linear-gradient(90deg, #e50914, #f87171);
}
.netplex-toast.info .netplex-toast-progress {
    background: linear-gradient(90deg, #e50914, #fbbf24);
}

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

@media (max-width: 600px) {
    #netplex-toast-container {
        bottom: auto;
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
    .netplex-toast {
        transform: translateY(-120%) scale(0.95);
    }
    .netplex-toast.show {
        transform: translateY(0) scale(1);
    }
    .netplex-toast.hide {
        transform: translateY(-120%) scale(0.95);
    }
}
