/* Variables natives Gravity Forms : champs, libellés et états cohérents. */
.site .gform_wrapper form,
:is(.site, .fancybox-container) :is(.kognos-employes__formulaire, .kognos-compte form.form-membership, .kognos-formulaire) {
	--gf-ctrl-radius: 10px;
	--gf-ctrl-textarea-radius: 10px;
	--gf-ctrl-size: 50px;
	--gf-ctrl-font-size: 16px;
	--gf-ctrl-color: var(--global-palette3);
	--gf-ctrl-color-hover: var(--global-palette3);
	--gf-ctrl-color-focus: var(--global-palette3);
	--gf-ctrl-border-color: #bccbd5;
	--gf-ctrl-border-color-hover: #879eae;
	--gf-ctrl-border-color-focus: var(--global-palette1);
	--gf-ctrl-outline-color-focus: var(--global-palette1);
	--gf-ctrl-outline-width-focus: 2px;
	--gf-ctrl-outline-offset: 3px;
	--gf-ctrl-shadow: none;
	--gf-ctrl-label-font-size-primary: 16px;
	--gf-ctrl-label-font-weight-primary: 600;
	--gf-ctrl-label-font-size-secondary: 14px;
	--gf-ctrl-label-font-weight-secondary: 500;
	--gf-ctrl-desc-font-size: 14px;
	--gf-ctrl-choice-size: 20px;
	--gf-ctrl-checkbox-check-size: 16px;
	--gf-ctrl-radio-check-size: 10px;
	--gf-form-validation-radius: 12px;
	--gf-field-pg-prog-bar-radius: 8px;
}

.site .gform_wrapper .gform_fields {
	row-gap: 28px;
}

.site .gform_wrapper .gfield_label {
	line-height: 1.5;
}

.site .gform_wrapper .gfield_description {
	line-height: 1.6;
}

.site .gform_wrapper .gfield_required {
	font-size: 12px;
	font-weight: 500;
}

.site .gform_wrapper .gsection {
	padding-bottom: 16px;
	border-bottom: 1px solid #dde5ec;
}

.site .gform_wrapper .gsection_title {
	margin: 0;
	color: var(--global-palette3);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.02em;
}

/* Le libellé entier reste cliquable ; le bouton radio natif reste accessible. */
.site .gform_wrapper .ginput_container_radio > .gfield_radio {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
	gap: 10px;
}

.site .gform_wrapper .gfield_radio > .gchoice {
	position: relative;
	display: block;
	min-width: 0;
}

.site .gform_wrapper .gfield_radio > .gchoice > input[type="radio"] {
	position: absolute;
	z-index: 1;
	top: 50%;
	left: 16px;
	margin: 0;
	transform: translateY(-50%);
}

.site .gform_wrapper .gfield_radio > .gchoice > label {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: none;
	min-height: 56px;
	height: 100%;
	margin: 0;
	padding: 14px 16px 14px 48px;
	color: var(--global-palette3);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	cursor: pointer;
}

/* Encadré partagé avec les choix des formulaires Kognos. */
.site .gform_wrapper .gfield_radio > .gchoice > label,
:is(.site, .fancybox-container) .kognos-choix-encadre {
	border: 1px solid #d5e0e7;
	border-radius: 12px;
	background: #f7fafb;
	transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.site .gform_wrapper .gfield_radio > .gchoice > label:hover,
:is(.site, .fancybox-container) .kognos-choix-encadre:hover {
	border-color: #8ebfb4;
	background: #f0f8f5;
}

.site .gform_wrapper .gfield_radio > .gchoice > input:checked + label,
:is(.site, .fancybox-container) .kognos-choix-encadre:has(input:checked) {
	border-color: var(--global-palette1);
	background: #eaf6f1;
	box-shadow: inset 0 0 0 1px var(--global-palette1);
}

.site .gform_wrapper .gfield_radio > .gchoice > input:focus-visible + label,
:is(.site, .fancybox-container) .kognos-choix-encadre:has(input:focus-visible) {
	outline: 2px solid var(--global-palette1);
	outline-offset: 3px;
}

.site .gform_wrapper .gfield_radio > .gchoice > input:focus,
:is(.site, .fancybox-container) .kognos-choix-encadre input:focus {
	outline: none;
}

.site .gform_wrapper .gfield_radio > .gchoice > input:disabled + label {
	opacity: .6;
	cursor: not-allowed;
}

.site .gform_wrapper .gfield_checkbox label {
	font-size: 15px;
	line-height: 1.6;
}

.site .gform_wrapper :is(.gform_footer, .gform_page_footer) {
	gap: 12px;
	margin-top: 32px;
}

.site .gform_wrapper .gform_validation_errors {
	border-radius: 12px;
	box-shadow: none;
}

.site .gform_confirmation_message {
	padding: 24px;
	border: 1px solid #bdded3;
	border-radius: 16px;
	background: #edf7f3;
	color: var(--global-palette3);
	line-height: 1.65;
}

/* L’infolettre garde des messages lisibles sur le pied de page bleu marine. */
.site-footer .gform_wrapper .gform_validation_errors {
	margin-bottom: 24px;
	padding: 20px;
	border: 1px solid #ffc6b7;
	border-radius: 14px;
	background: #fff3f1;
	color: #852b22;
	text-align: left;
}

.site-footer .gform_wrapper .gform_validation_errors :is(h2, p, a, li, .gform-icon) {
	color: #852b22;
}

.site-footer .gform_wrapper .gform_validation_errors h2 {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
}

#colophon .gform_wrapper .gform_validation_errors a {
	color: #852b22;
	text-decoration: underline;
	text-underline-offset: 3px;
}

#colophon .gform_wrapper .gform_validation_errors a:hover {
	color: #52170f;
}

#colophon .gform_wrapper .gform_validation_errors a:focus-visible {
	outline: 2px solid #852b22;
	outline-offset: 3px;
}

.site-footer .gform_wrapper .gform_validation_errors:focus {
	outline: 2px solid #ffd0c4;
	outline-offset: 4px;
}

.site-footer .gform_wrapper .gfield_validation_message {
	margin-block: 8px;
	color: #ffd0c4;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.site-footer .gform_wrapper .gfield_error input {
	border: 2px solid #c34c3e;
}

.site-footer .gform_wrapper input:focus {
	outline: 2px solid #b9f2df;
	outline-offset: 3px;
}

body .site-footer .gform_wrapper .gform_footer .gform_button {
	--gf-ctrl-btn-bg-color-primary: #b9f2df;
	--gf-ctrl-btn-bg-color-hover-primary: #dcfff2;
	--gf-ctrl-btn-bg-color-focus-primary: #dcfff2;
	--gf-ctrl-btn-color-primary: #063b35;
	--gf-ctrl-btn-color-hover-primary: #063b35;
	--gf-ctrl-btn-color-focus-primary: #063b35;
	border: 1px solid #b9f2df;
	background: #b9f2df;
	color: #063b35;
}

body .site-footer .gform_wrapper .gform_footer .gform_button:hover {
	border-color: #dcfff2;
	background: #dcfff2;
	color: #063b35;
}

body .site-footer .gform_wrapper .gform_footer .gform_button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

.site-footer .gform_confirmation_message {
	position: relative;
	padding: 24px 24px 24px 68px;
	border: 1px solid #93d9bc;
	border-radius: 16px;
	background: #eafbf4;
	color: #10483d;
	font-size: 16px;
	line-height: 1.6;
}

.site-footer .gform_confirmation_message::before {
	position: absolute;
	top: 25px;
	left: 24px;
	width: 28px;
	height: 28px;
	border: 1px solid #83c9b2;
	border-radius: 50%;
	background: #d3f2e5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310483d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 12 3 3 7-7'/%3E%3C/svg%3E") center / 24px no-repeat;
	content: "";
}

.site-footer .gform_confirmation_message p {
	margin: 0;
	color: inherit;
}

.site-footer .gform_confirmation_message p + p {
	margin-top: 8px;
}

.site-footer .gform_confirmation_message strong {
	color: inherit;
	font-size: 18px;
	font-weight: 700;
}

#colophon .gform_confirmation_message a {
	color: #10483d;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.site .kognos-formulaire-quiz .gform_fields {
	row-gap: 32px;
}

.site .kognos-formulaire-quiz .gfield--type-quiz {
	padding-bottom: 28px;
	border-bottom: 1px solid #e5ecf0;
}

.site .kognos-formulaire-quiz .gfield_label {
	font-size: 17px;
}

.site .kognos-formulaire-quiz .gsection:not(:first-child) {
	margin-top: 8px;
}

@media (max-width: 600px) {
	.site .gform_wrapper .ginput_container_radio > .gfield_radio {
		grid-template-columns: minmax(0, 1fr);
	}

	.site .kognos-formulaire-quiz .gform_footer .gform_button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site .gform_wrapper .gfield_radio > .gchoice > label {
		transition: none;
	}
}

/* Quiz LearnDash : mêmes cartes et champs que les formulaires Gravity Forms. */
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionList:is([data-type="single"], [data-type="multiple"]) {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 10px;
	margin: 0 0 28px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionList:is([data-type="single"], [data-type="multiple"]) > .wpProQuiz_questionListItem {
	min-width: 0;
	margin: 0;
	padding: 0;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) > label:has(input:is([type="radio"], [type="checkbox"])) {
	position: relative;
	min-height: 56px;
	height: 100%;
	margin: 0;
	padding: 14px 16px 14px 48px;
	border-width: 1px;
	border-radius: 12px;
	color: var(--global-palette3);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, box-shadow .15s;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem > label > input:is([type="radio"], [type="checkbox"]) {
	position: absolute;
	top: 18px;
	left: 16px;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--global-palette1);
}

/* Les réponses corrigées conservent les couleurs et les indications LearnDash. */
.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.wpProQuiz_answerCorrect):not(.wpProQuiz_answerIncorrect):not(.wpProQuiz_answerCorrectIncomplete) > label:has(input:is([type="radio"], [type="checkbox"])) {
	border-color: #d5e0e7;
	background: #f7fafb;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.wpProQuiz_answerCorrect):not(.wpProQuiz_answerIncorrect):not(.wpProQuiz_answerCorrectIncomplete) > label:has(input:enabled):not(:has(input:checked)):hover {
	border-color: #8ebfb4;
	background: #f0f8f5;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.wpProQuiz_answerCorrect):not(.wpProQuiz_answerIncorrect):not(.wpProQuiz_answerCorrectIncomplete) > label:has(input:checked) {
	border-color: var(--global-palette1);
	background: #eaf6f1;
	box-shadow: inset 0 0 0 1px var(--global-palette1);
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem > label:has(input:focus-visible) {
	outline: 2px solid var(--global-palette1);
	outline-offset: 3px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem > label > input:is([type="radio"], [type="checkbox"]):focus {
	outline: none;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem > label:has(input:disabled) {
	cursor: default;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:is(.wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect, .wpProQuiz_answerCorrectIncomplete) > label {
	padding-top: 36px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:is(.wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect, .wpProQuiz_answerCorrectIncomplete) > label::before {
	position: absolute;
	top: 36px;
	left: 14px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:is(.wpProQuiz_answerCorrect, .wpProQuiz_answerIncorrect, .wpProQuiz_answerCorrectIncomplete) > label > input:is([type="radio"], [type="checkbox"]) {
	top: 39px;
	margin-left: 0;
}

.learndash-wrapper .wpProQuiz_content :is(.wpProQuiz_forms, .wpProQuiz_questionListItem) :is(input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea) {
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid #bccbd5;
	border-radius: 10px;
	background: #fff;
	color: var(--global-palette3);
	font-size: 16px;
	line-height: 1.5;
	box-shadow: none;
}

.learndash-wrapper .wpProQuiz_content :is(.wpProQuiz_forms, .wpProQuiz_questionListItem) :is(input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea):focus {
	border-color: var(--global-palette1);
	outline: 2px solid var(--global-palette1);
	outline-offset: 3px;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_question_text {
	width: 100%;
}

.learndash-wrapper .wpProQuiz_content .kognos-quiz-image {
	display: block;
	width: 100%;
	max-width: 100%;
	cursor: zoom-in;
}

.learndash-wrapper .wpProQuiz_content .kognos-quiz-image img {
	display: block;
	width: 100%;
	height: auto;
}

.learndash-wrapper .wpProQuiz_content .kognos-quiz-image:focus-visible {
	outline: 2px solid var(--global-palette1);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:not(.ld-sortable__item) > label {
		transition: none;
	}
}

/* Garder les commandes de l’image au-dessus de la barre WordPress. */
.fancybox-container.kognos-quiz-dialog {
	z-index: 100000;
}

/* Ajout d’employé : mêmes variables que les formulaires Contact et Infolettre. */
.site .kognos-employes__formulaire .kognos-employes__champs { gap: 28px; }
:is(.site, .fancybox-container) :is(.kognos-employes__formulaire, .kognos-compte form.form-membership, .kognos-formulaire) label {
	font-size: var(--gf-ctrl-label-font-size-primary);
	font-weight: var(--gf-ctrl-label-font-weight-primary);
	line-height: 1.5;
}
:is(.site, .fancybox-container) :is(.kognos-employes__formulaire, .kognos-compte form.form-membership, .kognos-formulaire) :is(input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), select) {
	min-height: var(--gf-ctrl-size);
	padding: 12px 14px;
	border: 1px solid var(--gf-ctrl-border-color);
	border-radius: var(--gf-ctrl-radius);
	background: #fff;
	color: var(--gf-ctrl-color);
	font-family: inherit;
	font-size: var(--gf-ctrl-font-size);
	line-height: 1.5;
	box-shadow: var(--gf-ctrl-shadow);
}
:is(.site, .fancybox-container) :is(.kognos-employes__formulaire, .kognos-compte form.form-membership, .kognos-formulaire) :is(input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), select):hover { border-color: var(--gf-ctrl-border-color-hover); }
:is(.site, .fancybox-container) :is(.kognos-employes__formulaire, .kognos-compte form.form-membership, .kognos-formulaire) :is(input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), select):focus {
	border-color: var(--gf-ctrl-border-color-focus);
	outline: var(--gf-ctrl-outline-width-focus) solid var(--gf-ctrl-outline-color-focus);
	outline-offset: var(--gf-ctrl-outline-offset);
}
