/* ==========================================
   RESPONSIVE MOBILE â€” ajoutÃ© pour l'adaptation
   ========================================== */

/* ---- Tablette (â‰¤ 768px) ---- */
@media (max-width: 768px) {

    /* Header : masque les liens nav, affiche menu hamburger */
    header {
        padding: 0.85rem 4%;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .nav-left {
        gap: 0;
        flex: 1;
        min-width: 0;
    }

    /* Navigation links cachÃ©es sur mobile â€” remplacÃ©es par la bottom nav */
    .nav-links {
        display: none;
    }

    /* Barre de recherche rÃ©duite */
    .search-container input {
        width: 150px;
        font-size: 0.85rem;
        padding: 0.5rem 0.8rem 0.5rem 2.2rem;
    }
    .search-container input:focus {
        width: 180px;
    }

    /* Masquer le nom d'utilisateur dans le header */
    .header-username {
        display: none;
    }

    /* Hero banner plus compact */
    .hero-banner {
        height: 420px;
    }
    .hero-content {
        padding: 2rem 4%;
    }
    .hero-synopsis {
        -webkit-line-clamp: 2;
        font-size: 0.88rem;
    }

    /* Main padding rÃ©duit */
    main {
        padding: 2rem 4%;
    }

    /* Grille : 2 colonnes sur tablette */
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.2rem;
    }
    .media-poster {
        height: 210px;
    }

    /* Modal : empilÃ© verticalement */
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-body {
        flex-direction: column;
        gap: 20px;
    }
    .modal-left {
        width: 100%;
        display: flex;
        gap: 16px;
        align-items: flex-start;
    }
    #modalPoster {
        width: 120px;
        flex-shrink: 0;
    }
    .modal-right {
        min-width: 0;
    }
    #modalTitle {
        font-size: 1.5rem;
    }

    /* Profile */
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    /* Amis : boutons en colonne si peu de place */
    .friend-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Footer */
    .site-footer {
        padding: 2rem 4% 6rem; /* espace pour la bottom nav */
    }
    .footer-top {
        grid-template-columns: 1fr; /* Repasse en 1 seule colonne */
        gap: 2rem;
    }

    /* Section header filtres en colonne */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    .filters-container {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
}

/* ---- Mobile (â‰¤ 480px) ---- */
@media (max-width: 480px) {

    header {
        padding: 0.75rem 3.5%;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Recherche : icÃ´ne seulement, s'Ã©tend au focus */
    .search-container input {
        width: 36px;
        padding: 0.5rem 0.5rem 0.5rem 2rem;
        background: transparent;
        border-color: transparent;
        color: transparent;
        transition: all 0.3s ease;
    }
    .search-container input:focus,
    .search-container input:not(:placeholder-shown) {
        width: 160px;
        padding: 0.5rem 0.8rem 0.5rem 2.2rem;
        background: var(--bg-color);
        border-color: var(--primary);
        color: var(--text-main);
    }
    .search-container input::placeholder {
        color: transparent;
    }
    .search-container input:focus::placeholder {
        color: var(--text-muted);
    }

    /* Hero encore plus compact */
    .hero-banner {
        height: 340px;
    }
    .hero-content {
        padding: 1.5rem 3.5%;
    }
    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem);
    }
    .hero-synopsis {
        display: none; /* masquÃ© sur trÃ¨s petits Ã©crans */
    }
    .hero-meta {
        font-size: 0.75rem;
        margin-bottom: 16px;
    }
    .hero-btn {
        padding: 10px 20px;
        font-size: 0.88rem;
    }

    /* Main */
    main {
        padding: 1.5rem 3.5%;
    }

    /* Grille : 2 colonnes fixes sur mobile */
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }
    .media-poster {
        height: 190px;
    }
    .media-info {
        padding: 0.6rem;
    }
    .media-title {
        font-size: 0.78rem;
    }

    /* CatÃ©gories scroll */
    .cat-card {
        flex: 0 0 130px;
        min-width: 130px;
    }
    .cat-card .media-poster {
        height: 190px;
    }

    /* Modal plein Ã©cran sur mobile */
    .modal-content {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        padding: 16px;
        margin: 0;
        overflow-y: auto;
    }
    .modal {
        align-items: flex-end;
    }
    .modal-content {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        min-height: auto;
        max-height: 92dvh;
        overflow-y: auto;
    }
    .modal-left {
        flex-direction: row;
        gap: 14px;
    }
    #modalPoster {
        width: 100px;
    }
    .modal-left .streaming-section {
        display: none; /* sera visible dans la partie droite */
    }
    #modalTitle {
        font-size: 1.25rem;
    }
    .media-meta {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    .synopsis {
        max-height: 80px;
        font-size: 0.88rem;
    }
    .action-buttons {
        gap: 8px;
    }
    .action-btn {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
    .stars {
        font-size: 24px;
        gap: 4px;
    }
    .close-btn {
        top: 12px;
        right: 14px;
        font-size: 24px;
    }

    /* Auth */
    .auth-wall {
        padding: 1rem;
        align-items: flex-end;
    }
    .auth-container {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-width: 100%;
    }

    /* Profile */
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.2rem;
    }
    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 0;
    }
    .profile-display-name {
        font-size: 1.4rem;
    }
    .profile-stats {
        justify-content: center;
    }

    /* Amis */
    .friends-search-row {
        flex-direction: column;
    }
    .friends-search-row button {
        width: 100%;
        justify-content: center;
    }
    .friend-item {
        flex-wrap: wrap;
        gap: 10px;
    }
    .friend-actions {
        width: 100%;
        justify-content: flex-end;
    }

    /* Suggestion */
    .suggestion-hero-title {
        font-size: 1.8rem;
    }
    .suggestion-form {
        padding: 1.4rem;
    }
    .suggestion-submit-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    /* h2 */
    h2 {
        font-size: 1.15rem;
    }

    /* Footer */
    .site-footer {
        padding: 1.5rem 3.5% 7rem;
    }

    /* Trailer modal */
    .trailer-modal-content {
        padding: 12px;
    }
}

/* ==========================================
   BOTTOM NAVIGATION BAR (mobile uniquement)
   ========================================== */
.bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 60;
        background: rgba(22, 27, 34, 0.95);
        border-top: 1px solid var(--border-color);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 6px 0 env(safe-area-inset-bottom, 6px);
        justify-content: space-around;
        align-items: center;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 6px 12px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.3px;
        text-transform: uppercase;
        border: none;
        background: none;
        cursor: pointer;
        font-family: var(--font-body);
        transition: color 0.2s;
        position: relative;
        min-width: 56px;
    }

    .bottom-nav-item i {
        font-size: 1.2rem;
        transition: transform 0.2s ease;
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    .bottom-nav-item.active i {
        transform: scale(1.15);
    }

    .bottom-nav-item:hover {
        color: var(--primary);
    }

    /* Badge notifications dans la bottom nav */
    .bottom-nav-item .notif-badge {
        position: absolute;
        top: 2px;
        right: 6px;
        margin: 0;
    }

    /* Bouton Suggestion spÃ©cial dans la bottom nav */
    .bottom-nav-item.nav-magic {
        background: linear-gradient(135deg, var(--primary), #c678dd);
        color: #000;
        border-radius: 50%;
        width: 52px;
        height: 52px;
        padding: 0;
        margin-top: -14px;
        box-shadow: 0 4px 18px rgba(255, 132, 161, 0.45);
        gap: 0;
        min-width: unset;
    }
    .bottom-nav-item.nav-magic span {
        display: none;
    }
    .bottom-nav-item.nav-magic i {
        font-size: 1.3rem;
    }
}

/* ==========================================
   FOOTER BIOGRAPHIE â€” nouveau contenu
   ========================================== */
.footer-brand {
    flex: 2;
    min-width: 260px;
    max-width: 420px;
}

.footer-bio {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-bio p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-bio strong {
    font-weight: 700;
}

.footer-stats-row {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-color);
}

.footer-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-stat-num {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.footer-stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    font-weight: 600;
}

.footer-donate-thanks {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 0.75;
}

/* IcÃ´nes dans les liens nav du footer */
.footer-link i {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-right: 2px;
}

/* Adaptation mobile footer bio */
@media (max-width: 768px) {
    .footer-brand {
        max-width: 100%;
    }
    .footer-stats-row {
        gap: 1.2rem;
    }
}

@media (max-width: 480px) {
    .footer-bio p {
        font-size: 0.8rem;
    }
    .footer-stats-row {
        gap: 1rem;
    }
    .footer-stat-num {
        font-size: 1.1rem;
    }
}

/* ==========================================
   SUGGESTION â€” chips multi-sÃ©lection visuelles
   ========================================== */
.suggestion-chips-multi .chip.active {
    /* Style identique mais on peut en avoir plusieurs d'actifs */
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* ==========================================
   MODAL DISCORD
   ========================================== */
.discord-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: discordOverlayIn 0.3s ease forwards;
}
.discord-modal-overlay.hidden { display: none !important; }

@keyframes discordOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes discordOverlayOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.discord-modal {
    position: relative;
    background: #1e2030;
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 24px;
    padding: 3rem 2.5rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 60px rgba(88, 101, 242, 0.2), 0 20px 60px rgba(0,0,0,0.7);
    animation: discordModalIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    overflow: hidden;
}

@keyframes discordModalIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Lueur de fond */
.discord-modal-glow {
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Bouton fermer */
.discord-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    z-index: 2;
}
.discord-modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text-main); }

/* IcÃ´ne Discord */
.discord-modal-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px; height: 80px;
    border-radius: 22px;
    background: linear-gradient(135deg, #5865F2, #4752c4);
    font-size: 2.4rem;
    color: #fff;
    margin-bottom: 1.4rem;
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
    animation: discordIconPulse 3s ease-in-out infinite;
}
@keyframes discordIconPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45); }
    50%       { box-shadow: 0 8px 36px rgba(88, 101, 242, 0.7); }
}

/* Textes */
.discord-modal-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.7rem;
    line-height: 1.1;
}

.discord-modal-sub {
    position: relative;
    z-index: 1;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.6rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Perks */
.discord-modal-perks {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 2rem;
    background: rgba(88, 101, 242, 0.07);
    border: 1px solid rgba(88, 101, 242, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem 1.4rem;
}

.discord-perk {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 500;
    text-align: left;
}
.discord-perk i {
    color: #5865F2;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Bouton rejoindre */
.discord-join-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #5865F2, #4752c4);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
    margin-bottom: 10px;
}
.discord-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(88, 101, 242, 0.6);
    background: linear-gradient(135deg, #6672f5, #5865F2);
}
.discord-join-btn i { font-size: 1.2rem; }

/* Bouton plus tard */
.discord-later-btn {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}
.discord-later-btn:hover { color: var(--text-main); }

/* Responsive */
@media (max-width: 480px) {
    .discord-modal { padding: 2.5rem 1.5rem 2rem; border-radius: 20px; }
    .discord-modal-title { font-size: 1.4rem; }
}

/* ==========================================
   AUTOCOMPLETE RECHERCHE
   ========================================== */
.search-container { position: relative; }

.search-autocomplete {
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
    animation: dropdownFade 0.15s ease;
    max-height: 420px;
    overflow-y: auto;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--primary-light); }
.autocomplete-poster {
    width: 36px; height: 54px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--bg-color);
}
.autocomplete-info { flex: 1; min-width: 0; }
.autocomplete-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autocomplete-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.autocomplete-type {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
}

/* ==========================================
   MODAL ENRICHIE â€” Ã‰lÃ©ments nouveaux
   ========================================== */
.modal-collection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(198, 120, 221, 0.12);
    border: 1px solid rgba(198, 120, 221, 0.3);
    color: #c678dd;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.modal-tmdb-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}

.modal-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Cast */
.modal-cast-section { margin: 12px 0; }
.modal-cast-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.cast-card {
    flex: 0 0 72px;
    text-align: center;
    cursor: default;
}
.cast-photo {
    width: 64px; height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    margin-bottom: 5px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.cast-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
    word-break: break-word;
}
.cast-role {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Trailer button */
.action-btn-trailer {
    background: linear-gradient(135deg, #FF0000, #cc0000);
    color: #fff;
    border-color: transparent;
}
.action-btn-trailer:hover { background: linear-gradient(135deg, #cc0000, #990000); color: #fff; border-color: transparent; }

/* Similar films */
.modal-similar-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}
.modal-similar-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.similar-card {
    flex: 0 0 80px;
    cursor: pointer;
    transition: transform 0.2s;
}
.similar-card:hover { transform: scale(1.06); }
.similar-poster {
    width: 80px; height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-color);
    display: block;
}
.similar-title {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 80px;
}

/* ==========================================
   ROULETTE FAB + OVERLAY
   ========================================== */
.roulette-fab {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: linear-gradient(135deg, var(--primary), #c678dd);
    color: #000;
    border: none;
    border-radius: 50px;
    padding: 14px 20px;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 24px rgba(255, 132, 161, 0.45);
    z-index: 90;
    transition: all 0.25s ease;
    animation: fabPulse 3s ease-in-out infinite;
}
.roulette-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 32px rgba(255,132,161,0.6); }
.roulette-fab i { font-size: 1.1rem; }
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 6px 24px rgba(255,132,161,0.45); }
    50%       { box-shadow: 0 6px 32px rgba(255,132,161,0.7); }
}
@media (max-width: 768px) {
    .roulette-fab { bottom: 80px; right: 16px; }
    .roulette-fab-label { display: none; }
    .roulette-fab { border-radius: 50%; padding: 16px; }
}

.roulette-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    animation: discordOverlayIn 0.25s ease;
}
.roulette-overlay.hidden { display: none !important; }

.roulette-box {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: discordModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.roulette-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 10px;
}
.roulette-title i { color: var(--primary); }

.roulette-slots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    min-height: 120px;
    align-items: center;
}
.roulette-slot {
    width: 80px; height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    animation: slotSpin 0.15s ease infinite;
}
.roulette-slot img { width: 100%; height: 100%; object-fit: cover; }
@keyframes slotSpin {
    0%   { opacity: 0.6; transform: translateY(-4px); }
    100% { opacity: 1;   transform: translateY(4px); }
}

.roulette-result {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    animation: cardFadeUp 0.4s ease forwards;
    opacity: 0;
}
.roulette-result-poster {
    width: 100px; height: 150px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(255,132,161,0.3);
}
.roulette-result-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}
.roulette-result-meta { font-size: 0.85rem; color: var(--text-muted); }

/* ==========================================
   PROFIL STATS VISUELLES
   ========================================== */
.profile-visual-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    animation: cardFadeUp 0.6s ease forwards;
}

.stats-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stats-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.stats-card h4::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

/* Histogramme */
.stats-histogram {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    padding-top: 20px;
    border-bottom: 1px solid var(--border-color);
}

.hist-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
}

.hist-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary-light), var(--primary));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.hist-bar:hover { filter: brightness(1.2); }

.hist-bar::after {
    content: attr(data-count);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

.hist-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-main);
}
.hist-label i { color: #F6AD55; font-size: 0.6rem; margin-left: 2px; }

/* Barres de genres */
.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}
.stat-bar-percent { color: var(--text-muted); }

.stat-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c678dd, var(--primary));
    border-radius: 10px;
    width: 0;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================
   PAGE EXPLORER
   ========================================== */
.explore-header {
    margin-bottom: 2rem;
}
.explore-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.explore-header p {
    color: var(--text-muted);
}

.explore-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .explore-layout { grid-template-columns: 1fr; }
}

.explore-filters {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.explore-filter-group {
    margin-bottom: 1.5rem;
}

.explore-filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.explore-filter-group select,
.explore-filter-group input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.explore-filter-group select:focus,
.explore-filter-group input[type="number"]:focus {
    border-color: var(--primary);
}

.explore-filter-group input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.explore-range-val {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}
.explore-range-val i { color: #F6AD55; }

.explore-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #c678dd);
    color: #000;
    font-weight: 800;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s, filter 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.explore-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.explore-load-more {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
}
.explore-load-more .explore-btn {
    width: auto;
    padding: 12px 32px;
    display: inline-flex;
}

/* ==========================================
   STICKY FOOTER
   ========================================== */
#app:not(.hidden) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#app > main {
    flex: 1;
}


/* ==========================================
   AMELIORATIONS PC (Desktop - min-width: 1024px)
   ========================================== */
@media (min-width: 1024px) {
    main {
        max-width: 1600px;
        padding: 3rem 5%;
    }

    /* Grille PC : colonnes fixes (pas 1fr) pour Ã©viter qu'une seule carte s'Ã©tire */
    .grid-container {
        grid-template-columns: repeat(auto-fill, 220px);
        gap: 2rem;
        justify-content: start;
    }

    /* Top4 / Coups de cÅ“ur : mÃªme contrainte */
    #top4Section .grid-container {
        grid-template-columns: repeat(auto-fill, 220px);
        justify-content: start;
    }

    .media-poster {
        height: 320px;
    }

    .hero-banner {
        height: 680px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .cat-card {
        flex: 0 0 210px;
        min-width: 210px;
    }

    .cat-card .media-poster {
        height: 310px;
    }

    /* Section header : plus d'espace entre titre et filtres */
    .section-header {
        margin-bottom: 2.5rem;
        padding-bottom: 1.2rem;
        gap: 1.5rem;
        align-items: center;
    }

    h2 {
        font-size: 1.6rem;
    }

    .filters-container {
        display: flex;
        gap: 10px;
        flex-shrink: 0;
    }
}


/* ==========================================
   NOTES PAGE — espacement entre Top4 et liste timeline (PC)
   ========================================== */
@media (min-width: 1024px) {
    #top4Section {
        margin-bottom: 3rem;
        padding-bottom: 2.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    #top4Section h2 {
        margin-bottom: 1.5rem;
    }

    /* Évite que les cartes top4 ne prennent plus de 220px */
    #top4Section .media-card {
        max-width: 220px;
    }

    /* Filtres de la watchlist / journal bien espacés */
    #mainSectionHeader.section-header {
        flex-wrap: nowrap;
        padding-bottom: 1.4rem;
        margin-bottom: 2rem;
    }
}


@media (min-width: 1024px) {
    /* Poster dans les sections top4 : taille fixe */
    #top4Section .media-poster {
        height: 310px;
        width: 220px;
    }
}


@media (max-width: 768px) { .bottom-nav-item.nav-magic { justify-content: center; } }


@media (max-width: 900px) { .explore-filters { position: relative !important; top: 0 !important; margin-bottom: 1rem; } }

