/* ===== FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== RESET ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0f;
    color: #c8d0d8;
    min-height: 100vh;
    overflow-x: hidden;
}
img { animation: imgFadeIn 0.35s ease; }
@keyframes imgFadeIn { from { opacity:0; transform:scale(0.98); } to { opacity:1; transform:scale(1); } }
.loading-pulse { animation: loadingPulse 1.3s ease-in-out infinite; }
@keyframes loadingPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ===== LE SITE ===== */
#site-content { display: block; opacity: 1; }

/* ===== STYLES DU SITE ===== */
a { color: #10b981; text-decoration: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #0a0a0f; }
::-webkit-scrollbar-thumb { background: #10b981; border-radius: 4px; }

header {
    background: rgba(10, 10, 15, 0.95);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding: 12px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-logo {
    height: 46px;
    width: 46px;
    cursor: pointer;
    filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.25));
    transition: transform 0.2s ease;
}
.site-logo:hover { transform: scale(1.05); }

.header-top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-toggle-arrow { display: none; }
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #10b981;
    font-size: 1.3rem;
    line-height: 1;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.nav-toggle:active { background: rgba(16, 185, 129,0.1); }

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    align-items: center;
}
nav a {
    font-family: 'Inter', sans-serif;
    color: #6a7a8a;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
}
nav a:hover { color: #10b981; border-bottom-color: #10b981; }
nav a.active-link { color: #10b981; border-bottom-color: #10b981; }

.search-header {
    display: flex;
    gap: 4px;
    flex: 1;
    max-width: 360px;
    margin: 0 12px;
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 30px;
    padding: 2px 4px 2px 14px;
    position: relative;
}
.search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #0d0d16;
    border: 1px solid #1a1a26;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    max-height: 400px;
    overflow-y: auto;
    z-index: 200;
}
.search-suggestions.open { display: block; }
.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.search-suggestion-item:hover { background: rgba(16, 185, 129, 0.08); }
.search-suggestion-item img, .search-suggestion-item .ssi-placeholder {
    width: 34px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #08080c;
    flex-shrink: 0;
}
.search-suggestion-item .ssi-info { min-width: 0; }
.search-suggestion-item .ssi-titre {
    font-size: 0.75rem; color: #c8d0d8;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-suggestion-item .ssi-meta { font-size: 0.6rem; color: #5a6a7a; margin-top: 1px; }
.search-suggestions .ssi-voir-tout {
    padding: 10px 12px;
    font-size: 0.65rem;
    color: #10b981;
    text-align: center;
    cursor: pointer;
    border-top: 1px solid #14141e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-suggestions .ssi-voir-tout:hover { background: rgba(16, 185, 129, 0.06); }
.search-suggestions p { padding: 12px; font-size: 0.7rem; }
.search-header input {
    flex: 1;
    padding: 6px 0;
    background: transparent;
    border: none;
    color: #c8d0d8;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    outline: none;
}
.search-header input::placeholder { color: #3a4a5a; }
.search-header button {
    padding: 6px 16px;
    background: #10b981;
    border: none;
    border-radius: 30px;
    color: #0a0a0f;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}
.search-header button:hover {
    background: #0d9f6e;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}

#userBadge {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
    padding: 3px 14px;
    border-radius: 30px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    display: none;
    letter-spacing: 0.3px;
}
#userBadge.badge-admin {
    color: #ff8a6a;
    background: rgba(255, 106, 90, 0.1);
    border-color: rgba(255, 106, 90, 0.25);
}
#userBadge.badge-mod {
    color: #6ab8ff;
    background: rgba(106, 184, 255, 0.1);
    border-color: rgba(106, 184, 255, 0.25);
}
#userBadge.badge-premium {
    color: #e8b800;
    background: rgba(232, 184, 0, 0.1);
    border-color: rgba(232, 184, 0, 0.25);
}

.main-wrap { max-width: 1440px; margin: 16px auto; padding: 0 24px; }

.sidebar-wrap { display: flex; gap: 24px; }
.sidebar {
    flex: 0 0 190px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: linear-gradient(180deg, #0d0d14, #0a0a10);
    border: 1px solid #15151e;
    border-radius: 14px;
    padding: 18px 14px;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #1a1a26; border-radius: 4px; }
.sidebar h3 {
    color: #10b981;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #14141e;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sidebar h3:first-of-type { margin-top: 0; }
.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar ul li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    color: #8a9aaa;
    transition: background 0.18s ease, color 0.18s ease;
}
.sidebar ul li:hover {
    color: #e8eef4;
    background: rgba(16, 185, 129, 0.06);
}
.sidebar ul li.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    font-weight: 700;
}

.content { flex: 1; min-width: 0; }

.hero {
    background: linear-gradient(145deg, #0d0d14, #0f0f18);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    border: 1px solid #15151e;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}
.hero-poster {
    flex: 0 0 160px;
    border-radius: 8px;
    overflow: hidden;
    background: #08080c;
    border: 1px solid #1a1a26;
}
.hero-poster img { width:100%; height:240px; object-fit:cover; }
.hero-info { flex:1; min-width:200px; }
.hero-info .badge {
    display:inline-block;
    background: rgba(16, 185, 129,0.12);
    color:#10b981;
    font-size:0.5rem;
    font-weight:700;
    padding:1px 12px;
    border-radius:20px;
    text-transform:uppercase;
    letter-spacing:1.2px;
    border:1px solid rgba(16, 185, 129,0.1);
    margin-bottom:4px;
}
.hero-info h2 {
    font-size:1.6rem;
    font-weight:700;
    margin-bottom:2px;
    color:#e8eef4;
}
.hero-info .meta {
    display:flex;
    flex-wrap:wrap;
    gap:4px 14px;
    font-size:0.7rem;
    color:#6a7a8a;
    margin:4px 0 10px;
}
.hero-info .meta span {
    background:#0d0d16;
    padding:0 10px;
    border-radius:20px;
    border:1px solid #14141e;
}
.hero-info .meta .rating { color:#10b981; }
.hero-info p {
    color:#8a9aaa;
    line-height:1.5;
    font-size:0.8rem;
    max-width:520px;
    margin-bottom:12px;
}
.hero-info .actions { display:flex; flex-wrap:wrap; gap:8px; }
.hero-info .actions button {
    padding:8px 24px;
    border:none;
    border-radius:30px;
    font-family: 'Inter', sans-serif;
    font-weight:700;
    font-size:0.7rem;
    cursor:pointer;
    transition: all 0.25s ease;
    text-transform:uppercase;
    letter-spacing:0.5px;
}
.hero-info .actions button:hover { transform:translateY(-2px); }
.btn-watch {
    background: #10b981;
    color: #0a0a0f;
}
.btn-watch:hover { box-shadow:0 4px 30px rgba(16, 185, 129,0.2); }

.section-title {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:24px 0 12px;
    border-bottom:1px solid #12121c;
    padding-bottom:4px;
}
.section-title h2 {
    font-size:0.9rem;
    font-weight:600;
    color:#8a9aaa;
    text-transform:uppercase;
    letter-spacing:1.5px;
}
.section-title a {
    font-size:0.6rem;
    color:#10b981;
    cursor:pointer;
    opacity:0.6;
    transition:opacity 0.2s;
    text-transform:uppercase;
    letter-spacing:0.5px;
}
.section-title a:hover { opacity:1; }

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

.stream-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 16px;
}
.stream-toolbar label {
    font-size: 0.65rem;
    color: #6a7a8a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.stream-toolbar select {
    background: #0d0d16;
    color: #c8d0d8;
    border: 1px solid #1a1a26;
    border-radius: 8px;
    padding: 6px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    outline: none;
}
.stream-toolbar select:focus { border-color: #10b981; }

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 28px;
}
.pagination-bar span {
    font-size: 0.7rem;
    color: #6a7a8a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pagination-bar button {
    background: #0d0d16;
    color: #c8d0d8;
    border: 1px solid #1a1a26;
    border-radius: 30px;
    padding: 8px 20px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pagination-bar button:hover:not(:disabled) { border-color: rgba(16, 185, 129,0.3); color: #10b981; }
.pagination-bar button:disabled { opacity: 0.35; cursor: default; }

.card {
    background: #0d0d16;
    border-radius:10px;
    overflow:hidden;
    transition: all 0.3s ease;
    cursor:pointer;
    border:1px solid #14141e;
}
.card:hover {
    transform:translateY(-4px);
    box-shadow:0 8px 30px rgba(0,0,0,0.6), 0 0 0 1px rgba(16, 185, 129,0.08);
    border-color: rgba(16, 185, 129,0.1);
}
.card img { width:100%; height:200px; object-fit:cover; background:#08080c; }
.card iframe { width:100%; height:100px; border:none; background:#08080c; pointer-events:none; border-radius:8px 8px 0 0; }
.card-media { position: relative; }
.card-locked-placeholder {
    width:100%; height:200px; display:flex; align-items:center; justify-content:center;
    font-size:2.2rem; background:#08080c; cursor:pointer;
}
.premium-badge {
    position:absolute; top:8px; left:8px;
    background:rgba(232,184,0,0.15); color:#e8b800;
    border:1px solid rgba(232,184,0,0.3);
    font-size:0.55rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px;
    padding:2px 10px; border-radius:20px;
}
.top-badge {
    position:absolute; top:8px; left:8px; right:8px;
    background:rgba(16, 185, 129,0.15); color:#10b981;
    border:1px solid rgba(16, 185, 129,0.35);
    font-size:0.55rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px;
    padding:3px 10px; border-radius:20px;
    text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.quality-badge {
    position:absolute; bottom:8px; left:8px;
    font-size:0.55rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px;
    padding:2px 10px; border-radius:20px;
    background:rgba(10,10,15,0.75); color:#8a9aaa; border:1px solid rgba(255,255,255,0.1);
}
.quality-badge.quality-cam {
    background:rgba(255,60,60,0.18); color:#ff6a5a; border:1px solid rgba(255,60,60,0.4);
    animation: pulseCam 1.6s ease-in-out infinite;
}
@keyframes pulseCam { 0%,100% { opacity:1; } 50% { opacity:0.6; } }
.cam-warning {
    display:flex; align-items:center; gap:8px;
    background:rgba(255,60,60,0.1); border:1px solid rgba(255,60,60,0.3);
    color:#ff8a7a; font-size:0.7rem; padding:10px 16px; border-radius:8px;
    margin:10px 0;
}
.lock-overlay {
    position:absolute; inset:0;
    background:rgba(5,5,8,0.55);
    display:flex; align-items:center; justify-content:center;
    font-size:1.8rem; color:#e8b800;
    pointer-events:none;
}
.card .info { padding:10px 12px 12px; }
.card .info h4 {
    font-size:0.8rem;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    color:#c8d0d8;
}
.card .info .cat {
    font-size:0.55rem;
    color:#5a6a7a;
    margin-top:1px;
    display:inline-block;
    background:#11111c;
    padding:0 8px;
    border-radius:20px;
    border:1px solid #181824;
}
.card .info .actions {
    margin-top:8px;
    display:flex;
    gap:3px;
    flex-wrap:wrap;
}
.card .info .actions button {
    padding:3px 12px;
    border:none;
    border-radius:20px;
    font-size:0.55rem;
    font-weight:600;
    cursor:pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}
.card .info .actions button:hover { opacity:0.85; transform:scale(0.96); }
.btn-play { background:#10b981; color:#0a0a0f; }
.btn-fav { background:#1a1a26; color:#6a7a8a; }
.btn-del { background:#1a0a0a; color:#ff6a5a; }
.btn-edit { background:#1a3a3a; color:#10b981; border:1px solid rgba(16, 185, 129,0.15); }

/* ===== COLLECTIONS ===== */
.collection-card {
    background: #0d0d16;
    border: 1px solid #14141e;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}
.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    border-color: rgba(16, 185, 129,0.1);
}
.collection-cover {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, #1a1a26, #0d0d16);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #2a3a4a;
}
.collection-info { padding: 10px 12px 12px; }
.collection-info h4 { font-size: 0.8rem; color: #c8d0d8; margin-bottom: 2px; }
.collection-info span { font-size: 0.6rem; color: #5a6a7a; }
.btn-retirer-collection { background:#2a1a0a; color:#e8b800; }

.page { display:none; animation:fadeUp 0.4s ease; }
.page.active { display:block; }
@keyframes fadeUp {
    from { opacity:0; transform:translateY(12px); }
    to { opacity:1; transform:translateY(0); }
}

.login-container { display:flex; gap:30px; flex-wrap:wrap; margin-top:16px; justify-content:center; }
.login-box {
    background: #0d0d16;
    padding:28px 26px;
    border-radius:12px;
    flex:1;
    min-width:240px;
    max-width:380px;
    border:1px solid #15151e;
}
.login-box h3 { color:#10b981; font-size:0.9rem; margin-bottom:14px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.login-box input {
    display:block;
    width:100%;
    padding:10px 14px;
    margin:6px 0;
    background:#0a0a12;
    border:1px solid #1a1a26;
    border-radius:8px;
    color:#c8d0d8;
    font-size:0.8rem;
    outline:none;
    font-family: 'Inter', sans-serif;
    transition: border 0.3s;
}
.login-box input:focus { border-color:#10b981; }
.login-box button {
    width:100%;
    padding:11px;
    border:none;
    border-radius:8px;
    font-size:0.8rem;
    font-weight:700;
    cursor:pointer;
    transition: all 0.3s ease;
    margin-top:6px;
    font-family: 'Inter', sans-serif;
    text-transform:uppercase;
    letter-spacing:0.5px;
}
.btn-login { background:#10b981; color:#0a0a0f; }
.btn-login:hover { box-shadow:0 4px 20px rgba(16, 185, 129,0.2); transform:translateY(-2px); }
.btn-register { background:#1a2a3a; color:#8a9aaa; }
.btn-register:hover { background:#1f2f4a; transform:translateY(-2px); }
#authMessage {
    margin-top:12px;
    padding:10px;
    border-radius:8px;
    background:#0a0a12;
    text-align:center;
    color:#10b981;
    font-weight:500;
    font-size:0.75rem;
    border:1px solid rgba(16, 185, 129,0.05);
}

.admin-table-wrap { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.admin-table {
    width:100%;
    min-width:560px;
    border-collapse:collapse;
    margin-top:12px;
    background:#0a0a12;
    border-radius:10px;
    overflow:hidden;
    font-size:0.7rem;
}
.admin-table th {
    background:#0d0d16;
    color:#10b981;
    padding:10px 14px;
    text-align:left;
    font-size:0.55rem;
    text-transform:uppercase;
    letter-spacing:1.2px;
}
.admin-table td { padding:8px 14px; border-bottom:1px solid #12121c; }
.admin-table select {
    background:#0a0a12;
    color:#c8d0d8;
    border:1px solid #1a1a26;
    border-radius:4px;
    padding:3px 8px;
    font-family: 'Inter', sans-serif;
    font-size:0.65rem;
}
.admin-table button {
    background:#10b981;
    color:#0a0a0f;
    border:none;
    border-radius:4px;
    padding:3px 12px;
    cursor:pointer;
    font-weight:700;
    font-size:0.6rem;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}
.admin-table button:hover { background:#0d9f6e; }

.add-panel {
    background: #0d0d16;
    padding:24px;
    border-radius:12px;
    border:1px solid #15151e;
    margin-bottom:24px;
}
.add-panel input, .add-panel textarea {
    display:block;
    width:100%;
    max-width:400px;
    padding:10px 14px;
    margin:5px 0;
    background:#0a0a12;
    border:1px solid #1a1a26;
    border-radius:8px;
    color:#c8d0d8;
    font-size:0.8rem;
    outline:none;
    font-family: 'Inter', sans-serif;
    transition: border 0.3s;
}
.add-panel input:focus, .add-panel textarea:focus { border-color:#10b981; }
.add-panel button {
    padding:10px 30px;
    background:#10b981;
    color:#0a0a0f;
    border:none;
    border-radius:8px;
    font-weight:700;
    cursor:pointer;
    transition: all 0.3s ease;
    margin-top:6px;
    font-family: 'Inter', sans-serif;
    text-transform:uppercase;
    letter-spacing:0.5px;
    font-size:0.7rem;
}
.add-panel button:hover { transform:translateY(-2px); box-shadow:0 4px 20px rgba(16, 185, 129,0.15); }

.tmdb-result {
    background:#0a0a12;
    padding:10px 16px;
    border-radius:8px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid #14141e;
    margin-bottom:4px;
    font-size:0.75rem;
    transition: border 0.2s;
}
.tmdb-result:hover { border-color: rgba(16, 185, 129,0.1); }
.tmdb-result button {
    background:#1a3a4a;
    color:#10b981;
    border:none;
    border-radius:6px;
    padding:4px 14px;
    cursor:pointer;
    font-weight:600;
    font-size:0.6rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}
.tmdb-result button:hover { background:#1a4a5a; }

/* ===== DÉTAIL FILM ===== */
.detail-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 24px;
    background: linear-gradient(145deg, #0d0d14, #0f0f18);
    border: 1px solid #15151e;
}
.detail-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(24px) brightness(0.35);
    transform: scale(1.15);
    z-index: 0;
}
.detail-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    padding: 30px;
}
.detail-poster {
    flex: 0 0 220px;
    border-radius: 10px;
    overflow: hidden;
    background: #08080c;
    border: 1px solid #1a1a26;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.detail-poster img { width:100%; height:320px; object-fit:cover; display:block; }
.detail-info { flex:1; min-width:260px; }
.detail-meta-top { display:flex; gap:14px; font-size:0.75rem; color:#8a9aaa; margin-bottom:8px; }
.detail-info h2 { font-size:1.8rem; font-weight:800; color:#e8eef4; margin-bottom:10px; }
.detail-badges { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.detail-badge {
    background: rgba(16, 185, 129,0.1);
    color:#10b981;
    border:1px solid rgba(16, 185, 129,0.2);
    padding:4px 14px;
    border-radius:20px;
    font-size:0.7rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:0.5px;
}
#detailDescription { color:#8a9aaa; line-height:1.6; font-size:0.85rem; max-width:640px; margin-bottom:18px; }
.detail-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.detail-actions button {
    padding:10px 22px;
    border:none;
    border-radius:30px;
    font-family:'Inter', sans-serif;
    font-weight:700;
    font-size:0.75rem;
    cursor:pointer;
    transition: all 0.25s ease;
}
.detail-actions button:hover { transform:translateY(-2px); }
.btn-vote { background:#1a1a26 !important; color:#8a9aaa; padding:10px 16px !important; font-size:0.9rem !important; }
.btn-vote.active-vote { background:rgba(16, 185, 129,0.15) !important; color:#10b981; }
.btn-list { background:#1a1a26; color:#8a9aaa; }
.btn-list.active-list { background:rgba(16, 185, 129,0.15); color:#10b981; }
#detailEditBtn, #detailDelBtn { padding:10px 18px !important; font-size:0.65rem !important; }

.detail-body { display:flex; gap:24px; flex-wrap:wrap; margin-top:8px; }
.detail-main { flex:1; min-width:280px; }
.detail-tabs { display:flex; gap:24px; border-bottom:1px solid #14141e; margin-bottom:16px; }
.detail-tab {
    padding:8px 2px 12px;
    font-size:0.75rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:1px;
    color:#4a5a6a;
    cursor:pointer;
    border-bottom:2px solid transparent;
}
.detail-tab.active-tab { color:#10b981; border-bottom-color:#10b981; }
.trailer-embed {
    position:relative; width:100%; max-width:640px;
    aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:#000;
}
.trailer-embed iframe { width:100%; height:100%; border:none; }
.comment-form { display:flex; gap:10px; margin-bottom:18px; flex-wrap:wrap; }
.comment-form textarea {
    flex:1;
    min-width:220px;
    padding:12px 16px;
    background:#0d0d16;
    border:1px solid #1a1a26;
    border-radius:10px;
    color:#c8d0d8;
    font-family:'Inter', sans-serif;
    font-size:0.75rem;
    resize:vertical;
}
.comment-form textarea:focus { border-color:#10b981; outline:none; }
.comment-form button {
    background:#10b981;
    color:#0a0a0f;
    border:none;
    border-radius:8px;
    padding:0 26px;
    font-weight:700;
    cursor:pointer;
    font-family:'Inter', sans-serif;
    font-size:0.7rem;
}
.comment-item {
    background:#0d0d16;
    border:1px solid #14141e;
    border-radius:10px;
    padding:12px 16px;
    margin-bottom:8px;
}
.comment-item .comment-head { display:flex; justify-content:space-between; margin-bottom:4px; }
.comment-item .comment-head strong { color:#10b981; font-size:0.75rem; }
.comment-item .comment-head span { color:#4a5a6a; font-size:0.6rem; }
.comment-item p { color:#c8d0d8; font-size:0.75rem; line-height:1.5; }

.detail-sidebar { flex:0 0 220px; }
.detail-sidebar h3 { color:#10b981; font-size:0.65rem; text-transform:uppercase; letter-spacing:1.5px; margin-bottom:12px; }
.detail-stats-grid { display:flex; gap:10px; }
.stat-box {
    flex:1;
    background:#0d0d16;
    border:1px solid #14141e;
    border-radius:10px;
    padding:14px;
    text-align:center;
}
.stat-box strong { display:block; font-size:1.4rem; margin-bottom:2px; }
.stat-box span { font-size:0.6rem; color:#6a7a8a; text-transform:uppercase; letter-spacing:0.5px; }
.stat-like strong { color:#10b981; }
.stat-dislike strong { color:#ff6a5a; }

@media (max-width:820px) {
    .detail-hero-content { flex-direction:column; align-items:center; text-align:center; }
    .detail-poster { flex:0 0 auto; width:180px; }
    .detail-poster img { height:260px; }
    .detail-badges, .detail-actions { justify-content:center; }
    .detail-body { flex-direction:column; }
    .detail-sidebar { flex:0 0 auto; }
}

.player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.player-overlay.active { display: flex; }
.player-box { width:100%; height:100%; position:relative; background:#000; }
.player-box iframe { width:100%; height:100%; border:none; display:block; }
.close-btn {
    position: fixed;
    top: 16px;
    right: 24px;
    font-size: 28px;
    color: #6a7a8a;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.6;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.05);
    font-family: Arial, sans-serif;
}
.close-btn:hover { opacity:1; transform:rotate(90deg); background:rgba(255,255,255,0.05); }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ===== MODAL D'ÉDITION ===== */
.edit-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.edit-modal.active { display: flex; animation: modalBgFadeIn 0.25s ease; }
.edit-modal .modal-box {
    background: #0d0d16;
    border: 1px solid rgba(16, 185, 129,0.15);
    border-radius: 16px;
    padding: 30px 34px;
    max-width: 480px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: modalBoxPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalBgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalBoxPopIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.edit-modal .modal-box h2 {
    color: #10b981;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-weight: 700;
}
.edit-modal .modal-box input, .edit-modal .modal-box textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin: 6px 0;
    background: #0a0a12;
    border: 1px solid #1a1a26;
    border-radius: 8px;
    color: #c8d0d8;
    font-size: 0.8rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: border 0.3s;
}
.edit-modal .modal-box input:focus, .edit-modal .modal-box textarea:focus { border-color: #10b981; }
.edit-modal .modal-box .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.edit-modal .modal-box .modal-actions button {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.edit-modal .modal-box .modal-actions .btn-save {
    background: #10b981;
    color: #0a0a0f;
}
.edit-modal .modal-box .modal-actions .btn-save:hover {
    box-shadow: 0 4px 20px rgba(16, 185, 129,0.2);
    transform: translateY(-2px);
}
.edit-modal .modal-box .modal-actions .btn-cancel {
    background: #1a1a26;
    color: #6a7a8a;
}
.edit-modal .modal-box .modal-actions .btn-cancel:hover { background: #2a2a3a; transform: translateY(-2px); }

/* ===== NOTIFICATIONS (remplace alert/confirm) ===== */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 320px;
}
.toast {
    background: #0d0d16;
    border: 1px solid #1a1a26;
    border-left: 3px solid #4a9aea;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #c8d0d8;
    white-space: pre-line;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: #10b981; }
.toast-error { border-left-color: #ff6a5a; }
.toast-warning { border-left-color: #e8b800; }
.toast-info { border-left-color: #4a9aea; }

.confirm-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 20001;
    display: none;
    align-items: center;
    justify-content: center;
}
.confirm-modal.active { display: flex; animation: modalBgFadeIn 0.2s ease; }
.confirm-modal .confirm-box {
    background: #0d0d16;
    border: 1px solid rgba(16, 185, 129,0.15);
    border-radius: 16px;
    padding: 26px 30px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: fadeUp 0.25s ease forwards;
}
.confirm-modal .confirm-box p {
    color: #c8d0d8;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 18px;
    white-space: pre-line;
}
.confirm-modal .confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.confirm-modal .confirm-actions button {
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}
.confirm-modal .btn-confirm-yes { background: #10b981; color: #0a0a0f; }
.confirm-modal .btn-confirm-yes:hover { box-shadow: 0 4px 20px rgba(16, 185, 129,0.2); transform: translateY(-2px); }
.confirm-modal .btn-confirm-no { background: #1a1a26; color: #6a7a8a; }
.confirm-modal .btn-confirm-no:hover { background: #2a2a3a; transform: translateY(-2px); }

/* ===== POP-UP DISCORD ===== */
.discord-popup {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    z-index: 20002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.discord-popup.active { display: flex; animation: modalBgFadeIn 0.25s ease; }
.discord-popup .discord-box {
    background: #0d0d16;
    border: 1px solid rgba(88, 101, 242, 0.25);
    border-radius: 16px;
    padding: 32px 30px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: fadeUp 0.3s ease forwards;
    position: relative;
}
.discord-popup .discord-close {
    position: absolute;
    top: 14px; right: 14px;
    color: #4a5a6a;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}
.discord-popup .discord-close:hover { color: #c8d0d8; }
.discord-popup .discord-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(88, 101, 242, 0.12);
    border: 1px solid rgba(88, 101, 242, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.discord-popup h3 {
    color: #e8eef4;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.discord-popup p {
    color: #8a9aaa;
    font-size: 0.78rem;
    line-height: 1.55;
    margin-bottom: 20px;
}
.discord-popup .discord-actions { display: flex; flex-direction: column; gap: 8px; }
.discord-popup .btn-discord-join {
    background: #5865f2;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}
.discord-popup .btn-discord-join:hover { background: #4752c4; transform: translateY(-2px); }
.discord-popup .btn-discord-later {
    background: transparent;
    color: #5a6a7a;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    padding: 4px;
    text-decoration: underline;
}
.discord-popup .btn-discord-later:hover { color: #8a9aaa; }

/* ===== DÉBLOCAGE PREMIUM PAR LA PUBLICITÉ ===== */
.debloque-box { max-width: 420px; }
.debloque-progression { margin-bottom: 18px; }
.debloque-progression-barre {
    width: 100%;
    height: 8px;
    background: #16161f;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #1a1a26;
}
.debloque-progression-remplie {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 20px;
    transition: width 0.4s ease;
}
.debloque-progression-texte {
    margin: 8px 0 0;
    color: #6a7a8a;
    font-size: 0.7rem;
    text-align: center;
}
.debloque-pub-conteneur {
    min-height: 90px;
    background: #08080d;
    border: 1px solid #1a1a26;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.debloque-minuteur {
    color: #e8b800;
    font-size: 0.72rem;
    text-align: center;
    margin-bottom: 14px;
}
#debloqueActionBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.demande-panel {
    background: linear-gradient(180deg, #0d0d16, #0b0b12);
    border: 1px solid #15151e;
    border-radius: 14px;
    padding: 22px 24px;
    max-width: 640px;
    margin-bottom: 18px;
}
.demande-step { display: flex; gap: 14px; align-items: flex-start; }
.demande-step-num {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(16, 185, 129,0.1);
    border: 1px solid rgba(16, 185, 129,0.25);
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.demande-step-body { flex: 1; min-width: 0; }
.demande-step-body h3 {
    color: #e8eef4;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.demande-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demande-row input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    background: #0a0a12;
    border: 1px solid #1a1a26;
    border-radius: 8px;
    color: #c8d0d8;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    outline: none;
    transition: border 0.2s;
}
.demande-row input:focus { border-color: #10b981; }
.demande-btn-primary, .demande-btn-secondary {
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.demande-btn-primary { background: #10b981; color: #0a0a0f; }
.demande-btn-primary:hover { box-shadow: 0 4px 20px rgba(16, 185, 129,0.2); }
.demande-btn-secondary { background: #1a1a26; color: #8a9aaa; }
.demande-btn-secondary:hover { color: #c8d0d8; background: #20202e; }
#demandeSearchResults:not(:empty) { margin-top: 10px; }
.demande-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: #3a4a5a;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.demande-divider::before, .demande-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #14141e;
}
.demande-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 640px;
}
.demande-filter {
    padding: 6px 14px;
    background: #0d0d16;
    border: 1px solid #14141e;
    border-radius: 20px;
    color: #6a7a8a;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.demande-filter:hover { color: #c8d0d8; border-color: #1a1a26; }
.demande-filter.active {
    background: rgba(16, 185, 129,0.1);
    border-color: rgba(16, 185, 129,0.3);
    color: #10b981;
}
.demande-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #0d0d16;
    border: 1px solid #14141e;
    border-left: 3px solid #22222e;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 6px;
    font-size: 0.75rem;
    color: #c8d0d8;
    transition: border-color 0.2s ease;
}
.demande-item.statut-en_attente { border-left-color: #e8b800; }
.demande-item.statut-ajoute { border-left-color: #10b981; }
.demande-item.statut-refuse { border-left-color: #ff6a5a; }
.demande-item select {
    background: #0a0a12;
    color: #c8d0d8;
    border: 1px solid #1a1a26;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
}
.demande-item .btn-del-demande {
    background: #1a0a0a;
    color: #ff6a5a;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 0.6rem;
    font-family: 'Inter', sans-serif;
}
.demande-item .btn-play-demande {
    background: #10b981;
    color: #0a0a0f;
    border: none;
    border-radius: 20px;
    padding: 3px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.6rem;
    font-family: 'Inter', sans-serif;
}
#demandeHint {
    font-size: 0.65rem;
    margin: -2px 0 8px;
}
#demandeHint .found {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(16, 185, 129,0.06);
    border: 1px solid rgba(16, 185, 129,0.15);
    border-radius: 6px;
    padding: 6px 10px;
    color: #10b981;
}
#demandeHint .found button {
    background: #10b981;
    color: #0a0a0f;
    border: none;
    border-radius: 20px;
    padding: 3px 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.55rem;
    cursor: pointer;
}

.stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: #0a0a12;
    border-radius: 10px;
    padding: 12px 20px;
    border: 1px solid #12121c;
    margin-top: 16px;
}
.stats-bar .stat-item {
    font-size: 0.7rem;
    color: #6a7a8a;
}
.stats-bar .stat-item strong {
    color: #10b981;
    font-size: 0.9rem;
}

/* ===== BANDE DÉFILANTE D'AFFICHES ===== */
.poster-marquee {
    width: 100%;
    overflow: hidden;
    background: #0d0d14;
    border-bottom: 1px solid #15151e;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.poster-marquee-track {
    display: flex;
    gap: 12px;
    width: max-content;
}
.poster-marquee-track.poster-marquee-ready {
    animation: posterMarqueeScroll 50s linear infinite;
}
.poster-marquee-track:hover { animation-play-state: paused; }
.poster-marquee-track img {
    height: 76px;
    width: auto;
    border-radius: 6px;
    border: 1px solid #1a1a26;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.poster-marquee-track img:hover { transform: scale(1.08); border-color: rgba(16, 185, 129, 0.3); }
@keyframes posterMarqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-1 * var(--marquee-distance, 50%))); }
}
@media (prefers-reduced-motion: reduce) {
    .poster-marquee-track { animation: none; }
}

/* ===== PAGES LÉGALES ===== */
.legal-content { background:#0d0d16; border:1px solid #1a1a26; border-radius:12px; padding:28px; margin-top:16px; max-width:760px; }
.legal-content h3 { color:#10b981; font-size:0.85rem; margin:20px 0 8px; text-transform:uppercase; letter-spacing:0.8px; }
.legal-content h3:first-child { margin-top:0; }
.legal-content p { color:#8a9aaa; font-size:0.75rem; line-height:1.7; margin-bottom:10px; }
.legal-content ul { color:#8a9aaa; font-size:0.75rem; line-height:1.7; margin:0 0 10px 18px; }
.legal-content li { margin-bottom:4px; }
.legal-content strong { color:#c8d0d8; }
.legal-content .maj { color:#4a5a6a; font-size:0.65rem; margin-top:20px; }

/* ===== FOOTER ===== */
.site-footer {
    width: 100%;
    background: #0a0a0f;
    border-top: 1px solid #15151e;
    margin-top: 48px;
    padding: 40px 24px 20px;
}
.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
}
.footer-col { flex: 1; min-width: 160px; max-width: 320px; }
.footer-col.footer-brand { max-width: 340px; }
.footer-logo { height: 36px; width: 36px; margin-bottom: 10px; }
.footer-col p {
    color: #5a6a7a;
    font-size: 0.7rem;
    line-height: 1.6;
}
.footer-col h4 {
    color: #8a9aaa;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
    font-weight: 700;
}
.footer-col a {
    display: block;
    color: #5a6a7a;
    font-size: 0.72rem;
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.18s ease;
    width: fit-content;
}
.footer-col a:hover { color: #10b981; }
.footer-bottom {
    max-width: 1440px;
    margin: 32px auto 0;
    padding-top: 16px;
    border-top: 1px solid #14141e;
    color: #3a4a5a;
    font-size: 0.62rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: space-between;
}

/* ===== RESPONSIVE ===== */
/* Palier tablette + mobile : header compact, nav en menu déroulant,
   catégories en barre repliable au lieu de la sidebar fixe. */
@media (max-width:1024px) {
    header { flex-direction:column; align-items:stretch; gap:6px; padding:10px 20px; }
    .header-top-row { gap:8px; }
    .search-header { max-width:100%; margin:2px 0; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    nav {
        display: none;
        justify-content: center;
        width: 100%;
        padding-top: 8px;
        border-top: 1px solid #14141e;
        margin-top: 4px;
    }
    nav.nav-open { display: flex; }
    .sidebar-toggle { cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
    .sidebar-toggle-arrow { display: inline; transition: transform 0.2s ease; }
    .sidebar-toggle.open .sidebar-toggle-arrow { transform: rotate(180deg); }
    #categoriesList { display: none; width: 100%; }
    #categoriesList.open { display: flex; }
    .sidebar-wrap { flex-direction:column; }
    .sidebar {
        position:relative; top:0; max-height:none;
        display:flex; flex-wrap:wrap; gap:4px 16px;
        padding:12px; border-radius:12px; margin-bottom:6px;
    }
    .sidebar h3 { margin:4px 0; }
    .sidebar ul { display:flex; flex-wrap:wrap; gap:2px 8px; }
    .sidebar ul li { padding:5px 8px; }
}
/* Palier mobile uniquement : on empile ce qui tenait encore côte à côte sur tablette. */
@media (max-width:680px) {
    .site-footer { padding:32px 16px 16px; margin-top:32px; }
    .footer-inner { gap:24px; }
    .footer-bottom { justify-content:flex-start; }
    .poster-marquee-track img { height:52px; }
    .hero { flex-direction:column; align-items:center; text-align:center; }
    .hero-info p { max-width:100%; }
    .hero-info .actions { justify-content:center; }
    .hero-poster { flex:0 0 auto; width:100%; max-width:200px; }
    .hero-poster img { height:180px; }
    .grid { grid-template-columns:repeat(auto-fill, minmax(130px,1fr)); }
    .edit-modal .modal-box { padding:24px 20px; }
}
@media (max-width:480px) {
    .grid { grid-template-columns:repeat(auto-fill, minmax(110px,1fr)); }
    .hero-info h2 { font-size:1.2rem; }
    .login-container { flex-direction:column; align-items:center; }
    .login-box { max-width:100%; }
    .add-panel input, .add-panel textarea { max-width:100%; }
    .close-btn { top:10px; right:12px; width:36px; height:36px; font-size:22px; }
    .site-logo { height:38px; width:38px; }
    .edit-modal .modal-box { padding:20px 16px; }
    .edit-modal .modal-box .modal-actions button { padding:8px 20px; font-size:0.65rem; }
}
/* Cibles tactiles : sur un écran tactile (pas de souris), on agrandit un peu
   les éléments cliquables pour qu'ils restent faciles à toucher, sans alourdir
   l'interface desktop (souris = précision, écran tactile = doigt). */
@media (pointer: coarse) {
    .card .info .actions button { padding:6px 14px; min-height:30px; }
    .sidebar ul li { min-height:36px; }
    nav a { padding:8px 4px; }
    .admin-table button, .admin-table select { min-height:32px; }
}
