/* Conteneur principal des reviews */
.steam-reviews {
    font-family: Arial, sans-serif;
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* Colonne gauche : Reviews */
.steam-reviews-left {
    flex: 7; /* 70% */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Colonne droite : Informations sur le jeu (sticky) */
.steam-reviews-right {
    flex: 3; /* 30% */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: sticky; /* Sticky position */
    top: 130px; /* Distance depuis le haut */
}

/* Image du jeu */
.steam-reviews-right img {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
}

/* Bouton d'achat */
.steam-reviews-right .buy-button {
    display: inline-block;
    background-color: #0078d7;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
    width: 100%;
}

.steam-reviews-right .buy-button:hover {
    background-color: #0056a3;
}

/* Cercle pour la note moyenne */
.average-score {
    text-align: center;
    margin: 0 auto;
}

.average-score .circle {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(
        var(--circle-color) calc(var(--percentage) * 1%), 
        #ddd calc(var(--percentage) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.average-score .circle::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 80%;
    background-color: #fff;
    border-radius: 50%;
    z-index: 1;
}

.average-score .circle span {
    position: absolute;
    z-index: 2;
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    cursor: pointer;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 15px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.accordion-header i {
    font-size: 1.2em; /* Taille de l'icône */
    transition: transform 0.3s ease; /* Animation fluide */
}

.accordion-header:hover {
    background-color: #e0e0e0;
}

.accordion-header:active {
    background-color: #d6d6d6;
}

/* Carte individuelle d'une review */
.steam-review {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.steam-review:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Auteur (pseudo) */
.steam-review .review-author {
    font-size: 1em;
    font-weight: bold;
    color: #0078d7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.steam-review .review-author:hover {
    color: #0056a3;
    text-decoration: underline;
}

/* Contenu de la review (texte tronqué) */
.steam-review .review-content {
    position: relative;
    max-height: 6em; /* Environ 200 mots */
    overflow: hidden;
    word-break: break-word;
    line-height: 1.5;
    text-overflow: ellipsis;
    transition: max-height 0.3s ease-in-out;
}

/* État actif pour afficher le contenu complet */
.steam-review .review-content.show-more {
    max-height: none;
}

/* Bouton Read More */
.steam-review .read-more-button {
    display: inline-block;
    color: #0078d7;
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.steam-review .read-more-button:hover {
    color: #0056a3;
}

/* Icônes de vote */
.steam-review .review-vote {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.steam-review .review-vote .fa-thumbs-up {
    color: #4caf50; /* Vert */
    font-size: 3em;
}

.steam-review .review-vote .fa-thumbs-down {
    color: #f44336; /* Rouge */
    font-size: 3em;
}

/* Bouton sticky pour mobile */
.mobile-sticky-button {
    display: none; /* Par défaut, caché sur tous les écrans */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 90%;
    max-width: 300px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sticky-buy-button {
    display: block;
    background-color: #0078d7;
    color: #fff;
    padding: 15px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.sticky-buy-button:hover {
    background-color: #0056a3;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Animation d'apparition des pouces */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .steam-reviews {
        flex-direction: column-reverse; /* Colonne droite avant la gauche */
    }

    .steam-reviews-right {
        position: relative; /* Supprime sticky en mobile */
        width: 100%;
        top: 0px;
        text-align: center;
    }

    .average-score .circle {
        width: 100px;
        height: 100px;
    }

    .average-score .circle span {
        font-size: 1.2em;
    }

    .steam-review .review-vote .fa-thumbs-up,
    .steam-review .review-vote .fa-thumbs-down {
        font-size: 2.5em;
    }

    .mobile-sticky-button {
        display: block;
    }

    .accordion-header {
        font-size: 16px;
    }
}
