/* CSS DOCUMENT */

.half-star
{
    background: linear-gradient(90deg, var(--or) 50%, var(--gris) 50%);
    -webkit-background-clip: text;
    color: transparent;
    border : 1px sold var(--or);
}

#rating-summary 
{
    text-align: center;
    margin-bottom: 20px;
    border : 3px solid var(--gris_fonce);
    border-radius: 10px;
    width: 40%;
    height: 170px;
}

.avg-stars 
{
    font-size: 32px;
    color: var(--or);
}

.une_etoile 
{
    font-size: 20px;
    color: var(--or);
}
.avg-number {
    font-size: 20px;
    margin-top: 5px;
    color: #444;
}

.rating-distribution 
{
    max-width: 300px;
    margin: 0 auto;
    font-size: 18px;
}

.rating-line 
{
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.rating-label 
{
    font-size: 20px;
}

.rating-count 
{
    color: #555;
    font-weight: bold;
}

.rating-graph {
    width: 100%;
    max-width: 380px;
    margin: 5px auto;
    font-family: Arial, sans-serif;
}

.rating-graph-row 
{
    display: flex;
    align-items: center;
    flex-wrap: nowrap;        /* Empêche les retours à la ligne */
    gap: 7px;                /* Espacement propre entre les éléments */
    margin-bottom: 5px;
}

.rating-graph-stars {
    width: 110px;
    font-size: 20px;
    color: var(--or);
}

.rating-graph-bar 
{
    flex-grow: 1;             /* La barre prend toute la place disponible */
    height: 10px;
    background: #e6e6e6;
    border-radius: 5px;
    overflow: hidden;
    max-width: 300px;         /* Empêche la barre de se casser */
    flex-wrap: nowrap;        /* Empêche les retours à la ligne */
}

.rating-graph-bar-fill 
{
    height: 100%;
    background: linear-gradient(90deg, #ffcc00, #ff9900);
    border-radius: 5px;
}

.rating-graph-count 
{
    width: 40px;
    text-align: center;
    font-size: 16px;
    color: #444;
    white-space: nowrap;
    flex-wrap: nowrap;    
    border: 1px solid var(--gris_fonce);
    border-radius: 5px;
}

#stats_commentaires
{
    display: flex;
    justify-content: center;
    align-items: space-between;
    gap: 30px;
}

#stats_par_etoile
{
    border : 3px solid var(--gris_fonce);
    border-radius: 10px;
    width: 40%;
    height: 170px;
}

#nb_commentaires
{
    color: var(--noir);
    font-size: 15px;
    font-weight: 600;
}

.parent_btn_comment 
{
    display: flex;
    justify-content: center;
}

#btn_comment
{
    display: inline-block;     
    padding: 10px;
    color: var(--noir);
    background-color: var(--jaune); 
    border: 2px solid var(--gris_fonce);
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin: 0 auto;
    vertical-align: middle;          
}

.gros_chiffre
{
    font-size: 70px;
    font-weight: bold;
    vertical-align: middle;
}

#liste_commentaires
{
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.un_commentaire
{
    display: flex;
    border: 1px solid var(--gris_fonce);
    border-radius: 5px;
    height: 150px;
}

.un_commentaire_gauche
{
    width: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid var(--gris_fonce);
}

.pseudo
{
    font-size: 20px;
    font-weight: bold;
}

.un_commentaire_droite
{
    padding-left: 5px;
}

textarea.le_commentaire
{
    font-size: 15px;
    border: none;
    font-weight: unset;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
    outline: none;
    padding: 0px;
    resize: none;
    width: 100%;
    overflow: hidden;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    -ms-box-shadow: none;
    -o-box-shadow: none;
    box-shadow: none;
}

#page_saisie_commentaire
{
    display: flex;
    justify-content: center;
    align-items: center;  
    flex-direction : column;
}

#fiche_saisie_commentaire
{
    border: 3px solid var(--jaune-vert);
    border-radius: 4px;
    height: 520px;
}

.rating 
{
    direction: rtl;
    unicode-bidi: bidi-override;
    display: inline-flex;
}

.rating input 
{
    display: none;
}

.rating label 
{
    font-size: 40px;
    color: #ccc;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.rating label:before 
{
    content: "★";
}

/* étoiles sélectionnées */
.rating input:checked ~ label 
{
    color: var(--or);
    text-shadow: 0 0 10px var(--or);
}

/* survol */
.rating label:hover,
.rating label:hover ~ label 
{
    color: var(--or);
    transform: scale(1.2);
    text-shadow: 0 0 10px var(--or);
}

#reset_rating 
{
    margin-top: 20px;
    padding: 10px;
    background: #ccc;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

#reset_rating:hover 
{
    background: #bbb;
}

/*  CAPTCHA  */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 18px;
    padding: 6px 0;
}

.captcha-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--gris_fonce);
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
    position: relative;
}

.captcha-box:hover .captcha-check {
    border-color: var(--jaune); /* couleur au survol */
}

.captcha-check.checked {
    background: var(--vert); /* vert validation */
    border-color: var(--vert);
}

.captcha-check.checked::after {
    content: "✔";
    color: white;
    font-size: 18px;
    position: absolute;
    top: -2px;
    left: 4px;
}

#captchalogo
{
	width: 80px;
	background-color: var(--blanc);
	border: 2px solid var(--gris_fonce);
	border-radius: 10px;
}

textarea.txt_commentaire
{
    font-size: 15px;
    border: 2px solid var(--gris_fonce);
	border-radius: 10px;
    font-weight: unset;
    background: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
    outline: none;
    resize: none;
    width: 99%;
    overflow: hidden;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    -ms-box-shadow: none;
    -o-box-shadow: none;
    box-shadow: none;
    padding-top: 5px;
    padding-left: 5px;
}

#msg_err_commentaire
{
    min-height: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    visibility: hidden;
}