/*
 * COMPAK fixes — module "pages" (phase 3, tecpap.ma layout).
 * - .tp-contact : the contact block [compak_contact] (home section "Contactez-nous" and /contact/):
 *   quote form left in tecpap's field look, hairline, "Siège" column right.
 * - .tp-map     : the 500 px map band of /contact/ (pending "map").
 * - .tp-page-legal : the mentions légales page (tecpap's simple text page).
 * Tokens (--tp-*), .tp-title, .tp-btn, .tp-section come from module global (global-10-tecpap.css); the
 * fallbacks after the variables are the same values, only so this block reads before that file loads.
 * Measures (tecpap, tm-bottom-c): block padding 20/45; title → form 32; fields 34 px high, 13 px,
 * 1 px #f0eded border, 3 px corners, inset 8 px, 16 px between the two columns, 76 px from row to row;
 * form column 470 px at 1440 with 140 px to the "Siège" column; hairline 145 px tall.
 */

/* ========================================================================== Block */
/* Section box and edges: global's .tp-section--bottom-c (20/45) and .tp-container (x160 / x47 / x25). */
.tp-contact {
	color: var(--tp-text, #4e4e4e);
	font-family: var(--tp-font, "Roboto", Helvetica, Arial, sans-serif);
	font-weight: 400;
}
.tp-contact .tp-title {
	margin-bottom: 32px;
}
.tp-contact__grid {
	display: grid;
	grid-template-columns: 560px minmax(0, 1fr);   /* beautify pass: wider form (tecpap 470) */
	column-gap: 110px;
	align-items: start;
}
.tp-contact__form {
	min-width: 0;
}

/* "Siège" column with a thin vertical line on its left, as tecpap. */
.tp-contact__siege {
	position: relative;
	color: var(--tp-heading-2, #333);
	font-size: 19px;
	font-weight: 400;
	line-height: 24px;
}
.tp-contact__siege::before {
	content: "";
	position: absolute;
	top: 25px;
	left: -55px;
	width: 1px;
	height: 145px;
	background: var(--tp-line, #e5e5e5);
}
.tp-contact__siege-title {
	margin: 0 0 25px;
	color: var(--tp-heading-2, #333);
	font-family: inherit;
	font-size: 19px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.tp-contact__siege p {
	margin: 0 0 25px;
	color: inherit;
	font: inherit;
}
.tp-contact__siege a {
	color: inherit;
	text-decoration: none;
}
.tp-contact__siege a:hover,
.tp-contact__siege a:focus-visible {
	color: var(--tp-accent, #00752f);
	text-decoration: underline;
}

/* ========================================================================== Form (CF7 7358) */
.tp-contact .wpcf7 {
	font-family: inherit;
}
.tp-contact .wpcf7-form {
	margin: 0;
}
.tp-form {
	color: var(--tp-heading-2, #333);
	font-size: 15px;
	font-weight: 400;
	line-height: 18px;
}
/* Screen-reader-only labels (tecpap shows placeholders only). */
.tp-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.tp-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
	margin: 0 0 18px;      /* beautify pass: was 42 px around 34 px fields */
	padding: 0 8px;
}
.tp-form__row--full {
	grid-template-columns: minmax(0, 1fr);
}
.tp-contact .tp-form label.tp-form__field {
	position: relative;
	display: block;
	margin: 0; /* the agency's Additional CSS gives every .wpcf7 label a 10 px bottom margin */
	color: inherit;
	font: inherit;
}
.tp-form__field .wpcf7-form-control-wrap {
	position: relative;
	display: block;
	margin: 0;
}
/* Beats the theme's Elementor form rules and the agency's Additional CSS (.wpcf7 input …). */
.tp-contact .tp-form .wpcf7-form-control:is(.wpcf7-text, .wpcf7-email, .wpcf7-tel, .wpcf7-select, .wpcf7-textarea) {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 50px;          /* beautify pass: bigger, clearer fields (tecpap 34 px / 13 px) */
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #c9d3cd;
	border-radius: 6px;
	background: #fff;
	color: var(--tp-heading, #16211a);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	box-shadow: none;
	outline: none;
	transition: border-color 0.15s ease;
}
.tp-contact .tp-form select.wpcf7-form-control {
	-webkit-appearance: auto;
	appearance: auto;
	height: 50px !important;
	padding: 0 10px !important;
	border: 1px solid #c9d3cd !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: var(--tp-heading, #16211a) !important;
	font-size: 15px !important;
	line-height: 20px !important;
	cursor: pointer;
}
.tp-contact .tp-form textarea.wpcf7-form-control {
	height: 140px !important;
	min-height: 0;
	padding: 12px 14px !important;
	resize: vertical;
}
.tp-contact .tp-form :is(input, textarea)::placeholder {
	color: #5d6a62;
	opacity: 1;
}
.tp-contact .tp-form .wpcf7-form-control:is(.wpcf7-text, .wpcf7-email, .wpcf7-tel, .wpcf7-select, .wpcf7-textarea):focus {
	border-color: var(--tp-accent, #00752f);
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 117, 47, 0.18);
}

/* CF7's live-region for screen readers: visually hidden even before CF7's own stylesheet arrives
   (on the home page it is printed late, see inc/pages.php). */
.tp-contact .wpcf7 .screen-reader-response {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

/* CF7's hidden fields: never a visible box (a fieldset style of the home page gave it 70 px). */
.tp-contact .wpcf7 fieldset.hidden-fields-container {
	display: none !important;
}

/* Product checkboxes: compact two-column list. */
.tp-contact .tp-form fieldset.tp-form__products {
	min-width: 0;
	margin: 6px 0 24px;
	padding: 0 8px;
	border: 0;
}
.tp-contact .tp-form__products legend {
	margin: 0 0 10px;
	padding: 0;
	color: var(--tp-heading, #16211a);
	font-size: 15px;
	font-weight: 500;
	line-height: 20px;
}
.tp-form__products .wpcf7-form-control-wrap {
	position: relative;
	display: block;
}
.tp-form .tp-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
}
.tp-form .tp-products .wpcf7-list-item {
	display: block;
	margin: 0;
}
.tp-contact .tp-form .tp-products label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	margin: 0;
	color: var(--tp-heading-2, #333);
	font-size: 15px;
	font-weight: 400;
	line-height: 20px;
	cursor: pointer;
}
.tp-contact .tp-form :is(.tp-products, .tp-form__consent) input[type="checkbox"] {
	-webkit-appearance: auto;
	appearance: auto;
	padding: 0;
	border-radius: 0;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--tp-accent, #00752f);
}

/* Consent (only while the mentions légales are published, see inc/pages.php). */
.tp-form__consent {
	max-width: 460px;
	margin: 0 8px 24px;
	font-size: 14px;
	line-height: 17px;
}
.tp-form__consent .wpcf7-list-item {
	margin: 0;
}
.tp-contact .tp-form__consent label {
	display: block;
	color: var(--tp-heading-2, #333);
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	cursor: pointer;
}
.tp-form__consent input[type="checkbox"] {
	margin-right: 8px;
	vertical-align: -2px;
}
.tp-form__consent a {
	color: inherit;
	text-decoration: underline;
}

/* "Envoyer" (.tp-btn, module global). The retiring global-00-design.css still turns every CF7 submit into
   a 48 px pill with !important: hold tecpap's 141×34 button here until that file is gone. */
.tp-contact .wpcf7 .wpcf7-submit.tp-btn {
	display: inline-block !important;
	min-height: 0 !important;
	height: 50px !important;
	padding: 0 44px !important;
	border: 0 !important;
	border-radius: 6px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 50px !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
}
.tp-form__submit {
	position: relative;
	margin: 0 8px 0;
}
.tp-form__submit .wpcf7-spinner {
	position: absolute;
	top: 13px;
	margin-left: 12px;
}
.tp-form__note {
	margin: 9px 8px 0;
	color: var(--tp-text, #4e4e4e);
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
}

/* "Demande de devis pour : <produit>" (inc/pages.php, ?produit=…). */
.tp-form .cfx-quote-product {
	margin: 0 8px 24px;
	padding: 8px 12px;
	border-left: 3px solid var(--tp-accent, #00752f);
	background: #f5f8f6;
	color: var(--tp-heading-2, #333);
	font-size: 14px;
	line-height: 20px;
}
.tp-form .cfx-quote-product strong {
	font-weight: 500;
}

/* Errors: under the field, inside the row gap (no jump); summary under the note. */
.tp-form .wpcf7-not-valid-tip {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 3px;
	color: #b3261e;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
}
.tp-form__products .wpcf7-not-valid-tip,
.tp-form__consent .wpcf7-not-valid-tip {
	position: static;
	display: block;
	margin-top: 4px;
}
.tp-contact .tp-form .wpcf7-not-valid {
	border-color: #b3261e !important;
}
.tp-contact .wpcf7 form .wpcf7-response-output {
	margin: 16px 8px 0;
	padding: 10px 12px;
	border: 1px solid #b3261e;
	border-radius: 3px;
	color: #8c1d18;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
}
.tp-contact .wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--tp-accent, #00752f);
	color: var(--tp-accent-hover, #005a24);
}
.tp-contact .wpcf7 form:is(.init, .resetting, .submitting) .wpcf7-response-output {
	display: none;
}

/* ========================================================================== Map band (/contact/, pending) */
.tp-map {
	height: 500px;
	background: #e5e3df;
}
.tp-map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* /contact/ page: the Elementor wrapper adds nothing of its own. */
.e-con.e-con.tp-contact-page {
	--padding-top: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--padding-right: 0px;
	--gap: 0px;
	--row-gap: 0px;
	padding: 0;
}
.tp-contact-page .elementor-widget-shortcode {
	width: 100%;
	margin: 0;
}

/* ========================================================================== Mentions légales (tecpap text page) */
/* The theme's page wrappers add their own width and padding: the tecpap box below sets them. */
.tp-page-legal .site-content {
	margin: 0 !important; /* theme: 90 px above the content */
	padding: 0 !important;
}
.tp-page-legal .site-content > .col-full {
	max-width: none;
	padding: 0;
}
.tp-page-legal .site-main,
.tp-page-legal .site-main article,
.tp-page-legal .entry-content {
	margin: 0;
	padding: 0;
}
.tp-page-legal .tp-legal {
	box-sizing: border-box;
	max-width: 1120px;
	margin: 0 auto;
	padding: 60px 0;
	color: var(--tp-text, #4e4e4e);
	font-family: var(--tp-font, "Roboto", Helvetica, Arial, sans-serif);
	font-size: 16px;
	font-weight: 400;
	line-height: 24px;
}
.tp-page-legal .tp-legal h1 {
	margin: 0 0 25px;
	color: var(--tp-heading, #222);
	font-family: inherit;
	font-size: 54px;
	font-weight: 400;
	line-height: 58px;
	text-transform: none;
}
.tp-page-legal .tp-legal h2 {
	margin: 32px 0 12px;
	color: var(--tp-heading-2, #333);
	font-family: inherit;
	font-size: 19px;
	font-weight: 400;
	line-height: 28px;
	text-transform: uppercase;
}
.tp-page-legal .tp-legal :is(p, ul) {
	margin: 0 0 15px;
}
.tp-page-legal .tp-legal ul {
	padding-left: 0;
	list-style: none;
}
.tp-page-legal .tp-legal li {
	position: relative;
	padding-left: 25px;
}
.tp-page-legal .tp-legal li::before { /* tecpap's small square accent bullet */
	content: "";
	position: absolute;
	top: 10px;
	left: 4px;
	width: 6px;
	height: 6px;
	background: var(--tp-accent, #00752f);
}
.tp-page-legal .tp-legal a {
	color: var(--tp-accent, #00752f);
}

/* ========================================================================== Sizes (tecpap breakpoints) */
@media (max-width: 1219px) {
	.tp-page-legal .tp-legal {
		max-width: none;
		padding-left: 47px;
		padding-right: 47px;
	}
	.tp-contact__grid {
		grid-template-columns: 480px minmax(0, 1fr);
		column-gap: 90px;
	}
}
@media (max-width: 959px) {
	.tp-page-legal .tp-legal {
		padding-left: 25px;
		padding-right: 25px;
	}
	.tp-contact__grid {
		grid-template-columns: 420px minmax(0, 1fr);
		column-gap: 40px;
	}
	.tp-contact__siege {
		padding-top: 25px;
		font-size: 16px;
	}
	.tp-contact__siege::before {
		left: -15px;
	}
	.tp-contact__siege-title {
		margin-bottom: 13px;
	}
	.tp-contact__siege p {
		margin-bottom: 13px;
	}
}
@media (max-width: 767px) {
	.tp-contact__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.tp-contact__siege {
		margin-top: 50px;
		padding: 0 0 0 5px;
	}
	.tp-contact__siege::before {
		content: none;
	}
	.tp-contact__siege p {
		margin-bottom: 13px;
	}
}
