/* Formulaires maison (rappel CF7 10417, contact CF7 2937). Portee limitee a .crf-form. */

.crf-form {
	--crf-accent: #afaaaa;
	--crf-accent-fonce: #8d8888;
	--crf-bordure: #dcdcdc;
	--crf-texte: #3c3c3c;
	--crf-texte-doux: #7a7a7a;
	font-family: Outfit, "Helvetica Neue", Arial, sans-serif;
	color: var(--crf-texte);
	max-width: 860px;
	margin: 0 auto;
	text-align: left;
}

.crf-form--etroit {
	max-width: 720px;
}

.crf-form__intro {
	margin: 0 0 26px;
	font-size: 15px;
	line-height: 24px;
	color: var(--crf-texte-doux);
	text-align: center;
}

.crf-form__grille {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 22px;
}

.crf-form__champ {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
}

.crf-form__champ--large {
	grid-column: 1 / -1;
}

.crf-form__libelle {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--crf-texte);
}

.crf-form__libelle em,
.crf-form__mention em {
	font-style: normal;
	color: var(--crf-accent-fonce);
}

.crf-form__aide {
	font-size: 12px;
	line-height: 17px;
	color: var(--crf-texte-doux);
}

.crf-form .wpcf7-form-control-wrap {
	display: block;
}

.crf-form input[type="text"],
.crf-form input[type="email"],
.crf-form input[type="tel"],
.crf-form textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0 16px;
	font-family: inherit;
	font-size: 15px;
	color: var(--crf-texte);
	background: #fff;
	border: 1px solid var(--crf-bordure);
	border-radius: 6px;
	box-shadow: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.crf-form input[type="text"],
.crf-form input[type="email"],
.crf-form input[type="tel"] {
	height: 50px;
}

.crf-form textarea {
	min-height: 150px;
	padding: 14px 16px;
	line-height: 23px;
	resize: vertical;
}

.crf-form input::placeholder,
.crf-form textarea::placeholder {
	color: #b4b4b4;
}

.crf-form input[type="text"]:focus,
.crf-form input[type="email"]:focus,
.crf-form input[type="tel"]:focus,
.crf-form textarea:focus {
	outline: none;
	border-color: var(--crf-accent);
	box-shadow: 0 0 0 3px rgba(175, 170, 170, 0.28);
}

/* Champ fichier : le controle natif est illisible, on l'habille comme les autres champs. */
.crf-form input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 14px;
	color: var(--crf-texte-doux);
	background: #fff;
	border: 1px dashed var(--crf-bordure);
	border-radius: 6px;
	cursor: pointer;
}

.crf-form input[type="file"]:hover {
	border-color: var(--crf-accent);
}

.crf-form input[type="file"]::file-selector-button {
	margin-right: 14px;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 13px;
	color: var(--crf-texte);
	background: #f4f3f3;
	border: 1px solid var(--crf-bordure);
	border-radius: 5px;
	cursor: pointer;
}

/* Cases a cocher presentees en pastilles cliquables */
.crf-form .wpcf7-checkbox {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.crf-form .wpcf7-list-item {
	margin: 0;
}

.crf-form .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	color: var(--crf-texte);
	background: #fff;
	border: 1px solid var(--crf-bordure);
	border-radius: 999px;
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.crf-form .wpcf7-list-item label:hover {
	border-color: var(--crf-accent);
}

/*
 * Le thème Patara masque la case native (appearance:none, largeur 12px) et redessine
 * un carré de 18px en :before positionné 10px plus bas que l'input : la case se
 * retrouve décalée de son libellé. On rétablit la case native dans ces formulaires.
 */
.crf-form .wpcf7-list-item input[type="checkbox"] {
	position: static;
	-webkit-appearance: auto;
	-moz-appearance: auto;
	appearance: auto;
	width: 16px;
	height: 16px;
	min-width: 16px;
	padding: 0;
	margin: 0;
	background: none;
	border: none;
	accent-color: var(--crf-accent-fonce);
	cursor: pointer;
}

.crf-form .wpcf7-list-item input[type="checkbox"]::before,
.crf-form .wpcf7-list-item input[type="checkbox"]::after {
	content: none;
	display: none;
}

.crf-form .wpcf7-list-item label:has(input:checked) {
	border-color: var(--crf-accent-fonce);
	background: rgba(175, 170, 170, 0.16);
}

.crf-form__pied {
	margin-top: 28px;
	text-align: center;
}

.crf-form .wpcf7-submit,
.crf-form__pied .wpcf7-form-control.has-spinner {
	display: block;
}

.crf-form .wpcf7-submit button,
.crf-form button.butn-dark2 {
	min-width: 240px;
	height: 52px;
	padding: 0 34px;
	font-family: inherit;
	font-size: 15px;
	letter-spacing: 0.04em;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.crf-form .wpcf7-submit button:hover,
.crf-form button.butn-dark2:hover {
	background: var(--crf-accent-fonce);
}

.crf-form__mention {
	margin: 16px 0 0;
	font-size: 12px;
	line-height: 18px;
	color: var(--crf-texte-doux);
}

.crf-form .wpcf7-not-valid-tip {
	margin-top: 5px;
	font-size: 12px;
	line-height: 16px;
}

.crf-form input.wpcf7-not-valid,
.crf-form textarea.wpcf7-not-valid {
	border-color: #d05a5a;
}

.crf-form .wpcf7-response-output {
	margin: 20px 0 0;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 20px;
	border-radius: 6px;
	text-align: center;
}

@media (max-width: 767px) {
	.crf-form__grille {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.crf-form .wpcf7-submit button,
	.crf-form button.butn-dark2 {
		width: 100%;
		min-width: 0;
	}
}
