:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-bright: #e50914;
    --accent-gold: #ffd700;
    --bt-glow: rgba(229, 9, 20, 0.4);
    --bt-correct: #22c55e;
    --bt-wrong: #ef4444;
    --bt-neutral: #3b82f6;
    --bt-border: rgba(255,255,255,0.08);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    gap: 20px;
    transition: all 0.5s ease;
    background: transparent !important;
    backdrop-filter: none !important;
}

.navbar.scrolled {
    background: rgba(10,10,10,0.3) !important;
    backdrop-filter: blur(5px);
}

.logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 38px;
    letter-spacing: 3px;
    color: var(--accent-bright);
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(229,9,20,0.6);
    cursor: pointer;
    text-decoration: none;
    animation: logoPulse 0.7s var(--ease-smooth) both;
    will-change: transform;
}

@keyframes logoPulse {
    from { opacity: 0; transform: scale(0.9) translateY(-6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-bright);
    transition: width 0.3s ease;
    box-shadow: 0 0 6px rgba(229,9,20,0.6);
}

.nav-links a:hover::after,
.nav-links a.nav-active::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.nav-active,
.nav-links a.active {
    color: var(--accent-bright);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== RECHERCHE NAVBAR ===== */
.search-container {
    position: relative;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 240px;
    padding: 10px 40px 10px 40px;
    border-radius: 25px;
    border: solid 1px rgba(255,255,255,0.2);
    background: #000 !important;
    color: white;
    transition: all .35s ease;
    outline: none;
    font-family: 'Work Sans', sans-serif;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    fill: rgba(255,255,255,0.7);
    width: 18px;
    height: 18px;
    transition: fill 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.search-input:focus + .search-icon {
    fill: var(--accent-bright);
    transform: translateY(-50%) scale(1.1);
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.2s ease, transform 0.2s ease;
}

.search-input:not(:placeholder-shown) + .search-icon + .search-clear {
    opacity: 1;
}

.search-clear:hover {
    color: white;
    transform: translateY(-50%) scale(1.2) rotate(90deg);
}

.search-input:focus {
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 0 2px rgba(229,9,20,0.1);
}

.search-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(20,20,20,0.98);
    backdrop-filter: blur(20px);
    border-radius: 0 0 10px 10px;
    margin-top: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    max-height: 600px;
    overflow-y: auto;
    z-index: 1001;
}

.search-results.active {
    display: block;
    animation: dropdownReveal 0.2s var(--ease-smooth) both;
}

@keyframes dropdownReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.search-results::-webkit-scrollbar { width: 4px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    animation: slideInResult 0.22s var(--ease-smooth) both;
}

@keyframes slideInResult {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.search-result-item:nth-child(1) { animation-delay: 0ms; }
.search-result-item:nth-child(2) { animation-delay: 40ms; }
.search-result-item:nth-child(3) { animation-delay: 80ms; }
.search-result-item:nth-child(4) { animation-delay: 120ms; }
.search-result-item:nth-child(5) { animation-delay: 160ms; }

.search-result-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateX(4px);
}

.search-result-poster {
    width: 42px;
    height: 63px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.search-result-item:hover .search-result-poster {
    transform: scale(1.05);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: nowrap;
}

.search-result-type { font-weight: 700; }
.result-type-film  { color: #e50914 !important; }
.result-type-serie { color: #2196f3 !important; }

.search-result-rating {
    color: #ffd700;
    font-weight: 600;
}

.search-result-year { color: var(--text-secondary); }

.search-result-empty {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

.search-show-all {
    padding: 12px;
    text-align: center;
    color: var(--accent-bright);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s ease;
}

.search-show-all:hover {
    background: rgba(229,9,20,0.08);
}

/* BOUTON CONNEXION */
.btn-connexion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    white-space: nowrap;
}

.connexion-icon {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>') no-repeat center;
    background-size: contain;
}

.connexion-text { margin-right: 4px; }

.connexion-arrow {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 1px;
    transition: transform 0.3s ease;
}

.btn-connexion:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.3);
}

.btn-connexion:hover .connexion-arrow {
    transform: rotate(180deg);
}

/* BURGER MENU */
.burger {
    position: relative;
    width: 40px;
    height: 30px;
    background: transparent;
    cursor: pointer;
    display: none;
    flex-shrink: 0;
    z-index: 1001;
}

.burger input { display: none; }

.burger span {
    display: block;
    position: absolute;
    height: 4px;
    width: 100%;
    background: white;
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.burger span:nth-of-type(1) {
    top: 0px;
    transform-origin: left center;
}

.burger span:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
    transform-origin: left center;
}

.burger span:nth-of-type(3) {
    top: 100%;
    transform-origin: left center;
    transform: translateY(-100%);
}

.burger input:checked ~ span:nth-of-type(1) {
    transform: rotate(45deg);
    top: 0px;
    left: 5px;
}

.burger input:checked ~ span:nth-of-type(2) {
    width: 0%;
    opacity: 0;
}

.burger input:checked ~ span:nth-of-type(3) {
    transform: rotate(-45deg);
    top: 28px;
    left: 5px;
}

/* MENU MOBILE */
.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(20px);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68,-0.55,0.27,1.55);
    z-index: 999;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background: rgba(229,9,20,0.1);
    color: var(--accent-bright);
    padding-left: 30px;
}

/* RESPONSIVE NAV */
@media (min-width: 1801px) {
    .nav-links { display: flex !important; }
    .burger { display: none !important; }
}

@media (max-width: 1800px) {
    .navbar { padding: 15px 20px; gap: 15px; }
    .logo { font-size: 28px; flex-shrink: 0; }
    .nav-links { display: none !important; }
    .burger { display: block !important; }
    .navbar > .nav-right .btn-connexion { display: inline-flex !important; }
    .search-input { width: 220px; font-size: 13px; padding: 8px 35px 8px 35px; }
    .search-icon { width: 16px; height: 16px; left: 10px; }
}

@media (max-width: 480px) {
    .navbar { padding: 12px 15px; gap: 10px; }
    .logo { font-size: 24px; }
    .search-input { width: 100px; }
    .search-input:focus { width: 150px; }
}

/* ========== HERO ========== */
.hero {
    padding: 150px 60px 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(10,10,10,0) 0%, rgba(10,10,10,1) 100%);
    position: relative;
    overflow: hidden;
}

/* Fond dégradé radial rouge discret */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 55% at 50% 10%, rgba(229,9,20,0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

/* Canvas réseau animé */
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
}

/* Rangée titre + boutons */
.hero-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.hero-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.hero-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.35s var(--ease-bounce);
    flex-shrink: 0;
    backdrop-filter: blur(6px);
    will-change: transform;
}

.hero-icon-btn svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255,255,255,0.75);
    transition: stroke 0.3s ease;
}

.hero-icon-btn:hover {
    background: rgba(229,9,20,0.18);
    border-color: var(--accent-bright);
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 0 22px rgba(229,9,20,0.35);
}

.hero-icon-btn:hover svg {
    stroke: var(--accent-bright);
}

.hero-icon-btn:active {
    transform: scale(0.95) rotate(0deg);
}

/* Titre */
.hero-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 82px;
    letter-spacing: 6px;
    margin-bottom: 0;
    display: inline-block;
    color: var(--accent-bright);
    line-height: 1;
    animation: titleFadeIn 0.7s var(--ease-smooth) both,
               titleGlow 3.5s ease-in-out 0.7s infinite;
    will-change: text-shadow;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.95);
        text-shadow: none;
        letter-spacing: 2px;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        text-shadow: 0 0 40px rgba(229,9,20,0.6);
        letter-spacing: 6px;
    }
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 30px rgba(229,9,20,0.45),
                     0 0 60px rgba(229,9,20,0.15);
    }
    50% {
        text-shadow: 0 0 55px rgba(229,9,20,0.75),
                     0 0 100px rgba(229,9,20,0.30),
                     0 0 140px rgba(229,9,20,0.10);
    }
}

.title-char { display: inline; }

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: subtitleFadeIn 0.8s ease 0.9s both;
}

/* SEARCH BAR HÉROS */
.search-container--hero {
    width: 560px;
    max-width: calc(100% - 40px);
    margin: 0 auto 70px;
    animation: searchBarFadeIn 0.7s var(--ease-smooth) 1.1s both;
}

.search-container--hero .search-input {
    width: 100%;
    padding: 13px 44px 13px 44px;
    font-size: 15px;
    border-radius: 28px;
    background: rgba(0,0,0,0.85) !important;
    border: 1px solid rgba(255,255,255,0.22);
    transition: all 0.4s ease;
}

.search-container--hero .search-input:focus {
    border-color: var(--accent-bright);
    box-shadow: 0 0 0 3px rgba(229,9,20,0.15),
                0 4px 24px rgba(229,9,20,0.1);
}

/* Ligne de scan animée sous la search hero */
.search-container--hero .search-wrapper::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    transition: width 0.45s ease, left 0.45s ease;
    border-radius: 1px;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(229,9,20,0.6);
}

.search-container--hero .search-wrapper:focus-within::after {
    width: 90%;
    left: 5%;
}

.search-container--hero .search-icon {
    left: 15px;
    width: 18px;
    height: 18px;
}

.search-container--hero .search-clear { right: 14px; }

.search-container--hero .search-results {
    border-radius: 0 0 14px 14px;
    margin-top: 3px;
    min-width: 100%;
    z-index: 200;
}

.search-container--hero .search-result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.search-container--hero .search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    text-align: left;
}

/* ========== SKELETON LOADING ========== */
@keyframes skeletonShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.6s ease infinite;
}

.skeleton-card {
    cursor: default;
    animation: fadeInUp 0.45s var(--ease-smooth) both;
}

.skeleton-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 12px;
}

.skeleton-title {
    height: 13px;
    margin-top: 10px;
    border-radius: 6px;
    width: 75%;
}

.skeleton-meta {
    height: 11px;
    margin-top: 7px;
    border-radius: 6px;
    width: 50%;
}

/* ========== REVEAL AU SCROLL ========== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s var(--ease-smooth),
                transform 0.65s var(--ease-smooth);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== TRENDING SECTION ========== */
.trending-section {
    padding: 0 60px 100px;
}

.section-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    text-align: center;
    animation: subtitleFadeIn 0.6s ease both;
}

.section-icon {
    font-size: 26px;
    flex-shrink: 0;
    display: inline-block;
    animation: iconBounce 2.2s ease-in-out infinite;
    will-change: transform;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    45%       { transform: translateY(-5px) scale(1.12); }
    55%       { transform: translateY(-3px) scale(1.08); }
}

.section-title {
    font-size: 26px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* MOVIE GRID — 5 colonnes fixes */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
    perspective: 1200px;
}

/* ========== ANIMATIONS GLOBALES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes heroGlow {
    0%, 100% { text-shadow: 0 0 30px rgba(229,9,20,0.5), 0 0 60px rgba(229,9,20,0.2); }
    50%       { text-shadow: 0 0 50px rgba(229,9,20,0.8), 0 0 100px rgba(229,9,20,0.4); }
}

@keyframes subtitleFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes searchBarFadeIn {
    from { opacity: 0; transform: translateY(20px) scaleX(0.96); }
    to   { opacity: 1; transform: translateY(0) scaleX(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ========== MOVIE CARDS ========== */
.movie-card {
    cursor: pointer;
    transition: filter 0.3s ease;
    display: block;
    animation: fadeInUp 0.55s var(--ease-smooth) both;
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;
    overflow: visible;
}

/* Ripple container */
.movie-card {
    isolation: isolate;
}

@keyframes rippleAnim {
    to {
        transform: scale(4.5);
        opacity: 0;
    }
}

.ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(229,9,20,0.35);
    width: 10px;
    height: 10px;
    transform: scale(0);
    animation: rippleAnim 0.65s linear forwards;
    pointer-events: none;
    z-index: 10;
}

.movie-card:hover {
    filter: brightness(1.04);
    z-index: 2;
}

/* POSTER WRAPPER */
.movie-poster-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    line-height: 0;
}

/* Bordure lumineuse au hover */
.movie-poster-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    box-shadow: inset 0 0 0 1.5px rgba(229,9,20,0);
    transition: box-shadow 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.movie-card:hover .movie-poster-wrapper::after {
    box-shadow: inset 0 0 0 1.5px rgba(229,9,20,0.65);
}

.movie-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.07);
    box-shadow: 0 22px 55px rgba(229,9,20,0.35);
}

.movie-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(229,9,20,0.88) 0%,
        rgba(0,0,0,0.5) 50%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: 12px;
    gap: 8px;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.overlay-play {
    font-size: 42px;
    color: white;
    text-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transform: scale(0.65) translateY(6px);
    transition: transform 0.35s var(--ease-bounce);
}

.movie-card:hover .overlay-play {
    transform: scale(1) translateY(0);
}

.overlay-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.92);
    letter-spacing: 1px;
    text-transform: uppercase;
    transform: translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease 0.07s, opacity 0.3s ease 0.07s;
}

.movie-card:hover .overlay-label {
    transform: translateY(0);
    opacity: 1;
}

.movie-info {
    margin-top: 10px;
}

.movie-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    text-align: left;
    transition: color 0.25s ease;
}

.movie-card:hover .movie-title {
    color: rgba(255,255,255,0.9);
}

.movie-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: var(--accent-gold);
    font-weight: 600;
}

/* ========== LOADING STATE ========== */
.loading {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent-bright);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px;
    position: relative;
}

/* Double anneau intérieur */
.spinner::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 3px solid transparent;
    border-bottom-color: rgba(229,9,20,0.35);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1500px) {
    .movies-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 1200px) {
    .movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 900px) {
    .movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 768px) {
    .hero { padding: 120px 20px 60px; }
    .hero-title { font-size: 52px; letter-spacing: 3px; }
    .hero-subtitle { font-size: 15px; }
    .trending-section { padding: 0 20px 80px; }
    .section-title { font-size: 20px; }
    .movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .movie-title { font-size: 12px; }
    .movie-meta { font-size: 11px; }
}

@media (max-width: 480px) {
    .movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .hero-title-row { gap: 10px; }
    .hero-icon-btn { width: 36px; height: 36px; }
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(40px) scale(0.93);
    opacity: 0;
    transition: transform 0.4s var(--ease-bounce), opacity 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.modal-header-icon {
    font-size: 22px;
    animation: iconBounce 2.5s ease-in-out infinite;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.modal-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 26px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease-bounce);
    line-height: 1;
    padding-bottom: 2px;
}

.modal-close:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

/* Pref items */
.pref-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    animation: slideInPref 0.35s var(--ease-smooth) both;
}

@keyframes slideInPref {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.pref-item:nth-child(1) { animation-delay: 0ms; }
.pref-item:nth-child(2) { animation-delay: 50ms; }
.pref-item:nth-child(3) { animation-delay: 100ms; }
.pref-item:nth-child(4) { animation-delay: 150ms; }
.pref-item:nth-child(5) { animation-delay: 200ms; }
.pref-item:nth-child(6) { animation-delay: 250ms; }

.pref-item:hover {
    border-color: rgba(229,9,20,0.22);
    background: rgba(229,9,20,0.04);
    transform: translateX(3px);
}

.pref-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pref-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pref-icon { font-size: 20px; }

.pref-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.pref-sublabel {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input { display: none; }

.toggle-track {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 13px;
    transition: background 0.3s ease;
}

.toggle-track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--accent-bright);
    box-shadow: 0 0 10px rgba(229,9,20,0.3);
}

.toggle-switch input:checked + .toggle-track::after {
    transform: translateX(22px);
}

/* Sliders */
.pref-slider-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.pref-slider-val {
    color: white;
    font-weight: 700;
    font-size: 14px;
    background: var(--accent-bright);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-bounce);
}

.pref-slider:active ~ .pref-slider-row .pref-slider-val {
    transform: scale(1.2);
}

.pref-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.pref-slider-min, .pref-slider-max {
    font-size: 11px;
    color: #555;
    min-width: 16px;
}

.pref-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.12);
    outline: none;
    cursor: pointer;
    accent-color: var(--accent-bright);
    transition: background 0.3s ease;
}

.pref-slider:hover {
    background: rgba(255,255,255,0.18);
}

.pref-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-bright);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(229,9,20,0.5);
    transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s ease;
}

.pref-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 14px rgba(229,9,20,0.7);
}

/* Depth buttons */
.depth-buttons {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.depth-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--ease-bounce);
    font-family: 'Work Sans', sans-serif;
    position: relative;
    overflow: hidden;
}

.depth-btn:hover {
    background: rgba(255,255,255,0.09);
    color: white;
    transform: translateY(-2px);
}

.depth-btn.active {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    color: white;
    box-shadow: 0 0 18px rgba(229,9,20,0.45);
    transform: translateY(-1px);
}

/* Reset button */
.pref-reset-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    font-family: 'Work Sans', sans-serif;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.pref-reset-btn:hover {
    background: rgba(229,9,20,0.12);
    border-color: var(--accent-bright);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(229,9,20,0.2);
}

.pref-reset-btn:active {
    transform: translateY(0);
}

/* Help items — staggeré via JS */
.help-items { display: flex; flex-direction: column; gap: 14px; }

.help-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 16px 18px;
    transition: border-color 0.25s ease, background 0.25s ease,
                opacity 0.35s ease, transform 0.35s var(--ease-smooth);
    /* État initial pour l'animation staggerée */
    opacity: 0;
    transform: translateX(-14px);
}

.help-item.revealed {
    opacity: 1;
    transform: translateX(0);
}

.help-item:hover {
    background: rgba(229,9,20,0.06);
    border-color: rgba(229,9,20,0.28);
    transform: translateX(4px) !important;
}

.help-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    transition: transform 0.3s var(--ease-bounce);
}

.help-item:hover .help-icon {
    transform: scale(1.2) rotate(-5deg);
}

.help-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.help-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* ========== FOOTER ========== */
.footer {
    background: linear-gradient(to bottom, rgba(10,10,10,0) 0%, #0a0a0a 15%);
    padding: 30px 30px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 100px;
}

.footer-main {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    margin-bottom: 20px;
    align-items: start;
}

.footer-left { padding-right: 40px; }

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.footer-icons-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: transparent;
    transition: background-color 0.3s ease, transform 0.3s var(--ease-bounce), box-shadow 0.3s ease;
    text-decoration: none;
    will-change: transform;
}

.social-icon:hover { transform: scale(1.18) translateY(-3px); }
.social-icon:active { transform: scale(0.95); }

.social-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.social-icon.github:hover    { background-color: #24292e; box-shadow: 0 8px 20px rgba(36,41,46,0.4); }
.social-icon.discord:hover   { background-color: #5865F2; box-shadow: 0 8px 20px rgba(88,101,242,0.4); }
.social-icon.telegram:hover  { background-color: #0088cc; box-shadow: 0 8px 20px rgba(0,136,204,0.4); }
.social-icon.link:hover      { background-color: #666666; box-shadow: 0 8px 20px rgba(102,102,102,0.3); }
.social-icon.trustpilot:hover{ background-color: #00B67A; box-shadow: 0 8px 20px rgba(0,182,122,0.4); }
.social-icon.coffee:hover    { background-color: #FFDD00; box-shadow: 0 8px 20px rgba(255,221,0,0.4); }
.social-icon.beacons:hover   { background-color: #8B5CF6; box-shadow: 0 8px 20px rgba(139,92,246,0.4); }
.social-icon.dmca:hover      { background-color: #e50914; box-shadow: 0 8px 20px rgba(229,9,20,0.4); }
.social-icon.extension:hover { background-color: #FF7139; box-shadow: 0 8px 20px rgba(255,113,57,0.4); }
.social-icon.info:hover      { background-color: #0078D7; box-shadow: 0 8px 20px rgba(0,120,215,0.4); }

.social-icon:hover img { filter: brightness(0) invert(1); }

.footer-copyright {
    color: var(--text-secondary);
    font-size: 13px;
    opacity: 0.9;
}

.footer-author {
    color: var(--accent-bright);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-weight: 600;
}

.footer-author:hover {
    color: #ff0a16;
    text-shadow: 0 0 12px rgba(229,9,20,0.5);
}

@media (max-width: 1024px) {
    .footer-main { grid-template-columns: 1fr; gap: 50px; }
    .footer-left { padding-right: 0; }
}

@media (max-width: 768px) {
    .footer { padding: 50px 25px 25px; }
    .footer-main { gap: 40px; }
    .footer-title { text-align: center; }
    .footer-text { text-align: center; }
    .footer-icons-grid { gap: 15px; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; border: none; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }

/* ========== UTILITAIRES ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}