/* Styles communs pour l'affichage des formulaires (front-end et réponses) */

/* Styles pour le consentement RGPD */
.rgpd-consent {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1rem;
}

.rgpd-consent label.checkbox {
    align-items: flex-start;
}

.rgpd-consent label.checkbox > div {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* Labels de questions */
.form-question-label {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.form-question-label.required::after {
    content: ' *';
    color: #d32f2f;
}

/* Media dans les questions */
.form-question-media {
    margin-bottom: 1rem;
}

.form-question-media img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Groupes de checkboxes et radios */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
}

/* Styles pour les notes (rating) */
.rating-scale {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-input {
    display: none;
}

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 60px;
}

.rating-label:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.rating-input:checked + .rating-label {
    background: #ededed;
    color: white;
    transform: scale(1.1);
}

.rating-scale-numbers .rating-number {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

.rating-scale-numbers .rating-input:checked + .rating-label .rating-number {
    color: white;
}

.rating-scale-stars .rating-star {
    width: 32px;
    height: 32px;
    fill: #ddd;
    transition: fill 0.2s ease;
}

.rating-scale-stars .rating-label:hover .rating-star {
    fill: #ffa726;
}

.rating-scale-stars .rating-input:checked + .rating-label .rating-star {
    fill: #ff9800;
}

.rating-scale-smileys .rating-smiley {
    width: 48px;
    height: 48px;
    fill: #666;
    transition: all 0.2s ease;
}

.rating-scale-smileys .rating-option:nth-child(1) .rating-label:hover .rating-smiley,
.rating-scale-smileys .rating-option:nth-child(1) .rating-input:checked + .rating-label .rating-smiley {
    fill: #f44336;
}

.rating-scale-smileys .rating-option:nth-child(2) .rating-label:hover .rating-smiley,
.rating-scale-smileys .rating-option:nth-child(2) .rating-input:checked + .rating-label .rating-smiley {
    fill: #ff9800;
}

.rating-scale-smileys .rating-option:nth-child(3) .rating-label:hover .rating-smiley,
.rating-scale-smileys .rating-option:nth-child(3) .rating-input:checked + .rating-label .rating-smiley {
    fill: #4caf50;
}

.rating-label-text {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    text-align: center;
    max-width: 100px;
    line-height: 1.2;
}

.rating-input:checked + .rating-label .rating-label-text {
    font-weight: 600;
}

/* Affichage de la note dans les réponses */
.rating-display {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rating-display svg {
    width: 24px;
    height: 24px;
}

/* Styles pour les grilles */
.table-responsive {
    overflow-x: auto;
    position: relative;
    margin-top: 1rem;
}

.grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.grid-table th,
.grid-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e0e0e0;
    background-color: white;
}

.grid-table th {
    background-color: #f5f5f5;
    font-weight: 500;
}

/* Première colonne fixe */
.grid-table th:first-child,
.grid-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: white;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.grid-table thead th:first-child {
    background-color: #f5f5f5;
    z-index: 11;
}

.grid-table tbody tr:hover {
    background-color: #fafafa;
}

.grid-table tbody tr:hover td:first-child {
    background-color: #fafafa;
}

.grid-table td {
    vertical-align: middle;
    position: relative;
}

.grid-table label.radio,
.grid-table label.checkbox {
    display: inline-flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.grid-table label.radio > div,
.grid-table label.checkbox > div {
    margin: 0;
}

/* Styles pour l'affichage des réponses */
.response-question {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.response-question-label {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #333;
}

.response-question-label.required::after {
    content: ' *';
    color: #d32f2f;
}

.response-answer {
    padding: 0.75rem;
    background: #f9f9f9;
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
    min-height: 40px;
}

.response-answer-empty {
    color: #999;
    font-style: italic;
}

.response-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.5rem;
}

.response-grid-table th,
.response-grid-table td {
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    text-align: center;
    background-color: white;
}

.response-grid-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Première colonne fixe pour les grilles de réponse */
.response-grid-table th:first-child,
.response-grid-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: white;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.response-grid-table thead th:first-child {
    background-color: #f5f5f5;
    z-index: 11;
}

.response-grid-table .selected {
    background: #e3f2fd;
    font-weight: 600;
}

.response-grid-table .selected:first-child {
    background: white;
}
