        /* --- SECTION DU LECTEUR MULTIMÉDIA (ENDROIT DÉDIÉ AU MEDIA PLAYER) --- */
        .detail-player-section {
            background: linear-gradient(180deg, #1a1a1a 0%, #151515 100%);
            border: 1px solid var(--card-border);
            border-radius: 16px;
            padding: 24px;
            box-shadow: 0 14px 40px rgba(0,0,0,0.7);
            margin-bottom: 40px;
        }
        .player-area-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 1px solid #282828;
            padding-bottom: 12px;
        }
        .player-area-title {
            font-size: 19px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #ffffff;
        }

        /* LECTEUR VIDÉO PERSONNALISÉ (DURÉE RÉELLE, SEEK PRÉCIS, CONTROLES MODERNES) */
        .player-video-wrapper {
            position: relative;
            width: 100%;
            background: #000000;
            border-radius: 10px;
            overflow: hidden;
            border: 1px solid #333333;
            box-shadow: 0 12px 36px rgba(0,0,0,0.9);
            aspect-ratio: 16 / 9;
            max-height: 76vh;
            display: flex;
            align-items: center;
            justify-content: center;
            user-select: none;
        }
        .player-video-wrapper video {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: block;
            background: #000000;
            outline: none;
            cursor: pointer;
        }
        /* Moteur de sous-titres JASSUB (libass WebAssembly) */
        .player-video-wrapper canvas.JASSUB {
            position: absolute !important;
            pointer-events: none !important;
            z-index: 5 !important;
        }
        .player-video-wrapper.hide-controls {
            cursor: none;
        }
        .player-video-wrapper.hide-controls .custom-player-overlay {
            opacity: 0;
            pointer-events: none;
            transform: translateY(10px);
        }

        .player-video-wrapper:fullscreen {
            position: relative !important;
            width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            border-radius: 0 !important;
            border: none !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .player-video-wrapper:-webkit-full-screen {
            position: relative !important;
            width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            border-radius: 0 !important;
            border: none !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .player-video-wrapper:-moz-full-screen {
            position: relative !important;
            width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            border-radius: 0 !important;
            border: none !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }

        /* Overlay contrôles intégrés au lecteur */
        .custom-player-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 20;
            padding: 24px 18px 12px 18px;
            background: linear-gradient(to top, rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
            display: flex;
            flex-direction: column;
            gap: 6px;
            transition: opacity 0.25s ease, transform 0.25s ease;
            pointer-events: auto;
        }

        /* Barre de timeline (Scrubber) */
        .player-scrubber-container {
            position: relative;
            width: 100%;
            height: 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            user-select: none;
            -webkit-user-select: none;
            touch-action: none;
        }
        .player-scrubber-track {
            position: relative;
            width: 100%;
            height: 5px;
            background: rgba(255, 255, 255, 0.22);
            border-radius: 4px;
            transition: height 0.15s ease;
        }
        .player-scrubber-container:hover .player-scrubber-track,
        .player-scrubber-container.scrubbing .player-scrubber-track {
            height: 8px;
        }
        .player-scrubber-buffered {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: rgba(255, 255, 255, 0.35);
            border-radius: 4px;
            width: 0%;
            pointer-events: none;
        }
        .player-scrubber-progress {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: var(--primary, #e50914);
            border-radius: 4px;
            width: 0%;
            pointer-events: none;
        }
        .player-scrubber-thumb {
            position: absolute;
            right: -6px;
            top: 50%;
            transform: translateY(-50%) scale(0);
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 0 6px rgba(0,0,0,0.85);
            transition: transform 0.12s ease;
            pointer-events: none;
        }
        .player-scrubber-container:hover .player-scrubber-thumb,
        .player-scrubber-container.scrubbing .player-scrubber-thumb {
            transform: translateY(-50%) scale(1);
        }
        .player-scrubber-tooltip {
            position: absolute;
            bottom: 22px;
            left: 0;
            transform: translateX(-50%);
            background: rgba(18, 18, 18, 0.95);
            color: #ffffff;
            font-size: 11px;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 4px;
            border: 1px solid #444;
            pointer-events: none;
            display: none;
            white-space: nowrap;
            box-shadow: 0 2px 10px rgba(0,0,0,0.6);
            z-index: 30;
        }

        /* Ligne de boutons inférieurs du lecteur */
        .player-bottom-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            width: 100%;
        }
        .player-bar-left, .player-bar-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .player-btn {
            background: transparent;
            border: none;
            color: #ffffff;
            cursor: pointer;
            font-size: 15px;
            padding: 6px 9px;
            border-radius: 6px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s, transform 0.1s, color 0.15s;
            line-height: 1;
        }
        .player-btn:hover {
            background: rgba(255, 255, 255, 0.18);
            color: #ffffff;
        }
        .player-btn:active {
            transform: scale(0.94);
        }
        .player-btn-skip {
            background: rgba(229, 9, 20, 0.2);
            border: 1px solid rgba(229, 9, 20, 0.5);
            font-size: 12px;
            font-weight: 600;
            padding: 5px 10px;
            border-radius: 5px;
            color: #fff;
        }
        .player-btn-skip:hover {
            background: var(--primary, #e50914);
            border-color: var(--primary, #e50914);
        }
        .player-volume-group {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .player-volume-slider {
            width: 65px;
            height: 4px;
            accent-color: var(--primary, #e50914);
            cursor: pointer;
        }
        .player-time-label {
            font-size: 13px;
            font-weight: 600;
            color: #ffffff;
            margin-left: 6px;
            display: flex;
            align-items: center;
            gap: 4px;
            font-variant-numeric: tabular-nums;
        }
        .player-time-label .current-time {
            color: #ffffff;
        }
        .player-time-label .time-sep {
            color: #777777;
        }
        .player-time-label .total-time {
            color: #aaaaaa;
        }
        .player-badge-ep {
            font-size: 12px;
            color: #ccc;
            background: rgba(255, 255, 255, 0.12);
            padding: 3px 8px;
            border-radius: 4px;
            font-weight: 500;
        }
        .player-center-indicator {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.6);
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.65);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 26px;
            color: #ffffff;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.25s, transform 0.25s;
            z-index: 15;
        }
        .player-center-indicator.flash {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        /* STYLISATION DES SOUS-TITRES DANS LE SITE */
        video::cue {
            background-color: rgba(0, 0, 0, 0.75) !important;
            color: #ffffff !important;
            font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif !important;
            font-size: 1.3rem !important;
            font-weight: 600 !important;
            line-height: 1.35 !important;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 8px #000000 !important;
            padding: 3px 10px !important;
            border-radius: 4px !important;
            white-space: pre-line !important;
            max-width: 96% !important;
            text-align: center !important;
        }
        @media (max-width: 768px) {
            video::cue { font-size: 1rem !important; }
        }

        /* Élévation du conteneur de sous-titres au-dessus des contrôles */
        video::-webkit-media-text-track-container {
            bottom: 24px !important;
        }
        .player-video-wrapper:fullscreen video::-webkit-media-text-track-container {
            bottom: 34px !important;
        }

        .player-controls-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 14px;
            flex-wrap: wrap;
            gap: 12px;
            position: relative;
        }

        .btn-sub-style {
            padding: 5px 12px; font-size: 12px; background: #2a2a2a; border: 1px solid #444;
            border-radius: 4px; margin: 0; color: #fff; cursor: pointer; display: inline-flex;
            align-items: center; gap: 6px; transition: background 0.2s, border-color 0.2s;
        }
        .btn-sub-style:hover { background: #3a3a3a; border-color: #666; }

        .sub-style-popup {
            display: none; position: absolute; bottom: calc(100% + 12px); left: 0;
            background: #181818; border: 1px solid #383838; border-radius: 10px;
            padding: 16px; box-shadow: 0 14px 40px rgba(0,0,0,0.95); z-index: 350;
            width: 325px; max-width: calc(100vw - 30px); color: #fff; font-size: 13px;
            animation: fadeIn 0.2s ease-out; box-sizing: border-box;
        }
        .sub-style-row {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
        }
        .sub-style-row label { color: #bbb; font-size: 12px; font-weight: 500; }
        .sub-style-row select {
            background: #262626; border: 1px solid #444; color: white; border-radius: 4px;
            padding: 5px 8px; font-size: 12px; cursor: pointer; outline: none; transition: border-color 0.2s;
        }
        .sub-style-row select:focus { border-color: var(--primary); }

        .btn-sync-sub {
            flex: 1;
            padding: 5px 2px;
            font-size: 11px;
            font-weight: 600;
            background: #282828;
            border: 1px solid #444;
            color: #eee;
            border-radius: 4px;
            cursor: pointer;
            text-align: center;
            transition: all 0.15s ease;
        }
        .btn-sync-sub:hover {
            background: #383838;
            border-color: #666;
            color: #fff;
        }
        .btn-sync-sub:active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }

        .vlc-btn { 
            color: #ffa033; text-decoration: none; font-weight: bold; 
            cursor: pointer; border: 1px solid #ffa033; padding: 8px 14px; border-radius: 6px; 
            font-size: 13px; transition: background 0.2s, color 0.2s; display: inline-flex; align-items: center; gap: 6px;
        }
        .vlc-btn:hover { background: #ffa033; color: #000; }

        .spinner {
            width: 48px; height: 48px; border: 5px solid #222;
            border-top: 5px solid var(--primary); border-radius: 50%;
            animation: spin 0.9s linear infinite; margin-bottom: 16px;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        /* SECTION SÉLECTEUR D'ÉPISODES DU PACK */
        .pack-episodes-section {
            background: #141414;
            border: 1px solid #2b2b2b;
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 24px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.4);
        }
        .pack-episodes-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
            gap: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            padding-bottom: 8px;
        }
        .pack-episodes-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            max-height: 220px;
            overflow-y: auto;
            padding-right: 4px;
        }
        .btn-pack-ep {
            background: #222;
            border: 1px solid #383838;
            color: #ddd;
            padding: 7px 14px;
            border-radius: 8px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .btn-pack-ep:hover {
            background: #333;
            border-color: #666;
            color: #fff;
            transform: translateY(-1px);
        }
        .btn-pack-ep.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
            font-weight: 700;
            box-shadow: 0 0 12px rgba(229, 9, 20, 0.5);
        }
        .btn-seek-jump {
            background: #252525;
            border: 1px solid #3c3c3c;
            color: #ccc;
            padding: 4px 9px;
            border-radius: 5px;
            font-size: 11.5px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .btn-seek-jump:hover {
            background: #383838;
            color: #fff;
            border-color: #555;
        }
        .btn-skip-op {
            background: rgba(245, 158, 11, 0.15);
            border-color: rgba(245, 158, 11, 0.4);
            color: #fbbf24;
        }
        .btn-skip-op:hover {
            background: rgba(245, 158, 11, 0.3);
            border-color: #f59e0b;
            color: #fff;
        }

        /* --- BANNIÈRE DE REPRISE DE LECTURE FLOTTANTE --- */
        .player-resume-banner {
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 28;
            background: rgba(14, 14, 20, 0.94);
            backdrop-filter: blur(14px);
            border: 1px solid rgba(229, 9, 20, 0.55);
            border-radius: 12px;
            padding: 12px 18px;
            display: flex;
            align-items: center;
            gap: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 18px rgba(229, 9, 20, 0.25);
            animation: resumeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            max-width: 90%;
        }
        @keyframes resumeSlideIn {
            from { opacity: 0; transform: translateY(-12px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        .player-resume-content {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .player-resume-icon {
            font-size: 24px;
            line-height: 1;
        }
        .player-resume-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .player-resume-title {
            font-size: 11px;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            font-weight: 700;
        }
        .player-resume-sub {
            font-size: 13.5px;
            color: #ffffff;
            font-weight: 600;
        }
        .player-resume-sub b {
            color: #ff525d;
            font-weight: 700;
        }
        .player-resume-buttons {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 6px;
        }
        .btn-resume-action {
            padding: 7px 14px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            border: none;
            transition: all 0.18s ease;
            white-space: nowrap;
        }
        .btn-resume-primary {
            background: var(--primary);
            color: #ffffff;
            box-shadow: 0 2px 8px rgba(229, 9, 20, 0.4);
        }
        .btn-resume-primary:hover {
            background: var(--primary-hover);
            transform: scale(1.04);
        }
        .btn-resume-secondary {
            background: #27272f;
            color: #ccc;
            border: 1px solid #444;
        }
        .btn-resume-secondary:hover {
            background: #363640;
            color: #ffffff;
        }
        .btn-resume-close {
            background: transparent;
            border: none;
            color: #777;
            font-size: 20px;
            cursor: pointer;
            padding: 4px 6px;
            line-height: 1;
            border-radius: 4px;
            transition: color 0.15s;
        }
        .btn-resume-close:hover {
            color: #ffffff;
        }

        .badge-pack-resume {
            font-size: 10px;
            background: rgba(229, 9, 20, 0.25);
            color: #ff7675;
            border: 1px solid rgba(229, 9, 20, 0.4);
            padding: 1px 5px;
            border-radius: 4px;
            margin-left: auto;
            font-weight: 600;
        }

        /* --- BOUTON FLOTTANT ANISKIP (OPENING & ENDING) --- */
        .ani-skip-overlay-btn {
            position: absolute;
            bottom: 74px;
            right: 22px;
            z-index: 30;
            background: rgba(18, 18, 24, 0.88);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.28);
            color: #ffffff;
            padding: 9px 18px;
            border-radius: 24px;
            font-size: 13px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            animation: aniSkipSlideIn 0.3s ease-out;
        }
        .ani-skip-overlay-btn:hover {
            background: var(--primary);
            border-color: var(--primary);
            transform: scale(1.04);
            box-shadow: 0 8px 25px rgba(229, 9, 20, 0.5);
        }
        @keyframes aniSkipSlideIn {
            from { opacity: 0; transform: translateX(20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        /* --- OVERLAY BINGE-WATCHING (PROCHAIN ÉPISODE) --- */
        .player-next-ep-overlay {
            position: absolute;
            bottom: 74px;
            right: 22px;
            z-index: 35;
            background: rgba(14, 14, 20, 0.95);
            backdrop-filter: blur(12px);
            border: 1px solid #323d4e;
            border-radius: 12px;
            padding: 16px 20px;
            box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 280px;
            max-width: 320px;
            animation: nextEpSlideUp 0.3s ease-out;
        }
        @keyframes nextEpSlideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .next-ep-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .next-ep-title-badge {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #00e5ff;
            font-weight: 700;
        }
        .next-ep-dismiss-btn {
            background: transparent;
            border: none;
            color: #888;
            font-size: 20px;
            cursor: pointer;
            line-height: 1;
            padding: 0;
            transition: color 0.15s;
        }
        .next-ep-dismiss-btn:hover { color: #fff; }
        .next-ep-label {
            font-size: 15px;
            font-weight: 700;
            color: #ffffff;
        }
        .next-ep-timer-text {
            font-size: 12.5px;
            color: #aaa;
        }
        .next-ep-timer-text b {
            color: #00e5ff;
            font-weight: 700;
        }
        .next-ep-actions {
            display: flex;
            gap: 8px;
            margin-top: 4px;
        }
        .btn-next-ep-play {
            background: var(--primary);
            color: #fff;
            border: none;
            padding: 8px 14px;
            border-radius: 6px;
            font-size: 12.5px;
            font-weight: 700;
            cursor: pointer;
            flex: 1;
            transition: all 0.2s;
        }
        .btn-next-ep-play:hover {
            background: var(--primary-hover);
            transform: scale(1.03);
        }
        .btn-next-ep-cancel {
            background: #25252e;
            color: #ccc;
            border: 1px solid #3c3c48;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            cursor: pointer;
        }
        .btn-next-ep-cancel:hover { background: #32323e; color: #fff; }

        /* --- VITESSE & CONTRÔLES COMPLÉMENTAIRES --- */
        .player-btn-speed {
            min-width: 38px;
            font-size: 12px;
            font-weight: 700;
            color: #00e5ff;
            border-radius: 4px;
        }
        .player-btn.active {
            color: #ff9800 !important;
            background: rgba(255, 152, 0, 0.2) !important;
            border-radius: 4px;
        }

        /* --- OVERLAY TACTILE DOUBLE-TAP (SEEK RAPIDE MOBILE -10S / +10S) --- */
        .touch-seek-overlay {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 40%;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 25;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        .touch-seek-left {
            left: 0;
            border-top-right-radius: 50% 100%;
            border-bottom-right-radius: 50% 100%;
            background: radial-gradient(circle at left, rgba(255, 255, 255, 0.18) 0%, transparent 75%);
        }
        .touch-seek-right {
            right: 0;
            border-top-left-radius: 50% 100%;
            border-bottom-left-radius: 50% 100%;
            background: radial-gradient(circle at right, rgba(255, 255, 255, 0.18) 0%, transparent 75%);
        }
        .touch-seek-overlay.active {
            opacity: 1;
        }
        .touch-seek-circle {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            background: rgba(0, 0, 0, 0.76);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1.5px solid rgba(255, 255, 255, 0.35);
            border-radius: 50%;
            width: 78px;
            height: 78px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.75);
            transform: scale(0.8);
            transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .touch-seek-overlay.active .touch-seek-circle {
            transform: scale(1);
            animation: touchRipplePulse 0.35s ease-out;
        }
        @keyframes touchRipplePulse {
            0% { transform: scale(0.7); opacity: 0.6; }
            50% { transform: scale(1.12); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        .touch-seek-arrows {
            font-size: 15px;
            letter-spacing: -2px;
            color: #ffffff;
            font-weight: 800;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
        }
        .touch-seek-text {
            font-size: 13px;
            font-weight: 700;
            color: #ffffff;
            letter-spacing: 0.4px;
        }

        /* --- MODALE DE STATUT ET FEEDBACK P2P TORRSERVER EN DIRECT --- */
        .player-status-modal {
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            right: auto !important;
            bottom: auto !important;
            transform: translate(-50%, -50%) !important;
            margin: 0 !important;
            background: rgba(14, 17, 23, 0.94);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            padding: 24px 30px;
            border-radius: 16px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.4);
            z-index: 50 !important;
            max-width: 480px;
            width: min(88%, 480px);
            box-sizing: border-box !important;
            pointer-events: auto;
            animation: p2pModalFadeIn 0.25s ease-out;
        }

        /* En plein écran, centrage absolu garanti au pixel près */
        .player-video-wrapper:fullscreen .player-status-modal,
        .player-video-wrapper:-webkit-full-screen .player-status-modal,
        .player-video-wrapper:-moz-full-screen .player-status-modal {
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            right: auto !important;
            bottom: auto !important;
            transform: translate(-50%, -50%) !important;
            margin: 0 !important;
            z-index: 99999 !important;
        }

        @keyframes p2pModalFadeIn {
            from { opacity: 0; transform: translate(-50%, -46%) scale(0.96); }
            to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
        }

        .player-status-text {
            font-size: 15px;
            font-weight: 600;
            color: #f1f5f9;
            line-height: 1.45;
            margin-bottom: 2px;
            text-align: center;
        }

        .player-p2p-live {
            margin-top: 14px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            gap: 10px;
        }

        .player-p2p-chips {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
            width: 100%;
        }

        .p2p-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 11px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.2px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
            transition: all 0.2s ease;
        }

        .p2p-chip-speed {
            border-color: rgba(56, 189, 248, 0.35);
            background: rgba(56, 189, 248, 0.12);
            color: #38bdf8;
        }

        .p2p-chip-peers {
            border-color: rgba(52, 211, 153, 0.35);
            background: rgba(52, 211, 153, 0.12);
            color: #34d399;
        }

        .p2p-chip-buffer {
            border-color: rgba(251, 191, 36, 0.35);
            background: rgba(251, 191, 36, 0.12);
            color: #fbbf24;
        }

        .p2p-progress-track {
            width: 100%;
            height: 7px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 999px;
            overflow: hidden;
            position: relative;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
        }

        .p2p-progress-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, #e50914 0%, #ff6b35 50%, #34d399 100%);
            border-radius: 999px;
            transition: width 0.35s ease;
            box-shadow: 0 0 10px rgba(229, 9, 20, 0.6);
        }

        .p2p-sub-detail {
            font-size: 12px;
            color: #94a3b8;
            font-weight: 500;
        }

        /* Bouton P2P & Badge dans la barre de contrôle */
        .player-btn-p2p {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 9px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #e2e8f0;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .player-btn-p2p:hover {
            background: rgba(255, 255, 255, 0.16);
            border-color: rgba(56, 189, 248, 0.4);
            color: #fff;
        }

        .player-btn-p2p.active {
            border-color: #38bdf8;
            background: rgba(56, 189, 248, 0.18);
        }

        .p2p-hud-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #64748b;
            display: inline-block;
            transition: background 0.3s ease, box-shadow 0.3s ease;
            flex-shrink: 0;
        }

        .p2p-hud-dot.active {
            background: #22c55e;
            box-shadow: 0 0 8px #22c55e;
            animation: p2pDotPulse 2s infinite ease-in-out;
        }

        .p2p-hud-dot.buffering {
            background: #eab308;
            box-shadow: 0 0 8px #eab308;
        }

        .p2p-hud-dot.idle {
            background: #94a3b8;
        }

        @keyframes p2pDotPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.3); opacity: 0.7; }
        }

        .p2p-hud-speed {
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.2px;
            font-size: 11.5px;
        }

        /* Carte HUD Flottante P2P en direct */
        .player-p2p-hud-card {
            position: absolute;
            bottom: 54px;
            right: 12px;
            background: rgba(15, 23, 42, 0.96);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
            border: 1px solid rgba(56, 189, 248, 0.28);
            border-radius: 12px;
            padding: 14px 16px;
            min-width: 250px;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 15px rgba(56, 189, 248, 0.15);
            z-index: 35;
            animation: p2pHudFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
            text-align: left;
        }

        @keyframes p2pHudFadeIn {
            from { opacity: 0; transform: translateY(8px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .p2p-hud-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .p2p-hud-title {
            font-size: 13px;
            font-weight: 700;
            color: #f8fafc;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .p2p-hud-engine-status {
            font-size: 11px;
            font-weight: 600;
            padding: 2px 7px;
            border-radius: 10px;
            background: rgba(34, 197, 94, 0.15);
            color: #4ade80;
            border: 1px solid rgba(34, 197, 94, 0.3);
        }

        .p2p-hud-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px 14px;
        }

        .p2p-hud-item {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .p2p-hud-item.full-width {
            grid-column: 1 / -1;
            border-top: 1px dashed rgba(255, 255, 255, 0.08);
            padding-top: 6px;
            margin-top: 2px;
        }

        .p2p-hud-label {
            font-size: 11px;
            color: #94a3b8;
            font-weight: 500;
        }

        .p2p-hud-val {
            font-size: 13px;
            font-weight: 600;
            color: #f1f5f9;
            font-variant-numeric: tabular-nums;
        }

        .p2p-hud-val.p2p-highlight {
            color: #38bdf8;
        }

        .p2p-hud-val.p2p-seeders {
            color: #34d399;
        }

        /* --- OPTIMISATIONS RESPONSIVES MOBILE & TABLETTE --- */
        @media (max-width: 640px) {
            .player-volume-group {
                display: none !important; /* Téléphones disposant de boutons physiques de volume */
            }
            .player-btn-skip {
                padding: 4px 8px;
                font-size: 11px;
            }
            .player-time-label {
                font-size: 11.5px;
                margin-left: 2px;
                gap: 2px;
            }
            .player-bar-left, .player-bar-right {
                gap: 4px;
            }
            .player-btn {
                padding: 6px 7px;
                font-size: 14px;
            }
            .player-btn-p2p {
                padding: 4px 6px;
                font-size: 11px;
                gap: 4px;
            }
            .player-p2p-hud-card {
                right: 6px;
                bottom: 50px;
                min-width: 220px;
                padding: 10px 12px;
            }
            .player-status-modal {
                padding: 18px 20px;
                width: 92%;
            }
            .player-scrubber-container {
                height: 28px; /* Zone tactile élargie pour le pouce */
            }
            .player-scrubber-thumb {
                width: 15px;
                height: 15px;
                transform: translateY(-50%) scale(1); /* Toujours visible sur mobile */
            }
            .detail-player-section {
                padding: 14px 10px;
                border-radius: 12px;
            }
            .player-controls-bar {
                gap: 8px;
            }
            .ani-skip-overlay-btn {
                bottom: 60px;
                right: 12px;
                padding: 7px 14px;
                font-size: 12px;
            }
            .player-next-ep-overlay {
                bottom: 60px;
                right: 12px;
                min-width: 260px;
                padding: 12px 16px;
            }
            .player-resume-banner {
                top: 10px;
                left: 10px;
                right: 10px;
                max-width: none;
                padding: 10px 14px;
            }
        }

        /* --- ÉTAPE 1 : MINIATURES TIMELINE (VISUAL SCRUBBING), MARQUEURS CHAPITRES, HLS & CAST TV --- */
        .player-engine-badge {
            font-size: 11px;
            font-weight: 700;
            padding: 3px 9px;
            border-radius: 999px;
            background: rgba(56, 189, 248, 0.14);
            border: 1px solid rgba(56, 189, 248, 0.35);
            color: #38bdf8;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }
        .player-engine-badge.hls {
            background: rgba(168, 85, 247, 0.16);
            border-color: rgba(168, 85, 247, 0.45);
            color: #c084fc;
        }
        .player-engine-badge.transcode {
            background: rgba(245, 158, 11, 0.16);
            border-color: rgba(245, 158, 11, 0.45);
            color: #fbbf24;
        }

        /* Marqueurs de chapitres AniSkip (OP / ED) sur la barre de timeline */
        .player-scrubber-markers {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 2;
            overflow: hidden;
            border-radius: 4px;
        }
        .scrubber-chapter-marker {
            position: absolute;
            top: 0;
            height: 100%;
            border-radius: 2px;
            opacity: 0.85;
            transition: opacity 0.15s ease;
        }
        .scrubber-marker-op {
            background: linear-gradient(90deg, #f59e0b, #fbbf24);
            box-shadow: 0 0 6px rgba(245, 158, 11, 0.65);
        }
        .scrubber-marker-ed {
            background: linear-gradient(90deg, #06b6d4, #38bdf8);
            box-shadow: 0 0 6px rgba(56, 189, 248, 0.65);
        }

        /* Tooltip enrichi avec miniature 16:9 au survol de la timeline */
        .player-scrubber-tooltip {
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 5px 8px;
            border-radius: 8px;
            background: rgba(14, 16, 22, 0.96);
            border: 1px solid rgba(255, 255, 255, 0.18);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
        }
        .player-scrubber-tooltip.has-thumb {
            padding: 6px;
        }
        .scrubber-thumb-wrap {
            position: relative;
            width: 168px;
            height: 94px;
            border-radius: 5px;
            overflow: hidden;
            background: #090b10;
            border: 1px solid rgba(255, 255, 255, 0.12);
        }
        .scrubber-thumb-wrap img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .scrubber-chapter-badge {
            position: absolute;
            bottom: 4px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(245, 158, 11, 0.92);
            color: #000;
            font-size: 10px;
            font-weight: 800;
            padding: 1px 7px;
            border-radius: 999px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.6);
        }
        .scrubber-time-text {
            font-size: 11.5px;
            font-weight: 700;
            color: #ffffff;
            font-variant-numeric: tabular-nums;
            letter-spacing: 0.3px;
        }

        /* Boutons Téléchargement & Cast dans la fiche détail */
        .btn-download-ep {
            border-color: rgba(52, 211, 153, 0.4) !important;
            color: #6ee7b7 !important;
        }
        .btn-download-ep:hover {
            background: rgba(52, 211, 153, 0.16) !important;
            border-color: #34d399 !important;
            color: #ffffff !important;
        }
        .btn-cast-tv {
            border-color: rgba(56, 189, 248, 0.4) !important;
            color: #7dd3fc !important;
        }
        .btn-cast-tv:hover {
            background: rgba(56, 189, 248, 0.16) !important;
            border-color: #38bdf8 !important;
            color: #ffffff !important;
        }

        /* Modale Cast / Diffusion TV */
        .cast-modal-card {
            max-width: 540px;
        }
        .cast-modal-body {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .cast-section-box {
            background: #141c27;
            border: 1px solid #223247;
            border-radius: 10px;
            padding: 14px 16px;
        }
        .cast-section-title {
            font-size: 13.5px;
            font-weight: 700;
            color: #f8fafc;
            margin-bottom: 6px;
        }
        .cast-section-desc {
            font-size: 12px;
            color: #94a3b8;
            line-height: 1.45;
            margin: 0 0 12px 0;
        }
        .cast-wireless-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .btn-cast-primary {
            background: linear-gradient(135deg, #0284c7, #02a9ff);
            color: #ffffff;
            border: none;
            padding: 9px 16px;
            border-radius: 7px;
            font-size: 12.5px;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            box-shadow: 0 4px 14px rgba(2, 169, 255, 0.3);
        }
        .btn-cast-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(2, 169, 255, 0.45);
        }
        .cast-native-status {
            font-size: 12px;
            color: #38bdf8;
            margin-top: 8px;
            min-height: 16px;
        }
        .cast-url-label {
            display: block;
            font-size: 11.5px;
            color: #cbd5e1;
            margin-bottom: 5px;
            font-weight: 600;
        }
        .cast-url-row {
            display: flex;
            gap: 8px;
        }
        .cast-url-input {
            flex: 1;
            background: #0d131c;
            border: 1px solid #2b3d54;
            color: #38bdf8;
            font-family: monospace;
            font-size: 12px;
            padding: 7px 10px;
            border-radius: 6px;
        }

