:root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    background: #111;
    color: #eee;
    font-family: system-ui, sans-serif;
}

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

.film-card {
    background: #1c1c1c;
    padding: 12px;
    border-radius: 8px;
}

.film-card img {
    width: 100%;
    border-radius: 6px;
}

.container {
    max-width: 1200px;
    padding: 2rem;
    margin: auto;
}

h1 {
    margin-bottom: 2rem;
}

h2 {
    margin: 2rem 0 1rem;
    color: var(--muted);
}

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

.card {
    text-decoration: none;
    color: inherit;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,.5);
}

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

.meta {
    padding: .8rem;
}

.meta h3 {
    font-size: .95rem;
    margin: 0 0 .3rem;
}

.note {
    font-size: .85rem;
    color: var(--accent);
}

.card.serie {
    border: 1px solid rgba(139,92,246,.4);
}

.years-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.years-filter a {
    padding: 6px 14px;
    border-radius: 20px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.years-filter a:hover {
    background: #444;
}

.years-filter a.active {
    background: #e50914;
    font-weight: bold;
}

.hidden {
    display: none;
}

#tableWrapper {
    transition: all 0.3s ease;
}

/* =========================
   FILMS  RATINGS
   ========================= */

/* mauvais */

.rating-low {
    border: 2px solid #ff4d4d;
    background: linear-gradient(180deg, #2a0f0f, #140707);
}

.rating-low .rating {
    color: #ff4d4d;
    font-weight: bold;
}

.rating-low:hover {
    box-shadow: 0 0 12px rgba(255, 60, 60, 0.5);
}


/* excellents */

.rating-high {
    border: 2px solid #3fd17f;
    background: linear-gradient(180deg, #0f2a1c, #07140d);
}

.rating-high .rating {
    color: #3fd17f;
    font-weight: bold;
}

.rating-high:hover {
    box-shadow: 0 0 12px rgba(63, 209, 127, 0.5);
}

.rating {
    padding: 3px 8px;
    border-radius: 6px;
    background: #222;
    font-size: 0.9em;
}

.rating-high::after {
    content: " ⭐";
}

.rating-low::after {
    content: " 💀";
}
