/* ==========================================================================
   FICHE JEU - STYLE GLOBAL (INTÉGRAL & RESTAURÉ)
   ========================================================================== */

.fiche-jeu-container {
    width: 100%;
    background-color: #f4f4f4;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- 1. BANDEAU HEADER ET FOND FLOUTÉ --- */
.jeu-header {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    background-color: #1a1a1a;
}

.jeu-header-bg {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.5);
    transform: scale(1.05);
    z-index: 1;
}

.jeu-header-overlay {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: stretch;
    min-height: 280px;
    padding: 0;
}

.jeu-header-cover {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
}

.jeu-header-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jeu-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px 30px;
}

.jeu-header-top {
    width: 100%;
}

.jeu-titre {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #ffffff;
    width: 100%;
    line-height: 1.2;
}

.jeu-studios {
    font-size: 1.1rem;
    color: #76b900;
    font-weight: 600;
    margin-bottom: 15px;
}

.jeu-header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    gap: 15px;
    margin-top: 15px;
}

.jeu-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-genre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #76b900;
    color: #76b900;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    text-transform: uppercase;
    border-radius: 2px;
}

.btn-store-xbox {
    display: inline-block;
    background-color: #76b900;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 24px;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.btn-store-xbox:hover {
    background-color: #5c9300;
    color: #ffffff;
}

/* --- 2. BARRE D'ONGLETS --- */
.jeu-tabs-nav {
    background-color: #151515;
    width: 100%;
}

.jeu-tabs-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}

.jeu-tabs-nav li {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    border-bottom: 3px solid #76b900;
}

.jeu-tabs-nav .tab-item {
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 2px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.jeu-tabs-nav .tab-label {
    white-space: nowrap;
    overflow: visible;
}

.jeu-tabs-nav .tab-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.jeu-tabs-nav li:not(.disabled):not(.active):hover .tab-item {
    background-color: #252525;
}

.jeu-tabs-nav li.active {
    background-color: #76b900;
    border-bottom: 3px solid #76b900;
}

.jeu-tabs-nav li.active .tab-item {
    color: #ffffff;
}

.jeu-tabs-nav li.disabled {
    border-bottom: 3px solid transparent;
    background-color: #151515;
}

.jeu-tabs-nav li.disabled .tab-item {
    color: #444444;
    cursor: default;
}

.jeu-tabs-nav li.disabled .tab-icon {
    filter: brightness(0) invert(0.3);
}

/* --- 3. LAYOUT CORPS DE PAGE & SIDEBAR --- */
.jeu-body-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.jeu-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: #202020;
    color: #ffffff;
    padding: 20px;
}

.spec-title {
    color: #76b900;
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #333333;
    padding-bottom: 8px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.spec-row .label {
    color: #aaaaaa;
}

.spec-row .value {
    font-weight: 600;
}

.pegi-icon {
    height: 32px;
    width: auto;
    display: block;
}

.spec-section-title {
    font-size: 0.75rem;
    color: #76b900;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.spec-features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.badge-feature {
    background-color: #333333;
    color: #dddddd;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 2px;
}

.spec-gamepass-banner {
    background-color: #0e7a3d;
    color: #ffffff;
    padding: 12px;
    text-align: center;
    border-radius: 3px;
    margin-top: 15px;
}

.gp-text {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.gp-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 28px;
    display: block;
    margin: 0 auto;
}

/* CARDS SLIDER CONTAINER */
.jeu-main-content {
    flex: 1;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    overflow: hidden;
    padding: 0;
}

.tabs-slider-track {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    width: 100% !important;
    /* AJOUT DE LA TRANSITION FLUIDE DE TRANSLATION */
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform;
}

.tab-card {
    display: block !important;
    width: 100% !important;
    flex: 0 0 100% !important; /* Chaque carte prend 100% de la largeur du conteneur parent */
    height: auto !important;
    min-height: 0 !important;
    padding: 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box; /* Sécurité pour inclure les paddings dans les 100% */
}

.section-title {
    color: #76b900;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    border-left: none !important;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 100px;
    height: 24px;
    background-color: #76b900;
    margin-right: 12px;
    flex-shrink: 0;
}

.synopsis-text {
    color: #444444;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: justify;
}

/* ==========================================================================
   ONGLET MÉDIAS & GALERIE
   ========================================================================== */

.medias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    overflow: hidden;
    background-color: #111111;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.media-item:hover {
    transform: translateY(-3px);
    border-color: #76b900;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.media-video .play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.media-video:hover .play-overlay {
    background: rgba(0, 0, 0, 0.1);
}

.play-icon {
    width: 44px;
    height: 44px;
    background-color: rgba(118, 185, 0, 0.9);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    padding-left: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.media-video:hover .play-icon {
    transform: scale(1.1);
    background-color: #76b900;
}

.no-data {
    color: #777777;
    font-style: italic;
    margin-top: 10px;
}

.video-responsive-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0px;
}

.video-responsive-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
    margin-bottom: 0px;
}

.gameplay-single-container {
    width: 100%;
    margin-bottom: 0px;
}

.gameplay-multi-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.gameplay-thumbs-sidebar {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.gameplay-thumb-btn {
    position: relative;
    width: 100%;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
    background: #000;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.gameplay-thumb-btn img {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.gameplay-thumb-btn .play-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.6);
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gameplay-thumb-btn:hover img,
.gameplay-thumb-btn.active img {
    opacity: 1;
}

.gameplay-thumb-btn.active {
    border-color: #107c10;
}

.gameplay-main-player {
    flex-grow: 1;
}

.gameplay-video-meta {
    margin: 0px;
    padding: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    background-color:rgba(118, 185, 0, 1);
    border-radius: 0 0 10px 10px;
}

/* ==========================================================================
   ONGLET AVIS
   ========================================================================== */

.avis-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1f1f1f 0%, #141414 100%);
    border-left: 4px solid #76b900;
    padding: 18px 24px;
    border-radius: 4px;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.avis-score-block {
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-badge-empty {
    width: 52px; height: 52px;
    background-color: #2a2a2a;
    border: 2px dashed #444444;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 800; color: #777777;
    flex-shrink: 0;
}

.score-badge {
    width: 52px; height: 52px;
    background-color: #76b900;
    color: #ffffff;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 800;
    flex-shrink: 0;
}

.score-info {
    display: flex;
    flex-direction: column;
}

.score-status {
    font-size: 1.05rem; font-weight: 700; color: #ffffff; line-height: 1.2;
}

.score-sub {
    font-size: 0.8rem; color: #aaaaaa; margin-top: 3px;
}

.btn-ajouter-avis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #76b900;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 8px rgba(118, 185, 0, 0.3);
}

.btn-ajouter-avis:hover {
    background-color: #659e00;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(118, 185, 0, 0.45);
}

.avis-empty-box {
    text-align: center;
    padding: 35px 20px;
    background-color: #f8f9fa;
    border: 2px dashed #e0e0e0;
    border-radius: 4px;
}

.avis-empty-box p {
    margin: 0; color: #666666; font-size: 0.9rem; font-style: italic;
}

.reviews-section {
    margin-top: 30px;
}

.review-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card:hover {
    background: #252525;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #107c10;
}

.review-meta h3 {
    margin: 0; color: #fff; font-size: 1.1rem;
}

.star-rating {
    color: #ffc107;
    margin-top: 4px;
}

.review-content {
    color: #ccc; font-size: 0.95rem; line-height: 1.6;
}

.review-footer {
    display: flex; gap: 20px;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.btn-vote {
    background: none; border: none;
    color: #888; cursor: pointer;
    font-size: 0.9rem; display: flex; align-items: center; gap: 8px;
    transition: color 0.2s;
}

.btn-vote:hover {
    color: #107c10;
}

/* ==========================================================================
   RESPONSIVE STACK (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .jeu-body-layout {
        flex-direction: column;
    }
    .jeu-sidebar {
        width: 100%;
        box-sizing: border-box;
    }
    .jeu-header-overlay {
        flex-direction: column;
    }
    .jeu-header-cover {
        width: 100%;
        height: 200px;
        min-width: 100%;
    }
    .tabs-slider-track {
        display: block !important;
        transform: none !important;
        transition: none !important;
        width: 100% !important;
    }
    
    /* Par défaut sur mobile, on masque toutes les cartes */
    .tab-card {
        display: none !important;
        width: 100% !important;
        flex: none !important;
        padding: 20px 15px;
        border-bottom: 1px solid #e0e0e0;
    }

    /* On n'affiche que la carte active gérée par ton JS */
    .tab-card.active {
        display: block !important;
    }

    .jeu-tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    .jeu-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    .jeu-tabs-nav ul {
        display: inline-flex;
    }
    .medias-grid {
        grid-template-columns: 1fr;
    }
}