:root {
    --primary-color: #A855F7; /* Violet */
    --primary-light: #C084FC;
    --primary-dark: #7E22CE;
    --background-dark: #121212;
    --surface-dark: #1E1E1E;
    --card-background: #282828;
    --text-color-light: #E0E0E0;
    --text-color-medium: #B0B0B0;
    --text-color-dark: #808080;
    --border-color: #383838;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --padding-sm: 10px;
    --padding-md: 20px;
    --padding-lg: 30px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--padding-md);
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.header {
    background-color: var(--surface-dark);
    padding: var(--padding-sm) 0;
    box-shadow: 0 4px 20px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(30, 30, 30, 0.8);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.05em;
    padding: 5px 0;
    cursor: pointer;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.nav {
    display: flex;
    gap: var(--padding-md);
    flex-grow: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-color-medium);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-color-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--padding-sm);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px 8px 35px; /* Adjust padding for icon */
    color: var(--text-color-light);
    font-size: 0.9rem;
    width: 180px;
    transition: width var(--transition-speed), border-color var(--transition-speed);
}

.search-input::placeholder {
    color: var(--text-color-dark);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    width: 220px;
}

.search-button {
    background: none;
    border: none;
    color: var(--text-color-medium);
    position: absolute;
    left: 10px;
    cursor: pointer;
    font-size: 0.9rem;
}

.history-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color-medium);
    border-radius: var(--border-radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: color var(--transition-speed), border-color var(--transition-speed);
}

.history-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn {
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background-color var(--transition-speed), transform 0.2s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-dark);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-play {
    background-color: var(--primary-color);
    color: var(--background-dark);
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-play:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-info {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-info:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.donate-btn {
    background-color: var(--surface-dark);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.donate-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    transform: translateY(-2px);
}

.history-toggle {
    display: none; /* Hidden by default for larger screens */
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color-medium);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color var(--transition-speed), border-color var(--transition-speed);
    white-space: nowrap;
    align-items: center;
    gap: 5px;
}

.history-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.menu-toggle {
    display: none; /* Hidden by default for larger screens */
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color-light);
    margin-left: var(--padding-sm);
}

/* Page management */
.main-content {
    padding: var(--padding-lg) 0;
}

.page {
    display: none;
}

.page.active-page {
    display: block;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 550px;
    overflow: hidden;
    margin-bottom: var(--padding-lg);
    display: flex;
    align-items: flex-end;
    padding: var(--padding-lg) calc(var(--padding-lg) + 20px);
    color: var(--text-color-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    filter: brightness(0.7);
    transform: scale(1.02);
    transition: filter 0.5s ease, background-image 0.8s ease;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--background-dark) 0%, rgba(18,18,18,0.4) 50%, transparent 100%);
}

.hero-details {
    position: relative;
    z-index: 10;
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: var(--padding-sm);
    font-weight: 700;
    line-height: 1.2;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: var(--padding-md);
    color: var(--text-color-medium);
}

.hero-actions {
    display: flex;
    gap: var(--padding-sm);
}

/* Category Section & Carousel */
.section-category {
    margin-bottom: var(--padding-lg);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: var(--padding-md);
    color: var(--text-color-light);
    padding-left: var(--padding-sm);
    border-left: 3px solid var(--primary-color);
}

.card {
    background-color: var(--card-background);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    position: relative;
    width: 200px;
    flex-shrink: 0;
}

.card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 35px rgba(168, 85, 247, 0.25);
}

.card-img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: var(--padding-sm) var(--padding-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color-light);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-color-dark);
}

.carousel {
    display: flex;
    gap: var(--padding-md);
    overflow-x: auto;
    padding-bottom: var(--padding-sm); /* for scrollbar */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
    height: 8px;
}

.carousel::-webkit-scrollbar-track {
    background: var(--surface-dark);
    border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
    border: 2px solid var(--surface-dark);
}

.carousel::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.carousel .card {
    scroll-snap-align: start;
}

/* Grid for All Films/Series/Search results */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--padding-md);
}

.grid-container .card {
    width: auto; /* Allow grid to manage width */
    height: auto; /* Allow grid to manage height */
}

/* Donation Section */
.donation-section {
    margin-bottom: var(--padding-lg);
}

.donation-card {
    background: linear-gradient(145deg, var(--card-background) 0%, var(--surface-dark) 100%);
    border: 1px solid var(--primary-dark);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(var(--shadow-color), 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.donation-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color-light);
    letter-spacing: -0.03em;
}

.donation-text {
    font-size: 1.1rem;
    color: var(--text-color-medium);
    max-width: 700px;
}

.btn-paypal {
    background: #0070ba; /* PayPal blue */
    color: white;
    padding: 14px 30px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(0, 112, 186, 0.3);
}
.btn-paypal:hover {
    transform: translateY(-3px);
    background: #005ea6; /* Darker PayPal blue */
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.4);
}

/* Footer */
.footer {
    background-color: var(--surface-dark);
    padding: var(--padding-lg) 0 var(--padding-md);
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-color-medium);
    margin-top: var(--padding-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--padding-md);
}

.footer-links {
    display: flex;
    gap: var(--padding-md);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--text-color-medium);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var('--primary-color'); /* Corrected to primary color */
}

/* Watch Page */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color-medium);
    font-weight: 500;
    margin-bottom: var(--padding-md);
    background: var(--card-background);
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}
.back-link:hover {
    color: var(--primary-light);
    border-color: var(--primary-color);
    background-color: var(--surface-dark);
}

.video-player {
    background: var(--card-background);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    padding: var(--padding-md);
    margin-bottom: var(--padding-lg);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.video-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: var(--padding-md);
    position: relative;
}
.video-box iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.video-box .placeholder-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-medium);
    font-size: 1.1rem;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.player-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--padding-sm);
    justify-content: space-between;
    align-items: center;
}

.language-selector {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: var(--input-bg);
    color: var(--text-color-medium);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}
.lang-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-color), 0.3);
}
.lang-btn:hover:not(.active) {
    border-color: var(--primary-dark);
    color: var(--primary-light);
}

.episode-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.select-field {
    background: var(--input-bg);
    color: var(--text-color-light);
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23A0A0A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
    min-width: 120px;
}
.select-field:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 2px rgba(var(--primary-color), 0.3);
    background-color: var(--card-background);
}

.watch-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color-light);
    letter-spacing: -0.03em;
}

.watch-description {
    font-size: 1.05rem;
    color: var(--text-color-medium);
    line-height: normal;
}


/* Global Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--card-background);
    padding: var(--padding-lg);
    border-radius: var(--border-radius-lg);
    border: 2px solid var(--primary-dark);
    z-index: 10001;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 40px var(--shadow-color);
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
    opacity: 0;
    visibility: hidden;
}
.modal-card.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: var(--padding-md);
    line-height: 1;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: var(--padding-sm);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.modal-description {
    font-size: 1rem;
    color: var(--text-color-medium);
    margin-bottom: var(--padding-lg);
}

.btn-close-modal { /* Generic for modal close */
    background: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}
.btn-close-modal:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Media Details Modal */
.media-details-modal {
    max-width: 600px;
    padding: 0;
    overflow: hidden;
    text-align: left;
}

.details-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--input-bg);
    color: var(--text-color-medium);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 10;
}
.details-close-btn:hover {
    background-color: var(--primary-color); /* Use primary color for close on details */
    color: white;
    transform: rotate(90deg) scale(1.1);
}


.details-poster {
    width: 100%;
    aspect-ratio: 16 / 9; /* Cinematic aspect ratio */
    object-fit: cover;
    display: block;
    height: 250px;
}

.details-content {
    padding: var(--padding-lg);
}

.media-details-modal .modal-title {
    padding: 0;
    font-size: 2rem;
    margin-top: 0;
}

.details-badge {
    display: inline-block;
    margin: var(--padding-sm) 0 var(--padding-md);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(var(--primary-color), 0.1);
    color: var(--primary-light);
    border: 1px solid var(--primary-dark);
}

.media-details-modal .modal-description {
    padding: 0;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--padding-lg);
    color: var(--text-color-medium);
}
.details-director {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-color-medium);
    margin-bottom: var(--padding-md);
}

.director-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.details-actions {
    display: flex;
    gap: var(--padding-sm);
    padding: 0;
    justify-content: flex-start;
}
.details-actions .btn-primary {
    padding: 12px 30px;
}



/* Responsive adjustments */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        padding: 0 var(--padding-sm);
    }

    .nav {
        display: none; /* Hide nav links by default on smaller screens */
        flex-direction: column;
        width: 100%;
        background-color: rgba(30, 30, 30, 0.95); /* Semi-transparent background for dropdown */
        border-top: 1px solid var(--border-color);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 10px var(--padding-md);
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }
    .nav-link:last-child {
        border-bottom: none;
    }
    .nav-link.active::after {
        content: none; /* Remove underline for mobile menu items */
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: var(--padding-sm);
    }
    .search-container {
        width: 100%;
        max-width: 300px; /* Limit search bar width */
    }
    .donate-btn {
        display: none; /* Can hide for smaller screens or place differently */
    }
    .logo {
        flex-grow: 1;
        text-align: center;
        width: 100%; /* Take full width above 768px */
        margin-bottom: var(--padding-sm);
    }
    .menu-toggle {
        display: block; /* Show hamburger icon */
        margin-left: auto; /* Push to right */
    }
    .history-toggle {
        display: inline-flex; /* Show history button next to hamburger */
        margin-left: auto;
    }
}


@media (max-width: 768px) {
    .header-content {
        justify-content: space-between; /* Adjusted to keep toggle to right */
    }
    .logo {
        width: auto;
        text-align: left;
        margin-bottom: 0;
        flex-grow: 1;
    }
    .header-actions {
        order: 3; /* Move actions below logo/nav */
        margin-top: var(--padding-md);
    }
    .history-btn {
        display: none;
    }
    .history-toggle {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    .hero-section {
        height: 400px;
        padding: var(--padding-md);
        margin-bottom: var(--padding-md);
    }
.hero-title {
        font-size: 2.2rem;
    }
    .hero-description {
        font-size: 0.9rem;
    }
    .hero-actions {
        flex-direction: column;
        gap: var(--padding-sm);
    }
    .btn-play, .btn-info {
        width: 100%;
        text-align: center;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .details-poster {
        height: 200px;
    }
    .media-details-modal .modal-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--padding-sm);
    }
    .header-actions {
        flex-wrap: wrap; /* Allow search and toggle to wrap */
    }
    .search-container {
        max-width: 100%;
        order: 1;
        margin-bottom: var(--padding-sm);
    }
    .menu-toggle {
        order: 2;
        margin-left: var(--padding-sm);
    }
    .logo {
        margin-bottom: 0;
    }
    .hero-section {
        height: 300px;
        padding: var(--padding-sm);
    }
.hero-title {
        font-size: 1.8rem;
    }
    .hero-description {
        font-size: 0.8rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .main-content {
        padding: var(--padding-md) 0;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .carousel {
        padding-left: var(--padding-sm);
        padding-right: var(--padding-sm);
    }
    .carousel::-webkit-scrollbar {
        height: 6px;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); /* Even smaller cards */
        gap: var(--padding-sm);
    }
    .card-title {
        font-size: 0.9rem;
    }
    .donation-card {
        padding: var(--padding-md);
    }
    .donation-title {
        font-size: 1.5rem;
    }
    .donation-text {
        font-size: 0.9rem;
    }
    .btn-paypal {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .media-details-modal .modal-title {
        font-size: 1.4rem;
    }
    .details-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .media-details-modal .modal-description {
        font-size: 0.8rem;
    }
}
.snowfall-watch-container {
    text-align: center;
    padding: 2rem;
}

.big-watch-btn {
    display: inline-block;
    background-color: #e50914;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.big-watch-btn:hover {
    background-color: #b00610;
}
.snowfall-watch-container {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* espace entre les boutons */
}

.big-watch-btn {
    display: inline-block;
    background-color: #e50914;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.big-watch-btn:hover {
    background-color: #b00610;
}

.tuto-btn {
    display: inline-block;
    background-color: #7a3cff;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.tuto-btn:hover {
    background-color: #9b63ff;
}
/* History Page */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--padding-md);
}

.history-header .section-title {
    margin-bottom: 0;
}

.btn-clear-history {
    background: transparent;
    color: var(--text-color-medium);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-clear-history:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.history-empty {
    text-align: center;
    color: var(--text-color-dark);
    font-size: 1.1rem;
    padding: 60px 0;
}

.history-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 10px 8px 8px;
    pointer-events: none;
}

.history-card-progress {
    font-size: 0.7rem;
    color: var(--primary-light);
    font-weight: 600;
}

.history-card-date {
    font-size: 0.65rem;
    color: var(--text-color-dark);
    margin-top: 2px;
}

/* Square cards on mobile for films & series */
@media (max-width: 768px) {
    .card {
        width: 170px;
    }
}

@media (max-width: 480px) {
    .card {
        width: 120px;
    }
}

/* 📱 ULTRA ULTRA COMPACT MOBILE */
@media (max-width: 600px) {

    .snowfall-watch-container {
        padding: 0.6rem;
        gap: 8px;
    }

    .snowfall-watch-container h3 {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .big-watch-btn,
    .tuto-btn {
        width: 92%;              /* largeur parfaite pour mobile */
        font-size: 0.85rem;      /* très petit mais lisible */
        padding: 0.55rem 0.7rem; /* compact */
        border-radius: 5px;
    }

    .big-watch-btn {
        font-size: 0.9rem;       /* un poil plus grand que TUTO */
    }

    .tuto-btn {
        font-size: 0.85rem;
    }
}

/* 📱 iPhone & petits écrans (375px et moins) */
@media (max-width: 414px) {

    /* --- Header --- */
    .header-content {
        padding: 0 8px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .header-actions {
        margin-top: 8px;
        gap: 6px;
    }

    .search-input {
        width: 100%;
        font-size: 0.85rem;
        padding: 6px 10px 6px 30px;
    }

    .search-input:focus {
        width: 100%;
    }

    /* --- Hero Section --- */
    .hero-section {
        height: 260px;
        padding: 10px;
        margin-bottom: 15px;
    }

    .hero-details {
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .hero-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
        margin-bottom: 10px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 6px;
    }

    .btn-play,
    .btn-info {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* --- Cards & Images --- */
    .card {
        width: 110px;
    }

    .card-img {
        aspect-ratio: 3 / 4;
    }

    .card-content {
        padding: 6px 8px;
    }

    .card-title {
        font-size: 0.78rem;
    }

    .card-meta {
        font-size: 0.7rem;
    }

    /* --- Carousel --- */
    .carousel {
        gap: 10px;
        padding-left: 8px;
        padding-right: 8px;
    }

    /* --- Grid --- */
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 8px;
    }

    /* --- Section Titles --- */
    .section-title {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    /* --- Donation --- */
    .donation-card {
        padding: 15px;
        gap: 10px;
    }

    .donation-title {
        font-size: 1.25rem;
    }

    .donation-text {
        font-size: 0.82rem;
    }

    .btn-paypal {
        padding: 10px 16px;
        font-size: 0.82rem;
        width: 100%;
        text-align: center;
    }

    /* --- Modal Details --- */
    .media-details-modal {
        width: 95%;
        max-height: 90vh;
    }

    .details-poster {
        height: 170px;
    }

    .media-details-modal .modal-title {
        font-size: 1.2rem;
    }

    .media-details-modal .modal-description {
        font-size: 0.78rem;
    }

    .details-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Watch Page --- */
    .video-player {
        padding: 10px;
    }

    .player-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .language-selector {
        justify-content: center;
    }

    .lang-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .episode-selector {
        justify-content: center;
    }

    .select-field {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .watch-title {
        font-size: 1.3rem;
    }

    .watch-description {
        font-size: 0.85rem;
    }

    .back-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* --- Footer --- */
    .footer-links {
        gap: 10px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    /* --- Buttons snowfall --- */
    .big-watch-btn,
    .tuto-btn {
        width: 100%;
        font-size: 0.82rem;
        padding: 0.5rem 0.6rem;
    }

    .snowfall-watch-container {
        padding: 0.5rem;
        gap: 6px;
    }
}
