.ydu_form_contact_submit_wrapper .wpcf7-spinner {
	width: 24px !important;
	background-color: #343434;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: auto;
}

.submitting .ydu_form_contact_submit_wrapper .has-spinner {
	color: #3396ab;
}

.ydu_form_contact {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.wpcf7-form {
	position: relative;
}

.ydu_form_contact .floating_label {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	transition: all 0.2s linear;
	pointer-events: none;
}

.ydu_form_contact textarea.input_filled + .floating_label {
	top: -10px !important;
}

.ydu_form_contact input.input_filled + .floating_label,
.ydu_form_contact input:focus + .floating_label {
	font-size: 12px;
	top: 10px;
}

.ydu_form_contact input:focus, .ydu_form_contact_submit input:focus, .ydu_form_contact_submit select:focus, .ydu_form_contact_submit textarea:focus {
	outline: none !important;
}

.ydu_form_contact_item {
	width: 48%;
	margin-bottom: 25px;
}

.ydu_form_contact_msg.ydu_form_contact_item, .ydu_form_contact_checkbox, .ydu_form_contact_select.ydu_form_contact_item, .ydu_form_contact div[data-id="projet"], .ydu_form_contact_item.ydu_form_contact_item_choice, .ydu_form_contact div[data-id="assistance"], .ydu_form_contact div[data-id="candidature"] {
	width: 100%;
}

.ydu_form_contact span, .ydu_form_contact > div:not(.ydu_form_contact_checkbox) input, .ydu_form_contact textarea, .ydu_form_contact select {
	width: 100%;
	display: block;
}

.ydu_form_contact .dnd-upload-counter span { 
	width: max-content;
	margin-right: 4px;
}

.ydu_form_contact .dnd-upload-counter {
	width: max-content;
	display: flex;
}

.ydu_form_contact_item_wrapper, .wpcf7-form.invalidy {
	position: relative;
}

/* Le libellé flottant se positionne par rapport au champ, pas au bloc qui contient aussi le message d'erreur */
.ydu_form_contact_item_wrapper > p {
	position: relative;
	margin: 0;
}

.ydu_form_contact input, .ydu_form_contact textarea, .ydu_form_contact select {
	border-right: unset;
	border-top: unset;
	border-left: unset;
	border-bottom-color: #2696a9;
	border-width: 2px;
	padding: 15px 15px 0 0;
	border-bottom: 2px solid #2696a9;
}

.ydu_form_contact_msg.ydu_form_contact_item label {
	top: 20px !important;
	left: 15px !important;
}

/* .ydu_form_contact div[data-id="assistance"], .ydu_form_contact div[data-id="projet"], .ydu_form_contact div[data-id="candidature"] {
	display: none !important;
	transition: all 1s linear !important;
}

.ydu_form_contact div[data-id="assistance"].ydu_display_field, .ydu_form_contact div[data-id="projet"].ydu_display_field, .ydu_form_contact div[data-id="candidature"].ydu_display_field {
	display: block !important;
}
 */
.ydu_form_contact textarea {
	background-color: #f5fafa;
	padding: 15px;
	margin-top: 25px;
	resize: vertical;
	height: 150px;
	outline: none;
}

.ydu_form_contact .codedropz-upload-inner h3, .ydu_form_contact .codedropz-upload-inner h6 {
	font-size: 18px;
}

.ydu_form_contact .codedropz-upload-handler {
	background-color: #f5fafa;
	border-radius: 0px;
}

.ydu_form_contact .ydu_form_contact_msg.ydu_form_contact_item textarea:focus + label,
.ydu_form_contact .ydu_form_contact_msg.ydu_form_contact_item textarea.input_filled + label {
	font-size: 12px;
	top: 10px;
	left: 0 !important;
}

.wpcf7-form-control-wrap.rgpd {
	min-height: 10px;
}

.ydu_form_contact .ydu_form_contact_msg.ydu_form_contact_item textarea:focus + label {
	top: -10px !important;
}

.ydu_form_contact select {
	appearance: none;
	-webkit-appearance: none; /* Chrome, Safari, etc. */
	-moz-appearance: none;    /* Anciennes versions Firefox */
    text-indent: 0px;
    text-overflow: '';
	padding-bottom: 8px;
	color: #4d4d4d;
	cursor: pointer;
	outline: none;
	background-repeat: no-repeat;
	background-position: right 60%;
	background-image: url(data:image/svg+xml,%3Csvg%20width%3D%2210px%22%20height%3D%225px%22%20viewBox%3D%227%2010%2010%205%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%20%20%3Cpolygon%20id%3D%22Shape%22%20stroke%3D%22none%22%20fill%3D%22%230%22%20fill-rule%3D%22evenodd%22%20opacity%3D%220.54%22%20points%3D%227%2010%2012%2015%2017%2010%22%3E%3C%2Fpolygon%3E%0A%3C%2Fsvg%3E);
}

.ydu_form_contact_checkbox label input {
	appearance: none;
	-webkit-appearance: none; /* Chrome, Safari, etc. */
	-moz-appearance: none;    /* Anciennes versions Firefox */
	position: relative;
	height: 15px;
	width: 15px;
	border: 1px solid #4d4d4d;
	margin: 0 10px 0 0;
	padding: 0;
}

.ydu_form_contact_checkbox label input:checked {
	background-color: #4d4d4d;
}

.ydu_form_contact_checkbox .wpcf7-list-item, .ydu_form_contact_text_bottom {
	margin: 0;
	line-height: 1.5;
	font-size: 16px;
}

.ydu_form_contact_text_bottom {
	margin-top: 10px;
}

.ydu_form_contact_checkbox label {
	display: flex;
	cursor: pointer;
}

.ydu_form_contact_submit {
	padding: 0 !important;
	margin-top: 5px;
	position: relative;
}

.ydu_form_contact_submit .ajax-loader {
	position: absolute;
	left: 105%;
}

.ydu_form_contact_submit input {
	background-color: #3396ab;
	color: white;
	padding: 20px 40px;
	text-transform: uppercase;
	font-weight: 900;
	border: none;
	cursor: pointer;
	letter-spacing: 1.2px;
}


.ydu_form_contact_submit {
	transform: none !important;
	opacity: 1 !important;
}

.ydu_form_contact_submit_wrapper {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.ydu_form_contact_msg label {
	top: 20px;
	left: 10px;
}

/*.ydu_form_contact > div:not(.ydu_form_contact_submit) p {
	display: none;
}*/

/* ==========================================================================
   Messages du formulaire : erreurs par champ, message global, succès
   ========================================================================== */

:root {
	--ydu-form-error: #c2410c;
	--ydu-form-error-text: #9a3412;
	--ydu-form-error-bg: #fff7ed;
	--ydu-form-fail: #dc2626;
	--ydu-form-fail-text: #991b1b;
	--ydu-form-fail-bg: #fef2f2;
	--ydu-form-success: #3396ab;
	--ydu-form-success-bg: #f0f8fa;
}

@keyframes ydu_form_msg_in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}

/* Erreur sous un champ */
.ydu_form_contact .wpcf7-not-valid-tip {
	position: static;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	width: 100%;
	margin-top: 6px;
	color: var(--ydu-form-error);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	animation: ydu_form_msg_in 0.2s ease-out;
}

.ydu_form_contact .wpcf7-not-valid-tip::before {
	content: "!";
	flex: 0 0 16px;
	height: 16px;
	border-radius: 50%;
	background-color: var(--ydu-form-error);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 16px;
	text-align: center;
}

.ydu_form_contact_item_wrapper:has(.wpcf7-not-valid-tip) input,
.ydu_form_contact_item_wrapper:has(.wpcf7-not-valid-tip) textarea,
.ydu_form_contact_item_wrapper:has(.wpcf7-not-valid-tip) select {
	border-bottom-color: var(--ydu-form-error);
	background-color: #fff7f2;
}

.ydu_form_contact_item_wrapper:has(.wpcf7-not-valid-tip) .floating_label {
	color: var(--ydu-form-error);
}

.ydu_form_contact_checkbox:has(.wpcf7-not-valid-tip) label input {
	border-color: var(--ydu-form-error);
	box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}

.ydu_form_contact .dnd-upload-status .dnd-upload-details span.has-error,
.ydu_form_contact .has-error-msg {
	color: var(--ydu-form-error);
}

/* Message global (sous le bouton Envoyer) */
.wpcf7 form .wpcf7-response-output {
	position: static;
	width: 100%;
	margin: 24px 0 0;
	padding: 16px 20px 16px 56px;
	border: 0;
	border-left: 4px solid;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.45;
	background-repeat: no-repeat;
	background-position: 18px 50%;
	background-size: 22px;
	animation: ydu_form_msg_in 0.25s ease-out;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
	color: var(--ydu-form-error-text);
	background-color: var(--ydu-form-error-bg);
	border-color: var(--ydu-form-error);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2410c' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E");
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
	color: var(--ydu-form-fail-text);
	background-color: var(--ydu-form-fail-bg);
	border-color: var(--ydu-form-fail);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M15 9l-6 6M9 9l6 6'/%3E%3C/svg%3E");
}

/* Repli si ydu_contact.js n'a pas construit la carte de succès */
.wpcf7 form.sent .wpcf7-response-output {
	color: #1f2937;
	background-color: var(--ydu-form-success-bg);
	border-color: var(--ydu-form-success);
	font-size: 17px;
	font-weight: 700;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%233396ab'/%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Textes de succès saisis dans le modèle du formulaire CF7 : jamais affichés tels quels */
.ydu_success_text {
	display: none !important;
}

/* Carte de succès : remplace le formulaire après l'envoi */
/* Le formulaire est replié plutôt que retiré : il garde la largeur de la colonne, que la carte reprend */
.wpcf7-form.ydu_is_sent .ydu_form_contact {
	visibility: hidden;
	height: 0;
	margin: 0;
	overflow: hidden;
}

.wpcf7-form.ydu_is_sent .wpcf7-response-output {
	display: none !important;
}

.ydu_form_success {
	box-sizing: border-box;
	width: 100%;
	padding: 40px 32px;
	border-top: 5px solid var(--ydu-form-success);
	border-radius: 4px;
	background-color: var(--ydu-form-success-bg);
	text-align: center;
	color: #4d4d4d;
	animation: ydu_form_msg_in 0.35s ease-out;
	outline: none;
}

.ydu_form_success_icon {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%233396ab'/%3E%3Cpath d='M19 33l9 9 17-19' fill='none' stroke='%23fff' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.ydu_form_success_title {
	margin: 0;
	color: #1f2937;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.3;
}

.ydu_form_success_text {
	max-width: 520px;
	margin: 12px auto 0;
	font-size: 16px;
	line-height: 1.5;
}

.ydu_form_success_text p {
	margin: 0;
}

.ydu_form_success_text a {
	color: var(--ydu-form-success);
	font-weight: 600;
}

.ydu_form_success_again {
	margin-top: 24px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ydu-form-success);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 767px) {
	.ydu_form_success {
		padding: 32px 20px;
	}

	.ydu_form_success_title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ydu_form_contact .wpcf7-not-valid-tip,
	.wpcf7 form .wpcf7-response-output,
	.ydu_form_success {
		animation: none;
	}
}

.wpcf7 form .wpcf7-response-output:empty {
	display: none;
}
