/* Styles pour TOUS les modals de films (avec IDs dynamiques) */
.modal[id^="movieModal"] {
    padding: 0 !important;
}

.modal[id^="movieModal"] .modal-content {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: var(--bg-dark) !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.modal[id^="actorModal"] {
    padding: 0 !important;
}

.modal[id^="actorModal"] .modal-content {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    max-height: 100vh !important;
    height: 100vh !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: var(--bg-dark) !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Style original pour compatibilité */
#movieModal .modal-content {
    padding: 0;
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-dark);
}

.movie-modal-new {
    position: relative;
    min-height: 100vh;
    background: var(--bg-dark);
    overflow-x: hidden;
}

.modal-back-btn {
        margin-top: 20px;

    position: fixed;
    top: 16px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.modal-back-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-heart-btn {
    margin-top: 16px;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.modal-heart-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-heart-btn.active {
    color: #ef4444;
}

.modal-heart-btn.active svg {
    fill: currentColor;
}

/* Bouton options (3 points verticaux) */
.modal-options-btn {
    margin-top: 16px;
    position: fixed;
    top: 70px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.modal-options-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal-options-btn svg {
    width: 24px;
    height: 24px;
}

/* Menu date de visionnage */
.watched-date-menu {
    position: fixed;
    top: 125px;
    right: 20px;
    width: 220px;
    background: rgba(20, 24, 28, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 99;
    display: none;
    overflow: hidden;
    animation: slideIn 0.2s ease;
}

.watched-date-menu.visible {
    display: block;
}

.wdm-header {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.wdm-item {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wdm-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.wdm-item svg {
    flex-shrink: 0;
}

.wdm-calendar {
    width: calc(100% - 32px);
    margin: 12px 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.wdm-calendar::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

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

.movie-modal-header {
    position: relative;
    width: 100%;
    height: 50vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 40px;
    overflow: visible;
}

.movie-modal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--backdrop-url, none);
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: none;
    border-radius: 0;
    overflow: hidden;
    transform: scale(1.05);
    filter: blur(1px);
}

.movie-modal-header--backdrop-ready::before {
    opacity: 1;
    transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.movie-modal-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(20, 24, 28, 0.6) 0%,
        rgba(20, 24, 28, 0.95) 60%,
        var(--bg-dark) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.movie-modal-poster {
    position: relative;
    z-index: 2;
    width: 200px;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.movie-modal-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    
}


.movie-modal-content::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1;
}

.movie-modal-content {
    position: relative;
    z-index: 2;
    padding: 24px 10px 80px;
    background: linear-gradient(to bottom, transparent 200px, var(--bg-dark) 5%);
    margin-top: -220px;
}

.movie-modal-title-section {
    text-align: center;
    margin-bottom: 24px;
}

.movie-modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.movie-modal-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.meta-item {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.movie-modal-genres {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-pill {
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}
.movie-modal-rating-section {
    border-radius: 16px;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

.rating-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    position: relative;
}

.rating-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-stars-container {
    position: relative;
    display: inline-flex;
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
}

.rating-clear-btn {
    position: absolute;
    top: -4px;
    right: -14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rating-clear-btn:hover {
    background: #dc2626;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.rating-clear-btn:active {
    transform: scale(0.95);
}

.rating-clear-btn svg {
    width: 11px;
    height: 11px;
}

.movie-modal-stars {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    width: 80% !important;
    max-width: 80% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.modal-star-new {
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex: 1;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(28px, 9vw, 48px) !important;
    line-height: 1;
    -webkit-touch-callout: none;
}

.modal-star-new.active {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.modal-star-new:hover {
    transform: scale(1.15);
}

.modal-star-new {
    font-size: 32px;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    flex-shrink: 0;
    position: relative;
}

.modal-star-new.full {
    color: #fbbf24;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
}

.modal-star-new.half {
    background: linear-gradient(90deg, #fbbf24 50%, rgba(255, 255, 255, 0.2) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.3));
}

.modal-star-new:hover {
    transform: scale(1.15);
}

.modal-star-new:active {
    animation: starClick 0.3s ease;
}




@media (min-width: 769px) {
    .modal-star-new {
        font-size: clamp(32px, 3.5vw, 42px) !important;
    }
}

@media (max-width: 768px) {
    .modal-star-new {
        font-size: clamp(30px, 8vw, 40px) !important;
    }
}

@media (max-width: 480px) {
    .modal-star-new {
        font-size: clamp(28px, 9vw, 36px) !important;
    }
}

@media (max-width: 380px) {
    .modal-star-new {
        font-size: clamp(26px, 9.5vw, 34px) !important;
    }
}

@media (max-width: 320px) {
    .modal-star-new {
        font-size: clamp(24px, 10vw, 32px) !important;
    }
}

.rating-clear-btn {
    position: absolute;
    top: -8px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: #ef4444;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.rating-clear-btn:hover {
    background: #dc2626;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

.rating-clear-btn:active {
    transform: scale(0.95);
}

.rating-clear-btn svg {
    width: 12px;
    height: 12px;
}

@keyframes starClick {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@keyframes starPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5)); }
    50% { filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.8)); }
}

.modal-star-new.full {
    animation: starPulse 2s ease-in-out infinite;
}

.movie-modal-stars {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.modal-star-new {
    -webkit-touch-callout: none;
}

.movie-card {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.movie-card:active {
    transform: none !important;
}

.movies-grid {
    -webkit-touch-callout: none;
}



.movie-modal-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.action-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 3px solid;
    background: var(--bg-card);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:active::before {
    width: 300%;
    height: 300%;
}

@media (hover: hover) {
    .action-btn:hover {
        transform: scale(1.1);
    }
}

@media (hover: none) {
    .action-btn:active {
        transform: scale(0.9);
    }
}

.btn-trailer {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-trailer:active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.5);
}

.btn-seen {
    border-color: #10b981;
    color: #10b981;
}

.btn-seen.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #059669;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-seen:active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.btn-watchlist {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-watchlist.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #2563eb;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.action-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.action-btn:active svg {
    transform: scale(1.2);
}

.action-btn-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-secondary);
}

@keyframes likeHeartBeat {
  0% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1); }
  75% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.action-btn.active i, 
.action-btn.active .btn-icon {
    animation: likeHeartBeat 0.5s;
}

.movie-modal-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.movie-synopsis {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Cast */
.cast-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.cast-item {
    flex-shrink: 0;
    width: 100px;
}

.cast-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-card);
    background-size: cover;
    background-position: center;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.cast-info {
    text-align: center;
}

.cast-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cast-character {
    font-size: 11px;
    color: var(--text-muted);
}

/*film similar */
.similar-movies-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.similar-movie-card {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background: var(--bg-card);
}

.similar-movie-card:hover {
    transform: scale(1.05);
}

.similar-movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.similar-movie-title {
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-prompt {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 768px) {
    .movie-modal-header {
        height: 80vh;
        padding-bottom: 250px;
    }
    
    .movie-modal-poster {
        width: 160px;
        height: 240px;
    }
    
    .movie-modal-title {
        font-size: 24px;
    }
    
    .movie-modal-actions {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        flex-direction: row;
        justify-content: center;
        padding: 14px 20px;
    }
    
    .similar-movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-star-new {
        font-size: 28px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP REDESIGN — layout moderne deux colonnes (min-width: 769px)
   Le mobile n'est PAS touché.
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 769px) {

    /* ── Modal wrapper ── */
    .modal[id^="movieModal"] {
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.75) !important;
        backdrop-filter: blur(8px) !important;
    }

    /* Centrage flex seulement quand le modal est ouvert (style inline ou classe active) */
    .modal[id^="movieModal"].active,
    .modal[id^="movieModal"].open,
    .modal[id^="movieModal"][style*="display: flex"],
    .modal[id^="movieModal"][style*="display:flex"],
    .modal[id^="movieModal"][style*="display: block"],
    .modal[id^="movieModal"][style*="display:block"] {
        display: flex !important;
    }

    .modal[id^="movieModal"] .modal-content {
        width: 92vw !important;
        max-width: 1100px !important;
        height: 88vh !important;
        max-height: 760px !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06) !important;
        background: var(--bg-dark) !important;
        margin: 0 auto !important;
        position: relative !important;
    }

    /* ── Root container : grid 2 colonnes ── */
    .movie-modal-new {
        display: grid !important;
        grid-template-columns: 320px 1fr !important;
        grid-template-rows: 1fr !important;
        min-height: unset !important;
        height: 100% !important;
        overflow: hidden !important;
        background: var(--bg-dark) !important;
    }

    /* ═══ COLONNE GAUCHE : poster + infos fixes ═══ */

    /* Le header (backdrop) devient la colonne gauche */
    .movie-modal-header {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 320px !important;
        height: 100% !important;
        padding-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-end !important;
        padding: 32px 24px !important;
        border-radius: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        gap: 0 !important;
    }

    .movie-modal-header::before {
        border-radius: 0 !important;
        transform: scale(1.08) !important;
        filter: blur(2px) saturate(1.3) !important;
    }

    .movie-modal-gradient {
        background: linear-gradient(
            180deg,
            rgba(10,12,15,0.3) 0%,
            rgba(10,12,15,0.55) 40%,
            rgba(10,12,15,0.92) 80%,
            var(--bg-dark) 100%
        ) !important;
    }

    /* Poster : plus grand, avec ombre cinéma */
    .movie-modal-poster {
        width: 200px !important;
        height: 300px !important;
        border-radius: 14px !important;
        box-shadow:
            0 30px 60px rgba(0,0,0,0.9),
            0 0 0 1px rgba(255,255,255,0.08) !important;
        border: none !important;
        position: relative !important;
        z-index: 3 !important;
        flex-shrink: 0 !important;
        margin-bottom: 20px !important;
    }

    /* Titre + meta sous le poster (dans la colonne gauche) */
    .movie-modal-title-section {
        position: relative !important;
        z-index: 3 !important;
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .movie-modal-title {
        font-size: 18px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        margin-bottom: 8px !important;
        letter-spacing: -0.3px !important;
    }

    .movie-modal-meta {
        gap: 10px !important;
        margin-bottom: 10px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .meta-item {
        font-size: 12px !important;
    }

    .movie-modal-genres {
        gap: 6px !important;
        justify-content: center !important;
    }

    .genre-pill {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }

    /* ═══ COLONNE DROITE : scroll indépendant ═══ */

    .movie-modal-content {
        grid-column: 2 !important;
        grid-row: 1 !important;
        padding: 32px 32px 40px !important;
        margin-top: 0 !important;
        background: transparent !important;
        height: 100% !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(255,255,255,0.1) transparent !important;
    }

    .movie-modal-content::before {
        display: none !important;
    }

    .movie-modal-content::-webkit-scrollbar {
        width: 4px;
    }
    .movie-modal-content::-webkit-scrollbar-track {
        background: transparent;
    }
    .movie-modal-content::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
    }

    /* ── Boutons d'action ── */
    .movie-modal-actions {
        display: flex !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        margin-bottom: 32px !important;
        padding: 0 !important;
    }

    .action-btn {
        width: 48px !important;
        height: 48px !important;
        border-radius: 14px !important;
        border-width: 2px !important;
        border-style: solid !important;
    }

    .action-btn-label {
        font-size: 10px !important;
    }

    /* ── Rating stars ── */
    .movie-modal-rating-section {
        margin-bottom: 24px !important;
    }

    .movie-modal-stars {
        width: 100% !important;
        max-width: 240px !important;
        justify-content: space-between !important;
    }

    .modal-star-new {
        font-size: 28px !important;
    }

    /* ── Sections ── */
    .movie-modal-section {
        margin-bottom: 28px !important;
    }

    .section-title {
        font-size: 16px !important;
        margin-bottom: 14px !important;
        letter-spacing: -0.2px !important;
    }

    .movie-synopsis {
        font-size: 14px !important;
        line-height: 1.65 !important;
    }

    /* ── Cast ── */
    .cast-list {
        gap: 14px !important;
        padding-bottom: 6px !important;
    }

    .cast-item {
        width: 80px !important;
    }

    .cast-photo {
        width: 80px !important;
        height: 80px !important;
    }

    .cast-name {
        font-size: 11px !important;
    }

    /* ── Films similaires ── */
    .similar-movies-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 10px !important;
    }

    /* ── Boutons flottants : positionnés dans la colonne droite ── */
    .modal-back-btn {
        position: absolute !important;
        top: 16px !important;
        left: 16px !important;
        z-index: 200 !important;
        width: 36px !important;
        height: 36px !important;
        margin-top: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        transition: background 0.2s, transform 0.2s !important;
    }

    .modal-back-btn:hover {
        background: rgba(0,0,0,0.75) !important;
        border-color: rgba(255,255,255,0.15) !important;
    }

    .modal-heart-btn {
        position: absolute !important;
        top: 16px !important;
        right: 16px !important;
        z-index: 200 !important;
        width: 36px !important;
        height: 36px !important;
        margin-top: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
    }

    .modal-options-btn {
        position: absolute !important;
        top: 16px !important;
        right: 60px !important;
        z-index: 200 !important;
        width: 36px !important;
        height: 36px !important;
        margin-top: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
    }

    .watched-date-menu {
        position: absolute !important;
        top: 60px !important;
        right: 16px !important;
    }

    /* ── Divider visuel entre les colonnes ── */
    .movie-modal-new::after {
        content: '';
        position: absolute;
        left: 320px;
        top: 0;
        bottom: 0;
        width: 1px;
        background: rgba(255,255,255,0.06);
        pointer-events: none;
        z-index: 1;
    }

    /* Streaming section */
    .streaming-mapple-btn {
        padding: 12px 14px !important;
    }

    .streaming-subs-grid {
        justify-content: flex-start !important;
        gap: 12px !important;
    }

    /* Compatibilité pour l'ancien sélecteur unique */
    #movieModal .modal-content {
        max-width: 1100px !important;
        width: 92vw !important;
        border-radius: 20px !important;
        height: 88vh !important;
        max-height: 760px !important;
    }
}

/* Conteneur de chargement centré */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.actor-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    background: var(--bg-dark);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Close button */
.actor-modal-close {
    margin-top: 17px;
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.actor-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.actor-modal-header {
    position: relative;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.actor-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    opacity: 0.3;
}

.actor-modal-backdrop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-dark) 100%);
}

.actor-modal-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 20px 16px;
    height: 100%;
}

.actor-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    background: var(--bg-card);
}

.actor-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-modal-title {
    flex: 1;
    min-width: 0;
}

.actor-modal-title h1 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-modal-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.actor-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.actor-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.actor-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.actor-stat-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
    flex-shrink: 0;
}

.actor-modal-bio {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.actor-modal-bio h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.actor-bio-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    transition: all 0.3s ease;
    word-wrap: break-word;
}

.actor-bio-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.actor-bio-toggle {
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: opacity 0.3s ease;
}

.actor-bio-toggle:hover {
    opacity: 0.8;
}

.actor-modal-filmography {
    padding: 20px;
    padding-bottom: 80px;
    flex-shrink: 0;
}

.actor-modal-filmography h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.filmography-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

.actor-films-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.actor-film-card {
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
}

.actor-film-card:active {
    transform: scale(0.95);
}

.actor-film-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--bg-elevated);
    overflow: hidden;
}

.actor-film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.actor-film-card:hover .actor-film-poster img {
    transform: scale(1.05);
}

.actor-film-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 6px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
}

.actor-film-rating {
    display: flex;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.actor-film-info {
    padding: 8px;
}

.actor-film-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.actor-film-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actor-films-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    width: 100%;
}

.actor-films-loader.visible {
    display: flex;
}








.similar-movies-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    width: 100%;
    grid-column: 1 / -1;
    min-height: 80px;
}

.similar-movies-loader .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.section-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.section-title .filmography-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* ── Streaming / Où regarder ────────────────────────────────────────────── */
/* ══ Streaming section ══════════════════════════════════ */

/* ── Mapple.tv hero ─────────────────────────────────── */
.streaming-mapple-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 15px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.streaming-mapple-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}
.streaming-mapple-logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a2e;
    display: flex; align-items: center; justify-content: center;
}
.streaming-mapple-logo img {
    width: 44px; height: 44px;
    object-fit: cover; border-radius: 12px;
}
.streaming-mapple-logo-fallback {
    font-size: 20px; font-weight: 900;
    color: #fff; font-family: Arial, sans-serif;
}
.streaming-mapple-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; gap: 3px;
}
.streaming-mapple-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px; font-weight: 800;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: #34d399;
    line-height: 1;
}
.streaming-mapple-free-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}
.streaming-mapple-cta {
    font-size: 15px; font-weight: 700;
    color: #fff; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.streaming-mapple-domain {
    font-size: 11px; font-weight: 500;
    color: rgba(255,255,255,0.3);
}
.streaming-mapple-arrow {
    flex-shrink: 0;
    color: rgba(255,255,255,0.25);
    transition: color 0.18s, transform 0.18s;
}
.streaming-mapple-btn:hover .streaming-mapple-arrow {
    color: rgba(255,255,255,0.7);
    transform: translateX(3px);
}

/* ── Groupe label ────────────────────────────────────── */
.streaming-group-label {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin: 0 0 10px 0;
}

/* ── Abonnements : logos ronds ───────────────────────── */
.streaming-subs-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    margin-top: 20px;
    align-items: center;
    justify-content: center;
}
.sp-sub-chip {
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: 6px;
    text-decoration: none;
    transition: transform 0.18s;
    flex-shrink: 0;
}
.sp-sub-chip:hover { transform: translateY(-2px); }
.sp-sub-chip:hover .sp-sub-chip-logo {
    box-shadow: 0 0 0 2.5px var(--pc, #667eea);
}
.sp-sub-chip-logo {
    width: 50px; height: 50px; border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0;
    box-shadow: 0 0 0 1.5px rgba(255,255,255,0.1);
    transition: box-shadow 0.18s;
}
.sp-sub-chip-logo img {
    width: 50px; height: 50px;
    object-fit: cover; display: block;
}
.sp-sub-chip-name {
    font-size: 10px; font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-align: center; line-height: 1.2;
    max-width: 58px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-sub-chip-badge { display: none; }

/* ── VOD toggle ──────────────────────────────────────── */
.streaming-vod-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.65);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    text-align: left;
}
.streaming-vod-toggle:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}
.streaming-vod-toggle-icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: rgba(167,139,250,0.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.streaming-vod-toggle-icon svg { color: #a78bfa; }
.streaming-vod-toggle-text { flex: 1; }
.streaming-vod-toggle-count {
    font-size: 11px; font-weight: 500;
    color: rgba(255,255,255,0.3);
}
.streaming-vod-toggle-chevron {
    transition: transform 0.2s ease;
    color: rgba(255,255,255,0.25); flex-shrink: 0;
}
.streaming-vod-toggle.open .streaming-vod-toggle-chevron {
    transform: rotate(180deg);
}

/* ── VOD list ────────────────────────────────────────── */
.streaming-vod-list {
    display: none; flex-direction: column; gap: 6px; margin-top: 6px;
}
.streaming-vod-list.visible { display: flex; }

.streaming-platform-card {
    display: flex; flex-direction: row; align-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    text-decoration: none; overflow: hidden; position: relative;
    height: 62px; box-sizing: border-box;
    transition: background 0.18s, transform 0.18s;
}
.streaming-platform-card::before {
    content: ''; position: absolute;
    left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--pc, #667eea);
}
.streaming-platform-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(2px);
}
.sp-logo-box {
    width: 40px; height: 40px; border-radius: 9px;
    flex-shrink: 0; margin-left: 14px; margin-right: 12px;
    overflow: hidden; background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.sp-logo-box img {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 8px; display: block; flex-shrink: 0;
}
.sp-logo-initials {
    display: none; font-size: 10px; font-weight: 900;
    color: white; font-family: Arial, sans-serif;
    letter-spacing: -0.5px; position: absolute;
}
.sp-logo-error .sp-logo-initials { display: flex; }
.sp-logo-error img { display: none !important; }
.streaming-platform-info {
    flex: 1; display: flex; flex-direction: column;
    justify-content: center; gap: 3px;
    min-width: 0; overflow: hidden;
}
.streaming-platform-name {
    font-size: 13px; font-weight: 700;
    color: var(--text-primary, #fff);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1;
}
.streaming-badges-row {
    display: flex; flex-direction: row; align-items: center;
    gap: 5px; flex-wrap: nowrap; overflow: hidden;
}
.sp-badge { font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1; }
.sp-dot { color: rgba(255,255,255,0.15); font-size: 11px; flex-shrink: 0; line-height: 1; }
.sp-arrow {
    color: rgba(255,255,255,0.2); flex-shrink: 0;
    margin-left: 8px; margin-right: 14px;
    transition: color 0.18s, transform 0.18s;
}
.streaming-platform-card:hover .sp-arrow {
    color: rgba(255,255,255,0.6); transform: translateX(2px);
}

/* ── Source ──────────────────────────────────────────── */
.streaming-source {
    font-size: 11px; margin-top: 12px; text-align: right;
}
.streaming-source a {
    color: rgba(255,255,255,0.2); text-decoration: none; transition: color 0.15s;
}
.streaming-source a:hover { color: rgba(255,255,255,0.5); }

/* Skeleton */
.streaming-skeleton-row { display: flex; flex-direction: column; gap: 6px; }
.streaming-card-skeleton { height: 68px; border-radius: 12px; background: rgba(255,255,255,0.04); }