* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		sans-serif;
	line-height: 1.6;
	color: #333;
	background: linear-gradient(135deg, #667eea 0%, #093a88 100%);
	min-height: 100vh;
}

label {
	-webkit-user-select: none;
	user-select: none;
}

.container {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

.survey-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	margin-bottom: 20px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.survey-card:hover {
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.section-header {
	background: linear-gradient(135deg, #8cb7fb 0%, #093a88 100%);
	color: white;
	padding: 15px 25px;
	font-size: 16px;
	font-weight: 600;
	position: relative;
	overflow: hidden;
}

.section-header::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		45deg,
		transparent 30%,
		rgba(255, 255, 255, 0.1) 50%,
		transparent 70%
	);
	transform: translateX(-100%);
	animation: shimmer 3s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.section-content {
	padding: 30px;
}
.intro-section {
	text-align: center;
	background: linear-gradient(135deg, #667eea 0%, #093a88 100%);
	color: white;
	border-radius: 12px;
	margin-bottom: 30px;
}

.intro-section .section-content {
	padding: 40px 30px;
}

.intro-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 20px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.simple-title {
	font-size: 2rem;
	font-weight: 700;
	text-align: center;
	color: white;
	margin-bottom: 20px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intro-text {
	font-size: 1.1rem;
	line-height: 1.8;
	opacity: 0.95;
	max-width: 600px;
	margin: 0 auto;
}

.question-group {
	margin-bottom: 35px;
	padding: 25px;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 4px solid #4285f4;
	transition: all 0.3s ease;
}

.question-group:hover {
	background: #f1f5f9;
}

.question-title {
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 20px;
	color: #1e293b;
}

.checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.checkbox-item,
.radio-item {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	background: white;
	border-radius: 8px;
	border: 2px solid #e2e8f0;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.checkbox-item:hover,
.radio-item:hover {
	border-color: #4285f4;
	transform: scale(1.02);
	box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

/* --- STYLE GÉNÉRAL POUR LES INPUTS CACHÉS --- */
.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"],
.radio-button-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* --- STYLE POUR LES CHECKBOXES PERSONNALISÉES --- */
.checkbox-item label::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 15px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    vertical-align: middle;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-item input[type="checkbox"]:checked + label::before {
    content: "✔";
    font-size: 20px;
    font-weight: bold;
    color: white;
    background-color: #4285f4;
    border-color: #4285f4;
    text-align: center;
    line-height: 26px;
}

/* --- STYLE POUR LES BOUTONS RADIO OUI/NON --- */
.radio-item label::before {
    content: "";
    display: inline-block;
    width: 28px;
    height: 28px;
    margin-right: 15px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    vertical-align: middle;
    transition: background-color 0.2s, border-color 0.2s;
}

.radio-item input[type="radio"]:checked + label::before {
    background-color: #4285f4;
    border-color: #4285f4;
    background-clip: content-box;
    padding: 5px; 
}


/* --- STYLES POUR LES GROUPES D'ÉVALUATION (0, 1, 2, 3) --- */
.item-rating-group {
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}
.item-rating-group:last-of-type {
    border-bottom: none;
}

.item-title {
    font-weight: 500;
    color: #374151;
    margin-bottom: 15px;
}

.radio-buttons-container {
    display: flex;
    flex-wrap: wrap; /* Permet aux boutons de passer à la ligne si pas assez de place */
    justify-content: flex-start;
    gap: 20px;
    align-items: center;
}

.radio-button-item label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease-in-out;
}

.radio-button-item input[type="radio"]:checked + label {
    background-color: #4285f4;
    border-color: #4285f4;
    color: white;
    transform: scale(1.1);
}

.radio-button-item label:hover {
    border-color: #4285f4;
    background-color: #eff6ff;
}


/* --- STYLE GÉNÉRAL DES LABELS --- */
.checkbox-item label,
.radio-item label {
	cursor: pointer;
	font-weight: 500;
	color: #374151;
	z-index: 1;
	position: relative;
	flex: 1;
    display: flex;
    align-items: center;
}

/* --- Champs texte et navigation --- */
.text-area,
.text-input {
	width: 100%;
	padding: 15px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-family: inherit;
	font-size: 16px;
	transition: all 0.3s ease;
	background: white;
}

.text-area {
	min-height: 120px;
	resize: vertical;
}

.text-input {
	height: 50px;
}

.text-area:focus,
.text-input:focus {
	outline: none;
	border-color: #4285f4;
	box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.progress-bar {
	width: 100%;
	height: 8px;
	background: #acb1b8;
	border-radius: 4px;
	overflow: hidden;
	margin: 20px 0;
}

.progress-fill {
	height: 100%;
	background: #4285f4;
	border-radius: 4px;
	transition: width 0.5s ease;
}

.navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 0;
}

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

.btn {
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
}

.btn-primary {
	background: #4285f4;
	color: white;
}

.btn-primary:disabled {
    background: #a0c3ff;
    cursor: not-allowed;
}

.btn-primary:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

.btn-secondary {
	background: #f1f5f9;
	color: #64748b;
}

.btn-secondary:hover {
	background: #e2e8f0;
}

.page-indicator {
	color: #64748b;
	font-weight: 500;
}

.hidden {
	display: none;
}

.conditional-section {
	margin-top: 20px;
	padding: 20px;
	background: #f0f9ff;
	border-radius: 8px;
	border-left: 4px solid #0ea5e9;
}

.selection-counter {
	text-align: right;
	font-size: 14px;
	color: #64748b;
	margin-bottom: 15px;
	font-style: italic;
}

.checkbox-limit {
	background: #fef3c7;
	border-left-color: #f59e0b;
}

.checkbox-limit.reached {
	background: #dcfce7; /* Light green */
	border-left-color: #22c55e; /* Green */
}

/* --- STYLES POUR L'AFFICHAGE MOBILE --- */
@media (max-width: 768px) {
	.container {
		padding: 10px;
	}

	.intro-title {
		font-size: 2rem;
	}

	.simple-title {
		font-size: 1.5rem;
	}

	.section-content {
		padding: 20px;
	}

    .question-group {
        overflow-x: auto;
    }

    /* --- AJOUTS POUR ADAPTER LES BOUTONS RADIO SUR MOBILE --- */
    .radio-buttons-container {
        gap: 15px; /* On réduit l'espace entre les boutons */
    }

    .radio-button-item label {
        width: 40px;  /* On réduit la taille des boutons */
        height: 40px;
        font-size: 0.9rem; /* On ajuste la taille du texte à l'intérieur */
    }
    /* --- FIN DES AJOUTS --- */
}

.completion-screen {
	text-align: center;
	padding: 60px 30px;
}

.completion-icon {
	font-size: 4rem;
	color: #34a853;
	margin-bottom: 20px;
}

.completion-title {
	font-size: 2rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 15px;
}

.completion-text {
	font-size: 1.1rem;
	color: #64748b;
	line-height: 1.6;
}

.section-title-only {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 20px;
	border-radius: 12px;
	margin-bottom: 20px;
}

.validation-error {
    color: #ef4444;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: -10px;
    margin-bottom: 15px;
    min-height: 1.2em;
}

.validation-error.global {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

@keyframes bounce {
	0%,
	20%,
	60%,
	100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-20px);
	}
	80% {
		transform: translateY(-10px);
	}
}