/* ==========================================================
   Design System & Feuilles de Styles Modernes - Médiathèque
   Palette Dark Glassmorphism, Typographie Moderne & Micro-animations
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
    
    /* Palette de couleurs sombres et lumineuses */
    --bg-main: #0a0d14;
    --bg-surface: #111726;
    --bg-surface-elevated: #182238;
    --bg-surface-hover: #1f2b47;
    --bg-glass: rgba(17, 23, 38, 0.75);
    --bg-glass-card: rgba(24, 34, 56, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(99, 102, 241, 0.6);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --accent: #ec4899;
    --accent-hover: #db2777;
    --accent-glow: rgba(236, 72, 153, 0.3);
    
    --success: #10b981;
    --success-hover: #059669;
    --success-bg: rgba(16, 185, 129, 0.15);
    --success-border: rgba(16, 185, 129, 0.35);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.35);
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.35);
    
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.15);
    --info-border: rgba(6, 182, 212, 0.35);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 25px var(--primary-glow);

    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 12% 10%, rgba(99, 102, 241, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 88% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

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

a:hover {
    color: #818cf8;
}

/* Glassmorphism Styles */
.glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Layout Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 13, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 1.5rem;
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-logo {
    font-size: 1.65rem;
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.7));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-surface-elevated);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-glass);
    font-size: 0.88rem;
    font-weight: 600;
}

.role-tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-weight: 800;
    letter-spacing: 0.5px;
}

.role-tag.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.role-tag.member {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Main Container */
.main-content {
    flex: 1;
    max-width: 1320px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Forms & Controls */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-surface-elevated);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-glow);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #ffffff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #ffffff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.84rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Hero & Search Banner */
.search-hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2.5rem 1.5rem;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    border-radius: var(--radius-xl);
}

.search-hero h1 {
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.search-hero p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 1.75rem auto;
}

.search-bar-wrap {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem 1rem 3.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow), var(--shadow-lg);
}

.search-icon-inside {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Filter Chips Bar (Trackers, Quality, Sorting) */
.torrent-filters-bar {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    min-width: 90px;
    letter-spacing: 0.5px;
}

.filter-chips {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.filter-chip.tracker-chip {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
}

.filter-chip.tracker-chip.active {
    background: var(--primary);
    color: #ffffff;
}

.filter-chip.quality-chip {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.filter-chip.quality-chip.active {
    background: var(--success);
    color: #ffffff;
}

/* Grille de Médias */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.media-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.media-card:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background: #0d121f;
    overflow: hidden;
}

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

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

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.8rem;
    background: linear-gradient(135deg, #141c30, #0a0e18);
}

.media-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-rating-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.6rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    color: #facc15;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.media-info {
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.media-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.media-meta {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.media-overview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

.media-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-glass);
}

/* Badges de Statut */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-badge.pending {
    background: var(--warning-bg);
    color: #fde047;
    border: 1px solid var(--warning-border);
}

.status-badge.available {
    background: var(--success-bg);
    color: #86efac;
    border: 1px solid var(--success-border);
}

.status-badge.rejected {
    background: var(--danger-bg);
    color: #fca5a5;
    border: 1px solid var(--danger-border);
}

/* Tabs & Filters */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.tab-btn {
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-btn:hover, .tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* ==========================================================================
   Modale & Liste de Torrents Jackett / Multi-Trackers
   ========================================================================== */
.torrents-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.torrent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.torrent-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.torrent-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.torrent-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.45;
}

.torrent-quality-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.torrent-quality-tag {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.18rem 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.torrent-quality-tag.tag-4k {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border-color: rgba(234, 179, 8, 0.4);
}

.torrent-quality-tag.tag-french {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.4);
}

.torrent-quality-tag.tag-tracker {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.35);
}

.torrent-card-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.torrent-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.torrent-badge-seeders {
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 0.82rem;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

.torrent-badge-seeders.low {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.torrent-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.torrent-actions-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Complétude & Audit des Séries */
.series-audit-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.series-audit-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-md);
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.4s ease;
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Modales */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-dialog {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-xl);
    background: #0f172a;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0 0.5rem;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1.15rem 1.75rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
}

/* Grille des saisons dans la modale */
.seasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.season-card {
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.season-card:hover:not(.is-available) {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.season-card.is-selected {
    background: rgba(99, 102, 241, 0.22);
    border-color: var(--primary);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.season-card.is-available {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.35);
    cursor: default;
}

.season-num-badge {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.season-ep-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.season-status-tag {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    margin-top: 0.25rem;
}

.season-status-tag.available {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.season-status-tag.pending {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
}

.season-status-tag.select {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.season-card.is-selected .season-status-tag.select {
    background: var(--primary);
    color: #ffffff;
}

/* Toast System */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    max-width: 450px;
    padding: 1rem 1.35rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-primary);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.92rem;
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

/* ==========================================================================
   Page Nouveautés / News & Plateformes de Streaming
   ========================================================================== */
.news-hero {
    text-align: center;
    margin-bottom: 1.75rem;
    padding: 2.25rem 1.5rem;
    background: radial-gradient(circle at center, rgba(236, 72, 153, 0.15) 0%, rgba(99, 102, 241, 0.12) 40%, transparent 75%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glass);
}

.news-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.65rem;
    background: linear-gradient(135deg, #ffffff 30%, #f472b6 70%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.news-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto 1.35rem auto;
}

.badge-fire {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    background: rgba(236, 72, 153, 0.2);
    border: 1px solid rgba(236, 72, 153, 0.4);
    color: #f472b6;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.badge-time {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
}

.period-selector-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.period-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.period-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.period-chip {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    transition: var(--transition);
}

.period-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.period-chip.active {
    background: linear-gradient(135deg, var(--accent), #db2777);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Barre de filtres par plateforme */
.streaming-filters-bar {
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
}

.provider-chips-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.provider-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
    user-select: none;
}

.provider-filter-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
}

.provider-filter-chip.active {
    background: var(--bg-surface-elevated);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.provider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-netflix { background: #e50914; }
.dot-prime { background: #00a8e1; }
.dot-disney { background: #113ccf; }
.dot-canal { background: #000000; border: 1px solid rgba(255, 255, 255, 0.6); }
.dot-apple { background: #ffffff; }
.dot-max { background: #002be7; }
.dot-paramount { background: #0064ff; }

.chip-netflix.active { border-color: #e50914; color: #ff8a8a; background: rgba(229, 9, 20, 0.15); }
.chip-prime.active { border-color: #00a8e1; color: #7fe1ff; background: rgba(0, 168, 225, 0.15); }
.chip-disney.active { border-color: #113ccf; color: #9bb7ff; background: rgba(17, 60, 207, 0.2); }
.chip-canal.active { border-color: rgba(255, 255, 255, 0.6); color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.chip-apple.active { border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, 0.15); }
.chip-max.active { border-color: #002be7; color: #8eb0ff; background: rgba(0, 43, 231, 0.2); }
.chip-paramount.active { border-color: #0064ff; color: #85b8ff; background: rgba(0, 100, 255, 0.15); }

/* Badges sur les cartes de nouveautés */
.release-date-badge {
    position: absolute;
    bottom: 0.65rem;
    left: 0.65rem;
    padding: 0.25rem 0.55rem;
    background: rgba(10, 13, 20, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 0.74rem;
    font-weight: 700;
    color: #e2e8f0;
}

.news-streaming-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
    margin: 0.5rem 0 0.75rem 0;
}

.streaming-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dot-stream-live {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #10b981;
}

.streaming-logos-list {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.provider-logo-wrap {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    overflow: hidden;
    background: #1e293b;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.provider-logo-wrap:hover {
    transform: scale(1.18);
    border-color: rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.provider-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.provider-logo-txt {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.provider-justwatch-link {
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-weight: 700;
}

.provider-justwatch-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   Bande-Annonce / Bouton Flèche Rouge sur Poster
   ========================================================================== */
.btn-poster-trailer {
    position: absolute;
    bottom: 0.65rem;
    right: 0.65rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ff0000;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease;
    z-index: 5;
}

.btn-poster-trailer:hover {
    background: #e60000;
    transform: scale(1.18);
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.7), 0 3px 8px rgba(0, 0, 0, 0.7);
    color: #ffffff;
}

.poster-trailer-play-icon {
    font-size: 0.95rem;
    line-height: 1;
    margin-left: 2px; /* Centrage optique du triangle de lecture */
    display: block;
}

.badge-vf-mini-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #0f172a;
    color: #38bdf8;
    border: 1px solid #0284c7;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 4px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-glass);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 0.85rem;
    }
    
    .search-hero h1 {
        font-size: 1.95rem;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .torrent-card-top, .torrent-card-bottom {
        flex-direction: column;
        align-items: stretch;
    }
}
