body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #eef2f6;
    margin: 0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 550px;
    box-sizing: border-box;
}

#company-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 25px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
}

.stars {
    font-size: 4.5em;
    color: #d1d8e0; /* Couleur par défaut des étoiles (gris) */
    cursor: pointer;
    margin-bottom: 35px;
    
    /* Utilisation de Flexbox pour un alignement et espacement robustes */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 5px; /* Espacement entre les étoiles */
    
    white-space: nowrap; /* Empêche les étoiles de passer à la ligne */
    overflow: hidden; 
    max-width: 100%; 
    padding: 0 5px; 
}

.star {
    transition: color 0.2s ease-in-out, transform 0.1s ease-in-out;
    display: inline-block; 
    flex-shrink: 0; /* Empêche les étoiles de rétrécir */
}

/* ⭐⭐⭐ CORRECTION FINALE ET ROBUSTE POUR LA SURBRILLANCE DES ÉTOILES ⭐⭐⭐ */

/* 1. Couleur par défaut pour toutes les étoiles quand elles ne sont pas sélectionnées ou survolées */
.stars .star {
    color: #d1d8e0; 
}

/* 2. Quand une étoile a la classe 'selected' (ajoutée par JS), elle devient orange */
.stars .star.selected {
    color: #f39c12;
}

/* 3. Comportement au survol (quand pas encore noté, class 'rated' absente) :
   L'étoile survolée ET toutes les étoiles qui la précèdent deviennent orange.
   Le JS ajoute/retire la classe 'selected' pour cela. Donc la règle '.star.selected' est appliquée.
   Ceci est pour s'assurer que le survol change la couleur.
*/
.stars:not(.rated) .star:hover {
    color: #f39c12; /* La couleur de l'étoile survolée */
}

/* 4. Pour la persistance de l'état 'rated' (après un clic) :
   Si le conteneur a 'rated', seules les étoiles avec 'selected' sont orange.
   Les étoiles non-sélectionnées redeviennent grisées.
*/
.stars.rated .star:not(.selected) {
    color: #d1d8e0;
}
/* ⭐⭐⭐ FIN DE LA CORRECTION FINALE ET ROBUSTE POUR LA SURBRILLANCE DES ÉTOILES ⭐⭐⭐ */


.hidden {
    display: none;
}

#feedback-low-score p {
    margin-top: 25px;
    font-size: 1.1em;
    color: #555;
}

.feedback-message {
    font-weight: bold;
    color: #e74c3c;
}

.improvement-options {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.option-button {
    background-color: #f0f4f7;
    border: 1px solid #dcdcdc;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out;
    color: #555;
}

.option-button:hover {
    background-color: #e0e6eb;
    border-color: #c0c0c0;
}

.option-button.selected {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

textarea {
    width: calc(100% - 40px);
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

button#submit-low-score {
    background-color: #2ecc71;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.15em;
    margin-top: 25px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
}

button#submit-low-score:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.3);
}

.secondary-button {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    margin-top: 15px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.secondary-button:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

#thank-you-message {
    margin-top: 30px;
    padding: 20px;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 10px;
    color: #2e7d32;
    font-size: 1.1em;
}

#thank-you-message h2 {
    color: #2e7d32;
    margin-top: 0;
    margin-bottom: 10px;
}

/* --- Ajustements pour les écrans plus petits (smartphones) --- */
@media (max-width: 600px) {
    .container {
        padding: 20px; 
        border-radius: 10px; 
    }

    h1 {
        font-size: 1.4em; 
        margin-bottom: 15px;
    }

    #company-logo {
        max-width: 80px; 
        margin-bottom: 10px;
    }

    .stars {
        font-size: 3em; 
        gap: 2px; 
        margin-bottom: 20px;
        line-height: 1; 
        padding: 0 2px; 
    }

    .star {
        padding: 0; 
    }

    .improvement-options {
        gap: 8px; 
    }

    .option-button {
        padding: 8px 10px; 
        font-size: 0.8em; 
    }

    textarea {
        width: calc(100% - 30px); 
        padding: 10px;
        min-height: 70px; 
    }

    button#submit-low-score,
    .secondary-button {
        padding: 10px 18px; 
        font-size: 0.9em; 
    }
}

/* --- Ajustements pour les écrans encore plus petits (anciens smartphones ou très petits écrans) --- */
@media (max-width: 400px) {
    .stars {
        font-size: 2.5em; 
        gap: 1px; 
    }
    h1 {
        font-size: 1.2em; 
    }
    .option-button {
        font-size: 0.7em; 
        padding: 6px 8px;
    }
}