        /* --- STYLES ANILIST TRACKING --- */
        .btn-anilist-nav {
            background: linear-gradient(135deg, #02a9ff 0%, #0072b0 100%);
            color: #ffffff;
            border: none;
            border-radius: 6px;
            padding: 9px 15px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 12px rgba(2, 169, 255, 0.35);
            transition: all 0.2s ease;
        }
        .btn-anilist-nav:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(2, 169, 255, 0.5);
            background: linear-gradient(135deg, #1ab3ff 0%, #0084cc 100%);
        }
        .anilist-user-badge {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            background: #182330;
            border: 1px solid #23374d;
            border-radius: 24px;
            padding: 4px 12px 4px 5px;
            cursor: pointer;
            position: relative;
            transition: all 0.2s ease;
        }
        .anilist-user-badge:hover {
            background: #203144;
            border-color: var(--anilist-blue);
        }
        .anilist-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            object-fit: cover;
            border: 1.5px solid var(--anilist-blue);
            background: #000;
        }
        .anilist-username {
            font-size: 13px;
            font-weight: 600;
            color: #fff;
            max-width: 130px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .anilist-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            right: 0;
            background: #152232;
            border: 1px solid #22374e;
            border-radius: 10px;
            padding: 10px;
            box-shadow: 0 12px 32px rgba(0,0,0,0.85);
            z-index: 200;
            width: 220px;
            animation: fadeIn 0.15s ease-out;
            cursor: default;
        }
        /* Pont invisible pour préserver le hover continu sans rupture */
        .anilist-dropdown::before {
            content: "";
            position: absolute;
            top: -10px;
            left: 0;
            right: 0;
            height: 10px;
        }
        .anilist-user-badge:hover .anilist-dropdown,
        .anilist-user-badge.active .anilist-dropdown {
            display: block !important;
        }
        .anilist-dropdown a, .anilist-dropdown button {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            font-size: 13px;
            border-radius: 6px;
            color: #ddd;
            text-decoration: none;
            background: transparent;
            border: none;
            cursor: pointer;
            text-align: left;
            transition: background 0.15s;
            box-sizing: border-box;
        }
        .anilist-dropdown a:hover, .anilist-dropdown button:hover {
            background: rgba(2, 169, 255, 0.15);
            color: #fff;
        }

        /* SECTION SUIVI ANILIST DANS LA FICHE DE L'ANIME */
        .anilist-track-section {
            background: linear-gradient(135deg, #111a26 0%, #0c141e 100%);
            border: 1px solid var(--anilist-border);
            border-radius: 14px;
            padding: 20px 24px;
            margin-bottom: 28px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.45);
            position: relative;
            overflow: hidden;
        }
        .anilist-track-section::before {
            content: "";
            position: absolute;
            top: 0; left: 0; bottom: 0; width: 4px;
            background: linear-gradient(180deg, var(--anilist-blue), #0077b6);
        }
        .anilist-track-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            padding-bottom: 12px;
        }
        .anilist-track-title-wrap {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            font-weight: 700;
            color: #ffffff;
        }
        .anilist-track-actions-top {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .btn-anilist-link {
            background: rgba(2, 169, 255, 0.12);
            border: 1px solid rgba(2, 169, 255, 0.35);
            color: var(--anilist-blue);
            padding: 5px 10px;
            border-radius: 6px;
            font-size: 12px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-weight: 600;
            transition: all 0.2s;
        }
        .btn-anilist-link:hover {
            background: rgba(2, 169, 255, 0.25);
            border-color: var(--anilist-blue);
        }
        .anilist-track-body {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
        }
        .anilist-progress-wrap {
            flex: 1;
            min-width: 280px;
        }
        .anilist-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            margin-bottom: 10px;
        }
        .anilist-progress-bar-bg {
            width: 100%;
            height: 10px;
            background: #192738;
            border-radius: 5px;
            overflow: hidden;
            border: 1px solid #23374d;
        }
        .anilist-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #02a9ff 0%, #00d2ff 100%);
            border-radius: 5px;
            transition: width 0.3s ease;
        }
        .anilist-stepper {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #162436;
            border: 1px solid #243a54;
            border-radius: 8px;
            padding: 4px 6px;
        }
        .anilist-btn-step {
            background: #1f334d;
            border: 1px solid #2f4b70;
            color: #fff;
            width: 30px;
            height: 30px;
            border-radius: 5px;
            font-weight: bold;
            font-size: 15px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            padding: 0;
        }
        .anilist-btn-step:hover:not(:disabled) {
            background: var(--anilist-blue);
            border-color: var(--anilist-blue);
            color: #fff;
        }
        .anilist-btn-step:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        .anilist-badge-status {
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        .status-CURRENT { background: rgba(2, 169, 255, 0.15); color: #02a9ff; border: 1px solid rgba(2, 169, 255, 0.35); }
        .status-COMPLETED { background: rgba(70, 211, 105, 0.15); color: #46d369; border: 1px solid rgba(70, 211, 105, 0.35); }
        .status-PLANNING { background: rgba(255, 193, 7, 0.15); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.35); }
        .status-PAUSED { background: rgba(255, 152, 0, 0.15); color: #ff9800; border: 1px solid rgba(255, 152, 0, 0.35); }
        .status-DROPPED { background: rgba(229, 9, 20, 0.15); color: #ff525d; border: 1px solid rgba(229, 9, 20, 0.35); }
        .status-NOT_IN_LIST { background: rgba(255, 255, 255, 0.08); color: #aaa; border: 1px solid rgba(255, 255, 255, 0.15); }

        .btn-anilist-quick-ep {
            background: #02a9ff;
            color: #ffffff;
            border: none;
            padding: 8px 16px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(2, 169, 255, 0.3);
        }
        .btn-anilist-quick-ep:hover {
            background: #0093de;
            box-shadow: 0 6px 16px rgba(2, 169, 255, 0.45);
        }
        .btn-anilist-quick-ep.synced {
            background: #144026;
            color: #46d369;
            border: 1px solid #46d369;
            cursor: default;
            box-shadow: none;
        }

        /* BOUTON DANS LE LECTEUR VIDÉO */
        .btn-anilist-player {
            background: #10263d;
            border: 1px solid #02a9ff;
            color: #02a9ff;
            padding: 7px 13px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .btn-anilist-player:hover {
            background: #02a9ff;
            color: #fff;
            box-shadow: 0 4px 12px rgba(2, 169, 255, 0.4);
        }
        .btn-anilist-player.synced {
            background: #133820;
            border-color: #46d369;
            color: #46d369;
        }

        /* MODALES ANILIST */
        .anilist-modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.82);
            backdrop-filter: blur(6px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        .anilist-modal-content {
            background: #131a24;
            border: 1px solid #203146;
            border-radius: 14px;
            width: 100%;
            max-width: 520px;
            padding: 24px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.85);
            animation: fadeIn 0.2s ease-out;
            color: #fff;
            position: relative;
            max-height: calc(100vh - 40px);
            max-height: calc(100dvh - 40px);
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        .anilist-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            border-bottom: 1px solid #1f2e42;
            padding-bottom: 12px;
        }
        .anilist-modal-title {
            font-size: 18px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #fff;
        }
        .anilist-modal-close {
            background: none;
            border: none;
            color: #888;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .anilist-modal-close:hover { color: #fff; }
        .anilist-auth-section {
            background: #182230;
            border: 1px solid #22344a;
            border-radius: 10px;
            padding: 16px;
        }
        .anilist-section-title {
            font-size: 14px;
            font-weight: 700;
            margin-bottom: 8px;
            color: #fff;
        }
        .anilist-candidate-item {
            display: flex;
            gap: 12px;
            align-items: center;
            background: #16202c;
            border: 1px solid #203042;
            border-radius: 8px;
            padding: 8px 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .anilist-candidate-item:hover {
            background: #1e2c3d;
            border-color: var(--anilist-blue);
        }
        .anilist-candidate-thumb {
            width: 42px;
            height: 60px;
            border-radius: 4px;
            object-fit: cover;
            background: #000;
        }

        /* --- ACCUEIL : ANIMES EN COURS (ANILIST) --- */
        .home-watching-section {
            margin-bottom: 30px;
            animation: fadeIn 0.3s ease-out;
        }
        .home-watching-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 22px;
            flex-wrap: wrap;
            gap: 12px;
            padding-bottom: 14px;
            border-bottom: 1px solid #242424;
        }
        .home-watching-title-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .home-watching-title {
            margin: 0;
            font-size: 22px;
            font-weight: 800;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 8px;
            letter-spacing: 0.3px;
        }
        .home-watching-badge {
            background: rgba(2, 169, 255, 0.15);
            color: var(--anilist-blue);
            border: 1px solid rgba(2, 169, 255, 0.35);
            font-size: 12px;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: 12px;
        }
        .home-watching-actions {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .btn-refresh-watching {
            background: #182330;
            border: 1px solid #23374d;
            color: #d0def0;
            padding: 8px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            transition: all 0.2s;
        }
        .btn-refresh-watching:hover {
            background: #22354c;
            border-color: var(--anilist-blue);
            color: #fff;
            transform: translateY(-1px);
        }
        .card-watching {
            cursor: pointer;
            transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        }
        .card-watching:hover {
            transform: translateY(-5px);
            border-color: rgba(2, 169, 255, 0.5);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 16px rgba(2, 169, 255, 0.2);
        }
        .card-watching-progress-bar-wrap {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: rgba(0, 0, 0, 0.7);
            z-index: 3;
        }
        .card-watching-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--anilist-blue), #00e5ff);
            box-shadow: 0 0 8px rgba(2, 169, 255, 0.7);
            border-radius: 0 3px 3px 0;
        }
        .card-watching-meta {
            font-size: 12.5px;
            color: #aaa;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .card-ep-progress-text {
            color: #ddd;
            font-size: 12px;
        }
        .card-ep-progress-text b {
            color: #fff;
        }
        .card-next-ep-btn-pill {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            background: linear-gradient(135deg, rgba(229, 9, 20, 0.2), rgba(2, 169, 255, 0.2));
            border: 1px solid rgba(2, 169, 255, 0.4);
            color: #fff;
            padding: 7px 10px;
            border-radius: 6px;
            font-size: 12px;
            margin-top: auto;
            transition: all 0.2s;
        }
        .card-watching:hover .card-next-ep-btn-pill {
            background: var(--primary);
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(229, 9, 20, 0.5);
        }
        .badge-tag-airing-timer {
            background: rgba(255, 153, 0, 0.25) !important;
            border-color: rgba(255, 153, 0, 0.55) !important;
            color: #ffb84d !important;
            font-weight: 800 !important;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            animation: pulseGlow 2s infinite ease-in-out;
        }
        @keyframes pulseGlow {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.72; }
        }
        .card-next-ep-pill-airing {
            background: linear-gradient(135deg, rgba(255, 153, 0, 0.18), rgba(229, 9, 20, 0.15)) !important;
            border: 1px solid rgba(255, 153, 0, 0.45) !important;
            color: #ffc266 !important;
        }
        .card-watching:hover .card-next-ep-pill-airing {
            background: linear-gradient(135deg, #e67300, #cc3300) !important;
            border-color: #ff9900 !important;
            color: #fff !important;
            box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4) !important;
        }
        .home-watching-error {
            background: #1c1515;
            border: 1px solid #4a2323;
            border-radius: 12px;
            padding: 30px 20px;
            text-align: center;
            margin: 20px auto;
            max-width: 600px;
        }
        .anilist-home-connect-promo {
            background: linear-gradient(135deg, #101924 0%, #152438 100%);
            border: 1px solid var(--anilist-border);
            border-radius: 12px;
            padding: 30px;
            max-width: 620px;
            margin: 25px auto 0;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        }
        .anilist-home-connect-icon {
            width: 46px;
            height: 46px;
            margin-bottom: 12px;
        }
        .anilist-home-connect-promo h3 {
            margin: 0 0 8px;
            font-size: 18px;
            font-weight: 700;
            color: #fff;
        }
        .anilist-home-connect-promo p {
            margin: 0 0 18px;
            font-size: 13.5px;
            color: #a0aec0;
            line-height: 1.55;
        }
        /* --- BANNIÈRE DE CIBLAGE PROCHAIN ÉPISODE --- */
        .next-ep-target-banner {
            background: linear-gradient(135deg, #101a26 0%, #162436 100%);
            border: 1px solid var(--anilist-border);
            border-left: 4px solid var(--anilist-blue);
            border-radius: 10px;
            padding: 14px 20px;
            margin-bottom: 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 14px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
            animation: fadeIn 0.25s ease-out;
        }
        .next-ep-banner-left {
            display: flex;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }
        .btn-back-watching {
            background: #1a2738;
            border: 1px solid #2d425f;
            color: #fff;
            padding: 8px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .btn-back-watching:hover {
            background: #243850;
            border-color: var(--anilist-blue);
        }
        .next-ep-banner-info {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .next-ep-banner-anime {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
        }
        .next-ep-banner-subtitle {
            font-size: 13.5px;
            color: #aaa;
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }
        .next-ep-badge-highlight {
            background: rgba(70, 211, 105, 0.2);
            border: 1px solid rgba(70, 211, 105, 0.5);
            color: #5eff88;
            font-weight: 800;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 12.5px;
        }
        .btn-play-target-direct {
            background: linear-gradient(135deg, var(--primary) 0%, #ff2a3b 100%);
            color: white;
            border: none;
            padding: 9px 18px;
            border-radius: 8px;
            font-weight: 800;
            font-size: 13.5px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
            transition: transform 0.15s, box-shadow 0.2s;
        }
        .btn-play-target-direct:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 18px rgba(229, 9, 20, 0.65);
        }
        .card-target-highlight {
            border: 2px solid var(--accent-green) !important;
            box-shadow: 0 0 18px rgba(70, 211, 105, 0.35) !important;
        }
        .badge-target-direct-match {
            background: rgba(70, 211, 105, 0.9) !important;
            color: #000 !important;
            font-weight: 800 !important;
            border-color: #5eff88 !important;
        }
        .badge-target-pack-match {
            background: rgba(0, 229, 255, 0.85) !important;
            color: #000 !important;
            font-weight: 800 !important;
        }

        /* --- SWITCH NSFW / CONTENU ADULTE --- */
        .nsfw-filter-container {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #182330;
            border: 1px solid #23374d;
            padding: 4px 12px;
            border-radius: 20px;
            cursor: pointer;
            user-select: none;
            transition: all 0.2s ease;
        }
        .nsfw-filter-container:hover {
            background: #213247;
            border-color: #ff4757;
        }
        .switch-nsfw {
            position: relative;
            display: inline-block;
            width: 32px;
            height: 18px;
            margin: 0;
            cursor: pointer;
            flex-shrink: 0;
        }
        .switch-nsfw input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }
        .slider-nsfw {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background-color: #37475a;
            transition: .25s ease;
            border-radius: 18px;
        }
        .slider-nsfw:before {
            position: absolute;
            content: "";
            height: 14px;
            width: 14px;
            left: 2px;
            bottom: 2px;
            background-color: #ffffff;
            transition: .25s ease;
            border-radius: 50%;
        }
        .switch-nsfw input:checked + .slider-nsfw {
            background-color: #ff4757;
            box-shadow: 0 0 10px rgba(255, 71, 87, 0.45);
        }
        .switch-nsfw input:checked + .slider-nsfw:before {
            transform: translateX(14px);
        }
        .nsfw-filter-label {
            font-size: 12px;
            font-weight: 600;
            color: #cbd5e1;
            display: flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
        }
        .nsfw-filter-label b {
            color: #fff;
        }
        .badge-nsfw-count {
            font-size: 11px;
            color: #ff6b81;
            font-weight: 700;
        }
        .badge-nsfw-tag {
            background: rgba(255, 71, 87, 0.25) !important;
            border-color: rgba(255, 71, 87, 0.6) !important;
            color: #ff6b81 !important;
            font-weight: 800 !important;
        }
        .anilist-dropdown-nsfw {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 10px;
            border-top: 1px solid #23374d;
            border-bottom: 1px solid #23374d;
            margin: 4px 0;
            cursor: pointer;
            border-radius: 6px;
            color: #ddd;
            transition: background 0.15s;
            user-select: none;
        }
        .anilist-dropdown-nsfw:hover {
            background: rgba(255, 71, 87, 0.12);
            color: #fff;
        }

        /* --- SECTION DÉCOUVERTE (TENDANCES & SORTIES DE SAISON) --- */
        .discover-container {
            display: flex;
            flex-direction: column;
            gap: 28px;
            animation: fadeIn 0.25s ease-out;
        }

        .discover-top-banner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: linear-gradient(135deg, #111a26 0%, #172436 100%);
            border: 1px solid var(--anilist-border);
            border-left: 4px solid var(--anilist-blue);
            border-radius: 12px;
            padding: 16px 20px;
            gap: 16px;
            flex-wrap: wrap;
            box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
        }

        .discover-top-title-group h2 {
            margin: 0;
            font-size: 19px;
            font-weight: 800;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .discover-top-title-group p {
            margin: 4px 0 0;
            font-size: 13px;
            color: #94a3b8;
            line-height: 1.45;
        }

        .discover-section {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .discover-section-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            border-bottom: 1px solid #1f2b3b;
            padding-bottom: 10px;
            flex-wrap: wrap;
            gap: 8px;
        }

        .discover-section-title {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
            display: flex;
            align-items: baseline;
            gap: 8px;
            margin: 0;
            flex-wrap: wrap;
        }

        .discover-section-subtitle {
            font-size: 12.5px;
            color: #889bb4;
            font-weight: normal;
        }

        .discover-card {
            border: 1px solid #202d3f;
        }

        .discover-card:hover {
            border-color: var(--anilist-blue);
            box-shadow: 0 14px 28px rgba(2, 169, 255, 0.18);
        }

        .badge-airing-countdown {
            background: rgba(245, 158, 11, 0.9) !important;
            color: #000 !important;
            font-weight: 800 !important;
            border-color: #fbbf24 !important;
            white-space: nowrap;
        }

        .badge-discover-genre {
            font-size: 10px;
            font-weight: 600;
            color: #94a3b8;
            background: #141d27;
            padding: 2px 6px;
            border-radius: 4px;
            border: 1px solid #233346;
            white-space: nowrap;
        }

        /* --- FILTRES AVANCÉS DÉCOUVERTE --- */
        .discover-filters-container {
            background: #111a26;
            border: 1px solid var(--anilist-border);
            border-radius: 12px;
            padding: 14px 18px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
        }

        .discover-filters-main-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
        }

        .discover-sort-pills {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .discover-sort-pill {
            background: #172435;
            color: #94a3b8;
            border: 1px solid #23374d;
            padding: 7px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .discover-sort-pill:hover {
            background: #1f3249;
            color: #fff;
            border-color: #3b82f6;
        }

        .discover-sort-pill.active {
            background: linear-gradient(135deg, #02a9ff 0%, #0077b6 100%);
            color: #fff;
            border-color: #02a9ff;
            box-shadow: 0 4px 12px rgba(2, 169, 255, 0.35);
        }

        .discover-filters-right {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .discover-format-select {
            background: #172435;
            color: #e2e8f0;
            border: 1px solid #23374d;
            padding: 7px 12px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            outline: none;
        }

        .discover-format-select:focus {
            border-color: var(--anilist-blue);
        }

        .discover-search-box {
            display: flex;
            align-items: center;
            background: #172435;
            border: 1px solid #23374d;
            border-radius: 8px;
            overflow: hidden;
        }

        .discover-search-box input {
            background: transparent;
            border: none;
            color: #fff;
            padding: 7px 10px;
            font-size: 13px;
            outline: none;
            width: 170px;
        }

        .discover-search-box button {
            background: transparent;
            border: none;
            color: #94a3b8;
            padding: 7px 10px;
            cursor: pointer;
            transition: color 0.15s;
        }

        .discover-search-box button:hover {
            color: #fff;
        }

        .discover-genres-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            padding-top: 10px;
        }

        .discover-genres-label {
            font-size: 12px;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            white-space: nowrap;
        }

        .discover-genres-scroll {
            display: flex;
            gap: 6px;
            overflow-x: auto;
            padding-bottom: 2px;
            scrollbar-width: thin;
        }

        .discover-genre-chip {
            background: rgba(255, 255, 255, 0.04);
            color: #94a3b8;
            border: 1px solid rgba(255, 255, 255, 0.08);
            padding: 4px 10px;
            border-radius: 14px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.15s ease;
        }

        .discover-genre-chip:hover {
            background: rgba(2, 169, 255, 0.15);
            color: #fff;
            border-color: rgba(2, 169, 255, 0.4);
        }

        .discover-genre-chip.active {
            background: rgba(2, 169, 255, 0.25);
            color: #38bdf8;
            border-color: #02a9ff;
            font-weight: 700;
        }

        .btn-reset-filters {
            background: rgba(255, 71, 87, 0.12);
            border: 1px solid rgba(255, 71, 87, 0.35);
            color: #ff6b81;
            font-size: 12px;
            font-weight: 600;
            padding: 5px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-reset-filters:hover {
            background: rgba(255, 71, 87, 0.25);
            color: #fff;
        }

        /* --- PLANNING HEBDOMADAIRE (SIMULCAST SCHEDULE) --- */
        .schedule-container {
            display: flex;
            flex-direction: column;
            gap: 24px;
            animation: fadeIn 0.25s ease-out;
        }

        .schedule-days-bar-wrapper {
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .schedule-days-bar {
            display: flex;
            gap: 10px;
            min-width: min-content;
        }

        .schedule-day-pill {
            flex: 1;
            min-width: 105px;
            background: #111a26;
            border: 1px solid var(--anilist-border);
            border-radius: 12px;
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
            text-align: center;
        }

        .schedule-day-pill:hover {
            background: #172436;
            border-color: #3b82f6;
            transform: translateY(-2px);
        }

        .schedule-day-pill.active {
            background: linear-gradient(135deg, #13243a 0%, #1a3250 100%);
            border-color: var(--anilist-blue);
            box-shadow: 0 6px 18px rgba(2, 169, 255, 0.3);
        }

        .schedule-day-pill.is-today {
            border-color: #a855f7;
        }

        .schedule-day-pill.active.is-today {
            border-color: #c084fc;
            box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
        }

        .schedule-day-name {
            font-size: 13.5px;
            font-weight: 700;
            color: #fff;
        }

        .schedule-day-date {
            font-size: 11px;
            color: #94a3b8;
        }

        .schedule-day-badge {
            font-size: 11px;
            font-weight: 700;
            background: rgba(255, 255, 255, 0.08);
            color: #e2e8f0;
            padding: 2px 7px;
            border-radius: 10px;
            margin-top: 2px;
        }

        .schedule-day-pill.active .schedule-day-badge {
            background: var(--anilist-blue);
            color: #fff;
        }

        .schedule-today-tag {
            position: absolute;
            top: -8px;
            background: linear-gradient(135deg, #a855f7, #7e22ce);
            color: #fff;
            font-size: 9px;
            font-weight: 800;
            padding: 1px 6px;
            border-radius: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 6px rgba(168, 85, 247, 0.5);
        }

        .schedule-day-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #1f2b3b;
            padding-bottom: 10px;
        }

        .schedule-day-title-wrap {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .schedule-day-title {
            font-size: 17px;
            font-weight: 800;
            color: #fff;
            margin: 0;
            text-transform: capitalize;
        }

        .schedule-count-pill {
            background: #172436;
            color: #38bdf8;
            border: 1px solid #23374d;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
        }

        .schedule-card {
            border: 1px solid #202d3f;
            transition: all 0.2s ease;
        }

        .schedule-card:hover {
            border-color: #a855f7;
            box-shadow: 0 14px 28px rgba(168, 85, 247, 0.18);
        }

        .schedule-card.schedule-card-released:hover {
            border-color: var(--anilist-blue);
            box-shadow: 0 14px 28px rgba(2, 169, 255, 0.2);
        }

        .badge-schedule-time {
            background: rgba(168, 85, 247, 0.25) !important;
            color: #c084fc !important;
            border-color: rgba(168, 85, 247, 0.45) !important;
            font-weight: 700 !important;
        }

        .badge-schedule-released {
            background: rgba(34, 197, 94, 0.25) !important;
            color: #4ade80 !important;
            border-color: rgba(34, 197, 94, 0.45) !important;
            font-weight: 700 !important;
        }

        .badge-schedule-countdown {
            background: rgba(245, 158, 11, 0.9) !important;
            color: #000 !important;
            font-weight: 800 !important;
            border-color: #fbbf24 !important;
        }

        .schedule-ep-pill {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
            background: rgba(255, 255, 255, 0.04);
            padding: 5px 8px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.06);
        }

        .schedule-ep-num {
            font-size: 12.5px;
            color: #f1f5f9;
        }

        .schedule-ep-num b {
            color: #38bdf8;
        }

        /* --- HUB PLANNING ACCUEIL --- */
        .home-hub-schedule:hover {
            border-color: rgba(168, 85, 247, 0.6) !important;
            box-shadow: 0 10px 30px rgba(168, 85, 247, 0.25) !important;
        }

        /* --- MULTI-PROFILS UTILISATEURS --- */
        .settings-profiles-group {
            background: #171d26;
            border: 1px solid #263345;
            border-radius: 10px;
            padding: 14px 16px;
            margin-bottom: 16px;
        }

        .settings-profiles-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
        }

        .btn-add-profile {
            background: rgba(2, 169, 255, 0.15);
            border: 1px solid rgba(2, 169, 255, 0.4);
            color: var(--anilist-blue);
            font-size: 12px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .btn-add-profile:hover {
            background: var(--anilist-blue);
            color: #fff;
        }

        .settings-profiles-chips {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .settings-profile-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #1e2736;
            border: 1.5px solid #2d3e54;
            padding: 6px 12px;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }

        .settings-profile-chip:hover {
            border-color: var(--anilist-blue);
            background: #253347;
        }

        .settings-profile-chip.active {
            background: linear-gradient(135deg, #02a9ff 0%, #0077b6 100%);
            border-color: #38bdf8;
            color: #fff;
            box-shadow: 0 4px 12px rgba(2, 169, 255, 0.35);
        }

        .profile-chip-avatar {
            font-size: 15px;
        }

        .profile-chip-name {
            font-size: 13px;
            font-weight: 700;
            color: #f1f5f9;
        }

        .profile-chip-kid {
            font-size: 10px;
            background: rgba(255, 193, 7, 0.25);
            color: #ffc107;
            padding: 1px 5px;
            border-radius: 8px;
            font-weight: 700;
        }

        .profile-chip-del {
            font-size: 14px;
            color: #94a3b8;
            cursor: pointer;
            padding: 0 2px;
            line-height: 1;
            transition: color 0.15s;
        }

        .profile-chip-del:hover {
            color: #ff4757;
        }

        /* --- STYLES MODALE COMPTE UTILISATEUR & AUTH TABS --- */
        .auth-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
            border-bottom: 1px solid #23374d;
            padding-bottom: 10px;
        }
        .auth-tabs .filter-chip {
            padding: 7px 16px;
            font-size: 13px;
            border-radius: 20px;
            cursor: pointer;
            background: #182230;
            border: 1px solid #23374d;
            color: #94a3b8;
            transition: all 0.2s;
        }
        .auth-tabs .filter-chip.active {
            background: var(--anilist-blue);
            border-color: var(--anilist-blue);
            color: #ffffff;
            font-weight: 600;
        }




        /* =====================================================================
           FICHE ANIME : HÉROS, ÉPISODES, LECTURE EN UN CLIC
           ===================================================================== */
        .anime-page { --anime-accent: var(--primary); }
        .anime-hero {
            position: relative;
            border-radius: 16px;
            overflow: hidden;
            padding: 20px 28px 28px;
            background: #181818;
            border: 1px solid #262626;
            isolation: isolate;
        }
        .anime-hero::before {
            content: '';
            position: absolute; inset: 0;
            background-image: var(--anime-banner, none);
            background-size: cover;
            background-position: center;
            opacity: 0.28;
            filter: blur(2px) saturate(1.1);
            z-index: -2;
        }
        .anime-hero::after {
            content: '';
            position: absolute; inset: 0;
            background: linear-gradient(180deg, rgba(20,20,20,0.35) 0%, rgba(20,20,20,0.92) 75%, #181818 100%);
            z-index: -1;
        }
        .anime-hero-top { margin-bottom: 18px; }
        .anime-hero-inner { display: flex; gap: 28px; align-items: flex-start; }
        .anime-cover {
            width: 210px; aspect-ratio: 2/3; object-fit: cover;
            border-radius: 12px; flex-shrink: 0;
            box-shadow: 0 16px 40px rgba(0,0,0,0.55);
        }
        .anime-cover-skeleton { display: block; }
        .anime-hero-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
        .anime-title { margin: 0; font-size: clamp(24px, 3.2vw, 38px); line-height: 1.15; }
        .anime-alt-title { color: #9a9a9a; font-size: 14px; margin-top: -4px; }
        .anime-meta-row { display: flex; flex-wrap: wrap; gap: 8px; }
        .anime-meta-row .detail-badge { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); color: #e5e5e5; padding: 5px 11px; font-size: 12.5px; }
        .anime-status-releasing { color: var(--accent-green) !important; border-color: rgba(70,211,105,0.4) !important; }
        .anime-progress-pill {
            padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 700;
            background: rgba(2,169,255,0.14); border: 1px solid rgba(2,169,255,0.4); color: #6cc9ff;
        }
        .anime-genres { display: flex; flex-wrap: wrap; gap: 6px; }
        .anime-genres span {
            font-size: 12px; padding: 3px 10px; border-radius: 20px;
            background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: #bbb;
        }
        .anime-synopsis {
            margin: 0; color: #cfcfcf; font-size: 14px; line-height: 1.6; max-width: 820px;
            display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
        }
        .anime-synopsis.is-open { display: block; -webkit-line-clamp: unset; }
        .anime-synopsis-toggle {
            align-self: flex-start; background: none; padding: 0; margin-top: -6px;
            color: #9ad; font-size: 13px; font-weight: 600;
        }
        .anime-synopsis-toggle:hover { background: none; color: #fff; text-decoration: underline; }
        .anime-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
        .btn-anime-play {
            display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
            padding: 12px 26px; font-size: 16px; border-radius: 8px; min-height: 50px;
            box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
        }
        .btn-anime-play small { font-size: 12px; font-weight: 500; opacity: 0.85; }
        .btn-anime-play:disabled { background: #333; box-shadow: none; cursor: default; color: #bbb; }
        .btn-anime-play.is-loading { opacity: 0.7; pointer-events: none; }
        .anime-lang-select select {
            background: #242424; color: #fff; border: 1px solid #3c3c3c; border-radius: 6px;
            padding: 9px 10px; font-size: 13px;
        }
        .anime-source-status { font-size: 13px; color: #aaa; display: flex; align-items: center; gap: 8px; min-height: 18px; }
        .anime-source-dot { width: 8px; height: 8px; border-radius: 50%; background: #666; flex-shrink: 0; }
        .anime-source-status.is-loading .anime-source-dot { background: var(--accent-gold); animation: animeDotPulse 1s ease-in-out infinite; }
        .anime-source-status.is-ok .anime-source-dot { background: var(--accent-green); }
        .anime-source-status.is-empty .anime-source-dot { background: #ff4757; }
        @keyframes animeDotPulse { 50% { opacity: 0.3; } }

        .anime-section { margin-top: 30px; }
        .anime-section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
        .anime-section-title { margin: 0; font-size: 20px; }
        .anime-section-hint { font-size: 12.5px; color: #888; }
        .anime-ep-ranges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

        .anime-ep-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
            gap: 14px;
        }
        .anime-ep-tile {
            position: relative; display: flex; flex-direction: column; text-align: left;
            padding: 0; background: #1c1c1c; border: 1px solid #2a2a2a; border-radius: 10px;
            overflow: hidden; color: #fff; font-weight: 500;
            transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
        }
        button.anime-ep-tile:hover { background: #232323; border-color: #555; transform: translateY(-2px); }
        .anime-ep-thumb {
            position: relative; aspect-ratio: 16/9; background: #141414 center/cover no-repeat;
            display: flex; align-items: center; justify-content: center;
        }
        .anime-ep-thumb::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.35); transition: background 0.18s; }
        .anime-ep-num { position: relative; z-index: 1; font-size: 30px; font-weight: 800; color: rgba(255,255,255,0.9); text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
        .anime-ep-thumb[style] .anime-ep-num { position: absolute; left: 10px; bottom: 6px; font-size: 20px; }
        .anime-ep-play {
            position: absolute; z-index: 1; width: 42px; height: 42px; border-radius: 50%;
            background: var(--primary); display: flex; align-items: center; justify-content: center;
            font-size: 15px; opacity: 0; transform: scale(0.85); transition: all 0.18s ease;
        }
        button.anime-ep-tile:hover .anime-ep-play,
        button.anime-ep-tile:focus-visible .anime-ep-play { opacity: 1; transform: scale(1); }
        .anime-ep-state {
            position: absolute; z-index: 1; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
            background: var(--accent-green); color: #000; font-weight: 800; font-size: 13px;
            display: flex; align-items: center; justify-content: center;
        }
        .anime-ep-spinner {
            position: absolute; z-index: 1; width: 30px; height: 30px; border-radius: 50%;
            border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spin 0.8s linear infinite;
        }
        .anime-ep-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; min-height: 58px; }
        .anime-ep-label { font-size: 13px; font-weight: 700; color: #eee; }
        .anime-ep-resume { color: var(--accent-gold); }
        .anime-ep-title {
            font-size: 12.5px; color: #9a9a9a;
            display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        }
        .anime-ep-source { position: absolute; top: 10px; left: 10px; z-index: 2; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0,0,0,0.5); }
        .anime-ep-source-single { background: var(--accent-green); }
        .anime-ep-source-pack { background: var(--accent-gold); }
        .anime-ep-source-none { background: #666; }
        .anime-ep-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.1); }
        .anime-ep-progress span { display: block; height: 100%; background: var(--primary); }

        .anime-ep-tile.is-watched .anime-ep-thumb::after { background: rgba(0,0,0,0.6); }
        .anime-ep-tile.is-watched .anime-ep-label { color: #9a9a9a; }
        .anime-ep-tile.is-watched .anime-ep-progress span { background: #555; }
        .anime-ep-tile.is-target { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 8px 24px rgba(229,9,20,0.2); }
        .anime-ep-tile.is-target .anime-ep-play { opacity: 1; transform: scale(1); }
        .anime-ep-tile.is-loading { pointer-events: none; }
        .anime-ep-tile.is-loading .anime-ep-play { display: none; }
        .anime-ep-tile.is-upcoming { opacity: 0.6; border-style: dashed; }
        .anime-ep-skeleton { aspect-ratio: 16/12; border-radius: 10px; }
        .anime-page > .anime-ep-grid { margin-top: 26px; }

        .anime-relations { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
        .anime-relation-card {
            flex: 0 0 140px; display: flex; flex-direction: column; gap: 6px; text-align: left;
            padding: 0; background: none; color: #fff; font-weight: 500;
        }
        .anime-relation-card:hover { background: none; }
        .anime-relation-card img { width: 140px; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; transition: transform 0.18s; }
        .anime-relation-card:hover img { transform: translateY(-3px); }
        .anime-relation-type { font-size: 11px; color: #e57373; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
        .anime-relation-title { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

        @media (max-width: 768px) {
            .anime-hero { padding: 14px 16px 20px; }
            .anime-hero-inner { flex-direction: column; align-items: center; gap: 18px; }
            .anime-cover { width: 150px; }
            .anime-hero-info { width: 100%; }
            .anime-title, .anime-alt-title { text-align: center; }
            .anime-meta-row, .anime-genres { justify-content: center; }
            .btn-anime-play { width: 100%; align-items: center; }
            .anime-ep-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
            .anime-section-hint { display: none; }
        }
        @media (prefers-reduced-motion: reduce) {
            .anime-ep-tile, .anime-relation-card img, .anime-ep-spinner, .anime-source-status.is-loading .anime-source-dot { transition: none; animation: none; }
        }
        .anime-legend { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
        .anime-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
