/**
 * Contact and devis pages (inc/55-forms.php): page layout of the content groups built by scripts/pages/setup-pages.php,
 * and the Fluent Forms skin (labels, fields, columns, consent, anti-spam question, focus, errors, success).
 * Rule: an error message under one field never stretches the field next to it (rows align to the top).
 */

/* Page layout */
.rv-formpage { margin-top: var(--rv-s7); }
.rv-formpage__content > * { margin-block: 0; }
.rv-formpage__content > * + * { margin-top: var(--rv-s8); }
.rv-cpage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--rv-s7); align-items: start; }
.rv-cpage--devis { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.rv-cpage > * { margin-block: 0; min-width: 0; }
@media (max-width: 899px) {
	.rv-cpage, .rv-cpage--devis { grid-template-columns: 1fr; gap: var(--rv-s6); }
}

.rv-cpage__aside > * { margin-block: 0; }
.rv-cpage__aside > * + * { margin-top: var(--rv-s4); }
.rv-cpage__aside h2 { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.rv-cpage__aside h3 { margin-top: var(--rv-s5) !important; font-size: 1.15rem; }
.rv-cpage__aside ul { padding-left: 1.2em; }
.rv-cpage__aside li + li { margin-top: .45em; }
.rv-cpage__aside li::marker { color: var(--rv-teal); }
.rv-cpage__aside p, .rv-cpage__aside li { color: var(--rv-grey); }
.rv-cpage__aside strong { color: var(--rv-ink); font-weight: 600; }
/* Tip in the contact / devis aside: crème note, the sun mark on its horizon in a white disc at the left, a coral
   quarter-sun with its tint and blue-green ring in the bottom-right corner. */
.rv-cpage__tip {
	position: relative; padding: var(--rv-s5) var(--rv-s6) var(--rv-s5) 80px; border-radius: var(--rv-r-l);
	background:
		radial-gradient(circle at 100% 100%, var(--rv-corail) 0 18px, var(--rv-corail-tint) 18.5px 32px, transparent 32.5px 39px, var(--rv-teal) 39.5px 41.5px, transparent 42px),
		var(--rv-creme);
}
.rv-cpage__tip::before {
	content: ""; position: absolute; left: var(--rv-s5); top: var(--rv-s5); width: 42px; height: 42px; border-radius: 50%;
	background: var(--rv-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M7.44 22.75L3.55 20.5M12.75 17.44L10.5 13.55M20 15.5L20 11M27.25 17.44L29.5 13.55M32.56 22.75L36.45 20.5M5 30.5h30' fill='none' stroke='%230C7C7C' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M10 30A10 10 0 0 1 30 30Z' fill='%23F2785C'/%3E%3C/svg%3E") no-repeat center / 34px 34px;
}
.rv-cpage__tip p { margin: 0; color: var(--rv-ink); }
.rv-cpage__tip a { color: var(--rv-teal-d); }

.rv-cpage__form { padding: var(--rv-s6); background: var(--rv-white); border: 1px solid var(--rv-line); border-radius: var(--rv-r-l); }
.rv-cpage__form > * { margin-block: 0; }
.rv-cpage__formhead { margin-bottom: var(--rv-s5) !important; }
.rv-cpage__formhead > * { margin-block: 0; }
.rv-cpage__formtitle { font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.2; }
.rv-cpage__formhead p { margin-top: var(--rv-s1); font-size: var(--rv-fs-sm); color: var(--rv-grey); }
@media (max-width: 599px) {
	.rv-cpage__form { padding: var(--rv-s5) var(--rv-s4); }
}

/* FAQ (core Details blocks with the class rv-qa) */
.rv-cpage-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--rv-s5) var(--rv-s7); align-items: start; }
.rv-cpage-faq > * { margin-block: 0; }
.rv-cpage-faq h2 { font-size: var(--rv-fs-h2); letter-spacing: -.025em; line-height: 1.15; }
.rv-cpage-faq__list { display: grid; gap: var(--rv-s3); }
.rv-cpage-faq__list > * { margin-block: 0; }
.wp-block-details.rv-qa > summary::after {
	content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
	border-right: 2px solid var(--rv-teal); border-bottom: 2px solid var(--rv-teal);
	transform: rotate(45deg) translateY(-3px); transition: transform .2s ease;
}
.wp-block-details.rv-qa[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.wp-block-details.rv-qa > p { margin: 0; padding: 0 var(--rv-s5) var(--rv-s5); color: var(--rv-grey); }
.wp-block-details.rv-qa a { color: var(--rv-teal); }
@media (max-width: 799px) { .rv-cpage-faq { grid-template-columns: 1fr; } }

/* ── Fluent Forms skin ────────────────────────────── */
.rv-cpage__form .fluentform { font-family: var(--rv-font-b); }
.rv-cpage__form .fluentform .ff-el-group { margin-bottom: var(--rv-s5); }
.rv-cpage__form .fluentform .ff-el-input--label { margin-bottom: 6px; }
.rv-cpage__form .fluentform .ff-el-input--label label,
.rv-cpage__form .fluentform .rv-captcha label { font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--rv-ink); }
.rv-cpage__form .fluentform .ff-el-is-required.asterisk-right label::after { color: var(--rv-error); }
.rv-cpage__form .fluentform .ff-el-form-control {
	box-sizing: border-box; width: 100%; min-height: 48px; padding: 11px 14px;
	border: 1px solid var(--rv-field); border-radius: var(--rv-r-s); background: var(--rv-white);
	font: 400 1rem/1.4 var(--rv-font-b); color: var(--rv-ink); box-shadow: none;
	transition: border-color .15s ease;
}
.rv-cpage__form .fluentform textarea.ff-el-form-control { min-height: 160px; resize: vertical; }
.rv-cpage__form .fluentform select.ff-el-form-control {
	padding-right: 44px; -webkit-appearance: none; appearance: none; cursor: pointer;
	background: var(--rv-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C7C7C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px 18px;
}
.rv-cpage__form .fluentform .ff-el-form-control::placeholder { color: var(--rv-grey); opacity: 1; }
.rv-cpage__form .fluentform .ff-el-form-control:focus { border-color: var(--rv-teal); outline: 2px solid var(--rv-teal); outline-offset: 1px; box-shadow: none; }
.rv-cpage__form .fluentform .ff-el-help-message { margin-top: 6px; font-size: var(--rv-fs-sm); font-style: normal; color: var(--rv-grey); }

/* Columns (Fluent container): top-aligned so an error under one field never stretches its neighbour */
.rv-cpage__form .fluentform .ff-t-container { display: flex; gap: var(--rv-s4); align-items: flex-start; }
.rv-cpage__form .fluentform .ff-t-container .ff-t-cell { flex: 1 1 0; min-width: 0; padding: 0 !important; }
.rv-cpage__form .fluentform .ff-t-container .ff-el-group { height: auto; }
@media (max-width: 599px) {
	.rv-cpage__form .fluentform .ff-t-container { flex-direction: column; gap: 0; }
	.rv-cpage__form .fluentform .ff-t-container .ff-t-cell { width: 100%; flex-basis: auto; }
}

/* Consent */
.rv-cpage__form .fluentform .ff_gdpr_field, .rv-cpage__form .fluentform .ff-el-form-check { display: block; }
.rv-cpage__form .fluentform .ff-el-form-check-label { display: flex; gap: 10px; align-items: flex-start; font-size: var(--rv-fs-sm); line-height: 1.5; color: var(--rv-grey); }
.rv-cpage__form .fluentform .ff-el-form-check-input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rv-teal); }
.rv-cpage__form .fluentform .ff-el-form-check-label a { color: var(--rv-teal); }
.rv-cpage__form .fluentform .ff_tc_label { display: flex !important; gap: 12px; align-items: flex-start; cursor: pointer; }
.rv-cpage__form .fluentform .ff_tc_checkbox { flex: none; display: block; padding: 0 !important; margin: 0 !important; }
.rv-cpage__form .fluentform .ff_tc_checkbox input { display: block; width: 20px !important; height: 20px !important; margin: 1px 0 0 !important; accent-color: var(--rv-teal); cursor: pointer; }
.rv-cpage__form .fluentform .ff_t_c { flex: 1; margin: 0 !important; padding: 0 !important; font-size: var(--rv-fs-sm); line-height: 1.5; color: var(--rv-grey); }

/* Errors: text and border, next to the field */
.rv-cpage__form .fluentform .ff-el-is-error .ff-el-form-control { border-color: var(--rv-error); }
.rv-cpage__form .fluentform .error.text-danger,
.rv-cpage__form .fluentform .ff-el-is-error .text-danger { margin-top: 6px; font-size: var(--rv-fs-sm); line-height: 1.4; color: var(--rv-error); }
.rv-cpage__form .ff-errors-in-stack { margin-top: var(--rv-s4); color: var(--rv-error); }

/* Submit */
.rv-cpage__form .fluentform .ff_submit_btn_wrapper { margin-top: var(--rv-s2); }
.rv-cpage__form .fluentform .ff-btn-submit {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 var(--rv-s6);
	border: 0; border-radius: var(--rv-r-s); background: var(--rv-teal) !important; color: #fff !important;
	font: 600 1.0625rem/1.2 var(--rv-font-b); cursor: pointer; box-shadow: none; transition: background-color .15s ease;
}
.rv-cpage__form .fluentform .ff-btn-submit:hover { background: var(--rv-teal-d) !important; opacity: 1; }
.rv-cpage__form .fluentform .ff-btn-submit:focus-visible { outline: 2px solid var(--rv-teal); outline-offset: 3px; }
@media (max-width: 599px) { .rv-cpage__form .fluentform .ff-btn-submit { width: 100%; } }

/* Success */
.rv-cpage__form .ff-message-success {
	margin: 0; padding: var(--rv-s5); border: 1px solid var(--rv-teal); border-radius: var(--rv-r-l);
	background: var(--rv-teal-tint); color: var(--rv-ink); box-shadow: none;
}
.rv-cpage__form .ff-message-success p { margin: 0; }
.rv-cpage__form .ff-message-success p + p { margin-top: var(--rv-s2); }
