/* style.css - Version Corrigée et Complète */

/* ------------------------- */
/* VARIABLES DE COULEUR      */
/* ------------------------- */
:root {
    --primary-color: #e54d2e;
    --background-color: #f8f7f2;
    --card-background: #ffffff;
    --text-color: #333333;
    --text-light: #777777;
    --star-color: #ffc107;
    --border-color: #eeeeee;
    --primary-color-light: rgba(229, 77, 46, 0.1);
    --success-color: #28a745;
}

/* ------------------------- */
/* RESET GLOBAL ET BODY      */
/* ------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    -webkit-tap-highlight-color: transparent;
}


/* ------------------------- */
/* CARTE PRINCIPALE & LAYOUT */
/* ------------------------- */
.survey-card {
    background: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 450px;
    padding: 2rem 1.5rem;
    overflow: hidden;
}

/* ------------------------- */
/* BARRE DE PROGRESSION      */
/* ------------------------- */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin-bottom: 2rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease-in-out;
}

/* ------------------------- */
/* ÉTAPES DU SONDAGE (CORRIGÉ) */
/* ------------------------- */
.survey-step {
    display: none; /* Règle N°1 : TOUT est caché par défaut. */
    animation: fadeIn 0.5s ease-in-out;
    min-height: 250px; 
    /* Les propriétés de layout sont maintenant dans la classe .active */
}

.survey-step.active {
    display: flex; /* Règle N°2 : ON AFFICHE l'étape active en tant que flexbox */
    flex-direction: column;
}

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

legend {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
}


/* ------------------------- */
/* STYLES DES QUESTIONS      */
/* ------------------------- */
.menu-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.menu-choices input { display: none; }
.menu-choices label { padding: 0.6rem 1.2rem; border: 1px solid var(--border-color); border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: all 0.2s ease-in-out; }
.menu-choices input:checked + label { background-color: var(--primary-color); color: white; border-color: var(--primary-color); font-weight: 600; }

.detailed-ratings { display: flex; flex-direction: column; gap: 1rem; }
.rating-row { display: flex; justify-content: space-between; align-items: center; }
.rating-label { font-weight: 500; }

.rating-stars { display: flex; flex-direction: row-reverse; justify-content: center; }
.rating-stars input { display: none; }
.rating-stars label { color: var(--border-color); cursor: pointer; transition: color 0.2s ease, transform 0.2s ease; }
.rating-stars:not(:hover) input:checked ~ label, .rating-stars:hover label:hover, .rating-stars:hover label:hover ~ label { color: var(--star-color); }
.rating-stars label:hover { transform: scale(1.15); }

.rating-stars.rating-stars-small { gap: 0.25rem; }
.rating-stars.rating-stars-small label { font-size: 2rem; }
.rating-stars:not(.rating-stars-small) { gap: 0.5rem; }
.rating-stars:not(.rating-stars-small) label { font-size: 2.5rem; }

textarea.text-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border-color); border-radius: 8px; font-family: 'Poppins', sans-serif; font-size: 1rem; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; }
textarea.text-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px var(--primary-color-light); }

/* ------------------------- */
/* NAVIGATION                */
/* ------------------------- */
.navigation-buttons { display: flex; justify-content: space-between; margin-top: auto; padding-top: 1rem; gap: 1rem; }
.nav-btn, .submit-btn { width: 100%; font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 600; border: none; border-radius: 8px; padding: 0.9rem; cursor: pointer; transition: all 0.2s ease-in-out; }
.nav-btn:hover, .submit-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.prev-btn { background-color: #f0f0f0; color: var(--text-light); }
.next-btn { background: var(--primary-color); color: white; }
.submit-btn { background: var(--success-color); color: white; }

/* ------------------------- */
/* PAGE DE REMERCIEMENT      */
/* ------------------------- */
#thank-you-section { text-align: center; animation: fadeIn 0.5s; }
#thank-you-section .logo { width: 120px; height: auto; margin-bottom: 1rem; max-width: 40%; }
#thank-you-section h2 { font-size: 1.75rem; color: var(--primary-color); margin-bottom: 0.5rem; }
#thank-you-section p { font-size: 0.9rem; color: var(--text-light); }

/* ------------------------- */
/* CLASSE UTILITAIRE         */
/* ------------------------- */
.hidden { display: none !important; }