body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10+ */
    user-select: none;
    /* Standard */
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

h1,
h2,
h3 {
    color: #005a9c;
    border-bottom: 2px solid #e1e1e1;
    padding-bottom: 10px;
    margin-top: 0;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
}

h3 {
    text-align: center;
    border-bottom: none;
    margin-bottom: 10px;
    font-weight: normal;
}

.presentation-page h1 {
    margin-bottom: 5px;
}

.presentation-page p,
.presentation-page ul {
    margin-bottom: 20px;
}

.presentation-page ul {
    padding-left: 20px;
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    font-weight: bold;
    font-size: 1.2em;
    padding: 0 10px;
    color: #333;
}

.question-group div {
    margin-bottom: 10px;
}

input[type="radio"] {
    margin-right: 10px;
}

label {
    cursor: pointer;
    display: inline-block;
    padding: 5px;
}

.hidden {
    display: none !important;
}

.question-step {
    display: none;
}

.question-step.active {
    display: block;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

/* Style général des boutons */
.btn {
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
}

/* Les boutons sur la page de résultats et dans la modale s'étirent */
#results-page .btn,
#save-modal .btn,
#start-btn {
    flex-grow: 1;
}

#prev-btn,
#restart-btn,
#modal-cancel-btn {
    background-color: #6c757d;
    color: white;
}

#next-btn,
#start-btn,
#save-btn {
    background-color: #007bff;
    color: white;
}

#next-btn:disabled {
    background-color: #a0c7ff;
    cursor: not-allowed;
}

#submit-btn,
#modal-confirm-btn {
    background-color: #28a745;
    color: #fff;
    flex-grow: 1;
}

.text-center {
    text-align: center;
}

.footer-note {
    text-align: center;
    margin-top: 30px;
    font-style: italic;
    color: #666;
}

#results-page h2 {
    text-align: center;
}

.results-summary {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    background-color: #f8f9fa;
}

.summary-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #005a9c;
}

.summary-header h3 {
    color: #005a9c;
    margin-bottom: 15px;
    border: none;
}

.scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.score-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.score-card h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.score-card .score-value {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

.score-card .interpretation {
    font-size: 1em;
    margin-top: 10px;
    padding: 8px;
    border-radius: 5px;
    font-weight: 600;
}

.interpretation.normal {
    background-color: #d4edda;
    color: #155724;
}

.interpretation.doubtful {
    background-color: #fff3cd;
    color: #856404;
}

.interpretation.severe {
    background-color: #f8d7da;
    color: #721c24;
}

.detailed-results {
    margin-top: 30px;
}

.detailed-results h3 {
    color: #005a9c;
    border-bottom: 2px solid #005a9c;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dimension-section {
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dimension-section h4 {
    color: #005a9c;
    margin: 0 0 15px 0;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dimension-section h4 .dimension-score {
    background-color: #e9f5ff;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.9em;
}

.questions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.questions-table th {
    background-color: #005a9c;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.questions-table td {
    padding: 12px;
    border-bottom: 1px solid #e1e1e1;
}

.questions-table tr:last-child td {
    border-bottom: none;
}

.questions-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.questions-table .question-col {
    width: 50%;
    font-weight: 500;
}

.questions-table .response-col {
    width: 40%;
}

.questions-table .score-col {
    width: 10%;
    text-align: center;
    font-weight: bold;
    color: #005a9c;
}

.final-score {
    text-align: center;
    margin: 20px 0;
}

.final-score p {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.score-box {
    background-color: #e9f5ff;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    border: 2px solid #007bff;
    font-weight: bold;
    font-size: 1.2em;
    min-width: 100px;
}

.score-box.normal {
    border: 2px solid #28a745;
    color: #28a745;
}

.score-box.doubtful {
    border: 2px solid #ffc107;
    color: #ffc107;
}

.score-box.severe {
    border: 2px solid #dc3545;
    color: #dc3545;
}

.info-note {
    font-size: 0.9em;
    color: #555;
    margin-top: 25px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid #6c757d;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-top: 0;
}

.modal-form-group {
    margin-bottom: 15px;
}

.modal-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.modal-form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.modal-checkbox-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.id-warning {
    font-size: 0.8em;
    color: #e74c3c;
    background-color: #fdf2f2;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #e74c3c;
    margin-top: 10px;
}