/**
 * WANO FLIX - Thème Halloween & Moteur Ultra-Fluide (v3.5)
 * Styles sombres, Manoir Hanté SVG, Jolly Roger One Piece Halloween SVG, 150 Paramètres
 */

:root {
    --bg-main: #09050d;
    --bg-card: #130b1a;
    --bg-card-hover: #21122e;
    --bg-modal: #140c1c;
    --red-netflix: #ff5500;
    --red-hover: #ff7700;
    --accent-purple: #9b30ff;
    --accent-green: #00ff66;
    --text-main: #FFFFFF;
    --text-muted: #B0A4B8;
    --text-secondary: #7E7285;
    --border-color: rgba(255, 85, 0, 0.24);
    --shadow-main: 0 12px 35px rgba(0, 0, 0, 0.9);
    --glow-effect: 0 0 22px rgba(255, 85, 0, 0.45);
    --card-radius: 8px;
    --card-scale: 1.08;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --title-font: 'Inter', sans-serif;
    --ui-saturation: 100%;
    --ui-contrast: 100%;
    --ui-brightness: 100%;
}

[data-theme="pumpkin"] {
    --bg-main: #0b0604;
    --bg-card: #160d07;
    --red-netflix: #ff6600;
    --border-color: rgba(255, 102, 0, 0.28);
    --glow-effect: 0 0 22px rgba(255, 102, 0, 0.45);
}

[data-theme="spectral"] {
    --bg-main: #070410;
    --bg-card: #120a24;
    --red-netflix: #9b30ff;
    --red-hover: #b455ff;
    --border-color: rgba(155, 48, 255, 0.28);
    --glow-effect: 0 0 22px rgba(155, 48, 255, 0.5);
}

[data-theme="toxic"] {
    --bg-main: #040c07;
    --bg-card: #09190e;
    --red-netflix: #00ff66;
    --red-hover: #33ff85;
    --border-color: rgba(0, 255, 102, 0.28);
    --glow-effect: 0 0 22px rgba(0, 255, 102, 0.45);
}

[data-theme="netflix"] {
    --bg-main: #111111;
    --bg-card: #181818;
    --red-netflix: #E50914;
    --red-hover: #f40612;
    --border-color: rgba(255, 255, 255, 0.14);
    --glow-effect: 0 0 20px rgba(229, 9, 20, 0.45);
}

[data-theme="oled"] {
    --bg-main: #000000;
    --bg-card: #080808;
    --bg-modal: #0a0a0a;
    --border-color: rgba(255, 85, 0, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-stack);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
    min-height: 100vh;
}

/* Accélération Matérielle Ultra-Fluide GPU */
[data-performance="ultra"] .carousel-track { transform: translateZ(0); }

/* Compteur FPS HUD */
.fps-hud {
    position: fixed;
    bottom: 16px;
    left: 16px;
    background: rgba(10, 5, 15, 0.9);
    border: 1px solid var(--red-netflix);
    color: #00ff66;
    font-family: monospace;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 9500;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.25);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #07040a;
}
::-webkit-scrollbar-thumb {
    background: #351d42;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--red-netflix);
}

/* ==========================================================================
   AMBIANCE HALLOWEEN : MANOIR HANTÉ, LUNE DE SANG, BRUME, CHAUVES-SOURIS
   ========================================================================== */
.halloween-ambient-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

/* Éclair d'orage silencieux */
.silent-lightning {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 15%, rgba(255, 119, 0, 0.22), rgba(155, 48, 255, 0.14), transparent 70%);
    opacity: 0;
    pointer-events: none;
    animation: silentStormFlash 14s infinite;
}

@keyframes silentStormFlash {
    0%, 92%, 94%, 96%, 100% { opacity: 0; }
    93% { opacity: 0.85; }
    95% { opacity: 0.45; }
}

.blood-moon {
    position: absolute;
    top: 72px;
    right: 8.5%;
    width: 126px;
    height: 126px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffbb55 0%, #ff4400 55%, #770000 100%);
    box-shadow: 0 0 70px rgba(255, 68, 0, 0.55), 0 0 140px rgba(255, 34, 0, 0.3);
    opacity: 0.55;
    animation: pulseMoon 7s ease-in-out infinite alternate;
}

.moon-crater {
    position: absolute;
    border-radius: 50%;
    background: rgba(90, 10, 0, 0.28);
}
.moon-crater.c1 { width: 26px; height: 22px; top: 26px; left: 30px; }
.moon-crater.c2 { width: 18px; height: 18px; top: 64px; left: 72px; }
.moon-crater.c3 { width: 32px; height: 24px; top: 75px; left: 28px; }

@keyframes pulseMoon {
    0% { transform: scale(1); opacity: 0.44; }
    100% { transform: scale(1.08); opacity: 0.65; }
}

/* Sorcière volante sur son balai */
.flying-witch-track {
    position: absolute;
    top: 90px;
    right: -180px;
    z-index: 4;
    pointer-events: none;
    animation: witchSkyRide 24s linear infinite;
}

.witch-svg {
    animation: witchBobbing 2.2s ease-in-out infinite alternate;
}

@keyframes witchSkyRide {
    0% { transform: translate(0, 20px) scale(0.85); opacity: 0; }
    8% { opacity: 0.92; }
    50% { transform: translate(-55vw, -35px) scale(1.05); opacity: 0.95; }
    92% { opacity: 0.9; }
    100% { transform: translate(-115vw, 15px) scale(0.85); opacity: 0; }
}

@keyframes witchBobbing {
    0% { transform: translateY(0px) rotate(-3deg); }
    100% { transform: translateY(-12px) rotate(3deg); }
}

/* Fantômes Spectraux Errants */
.spooky-ghosts {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.ghost-entity {
    position: absolute;
    opacity: 0;
}

.ghost-1 {
    top: 28%;
    left: -90px;
    animation: ghostRoamRight 26s ease-in-out infinite;
}
.ghost-2 {
    top: 56%;
    right: -90px;
    animation: ghostRoamLeft 31s ease-in-out infinite 5s;
}
.ghost-3 {
    top: 18%;
    right: -90px;
    animation: ghostRoamLeft 22s ease-in-out infinite 12s;
}

@keyframes ghostRoamRight {
    0% { transform: translate(0, 0) rotate(4deg) scale(0.85); opacity: 0; }
    12% { opacity: 0.78; }
    35% { transform: translate(35vw, -38px) rotate(-6deg) scale(1.05); }
    68% { transform: translate(72vw, 24px) rotate(5deg) scale(0.95); opacity: 0.78; }
    100% { transform: translate(110vw, -25px) rotate(-4deg) scale(0.85); opacity: 0; }
}

@keyframes ghostRoamLeft {
    0% { transform: translate(0, 0) rotate(-4deg) scale(0.85); opacity: 0; }
    12% { opacity: 0.75; }
    40% { transform: translate(-42vw, -32px) rotate(6deg) scale(1.04); }
    75% { transform: translate(-78vw, 22px) rotate(-5deg) scale(0.95); opacity: 0.75; }
    100% { transform: translate(-112vw, -20px) rotate(4deg) scale(0.85); opacity: 0; }
}

.haunted-mansion-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    opacity: 0.68;
    pointer-events: none;
}

.mansion-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.haunted-window {
    animation: windowFlicker 5s infinite alternate;
}
.haunted-window.win-2 { animation-delay: 1.4s; }
.haunted-window.win-3 { animation-delay: 2.9s; }

@keyframes windowFlicker {
    0%, 18%, 22%, 62%, 64%, 100% { opacity: 0.95; }
    20%, 63% { opacity: 0.15; filter: none; }
}

/* Brume animée triple couche */
.spooky-fog-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 260px;
    overflow: hidden;
    opacity: 0.48;
}

.spooky-fog {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, rgba(155, 48, 255, 0.28) 0%, rgba(255, 85, 0, 0.18) 42%, transparent 74%);
    animation: driftFog 24s linear infinite;
}

.fog-layer-2 {
    animation: driftFogReverse 32s linear infinite;
    opacity: 0.7;
}

.fog-layer-3 {
    height: 160px;
    background: radial-gradient(ellipse at bottom, rgba(255, 119, 0, 0.22) 0%, rgba(0, 255, 102, 0.07) 45%, transparent 75%);
    animation: driftFog 19s linear infinite;
    opacity: 0.55;
}

@keyframes driftFog {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes driftFogReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Chauves-souris SVG en vol (8 chauves-souris aux ailes battantes) */
.spooky-bats {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bat {
    position: absolute;
    color: rgba(255, 115, 0, 0.82);
    opacity: 0;
    animation: batFlight 15s linear infinite;
}
.bat svg {
    animation: batWingFlap 0.32s ease-in-out infinite alternate;
}
@keyframes batWingFlap {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(0.52) scaleX(1.08); }
}

.bat-1 { top: 16%; animation-delay: 0s; animation-duration: 13s; }
.bat-2 { top: 30%; animation-delay: 2.5s; animation-duration: 16s; color: rgba(175, 75, 255, 0.85); }
.bat-3 { top: 11%; animation-delay: 5.5s; animation-duration: 12s; }
.bat-4 { top: 44%; animation-delay: 8s; animation-duration: 15s; }
.bat-5 { top: 22%; animation-delay: 4s; animation-duration: 14s; color: rgba(255, 60, 0, 0.85); }
.bat-6 { top: 38%; animation-delay: 9.5s; animation-duration: 17s; }
.bat-7 { top: 14%; animation-delay: 11.5s; animation-duration: 13.5s; color: rgba(185, 85, 255, 0.85); }
.bat-8 { top: 52%; animation-delay: 6.5s; animation-duration: 16.5s; }

@keyframes batFlight {
    0% { transform: translate(-80px, 25px) scale(0.75) rotate(10deg); opacity: 0; }
    10% { opacity: 0.92; }
    35% { transform: translate(35vw, -35px) scale(1.08) rotate(-8deg); }
    65% { transform: translate(70vw, 15px) scale(0.95) rotate(6deg); }
    90% { opacity: 0.9; }
    100% { transform: translate(108vw, -95px) scale(0.8) rotate(-10deg); opacity: 0; }
}

/* Braises, Feux Follets & Lucioles d'Halloween */
.spooky-embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ember {
    position: absolute;
    bottom: -10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff7700;
    box-shadow: 0 0 10px #ff5500, 0 0 20px #ffaa00;
    animation: riseEmber 11s linear infinite;
    opacity: 0;
}
.ember.wisp-purple {
    width: 8px;
    height: 8px;
    background: #b84dff;
    box-shadow: 0 0 12px #9b30ff, 0 0 24px #d488ff;
}
.ember.wisp-green {
    width: 7px;
    height: 7px;
    background: #00ff66;
    box-shadow: 0 0 12px #00ff66, 0 0 22px #88ffbb;
}

.ember.e-1 { left: 8%; animation-delay: 0s; animation-duration: 10s; }
.ember.e-2 { left: 18%; animation-delay: 2.5s; animation-duration: 13s; }
.ember.e-3 { left: 29%; animation-delay: 1.2s; animation-duration: 9.5s; }
.ember.e-4 { left: 41%; animation-delay: 4.5s; animation-duration: 12s; }
.ember.e-5 { left: 53%; animation-delay: 2s; animation-duration: 11s; }
.ember.e-6 { left: 64%; animation-delay: 5.5s; animation-duration: 14s; }
.ember.e-7 { left: 73%; animation-delay: 0.8s; animation-duration: 10.5s; }
.ember.e-8 { left: 81%; animation-delay: 3.4s; animation-duration: 12.5s; }
.ember.e-9 { left: 88%; animation-delay: 6.2s; animation-duration: 11.5s; }
.ember.e-10 { left: 94%; animation-delay: 1.7s; animation-duration: 13.5s; }
.ember.e-11 { left: 35%; animation-delay: 7.1s; animation-duration: 10s; }
.ember.e-12 { left: 58%; animation-delay: 8.3s; animation-duration: 12s; }

@keyframes riseEmber {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    15% { opacity: 0.9; }
    50% { transform: translateY(-45vh) translateX(-28px) scale(1.15); opacity: 0.85; }
    85% { opacity: 0.7; }
    100% { transform: translateY(-94vh) translateX(42px) scale(0.35); opacity: 0; }
}

/* Toiles d'araignées SVG + Araignées suspendues animées */
.spiderweb {
    position: absolute;
    width: 165px;
    height: 165px;
    pointer-events: none;
    z-index: 3;
}
.spiderweb-top-left { top: 68px; left: 0; }
.spiderweb-top-right { top: 68px; right: 0; }

.hanging-spider {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: spiderDropClimb 9s ease-in-out infinite alternate;
}
.spider-left { left: 42px; }
.spider-right { right: 46px; animation-delay: 3.5s; animation-duration: 11s; }

.spider-thread {
    width: 1.5px;
    height: 95px;
    background: linear-gradient(180deg, rgba(255, 136, 0, 0.55), rgba(255, 255, 255, 0.35));
}

.spider-svg {
    margin-top: -3px;
    animation: spiderWiggle 1.4s ease-in-out infinite alternate;
}

@keyframes spiderDropClimb {
    0% { transform: translateY(-55px); }
    45% { transform: translateY(25px); }
    65% { transform: translateY(10px); }
    100% { transform: translateY(55px); }
}

@keyframes spiderWiggle {
    0% { transform: rotate(-7deg); }
    100% { transform: rotate(7deg); }
}

/* Citrouilles & Ornements Flottants */
.floating-pumpkin {
    position: absolute;
    font-size: 36px;
    animation: floatPumpkin 4s ease-in-out infinite alternate;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.25s ease;
    z-index: 5;
}
.floating-pumpkin:hover {
    transform: scale(1.28) rotate(14deg);
}
.pumpkin-1 { bottom: 30px; right: 26px; }
.pumpkin-2 { top: 140px; right: 22px; font-size: 29px; animation-delay: 1.8s; opacity: 0.9; }
.pumpkin-3 { bottom: 110px; left: 22px; font-size: 28px; animation-delay: 0.9s; opacity: 0.78; }
.pumpkin-4 { top: 210px; left: 20px; font-size: 25px; animation-delay: 2.7s; opacity: 0.72; }

@keyframes floatPumpkin {
    0% { transform: translateY(0px) rotate(-6deg); }
    100% { transform: translateY(-18px) rotate(8deg); }
}

/* ==========================================================================
   ANIMATION INTRO ONE PIECE HALLOWEEN (SVG HAUTE PRÉCISION)
   ========================================================================== */
.onepiece-intro-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #220a33 0%, #0a0310 65%, #000000 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.65s ease, visibility 0.65s ease;
}

.intro-content {
    text-align: center;
    padding: 24px;
    max-width: 540px;
    animation: introZoomIn 0.9s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes introZoomIn {
    0% { transform: scale(0.72); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.jolly-roger-svg-wrapper {
    width: 230px;
    height: 230px;
    margin: 0 auto 14px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jolly-roger-svg {
    width: 100%;
    height: 100%;
    animation: skullFloat 3s ease-in-out infinite alternate;
}

@keyframes skullFloat {
    0% { transform: translateY(0px) rotate(-2deg); }
    100% { transform: translateY(-10px) rotate(2deg); }
}

.svg-aura-ring {
    transform-origin: 160px 165px;
    animation: spinRing 18s linear infinite;
}
.svg-aura-ring-reverse {
    transform-origin: 160px 165px;
    animation: spinRingReverse 24s linear infinite;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes spinRingReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.svg-eye-flame {
    animation: eyePulse 1.2s ease-in-out infinite alternate;
}

@keyframes eyePulse {
    0% { transform: scale(0.92); opacity: 0.85; }
    100% { transform: scale(1.12); opacity: 1; }
}

.intro-title {
    font-family: 'Cinzel', 'Inter', serif;
    font-size: 46px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 25px rgba(255, 85, 0, 0.85);
}

.intro-wano {
    color: var(--red-netflix);
}

.intro-subtitle {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #ffaa44;
    margin-bottom: 20px;
}

.intro-progress-bar {
    width: 240px;
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    margin: 0 auto 22px auto;
    overflow: hidden;
}

.intro-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff5500, #ffcc00, #9b30ff);
    animation: fillIntroBar 2.4s ease-out forwards;
}

@keyframes fillIntroBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

.btn-skip-intro {
    background: rgba(255, 85, 0, 0.2);
    color: #ffffff;
    border: 1px solid var(--red-netflix);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--glow-effect);
}

.btn-skip-intro:hover {
    background: var(--red-netflix);
    transform: scale(1.05);
}

/* ==========================================================================
   NAVBAR (SANS RETOUR À LA LIGNE NI BUG D'AFFICHAGE)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3.5%;
    z-index: 1000;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
    background: linear-gradient(180deg, rgba(9, 5, 13, 0.96) 0%, rgba(9, 5, 13, 0.65) 70%, rgba(9, 5, 13, 0) 100%);
    gap: 16px;
}

.navbar.scrolled {
    background-color: rgba(9, 5, 13, 0.97);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.9);
    border-bottom: 1px solid var(--border-color);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
    flex-shrink: 0;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo-svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.logo:hover .nav-logo-svg {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    letter-spacing: 0.5px;
}

.logo-red {
    color: var(--red-netflix);
    text-shadow: var(--glow-effect);
}

.badge-halloween,
.badge-christmas {
    background: linear-gradient(135deg, #e50914, #00b050);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 5px;
    letter-spacing: 0.8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.55);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
    background: rgba(255, 85, 0, 0.14);
    text-shadow: 0 0 10px rgba(255, 85, 0, 0.6);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(20, 12, 28, 0.82);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 6px 14px;
    transition: all 0.25s ease;
}

.search-box:focus-within {
    border-color: var(--red-netflix);
    background: rgba(12, 7, 18, 0.98);
    box-shadow: var(--glow-effect);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 13px;
    margin-left: 8px;
    width: 155px;
    transition: width 0.25s ease;
}

.search-box:focus-within input {
    width: 210px;
}

.search-icon {
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
}

.clear-search {
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    display: none;
    margin-left: 6px;
}

.btn-nav-icon {
    background: rgba(26, 15, 35, 0.85);
    border: 1px solid var(--border-color);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-nav-icon:hover {
    background: var(--red-netflix);
    border-color: var(--red-netflix);
    box-shadow: var(--glow-effect);
    transform: rotate(25deg);
}

.user-avatar {
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.user-avatar img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--red-netflix);
    box-shadow: 0 0 10px rgba(255, 85, 0, 0.5);
    transition: transform 0.2s ease;
}

.user-avatar:hover img {
    transform: scale(1.08);
}

.avatar-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: var(--red-netflix);
    color: #ffffff;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   HERO BILLBOARD
   ========================================================================== */
.hero-billboard {
    position: relative;
    height: 80vh;
    min-height: 540px;
    max-height: 800px;
    display: flex;
    align-items: center;
    padding: 0 4%;
    margin-bottom: -45px;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 1;
    transition: background-image 0.5s ease;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(77deg, rgba(9,5,13,0.96) 0%, rgba(9,5,13,0.65) 46%, rgba(9,5,13,0.05) 85%),
                linear-gradient(180deg, rgba(9,5,13,0.2) 0%, rgba(9,5,13,0) 50%, var(--bg-main) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 4;
    max-width: 650px;
    padding-top: 30px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--red-netflix), #9b30ff);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 14px;
    letter-spacing: 0.8px;
    box-shadow: var(--glow-effect);
}

.hero-title {
    font-family: var(--title-font);
    font-size: 44px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 14px;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.95);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.match-score {
    color: #ffaa00;
    font-weight: 800;
}

.badge-hd {
    font-size: 10px;
    font-weight: 800;
    border: 1px solid rgba(255, 136, 0, 0.45);
    background: rgba(255, 85, 0, 0.12);
    padding: 2px 6px;
    border-radius: 3px;
    color: #ffbb33;
}

.hero-overview {
    font-size: 15px;
    color: #e2dae6;
    line-height: 1.55;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12.5px;
}

.btn-primary {
    background-color: var(--red-netflix);
    color: #ffffff;
    box-shadow: var(--glow-effect);
}

.btn-primary:hover {
    background-color: var(--red-hover);
    transform: scale(1.03);
}

.btn-secondary {
    background-color: rgba(45, 28, 60, 0.72);
    color: #ffffff;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(75, 45, 98, 0.88);
    transform: scale(1.03);
}

.btn-danger {
    background-color: #9e0b16;
    color: #ffffff;
}
.btn-danger:hover { background-color: #c41220; }

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(25, 15, 35, 0.72);
    border: 1px solid var(--border-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    border-color: var(--red-netflix);
    background: rgba(255, 85, 0, 0.25);
    transform: scale(1.08);
}

/* ==========================================================================
   CAROUSELS & CARTES MÉDIAS
   ========================================================================== */
.rows-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 36px;
    padding-bottom: 60px;
}

.content-row {
    padding: 0 4%;
}

.row-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.row-title {
    font-family: var(--title-font);
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carousel-wrapper {
    position: relative;
}

.carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px 0 22px 0;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 84px;
    background: rgba(10, 6, 15, 0.88);
    color: #ffffff;
    border: 1px solid var(--border-color);
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    border-radius: 6px;
}

.carousel-wrapper:hover .carousel-btn { opacity: 1; }
.carousel-btn:hover {
    background: var(--red-netflix);
    border-color: var(--red-netflix);
}
.carousel-btn.left { left: -16px; }
.carousel-btn.right { right: -16px; }

.media-card {
    flex: 0 0 calc(16.666% - 10px);
    min-width: 158px;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.24s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.24s ease, border-color 0.24s ease;
    background: var(--bg-card);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.media-card:hover {
    transform: scale(var(--card-scale)) translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9), var(--glow-effect);
    border-color: var(--red-netflix);
    z-index: 15;
}

.media-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 12px;
    background: linear-gradient(0deg, rgba(9,5,13,0.98) 0%, rgba(9,5,13,0.75) 65%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.media-card:hover .card-overlay { opacity: 1; }

.card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

/* ==========================================================================
   GRILLES RECHERCHE, WATCHLIST, PLATEFORMES & CALENDRIER
   ========================================================================== */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 16px;
    padding: 20px 4% 60px 4%;
    position: relative;
    z-index: 10;
}

.search-header, .section-header {
    padding: 95px 4% 12px 4%;
    position: relative;
    z-index: 10;
}

.search-header h2, .section-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 14px;
}

.search-filters, .platform-tabs {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.filter-btn, .platform-tab {
    background: #191022;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 9px 18px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active,
.platform-tab:hover, .platform-tab.active {
    background: var(--red-netflix);
    color: #ffffff;
    border-color: var(--red-netflix);
    box-shadow: var(--glow-effect);
}

/* Calendrier des Sorties */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 20px;
    padding: 20px 4% 60px 4%;
    position: relative;
    z-index: 10;
}

.calendar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.calendar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9), var(--glow-effect);
    border-color: var(--red-netflix);
}

.calendar-card-header {
    position: relative;
    height: 165px;
    overflow: hidden;
}

.calendar-card-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calendar-date-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 85, 0, 0.95);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.calendar-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(10, 6, 15, 0.9);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.calendar-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calendar-card-title {
    font-size: 15.5px;
    font-weight: 800;
    margin-bottom: 6px;
}

.calendar-card-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.calendar-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #aaaaaa;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 10px;
}

/* ==========================================================================
   MODALES (DÉTAILS, LECTEUR VIDÉO, 150 PARAMÈTRES, COMPTE)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 3, 8, 0.88);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 24px 16px;
}

.modal-card {
    background: var(--bg-modal);
    border-radius: 12px;
    max-width: 880px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-main);
    border: 1px solid var(--border-color);
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: rgba(20, 12, 28, 0.88);
    color: #ffffff;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    font-size: 16px;
    cursor: pointer;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--red-netflix);
    border-color: var(--red-netflix);
}

.modal-header {
    position: relative;
    height: 340px;
}

.modal-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, var(--bg-modal) 100%);
}

.modal-header-content {
    position: absolute;
    bottom: 20px;
    left: 28px;
    right: 28px;
}

.modal-title {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 14px;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-body {
    padding: 12px 28px 28px 28px;
}

.modal-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 13.5px;
    flex-wrap: wrap;
}

.modal-overview {
    font-size: 14px;
    line-height: 1.6;
    color: #d8d0de;
}

.meta-item {
    font-size: 13px;
    margin-bottom: 8px;
}
.meta-item .label { color: var(--text-secondary); }
.meta-item .val { color: #ece6f0; }

.episodes-section, .recommendations-section {
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
    margin-top: 22px;
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.episodes-header select {
    background: #21142b;
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 8px;
    background: #1a1023;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.episode-item:hover {
    background: #281836;
    border-color: var(--red-netflix);
}

.ep-num {
    font-size: 16px;
    font-weight: 800;
    color: var(--red-netflix);
    min-width: 28px;
    text-align: center;
}

.ep-thumb {
    width: 115px;
    height: 66px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.ep-info { flex: 1; min-width: 0; }
.ep-title-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 4px;
}
.ep-overview {
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendations-section h3 {
    margin-bottom: 14px;
    font-size: 18px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
}

/* ==========================================================================
   LECTEUR VIDÉO PLEIN ÉCRAN (SANS ERREUR SANDBOX)
   ========================================================================== */
.player-overlay {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 3000;
    display: none;
    flex-direction: column;
}

.player-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.player-header {
    height: 58px;
    background: #0d0812;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.player-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #ffffff;
}

.player-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-left: 8px;
}

.player-controls-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.server-picker select {
    background: #1a1024;
    color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.btn-close-player {
    background: var(--red-netflix);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-close-player:hover { background: var(--red-hover); }

.player-tip-bar {
    background: #140b1c;
    border-bottom: 1px solid rgba(255, 85, 0, 0.2);
    padding: 7px 20px;
    font-size: 12px;
    color: #ffbb44;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.player-adblock-badge {
    background: rgba(0, 255, 102, 0.14);
    color: #00ff66;
    border: 1px solid rgba(0, 255, 102, 0.45);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    outline: none;
}
.player-adblock-badge:hover {
    background: rgba(0, 255, 102, 0.26);
    transform: scale(1.02);
}
.player-adblock-badge:active {
    transform: scale(0.96);
}

.player-frame-wrapper {
    flex: 1;
    background: #000000;
    position: relative;
}

.player-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Contrôles Épisodes & Passer le Générique dans l'en-tête du lecteur */
.player-ep-nav {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.btn-player-pill {
    background: rgba(28, 16, 40, 0.92);
    color: #f0e8f8;
    border: 1px solid rgba(255, 115, 0, 0.42);
    padding: 6px 11px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.btn-player-pill:hover {
    background: rgba(255, 85, 0, 0.22);
    border-color: var(--red-netflix);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-player-pill.btn-skip-opening {
    background: linear-gradient(135deg, #ff5500, #9b30ff);
    border-color: #ffcc66;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 85, 0, 0.45);
}

.btn-player-pill.btn-skip-opening:hover {
    box-shadow: 0 0 22px rgba(255, 136, 0, 0.85);
    transform: scale(1.04);
}

.btn-player-pill.active-autoskip {
    background: rgba(0, 255, 102, 0.18);
    border-color: #00ff66;
    color: #00ff66;
}

/* Barre de progression Reprise Automatique sur les épisodes et cartes */
.ep-thumb-wrap {
    position: relative;
    width: 135px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #0c0612;
}
.ep-thumb-wrap .ep-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ep-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
}
.ep-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff5500, #ffcc00);
}
.ep-resume-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 85, 0, 0.2);
    border: 1px solid rgba(255, 119, 0, 0.55);
    color: #ffbb55;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
}

/* ==========================================================================
   MODAL CENTRE DE PARAMÈTRES REPENSÉ (DESIGN PREMIUM & SWITCHS MODERNES)
   ========================================================================== */
.settings-card {
    max-width: 1140px;
    width: 95%;
    height: 88vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #130a1d 0%, #0b0512 100%);
    border: 1px solid rgba(255, 102, 0, 0.38);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 85, 0, 0.2);
}

.settings-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: rgba(14, 7, 22, 0.98);
    flex-wrap: wrap;
}

.settings-title-group h2 {
    font-size: 19px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-title-group p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-count-badge {
    background: linear-gradient(135deg, var(--red-netflix), #9b30ff);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(255, 85, 0, 0.4);
}

.settings-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-search-box {
    display: flex;
    align-items: center;
    background: #1a0f26;
    border: 1px solid rgba(255, 102, 0, 0.4);
    border-radius: 22px;
    padding: 7px 14px;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-search-box:focus-within {
    border-color: var(--red-netflix);
    box-shadow: 0 0 14px rgba(255, 85, 0, 0.45);
}

.settings-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 12.5px;
    width: 245px;
}

/* Barre des Profils Express */
.settings-presets-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(22, 11, 34, 0.92);
    border-bottom: 1px solid rgba(255, 102, 0, 0.2);
    overflow-x: auto;
    flex-shrink: 0;
}

.presets-label {
    font-size: 12px;
    font-weight: 800;
    color: #ffaa44;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-chip {
    background: rgba(255, 85, 0, 0.12);
    color: #f3eaf8;
    border: 1px solid rgba(255, 102, 0, 0.35);
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preset-chip:hover {
    background: linear-gradient(135deg, var(--red-netflix), #9b30ff);
    border-color: #ffcc66;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 85, 0, 0.45);
}

.settings-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.settings-sidebar {
    width: 265px;
    background: rgba(10, 5, 16, 0.92);
    border-right: 1px solid rgba(255, 102, 0, 0.22);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    flex-shrink: 0;
}

.settings-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.18s ease;
}

.settings-nav-btn .nav-btn-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-nav-btn .cat-count {
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 7px;
    border-radius: 10px;
    color: #cccccc;
    font-weight: 800;
}

.settings-nav-btn:hover {
    background: rgba(255, 85, 0, 0.14);
    border-color: rgba(255, 85, 0, 0.28);
    color: #ffffff;
}

.settings-nav-btn.active {
    background: linear-gradient(135deg, var(--red-netflix), #b833ff);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 85, 0, 0.45);
}

.settings-nav-btn.active .cat-count {
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.settings-content {
    flex: 1;
    padding: 20px 26px;
    overflow-y: auto;
}

/* Panneau Mis en Avant : Reprise Auto & Passer le Générique */
.featured-binge-panel {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.16) 0%, rgba(155, 48, 255, 0.16) 100%);
    border: 1px solid rgba(255, 136, 0, 0.45);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.featured-binge-title {
    font-size: 14px;
    font-weight: 800;
    color: #ffcc66;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-binge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
}

.settings-cat-header {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.settings-cat-header h3 {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-cat-header p {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

.settings-grid-150 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.setting-card-item {
    background: rgba(24, 14, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 13px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.setting-card-item:hover {
    border-color: rgba(255, 119, 0, 0.5);
    background: rgba(36, 20, 52, 0.95);
    transform: translateY(-1px);
}

.setting-card-item.setting-active-card {
    border-color: rgba(255, 102, 0, 0.32);
}

.setting-card-info {
    flex: 1;
    min-width: 0;
}

.setting-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 7px;
}

.setting-num-tag {
    font-size: 10px;
    background: rgba(255, 85, 0, 0.18);
    color: #ff9933;
    padding: 1px 6px;
    border-radius: 5px;
    font-weight: 800;
}

.setting-card-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.35;
}

.setting-card-control {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.setting-card-control select {
    background: #140a20;
    border: 1px solid rgba(255, 102, 0, 0.45);
    color: #ffffff;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    max-width: 170px;
    transition: border-color 0.2s;
}
.setting-card-control select:hover {
    border-color: #ffaa44;
}

/* Switch Toggle Moderne Animé (Style iOS / Netflix Halloween) */
.wano-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 25px;
    cursor: pointer;
}
.wano-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.wano-slider {
    position: absolute;
    inset: 0;
    background-color: #261736;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.wano-slider::before {
    content: "";
    position: absolute;
    height: 19px;
    width: 19px;
    left: 2px;
    bottom: 2px;
    background-color: #cbbdd6;
    border-radius: 50%;
    transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.wano-switch input:checked + .wano-slider {
    background: linear-gradient(135deg, var(--red-netflix), #9b30ff);
    border-color: #ffaa44;
    box-shadow: 0 0 12px rgba(255, 85, 0, 0.5);
}
.wano-switch input:checked + .wano-slider::before {
    transform: translateX(21px);
    background-color: #ffffff;
}

/* ==========================================================================
   MODAL AUTH & CRÉATION DE COMPTE
   ========================================================================== */
.auth-card {
    max-width: 470px;
    padding: 32px 28px;
}

.auth-header {
    text-align: center;
    margin-bottom: 22px;
}

.auth-icon-badge {
    font-size: 42px;
    margin-bottom: 8px;
}

.auth-header h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 4px;
}

.auth-header p {
    font-size: 12.5px;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    background: #120a1a;
    padding: 4px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    background: var(--red-netflix);
    color: #ffffff;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #e0d8e8;
}

.auth-field input {
    width: 100%;
    background: #1a1024;
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
}

.auth-field input:focus {
    border-color: var(--red-netflix);
    box-shadow: var(--glow-effect);
}

.avatar-picker-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.avatar-choice {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    object-fit: cover;
    transition: transform 0.2s, border-color 0.2s;
}

.avatar-choice:hover, .avatar-choice.active {
    border-color: var(--red-netflix);
    transform: scale(1.12);
    box-shadow: var(--glow-effect);
}

.auth-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 13px;
    margin-top: 6px;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--red-netflix);
    text-decoration: none;
    font-weight: 700;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(18, 10, 26, 0.96);
    border: 1px solid var(--red-netflix);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow-main), var(--glow-effect);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-links { gap: 8px; }
    .nav-link { font-size: 12.5px; padding: 5px 7px; }
    .search-box input { width: 110px; }
}

@media (max-width: 860px) {
    .media-card { flex: 0 0 calc(25% - 9px); }
    .modal-columns { grid-template-columns: 1fr; }
    .settings-layout { flex-direction: column; }
    .settings-sidebar { width: 100%; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border-color); }
    .settings-nav-btn { white-space: nowrap; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .media-card { flex: 0 0 calc(33.333% - 8px); }
    .hero-title { font-size: 30px; }
}

/* Performance : on fige le decor quand une fenetre est ouverte */
body:has(.modal-overlay[style*="flex"]) .halloween-ambient-layer,
body:has(.player-overlay[style*="flex"]) .halloween-ambient-layer { visibility: hidden; }
body:has(.modal-overlay[style*="flex"]) .halloween-ambient-layer *,
body:has(.player-overlay[style*="flex"]) .halloween-ambient-layer * { animation-play-state: paused !important; }
.modal-overlay { background: rgba(5,3,8,0.95); }
.player-overlay { z-index: 3000; }
.player-header { position: relative; z-index: 5; }
.player-frame-wrapper { z-index: 1; }
.spooky-fog, .bat, .ember { will-change: transform; }

/* ==========================================================================
   SOUS-MENUS VIVANTS NAVBAR (MEGA-MENUS ANIMÉS) & BOUTON CRUNCHYROLL
   ========================================================================== */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-item-icon {
    font-size: 12px;
    margin-right: 4px;
    opacity: 0.85;
    transition: transform 0.25s ease, color 0.25s ease;
}

.nav-link:hover .nav-item-icon {
    transform: scale(1.2) rotate(-6deg);
    color: var(--red-netflix);
}

.nav-caret {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
    transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-caret {
    transform: rotate(180deg);
    color: var(--red-netflix);
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 10px);
    left: -20px;
    width: 480px;
    background: linear-gradient(155deg, rgba(19, 10, 30, 0.98) 0%, rgba(10, 5, 16, 0.98) 100%);
    border: 1px solid rgba(255, 102, 0, 0.42);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.92), 0 0 30px rgba(255, 85, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    transform-origin: top left;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    z-index: 2500;
    pointer-events: none;
}

.nav-submenu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-dropdown:hover .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.submenu-title {
    font-size: 12px;
    font-weight: 800;
    color: #ffaa44;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.22);
}

.submenu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.submenu-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 9px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.submenu-item:hover {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.22), rgba(155, 48, 255, 0.2));
    border-color: rgba(255, 136, 0, 0.65);
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.submenu-item .sub-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 85, 0, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.submenu-item:hover .sub-icon {
    transform: scale(1.18) rotate(-8deg);
    background: rgba(255, 85, 0, 0.3);
}

.submenu-item strong {
    display: block;
    font-size: 12.5px;
    font-weight: 800;
    color: #ffffff;
}

.submenu-item small {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Bouton Direct Crunchyroll dans la Navbar */
.nav-link-crunchyroll {
    background: linear-gradient(135deg, rgba(244, 117, 33, 0.2), rgba(244, 117, 33, 0.08));
    border: 1px solid rgba(244, 117, 33, 0.55);
    color: #ff9944 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 12px !important;
    font-weight: 800 !important;
}

.nav-link-crunchyroll:hover, .nav-link-crunchyroll.active {
    background: linear-gradient(135deg, #f47521, #ff5500) !important;
    color: #ffffff !important;
    border-color: #ffcc88;
    box-shadow: 0 0 18px rgba(244, 117, 33, 0.7);
    transform: translateY(-1px);
}

.cr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f47521;
    box-shadow: 0 0 8px #f47521;
    animation: crPulse 1.6s infinite alternate;
}

@keyframes crPulse {
    0% { transform: scale(0.85); opacity: 0.75; }
    100% { transform: scale(1.25); opacity: 1; }
}

/* ==========================================================================
   BARRE DE SOUS-MENUS VIVANTS DYNAMIQUES (FILTRES DE CATÉGORIES ANIMÉS)
   ========================================================================== */
.living-submenu-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 4% 4px 4%;
    overflow-x: auto;
    position: relative;
    z-index: 15;
    scrollbar-width: none;
}
.living-submenu-bar::-webkit-scrollbar { display: none; }

.subcat-pill {
    background: rgba(22, 12, 34, 0.88);
    border: 1px solid rgba(255, 119, 0, 0.28);
    color: #e2d6ec;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.subcat-pill:hover {
    border-color: #ff8800;
    color: #ffffff;
    transform: translateY(-3px) scale(1.03);
    background: rgba(40, 20, 58, 0.95);
    box-shadow: 0 8px 22px rgba(255, 85, 0, 0.35);
}

.subcat-pill.active {
    background: linear-gradient(135deg, var(--red-netflix), #9b30ff);
    border-color: #ffcc66;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 85, 0, 0.55);
    transform: translateY(-2px);
}

.subcat-pill .pill-emoji {
    font-size: 15px;
    transition: transform 0.25s ease;
}

.subcat-pill:hover .pill-emoji,
.subcat-pill.active .pill-emoji {
    transform: scale(1.22) rotate(-8deg);
}

/* ==========================================================================
   CARTES LOGOS OFFICIELLES DES SERVICES DE STREAMING (NETFLIX, CRUNCHYROLL, DISNEY+, ETC.)
   ========================================================================== */
.brand-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.home-brands-section {
    padding: 10px 4% 8px 4%;
    position: relative;
    z-index: 12;
}

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

.home-brands-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-card {
    position: relative;
    height: 92px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(26, 15, 38, 0.94) 0%, rgba(12, 7, 20, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.75);
}

.brand-logo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.14;
    transition: opacity 0.26s ease;
    background: radial-gradient(circle at center, var(--brand-color, #ff5500) 0%, transparent 75%);
}

.brand-logo-card:hover,
.brand-logo-card.active {
    transform: translateY(-6px) scale(1.04);
    border-color: var(--brand-color, #ff5500);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.9), 0 0 26px var(--brand-glow, rgba(255, 85, 0, 0.55));
}

.brand-logo-card:hover::before,
.brand-logo-card.active::before {
    opacity: 0.38;
}

.brand-logo-svg-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    transition: transform 0.25s ease;
}

.brand-logo-card:hover .brand-logo-svg-wrap {
    transform: scale(1.1);
}

.brand-logo-sub {
    position: relative;
    z-index: 2;
    font-size: 10.5px;
    font-weight: 700;
    color: #cfc3da;
    margin-top: 6px;
    letter-spacing: 0.3px;
}

/* Bannière Active du Service Sélectionné */
.active-platform-banner {
    margin-top: 20px;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(25, 14, 38, 0.95), rgba(12, 6, 20, 0.98));
    border: 1px solid rgba(255, 119, 0, 0.38);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65);
}

.platform-cat-submenu {
    padding: 14px 0 4px 0 !important;
}

/* ============================================================================
   SYSTÈME MULTI-PROFILS NETFLIX / CRUNCHYROLL & PANEL DE COMPTE SERVEUR
   ============================================================================ */

/* Bouton "Qui regarde ?" dans la navbar */
.btn-who-watching {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.2), rgba(155, 48, 255, 0.22));
    border: 1px solid rgba(255, 119, 0, 0.5);
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.btn-who-watching:hover {
    background: linear-gradient(135deg, #ff5500, #9b30ff);
    border-color: #ffcc66;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 85, 0, 0.45);
}

/* Sous-menu rapide sur l'avatar de la navbar */
.profile-nav-dropdown .profile-quick-submenu {
    left: auto;
    right: 0;
    transform: translateY(10px) scale(0.96);
    min-width: 310px;
}

.profile-nav-dropdown:hover .profile-quick-submenu {
    transform: translateY(0) scale(1);
}

.nav-profiles-quick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 119, 0, 0.2);
}

.nav-profile-quick-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    color: #fff;
    text-align: left;
}

.nav-profile-quick-item:hover,
.nav-profile-quick-item.active {
    background: rgba(255, 85, 0, 0.18);
    border-color: rgba(255, 136, 0, 0.55);
}

.nav-profile-quick-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-profile-quick-left img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ff5500;
}

.nav-profile-quick-left strong {
    display: block;
    font-size: 13px;
    color: #fff;
}

.nav-profile-quick-left small {
    font-size: 11px;
    color: #b8acc8;
}

.nav-profile-active-dot {
    font-size: 10px;
    font-weight: 800;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.14);
    border: 1px solid rgba(0, 255, 136, 0.4);
    padding: 2px 8px;
    border-radius: 999px;
}

.nav-profile-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Écran Plein Écran "Qui regarde WANO FLIX ?" (Style Netflix / Crunchyroll) */
.profile-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: radial-gradient(circle at center, rgba(26, 11, 42, 0.96) 0%, rgba(6, 3, 10, 0.99) 100%);
    backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    animation: fadeIn 0.28s ease;
}

.profile-gate-container {
    max-width: 980px;
    width: 100%;
    text-align: center;
    margin: auto;
}

.profile-gate-brand {
    font-family: var(--title-font);
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
}

.profile-gate-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 900;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 4px 20px rgba(255, 85, 0, 0.4);
}

.profile-gate-subtitle {
    font-size: 14px;
    color: #bfb2d0;
    margin-bottom: 34px;
}

.profile-gate-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    margin-bottom: 32px;
}

.profile-gate-card {
    width: 155px;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.profile-gate-card:hover {
    transform: translateY(-10px) scale(1.06);
}

.profile-gate-avatar-wrap {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    background: #140a20;
}

.profile-gate-card:hover .profile-gate-avatar-wrap,
.profile-gate-card.active-profile .profile-gate-avatar-wrap {
    border-color: var(--prof-color, #ff5500);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.9), 0 0 26px var(--prof-color, #ff5500);
}

.profile-gate-avatar-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-gate-edit-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 5, 18, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-gate-card.manage-mode .profile-gate-edit-overlay {
    opacity: 1;
}

.profile-gate-pin-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(10, 5, 18, 0.85);
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.5);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.profile-gate-name {
    font-size: 16px;
    font-weight: 800;
    color: #f3eafc;
    margin-bottom: 4px;
}

.profile-gate-role {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #ffb76b;
    background: rgba(255, 102, 0, 0.14);
    border: 1px solid rgba(255, 119, 0, 0.35);
    padding: 2px 9px;
    border-radius: 999px;
}

.profile-gate-card.add-profile-card .profile-gate-avatar-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    border-color: rgba(255, 136, 0, 0.45);
    background: rgba(255, 85, 0, 0.06);
    font-size: 42px;
    color: #ff8800;
}

.profile-gate-card.add-profile-card:hover .profile-gate-avatar-wrap {
    background: rgba(255, 85, 0, 0.18);
    color: #fff;
}

/* Éditeur de Profil & Boîte PIN */
.profile-editor-box,
.profile-pin-box {
    max-width: 680px;
    margin: 0 auto 28px;
    background: rgba(20, 10, 32, 0.96);
    border: 1px solid rgba(255, 119, 0, 0.45);
    border-radius: 16px;
    padding: 22px 26px;
    text-align: left;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85);
}

.profile-editor-box h3,
.profile-pin-box h3 {
    font-size: 18px;
    color: #ff9e00;
    margin-bottom: 14px;
}

.profile-editor-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
    margin-bottom: 12px;
}

.profile-select-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 5, 18, 0.9);
    border: 1px solid rgba(255, 119, 0, 0.35);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.profile-editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn-danger {
    background: rgba(229, 9, 20, 0.2);
    border: 1px solid #e50914;
    color: #ff6b6b;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.btn-danger:hover {
    background: #e50914;
    color: #fff;
}

.pin-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.pin-input-row input {
    width: 140px;
    padding: 10px 14px;
    font-size: 20px;
    letter-spacing: 6px;
    text-align: center;
    background: #0d0616;
    border: 1px solid #ff8800;
    color: #fff;
    border-radius: 10px;
}

.profile-gate-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Modal Compte Large & Hub Profils */
.auth-card.auth-card-wide {
    max-width: 780px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.account-hub-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 10px;
}

.account-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.14), rgba(155, 48, 255, 0.16));
    border: 1px solid rgba(255, 119, 0, 0.42);
}

.account-status-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-status-left img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #ff5500;
}

.hub-badge-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.hub-vip-tag {
    background: linear-gradient(135deg, #ff5500, #ff9900);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
}

.hub-sync-tag {
    font-size: 11px;
    color: #00ff88;
    font-weight: 700;
}

.account-status-left h3 {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.account-status-left p {
    font-size: 12.5px;
    color: #c9bdd8;
}

.account-status-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-friends-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 15px 18px;
    border-radius: 12px;
    background: rgba(18, 10, 28, 0.9);
    border: 1px dashed rgba(255, 158, 0, 0.5);
}

.share-friends-info h4 {
    font-size: 14.5px;
    color: #ffae42;
    margin-bottom: 4px;
}

.share-friends-info p {
    font-size: 12px;
    color: #bdb0ce;
    max-width: 470px;
}

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

.hub-profiles-header h4 {
    font-size: 15px;
    color: #fff;
}

.hub-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 12px;
}

.hub-profile-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.hub-profile-item.active {
    border-color: #ff6a00;
    background: rgba(255, 85, 0, 0.14);
}

.hub-profile-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.hub-profile-meta img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #ff5500;
}

.hub-profile-meta strong {
    display: block;
    font-size: 13.5px;
    color: #fff;
}

.hub-profile-meta small {
    display: block;
    font-size: 11px;
    color: #b7aac8;
}

.hub-profile-btns {
    display: flex;
    gap: 6px;
}

.hub-icon-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e4d8f2;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.18s ease;
}

.hub-icon-btn:hover {
    background: #ff5500;
    color: #fff;
    border-color: #ff9900;
}

.auth-info-callout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    background: rgba(255, 119, 0, 0.11);
    border: 1px solid rgba(255, 119, 0, 0.35);
    font-size: 12.5px;
    color: #f3e6ff;
    margin-bottom: 12px;
}

.auth-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #dcd0ea;
    cursor: pointer;
}

.auth-checkbox-label input {
    width: 17px !important;
    height: 17px !important;
    accent-color: #ff5500;
}







/* ============================================================================
   MODE PLEIN ÉCRAN UNIVERSEL, CINÉMA IMMERSIF & CONTRÔLES FLOTTANTS
   ============================================================================ */
.btn-fullscreen-toggle {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.28), rgba(155, 48, 255, 0.28)) !important;
    border-color: #ffaa00 !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-fullscreen-toggle:hover,
.btn-fullscreen-toggle:active,
.btn-fullscreen-toggle.active-fs {
    background: linear-gradient(135deg, #ff5500, #9b30ff) !important;
    border-color: #ffdd66 !important;
    box-shadow: 0 0 16px rgba(255, 85, 0, 0.65) !important;
    color: #ffffff !important;
    transform: translateY(-1px) scale(1.02);
}

.btn-theater-toggle {
    background: rgba(0, 180, 255, 0.12) !important;
    border-color: rgba(0, 180, 255, 0.45) !important;
    color: #90e0ef !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-theater-toggle:hover,
.btn-theater-toggle:active,
.btn-theater-toggle.active-cinema {
    background: rgba(0, 200, 255, 0.3) !important;
    border-color: #00e5ff !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 200, 255, 0.5) !important;
}

/* Plein Écran Natif & Mode Immersif Mobile (iPhone Safari / MacBook) */
.player-overlay.is-fullscreen-immersive,
.player-overlay:fullscreen,
.player-overlay:-webkit-full-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    z-index: 999999 !important;
    background: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.player-overlay.is-fullscreen-immersive .player-container,
.player-overlay:fullscreen .player-container,
.player-overlay:-webkit-full-screen .player-container {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.player-overlay.is-fullscreen-immersive .player-tip-bar,
.player-overlay:fullscreen .player-tip-bar,
.player-overlay:-webkit-full-screen .player-tip-bar,
.player-overlay.cinema-mode .player-tip-bar {
    display: none !important;
}

.player-overlay.is-fullscreen-immersive .player-header,
.player-overlay:fullscreen .player-header,
.player-overlay:-webkit-full-screen .player-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 60 !important;
    background: linear-gradient(180deg, rgba(8, 4, 14, 0.96) 0%, rgba(8, 4, 14, 0.75) 65%, transparent 100%) !important;
    border-bottom: none !important;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

/* Mode Cinéma / Fenêtre Élargie */
.player-overlay.cinema-mode {
    padding: 0 !important;
    background: #000000 !important;
}

.player-overlay.cinema-mode .player-container {
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Auto-masquage cinématique des commandes lors de l'inactivité */
.player-overlay.controls-hidden .player-header,
.player-overlay.controls-hidden .player-floating-overlay {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
    pointer-events: none !important;
    visibility: hidden;
}

.player-overlay.controls-hidden {
    cursor: none !important;
}

/* ============================================================================
   BANNIÈRE SAGA CULTE (EX: LES GENDARMES AVEC LOUIS DE FUNÈS)
   ============================================================================ */
.saga-callout-banner {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.16), rgba(155, 48, 255, 0.16));
    border: 1px solid rgba(255, 119, 0, 0.55);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 85, 0, 0.2);
}
.saga-callout-banner h4 {
    margin: 0 0 8px 0;
    color: #ffb703;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}
.saga-callout-banner p {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #e5dcf0;
    line-height: 1.45;
}
.saga-films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}
.saga-film-chip {
    background: rgba(14, 8, 24, 0.85);
    border: 1px solid rgba(255, 119, 0, 0.35);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}
.saga-film-chip:hover, .saga-film-chip:active {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.3), rgba(155, 48, 255, 0.3));
    border-color: #ff9e00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 85, 0, 0.35);
}
.saga-film-chip strong {
    font-size: 12px;
    color: #fff;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.saga-film-chip small {
    font-size: 11px;
    color: #ffcc66;
}
.saga-film-play-icon {
    color: #00ff66;
    font-size: 13px;
    flex-shrink: 0;
}

/* ============================================================================
   RÉCUPÉRATION DE COMPTE & MOT DE PASSE OUBLIÉ (AMIS VIP)
   ============================================================================ */
.auth-helper-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
    margin-bottom: 12px;
}
.forgot-pwd-link {
    color: #ffaa33;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.forgot-pwd-link:hover {
    color: #ffcc66;
    text-decoration: underline;
}
.account-recovery-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.recovery-step {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.recovery-account-card {
    background: rgba(14, 8, 24, 0.9);
    border: 1px solid rgba(0, 255, 102, 0.5);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.2);
}
.recovery-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}
.recovery-avatar-icon {
    font-size: 28px;
}
.recovery-card-header h4 {
    margin: 0 0 4px 0;
    color: #00ff66;
    font-size: 16px;
}
.recovery-card-header p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #e5dcf0;
}
.recovery-support-card {
    background: rgba(25, 15, 38, 0.7);
    border: 1px solid rgba(255, 153, 0, 0.35);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 10px;
}
.recovery-support-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.recovery-support-card h5 {
    margin: 0 0 4px 0;
    color: #ffb703;
    font-size: 14px;
}
.recovery-support-card p {
    margin: 0;
    font-size: 12.5px;
    color: #c9bdd8;
    line-height: 1.4;
}

/* ============================================================================
   ADMIN FONDATEUR : GESTION DES COMPTES AMIS & RÉINITIALISATION EN 1 CLIC
   ============================================================================ */
.admin-friends-section {
    background: rgba(18, 9, 30, 0.85);
    border: 1px solid rgba(255, 85, 0, 0.4);
    border-radius: 14px;
    padding: 18px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.admin-friends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}
.admin-friends-header h4 {
    margin: 0;
    font-size: 15px;
    color: #ff7700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-friends-desc {
    margin: 0 0 14px 0;
    font-size: 12.5px;
    color: #bfaed4;
}
.admin-friends-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
}
.admin-friend-card {
    background: rgba(10, 5, 18, 0.9);
    border: 1px solid rgba(255, 119, 0, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-friend-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.admin-friend-meta strong {
    font-size: 14px;
    color: #fff;
}
.admin-friend-meta span {
    font-size: 12px;
    color: #ffaa33;
}
.admin-friend-meta small {
    font-size: 11px;
    color: #8f82a5;
}
.admin-friend-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================================
   ASTUCE MOBILE / IPHONE PWA (INSTALLATION ÉCRAN D'ACCUEIL)
   ============================================================================ */
.mobile-pwa-tip {
    position: fixed;
    bottom: 74px;
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(16, 8, 28, 0.98), rgba(28, 12, 45, 0.98));
    border: 1px solid #ff7700;
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 85, 0, 0.4);
    animation: slideUpTip 0.4s ease-out;
}
@keyframes slideUpTip {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pwa-tip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}
.pwa-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.pwa-tip-text {
    font-size: 12.5px;
    color: #e5dcf0;
    line-height: 1.4;
}
.pwa-tip-text strong {
    color: #ffcc66;
}
.pwa-tip-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    opacity: 0.7;
    transition: opacity 0.2s;
    touch-action: manipulation;
}
.pwa-tip-close:hover, .pwa-tip-close:active {
    opacity: 1;
    color: #ff5500;
}

/* Ergonomie Tactile Mobile Renforcée */
@media (max-width: 768px) {
    .btn, .filter-btn, .modal-close, .mobile-tabbar button {
        min-height: 44px;
        touch-action: manipulation;
    }
    .mobile-tabbar button:active {
        transform: scale(0.94);
    }
    .modal-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    .modal-actions .btn {
        flex: 1 1 auto;
    }
    .auth-tab-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* Boutons Flottants Rapides en Plein Écran */
.player-floating-overlay {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-floating-fs {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(18, 10, 26, 0.9);
    border: 1.5px solid rgba(255, 136, 0, 0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-floating-fs:hover,
.btn-floating-fs:active {
    background: #ff5500;
    border-color: #ffcc00;
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(255, 85, 0, 0.85);
}

.btn-floating-close {
    background: rgba(229, 9, 20, 0.88) !important;
    border-color: rgba(255, 100, 100, 0.8) !important;
}

.btn-floating-skip {
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.9), rgba(155, 48, 255, 0.9)) !important;
    border-color: #ffcc66 !important;
}

/* ==========================================================================
   MODE MOBILE (iPhone Safari / Android) - v7.0
   ========================================================================== */
.mobile-tabbar, .mobile-more-sheet { display: none; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overflow-x: hidden; }
button, a, .media-card, .brand-logo-card { touch-action: manipulation; }

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
    /* Pas de sous-menus au survol sur écran tactile */
    .nav-submenu, .nav-caret { display: none !important; }
    .nav-links { display: none !important; }
    .btn-who-watching span, .search-box .search-icon + input::placeholder { }
    .btn-who-watching { padding: 7px 10px; }
    #activeProfileNavName { display: none; }
}

@media (max-width: 900px) {
    /* Barre du haut compacte avec zone sûre (encoche iPhone) */
    .navbar {
        padding: calc(env(safe-area-inset-top) + 8px) 12px 8px !important;
        gap: 8px;
        height: auto !important;
    }
    .nav-left { gap: 8px; min-width: 0; }
    .logo-text { font-size: 18px !important; }
    .badge-halloween { display: none !important; }
    .nav-logo-svg { width: 30px; height: 30px; }
    .nav-right { gap: 6px !important; margin-left: auto; }
    .search-box { flex: 1; min-width: 0; max-width: 46vw; }
    .search-box input { width: 100% !important; min-width: 0; font-size: 16px !important; /* évite le zoom auto iOS */ }
    #openSettingsBtn { display: none; }
    .user-avatar img { width: 32px; height: 32px; }

    /* Barre d'onglets en bas, façon application */
    .mobile-tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 2500;
        background: rgba(10, 5, 16, 0.96);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-top: 1px solid rgba(255, 119, 0, 0.35);
        padding: 6px 4px calc(env(safe-area-inset-bottom) + 6px);
    }
    .mobile-tabbar button {
        flex: 1;
        background: none;
        border: none;
        color: #a898ba;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-size: 10.5px;
        font-weight: 700;
        padding: 4px 0;
        min-height: 44px;
        cursor: pointer;
    }
    .mobile-tabbar button i { font-size: 19px; }
    .mobile-tabbar button.active { color: #ff7a1a; text-shadow: 0 0 12px rgba(255, 106, 0, 0.7); }
    .mobile-tabbar button:active { transform: scale(0.92); }

    .mobile-more-sheet {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 10px; right: 10px;
        bottom: calc(env(safe-area-inset-bottom) + 70px);
        z-index: 2600;
        background: rgba(18, 9, 28, 0.98);
        border: 1px solid rgba(255, 119, 0, 0.45);
        border-radius: 16px;
        padding: 8px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.85);
        transform: translateY(20px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }
    .mobile-more-sheet.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .mobile-more-sheet button {
        background: none; border: none; color: #fff;
        text-align: left; padding: 14px 12px; font-size: 15px; font-weight: 700;
        display: flex; align-items: center; gap: 12px; border-radius: 10px;
    }
    .mobile-more-sheet button:active { background: rgba(255, 85, 0, 0.25); }

    main, #mainContent { padding-bottom: calc(env(safe-area-inset-bottom) + 84px) !important; }

    /* Bannière principale */
    .hero-billboard { min-height: 62vh !important; height: 62vh !important; }
    .hero-content { left: 14px !important; right: 14px !important; bottom: 22px !important; max-width: none !important; padding: 0 !important; }
    .hero-title { font-size: 26px !important; }
    .hero-overview { font-size: 13px !important; -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-buttons { gap: 8px; flex-wrap: wrap; }
    .hero-buttons .btn { padding: 10px 16px; font-size: 14px; }
    .hero-meta { flex-wrap: wrap; gap: 6px; }

    /* Rayons et cartes */
    .rows-container, .search-view, .watchlist-view, .platforms-view, .calendar-view { padding-left: 12px !important; padding-right: 12px !important; }
    .carousel-btn { display: none !important; }
    .carousel-track { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; gap: 8px; }
    .media-card { flex: 0 0 34vw !important; min-width: 118px !important; scroll-snap-align: start; }
    .media-card:hover { transform: none !important; }
    .row-title { font-size: 16px !important; }
    .living-submenu-bar { overflow-x: auto; flex-wrap: nowrap !important; padding: 8px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .living-submenu-bar::-webkit-scrollbar { display: none; }
    .subcat-pill { flex: 0 0 auto; white-space: nowrap; }
    .brand-logos-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .calendar-grid, .search-grid, .watchlist-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: 10px !important; }
    .calendar-grid { grid-template-columns: 1fr !important; }
    .active-platform-banner { padding: 14px; }

    /* Fiche détail : plein écran */
    .modal-overlay { padding: 0 !important; align-items: flex-start !important; }
    .modal-card { border-radius: 0 !important; min-height: 100vh; max-width: 100% !important; margin: 0 !important; }
    .modal-body { padding: 16px !important; }
    .modal-columns { grid-template-columns: 1fr !important; }
    .modal-close { top: calc(env(safe-area-inset-top) + 10px) !important; right: 12px !important; width: 42px; height: 42px; z-index: 30; }
    .episodes-header { flex-wrap: wrap; gap: 8px; }
    .ep-thumb-wrap { width: 108px; height: 62px; }
    .recommendations-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 8px !important; }

    /* Lecteur : plein écran & contrôles tactiles optimisés */
    .player-overlay { height: 100dvh; }
    .player-container { height: 100dvh; }
    .player-header {
        height: auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: calc(env(safe-area-inset-top) + 6px) 12px 10px !important;
        gap: 8px !important;
        background: rgba(12, 6, 20, 0.98) !important;
    }
    .player-title-info {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }
    .player-title { font-size: 14.5px !important; font-weight: 800; }
    .player-subtitle { font-size: 12px !important; margin-left: 0; }
    .player-controls-top {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .player-ep-nav {
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        padding-bottom: 2px !important;
    }
    .btn-player-pill {
        min-height: 42px !important;
        padding: 9px 13px !important;
        font-size: 13px !important;
        border-radius: 9px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        touch-action: manipulation !important;
        flex: 0 0 auto !important;
    }
    .btn-player-pill:active {
        transform: scale(0.94) !important;
        filter: brightness(1.25) !important;
    }
    .btn-close-player {
        min-height: 42px !important;
        padding: 9px 14px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        border-radius: 9px !important;
        touch-action: manipulation !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-left: auto !important;
    }
    .btn-close-player:active {
        transform: scale(0.94) !important;
    }
    .server-picker {
        width: 100% !important;
        flex: 1 1 100% !important;
        order: 1 !important;
        margin: 2px 0 !important;
    }
    .server-picker label { display: none !important; }
    .server-picker select, #serverSelect {
        width: 100% !important;
        min-height: 44px !important;
        font-size: 14.5px !important; /* Pas de zoom forcé Safari iOS (>= 14px) */
        font-weight: 700 !important;
        border-radius: 9px !important;
        padding: 8px 12px !important;
        background: #180e28 !important;
        border: 1px solid rgba(255, 120, 0, 0.45) !important;
        color: #fff !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .player-tip-bar { display: none !important; }

    /* Boutons Flottants en Plein Écran Mobile */
    .player-floating-overlay {
        bottom: calc(env(safe-area-inset-bottom) + 16px) !important;
        right: 14px !important;
        gap: 8px !important;
    }
    .btn-floating-fs {
        width: 48px !important;
        height: 48px !important;
        font-size: 19px !important;
    }

    /* Fluidité & Momentum Touch Scrolling 120Hz */
    .carousel-track,
    .living-submenu-bar,
    .settings-presets-bar,
    .player-ep-nav {
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        transform: translateZ(0);
        will-change: scroll-position;
    }

    .media-card {
        transform: translate3d(0, 0, 0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    .media-card:active {
        transform: scale(0.96) !important;
        transition: transform 0.12s ease;
    }

    /* Boutons Mobile : Touch Targets & Fluidité Active */
    .mobile-tabbar button {
        min-height: 48px !important;
        touch-action: manipulation !important;
    }
    .mobile-tabbar button:active {
        transform: scale(0.90) !important;
        color: #ff5500 !important;
    }
    .subcat-pill {
        min-height: 40px !important;
        padding: 8px 18px !important;
        font-size: 13.5px !important;
        touch-action: manipulation !important;
    }
    .subcat-pill:active {
        transform: scale(0.95) !important;
    }
    .hero-buttons .btn {
        min-height: 46px !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        touch-action: manipulation !important;
    }
    .hero-buttons .btn:active {
        transform: scale(0.95) !important;
    }
    .modal-close {
        width: 46px !important;
        height: 46px !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .modal-close:active {
        transform: scale(0.92) !important;
    }

    /* Paramètres */
    .settings-card { border-radius: 0 !important; min-height: 100vh; }
    .settings-header { flex-direction: column; align-items: stretch !important; gap: 10px; padding: calc(env(safe-area-inset-top) + 12px) 14px 10px !important; }
    .settings-header-actions { flex-wrap: wrap; }
    .settings-search-box input { font-size: 16px; }
    .settings-presets-bar { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; padding: 8px 12px; }
    .preset-chip { flex: 0 0 auto; white-space: nowrap; }
    .settings-grid-150 { grid-template-columns: 1fr !important; }
    .featured-binge-grid { grid-template-columns: 1fr !important; }
    .setting-card-item { padding: 12px; }

    /* Profils & compte */
    .profile-gate-overlay { padding: calc(env(safe-area-inset-top) + 14px) 12px 24px; align-items: flex-start; }
    .profile-gate-grid { gap: 14px; }
    .profile-gate-card { width: 42vw; max-width: 160px; }
    .profile-gate-avatar-wrap { width: 100%; height: auto; aspect-ratio: 1; }
    .profile-gate-actions .btn { flex: 1 1 100%; }
    .profile-editor-box, .profile-pin-box { padding: 16px; }
    .auth-card.auth-card-wide { width: 100% !important; max-width: 100% !important; max-height: none; min-height: 100vh; border-radius: 0 !important; }
    .auth-field input, .auth-field select, .profile-select-input, .pin-input-row input { font-size: 16px !important; }
    .account-status-banner { flex-direction: column; align-items: flex-start; }
    .hub-profiles-grid { grid-template-columns: 1fr; }
    .avatar-picker-row { flex-wrap: wrap; justify-content: center; }
    .toast { bottom: calc(env(safe-area-inset-bottom) + 84px) !important; max-width: 92vw; }

    /* Intro : adaptée à l'écran */
    .intro-title { font-size: 34px !important; }
    .intro-subtitle { font-size: 11px !important; padding: 0 14px; text-align: center; }
    .btn-skip-intro { bottom: calc(env(safe-area-inset-bottom) + 24px); }

    /* Performance iPhone : on allège le décor lourd */
    .flying-witch-track, .spooky-bats, .spooky-ghosts, .silent-lightning, .blood-moon, .haunted-mansion,
    #flyingWitch, #spookyBats, #spookyGhosts, #silentLightning, #hauntedMansion { display: none !important; }
    .spooky-fog { opacity: 0.35 !important; }
    .fps-hud { top: calc(env(safe-area-inset-top) + 56px); }
}

@media (max-width: 400px) {
    .media-card { flex: 0 0 38vw !important; }
    .hero-title { font-size: 22px !important; }
    .logo-text { font-size: 16px !important; }
    .search-box { max-width: 40vw; }
}

/* Paysage smartphone : lecteur plein écran immersif sans bandeau superflu */
@media (max-height: 520px) and (orientation: landscape) {
    .mobile-tabbar { display: none !important; }
    .player-overlay {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 999999 !important;
        padding: 0 !important;
        background: #000 !important;
    }
    .player-container {
        height: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
    }
    .player-header {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 60 !important;
        background: linear-gradient(180deg, rgba(8, 4, 14, 0.95) 0%, transparent 100%) !important;
        padding: calc(env(safe-area-inset-top) + 4px) 14px 6px !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .player-overlay.controls-hidden .player-header {
        opacity: 0 !important;
        transform: translateY(-20px) !important;
        pointer-events: none !important;
    }
    .hero-billboard { height: 90vh !important; }
}


/* Codes d'invitation (Fondateur) */
.admin-invites-header { margin-top: 20px; }
.admin-invites-list { display: flex; flex-direction: column; gap: 8px; }
.admin-invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; }
.admin-invite-code { font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: 1px; }
.admin-invite-status, .admin-invite-date { color: #888; font-size: 13px; }
.admin-invite-row.invite-active .admin-invite-status { color: #00e676; }
.admin-invite-row.invite-used, .admin-invite-row.invite-expired, .admin-invite-row.invite-revoked { opacity: 0.55; }


/* ==========================================================================
   BANNIÈRE SESSION FONDATEUR VIP (ZÉRO MOT DE PASSE)
   ========================================================================== */
.founder-impersonation-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(90deg, #ff5500, #9b30ff);
    color: #fff;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
.btn-return-founder {
    background: #000;
    color: #ff9900;
    border: 1px solid #ff9900;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s, background 0.2s;
}
.btn-return-founder:hover {
    background: #1a0f2b;
    transform: scale(1.04);
}

/* ==========================================================================
   DÉFI TERRIFIANT D'HALLOWEEN (KRYSTAL & MICKAEL)
   ========================================================================== */
.halloween-challenge-card {
    max-width: 680px;
    width: 95%;
    background: radial-gradient(circle at top, #260a38 0%, #0d0414 100%);
    border: 2px solid #ff5500;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 0 50px rgba(255, 85, 0, 0.4), 0 0 80px rgba(155, 48, 255, 0.3);
    animation: challengeGlow 2.5s infinite alternate ease-in-out;
}
@keyframes challengeGlow {
    from { box-shadow: 0 0 30px rgba(255, 85, 0, 0.3); }
    to { box-shadow: 0 0 65px rgba(255, 85, 0, 0.6), 0 0 100px rgba(155, 48, 255, 0.4); }
}
.halloween-challenge-header {
    text-align: center;
    margin-bottom: 20px;
}
.challenge-skull {
    font-size: 38px;
    display: block;
    margin-bottom: 6px;
}
.halloween-challenge-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    font-weight: 900;
    color: #ffaa00;
    text-shadow: 0 0 15px rgba(255, 170, 0, 0.6);
    letter-spacing: 1px;
}
.challenge-subtitle {
    color: #dfbfff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.halloween-challenge-body {
    display: flex;
    gap: 22px;
    align-items: center;
}
@media (max-width: 600px) {
    .halloween-challenge-body {
        flex-direction: column;
        text-align: center;
    }
}
.challenge-poster-wrap {
    position: relative;
    flex-shrink: 0;
    width: 170px;
}
.challenge-poster {
    width: 100%;
    border-radius: 12px;
    border: 2px solid rgba(255, 85, 0, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}
.challenge-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff5500;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.challenge-text-content {
    flex: 1;
}
.challenge-message {
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.challenge-stats {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #ff9900;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.challenge-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btn-challenge-accept {
    background: linear-gradient(135deg, #ff5500, #ff1a1a);
    color: #fff;
    border: none;
    padding: 13px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 30, 30, 0.5);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-challenge-accept:hover {
    transform: scale(1.03);
}
.btn-challenge-flee {
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-challenge-flee:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ==========================================================================
   MODAL TÉLÉCHARGEMENT DES APPLICATIONS MULTI-PLATEFORMES
   ========================================================================== */
.downloads-card {
    max-width: 880px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    background: #11081f;
    border: 1px solid rgba(255, 120, 0, 0.4);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
}
.downloads-header {
    text-align: center;
    margin-bottom: 24px;
}
.downloads-icon {
    font-size: 32px;
    margin-bottom: 6px;
    display: inline-block;
}
.downloads-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}
.downloads-header p {
    color: #aaa;
    font-size: 14px;
}
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}
.download-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.download-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 120, 0, 0.5);
    background: rgba(255, 255, 255, 0.07);
}
.download-item-icon {
    font-size: 30px;
    color: #fff;
}
.download-item-info h4 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.download-item-info p {
    font-size: 12.5px;
    color: #bbb;
    line-height: 1.4;
    margin-bottom: 12px;
}
.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-download {
    background: linear-gradient(135deg, #ff5500, #ff8800);
    color: #fff !important;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 12px;
    border-radius: 8px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.2s;
}
.btn-download:hover {
    opacity: 0.9;
}
.btn-download-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #eee !important;
    text-decoration: none;
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 6px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-download-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}
