/* ==========================================
   MODALE
   ========================================== */
.modal { 
    display: none; position: fixed; z-index: 100; left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0, 0, 0, 0); 
    align-items: center; justify-content: center; 
    backdrop-filter: blur(0px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}
.modal.modal-visible {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
@keyframes modalScale {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content { 
    background: linear-gradient(145deg, #1a2030, var(--surface));
    border: 1px solid var(--border-color); 
    border-radius: var(--radius-lg); 
    position: relative; padding: 24px; 
    width: 90%; max-width: 720px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.trailer-modal-content { max-width: 900px; padding: 20px; background: #000; border-color: #222; }
#trailerContainer iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; }
.close-btn { 
    position: absolute; top: 15px; right: 20px; 
    color: var(--text-muted); font-size: 28px; 
    cursor: pointer; transition: 0.2s; line-height: 1;
}
.close-btn:hover { color: var(--primary); }
.modal-body { display: flex; gap: 30px; flex-wrap: wrap; }
.modal-left { width: 180px; position: relative; flex-shrink: 0; }
#modalPoster { 
    width: 100%; border-radius: var(--radius-md); 
    box-shadow: var(--shadow-md); transition: transform 0.3s ease;
}
#modalPoster:hover { transform: scale(1.02); }
.badge { 
    position: absolute; top: 15px; left: 15px; 
    background: rgba(0,0,0,0.7); border: 1px solid var(--primary); 
    color: var(--primary); font-weight: 800; padding: 4px 10px; 
    border-radius: 20px; font-size: 0.75rem; text-transform: uppercase; 
    backdrop-filter: blur(4px); 
}
.modal-right { flex: 1; min-width: 250px; display: flex; flex-direction: column; }
#modalTitle { 
    font-family: var(--font-display);
    color: var(--text-main); font-size: 2rem; font-weight: 800; 
    margin-bottom: 5px; line-height: 1.1; 
}
.media-meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; font-weight: 500; }
.synopsis { font-size: 0.95rem; line-height: 1.7; color: var(--text-main); margin-bottom: 20px; max-height: 120px; overflow-y: auto; padding-right: 10px; }
.streaming-section { 
    background: var(--bg-color); padding: 12px 15px; 
    border-radius: var(--radius-md); margin-top: 15px; 
    border: 1px solid var(--border-color); text-align: center; 
}
.streaming-section h4 { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; letter-spacing: 0.5px; }
.streaming-logos { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.streaming-icon { width: 35px; height: 35px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.action-buttons { display: flex; gap: 12px; margin-bottom: 25px; flex-wrap: wrap; }
.action-btn { 
    background: var(--bg-color); color: var(--text-main); 
    border: 1px solid var(--border-color); padding: 10px 20px; 
    border-radius: 30px; cursor: pointer; font-weight: 600; 
    font-size: 0.9rem; transition: 0.2s; display: flex; 
    align-items: center; gap: 8px; font-family: var(--font-body);
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.active-watchlist { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.action-btn.active-top4 { background: rgba(252, 129, 129, 0.15); border-color: #FC8181; color: #FC8181; }
.rating-section { background: var(--bg-color); padding: 20px; border-radius: var(--radius-md); border: 1px solid var(--border-color); margin-top: auto; }
.rating-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.stars { font-size: 28px; color: #4B5563; cursor: pointer; display: flex; gap: 5px; margin: 10px 0 15px 0; }
.star-wrapper { position: relative; display: inline-block; font-size: 28px; }
.star-bg { color: #4B5563; display: block; }
.star-fill { 
    position: absolute; top: 0; left: 0; 
    overflow: hidden; white-space: nowrap;
    color: var(--star-color);
    width: 0%;
    transition: width 0.1s;
}
.star { transition: transform 0.15s ease; }
.star:hover { transform: scale(1.2); }
.star:hover, .star.active { color: var(--star-color); }
textarea { 
    width: 100%; background: var(--surface); color: var(--text-main); 
    border: 1px solid var(--border-color); padding: 12px; 
    border-radius: var(--radius-md); resize: vertical; margin-bottom: 15px; 
    outline: none; font-size: 0.95rem; font-family: var(--font-body);
}
textarea:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.save-btn { 
    background: var(--primary); color: #000; border: none; 
    padding: 12px 20px; border-radius: 30px; font-weight: 800; 
    cursor: pointer; width: 100%; transition: 0.3s; font-size: 1rem; 
    box-shadow: 0 4px 10px rgba(255, 132, 161, 0.2);
    font-family: var(--font-body);
}
.save-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
#ratingMessage { color: var(--primary); font-size: 0.9rem; margin-top: 10px; text-align: center; font-weight: 600; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    padding: 2.5rem 5% 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    margin-top: 3rem;
    background: var(--surface);
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; /* 3 colonnes : la 1ère est 2x plus large que les autres */
    gap: 3rem;
    margin-bottom: 2rem;
    align-items: start;
}

.footer-brand {
    /* Suppression des min-width et flex obsolètes avec le Grid */
    display: flex;
    flex-direction: column;

}
.footer-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}
.footer-tagline {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}
.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 160px;
}
.footer-links-title {
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.3rem;
}
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}
.footer-link:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}
.footer-tmdb { font-size: 0.75rem; color: var(--text-muted); opacity: 0.7; }
.footer-donate-text {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}
.footer-donate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #0070ba;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.footer-donate-btn:hover {
    background: #005ea6;
    transform: translateY(-1px);
    color: #fff;
}
.footer-highlight { color: var(--primary); font-weight: 700; }

/* Legal Modal */
.legal-modal-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}
.legal-modal-body { padding: 1rem 0.5rem; }
.legal-modal-body h2 {
    font-family: var(--font-display);
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}
.legal-text h3 {
    color: var(--text-main);
    font-size: 1rem;
    margin: 1.5rem 0 0.5rem;
}
.legal-text p, .legal-text li {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}
.legal-text ul { padding-left: 1.2rem; }
.legal-text a { color: var(--primary); text-decoration: none; }
.legal-text a:hover { text-decoration: underline; }
