/*
 * Popa Toiture: design tokens, base elements, buttons, links, utilities, scroll reveal.
 * Every custom class starts with "wm-". Colours and fonts come from theme.json presets,
 * so a change in Styles follows through the whole theme.
 */

:root {
	--wm-ink: var(--wp--preset--color--ink, #0e0e0e);
	--wm-yellow: var(--wp--preset--color--yellow, #fdeb00);
	--wm-white: var(--wp--preset--color--white, #fff);
	--wm-cream: var(--wp--preset--color--cream, #fffbd1);
	--wm-black: var(--wp--preset--color--black, #000);
	--wm-shade: rgb(14 14 14 / 0.96);
	--wm-line-light: rgb(255 255 255 / 0.25);

	--wm-font-head: var(--wp--preset--font-family--heading, "Barlow Condensed", "Arial Narrow", sans-serif);
	--wm-font-body: var(--wp--preset--font-family--body, Roboto, Arial, sans-serif);

	--wm-container: 1320px;
	--wm-narrow: 1000px;
	--wm-prose: 760px;
	--wm-gutter: clamp(20px, 4vw, 32px);
	--wm-section-pad: clamp(72px, 9vw, 112px);
	--wm-border: 2px solid var(--wm-ink);
	--wm-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	--wm-admin-bar: var(--wp-admin--admin-bar--height, 0px);
	--wm-admin-bar-fixed: var(--wm-admin-bar);
	--wm-header-stuck-h: 76px;
	--wm-sticky-top: var(--wm-admin-bar-fixed);

	--wm-title-xl: clamp(46px, 7vw, 108px);
	--wm-title-l: clamp(46px, 6.4vw, 100px);
	--wm-title-m: clamp(44px, 5vw, 76px);
	--wm-title-s: clamp(40px, 4.4vw, 64px);
}

/* Below 600px the admin bar scrolls away with the page: fixed elements start at the top. */
@media (max-width: 600px) {
	:root {
		--wm-admin-bar-fixed: 0px;
	}
}

/* Sticky elements sit right below the header once it sticks (its height is fixed then). */
.wm-header-stuck {
	--wm-sticky-top: calc(var(--wm-admin-bar-fixed) + var(--wm-header-stuck-h));
}

/* ------------------------------------------------------------------ Base */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	overflow-x: clip;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wm-no-scroll,
.wm-no-scroll body {
	overflow: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

:where(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	text-wrap: balance;
	overflow-wrap: break-word;
}

:where(p) {
	text-wrap: pretty;
}

:focus-visible {
	outline: 3px solid var(--wm-yellow);
	outline-offset: 3px;
}

:where(.wm-section--yellow, .wm-cta--yellow, .wm-testimonial--band, .wm-testimonial--plain, .wm-testimonial--box) :focus-visible {
	outline-color: var(--wm-ink);
}

::selection {
	background: var(--wm-yellow);
	color: var(--wm-ink);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link.screen-reader-text:focus {
	clip-path: none;
	width: auto;
	height: auto;
	margin: 0;
	padding: 14px 20px;
	z-index: 1000;
	background: var(--wm-yellow);
	color: var(--wm-ink);
	font: 700 18px/1 var(--wm-font-head);
	text-transform: uppercase;
	top: 8px;
	left: 8px;
}

/* ------------------------------------------------------------------ Layout utilities */

.wm-container {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wm-container);
	margin-inline: auto;
	padding-inline: var(--wm-gutter);
}

.wm-container--narrow {
	max-width: var(--wm-narrow);
}

.wm-section {
	padding-block: var(--wm-section-pad);
}

.wm-section--dark {
	background: var(--wm-ink);
	color: var(--wm-white);
}

.wm-section--yellow {
	background: var(--wm-yellow);
	color: var(--wm-ink);
	border-block: var(--wm-border);
}

.wm-section--rule {
	border-top: var(--wm-border);
}

.wm-section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px 32px;
	margin-bottom: 56px;
}

.wm-section-head > * {
	margin: 0;
}

.wm-section__title {
	margin-bottom: 64px;
	max-width: 800px;
}

/* Two columns that stack under ~900px. */
.wm-split {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: 64px;
	align-items: center;
}

.wm-split--top {
	align-items: start;
}

.wm-split--wide-gap {
	gap: 72px;
}

.wm-stack {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.wm-stack > * {
	margin: 0;
}

/* ------------------------------------------------------------------ Type */

.wm-h1 {
	font: 800 var(--wm-title-l) / 0.92 var(--wm-font-head);
	text-transform: uppercase;
}

.wm-h2 {
	font: 800 var(--wm-title-m) / 0.95 var(--wm-font-head);
	text-transform: uppercase;
}

.wm-h2--s {
	font-size: var(--wm-title-s);
}

.wm-h3 {
	font: 700 30px / 1 var(--wm-font-head);
	text-transform: uppercase;
}

.wm-accent {
	color: var(--wm-yellow);
}

.wm-highlight {
	background: var(--wm-yellow);
	color: var(--wm-ink);
	padding: 0 8px;
}

mark,
.wm-mark {
	background: var(--wm-yellow);
	color: var(--wm-ink);
	padding: 0 4px;
}

.wm-lead {
	font-size: 19px;
	line-height: 1.6;
	max-width: 560px;
}

.wm-text {
	font-size: 18px;
	line-height: 1.65;
	max-width: 480px;
}

/* ------------------------------------------------------------------ Links */

/* Uppercase link with a thick yellow underline ("Tous les services →"). */
.wm-link,
.wm-link-p a {
	display: inline-block;
	padding-bottom: 6px;
	border-bottom: 3px solid var(--wm-yellow);
	font: 700 20px / 1 var(--wm-font-head);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wm-link:hover,
.wm-link-p a:hover {
	border-bottom-color: currentColor;
}

/* Bold text link underlined in yellow (inside text). */
.wm-inline-link,
.wm-note a,
.wm-prose :where(p, li, td) a {
	font-weight: 700;
	border-bottom: 2px solid var(--wm-yellow);
}

.wm-inline-link:hover,
.wm-note a:hover,
.wm-prose :where(p, li, td) a:hover {
	background: var(--wm-yellow);
	color: var(--wm-ink);
}

.wm-note {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
}

.wm-note--l {
	font-size: 15px;
}

/* ------------------------------------------------------------------ Buttons */

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
}

.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	box-sizing: border-box;
	border-radius: 0;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus-visible {
	background-color: var(--wm-white);
	color: var(--wm-ink);
}

/* Dark button (on white and yellow backgrounds). */
.wm-btn--dark .wp-block-button__link,
.wm-btn--dark.wp-element-button {
	background-color: var(--wm-ink);
	color: var(--wm-white);
}

.wm-btn--dark .wp-block-button__link:hover,
.wm-btn--dark.wp-element-button:hover {
	background-color: var(--wm-yellow);
	color: var(--wm-ink);
}

:where(.wm-section--yellow, .wm-cta--yellow) .wm-btn--dark .wp-block-button__link:hover {
	background-color: var(--wm-white);
	color: var(--wm-ink);
}

/* Outline button: border in the text colour. */
.wm-btn--outline .wp-block-button__link {
	background-color: transparent;
	color: inherit;
	border: 2px solid currentColor;
	padding: 18px 28px;
}

.wm-btn--outline .wp-block-button__link:hover {
	background-color: var(--wm-white);
	border-color: var(--wm-white);
	color: var(--wm-ink);
}

:where(.wm-section--yellow, .wm-cta--yellow) .wm-btn--outline .wp-block-button__link:hover {
	border-color: var(--wm-ink);
}

/* Phone number as a big underlined link (home hero). */
.wm-btn--underline .wp-block-button__link {
	background: none;
	color: inherit;
	padding: 0 0 4px;
	border-bottom: 3px solid var(--wm-yellow);
	font-size: 26px;
	letter-spacing: 0.02em;
	text-transform: none;
}

.wm-btn--underline .wp-block-button__link:hover {
	background: none;
	color: var(--wm-yellow);
}

.wm-btn--block,
.wm-btn--block .wp-block-button__link {
	width: 100%;
}

/* ------------------------------------------------------------------ Small parts */

.wm-badge {
	display: inline-block;
	background: var(--wm-yellow);
	color: var(--wm-ink);
	padding: 10px 14px;
	font: 700 17px / 1 var(--wm-font-head);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wm-kicker {
	display: inline-block;
	margin: 0;
	background: var(--wm-yellow);
	color: var(--wm-ink);
	padding: 8px 12px;
	font: 700 17px / 1 var(--wm-font-head);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wm-dash {
	flex: none;
	width: 40px;
	height: 3px;
	background: currentColor;
}

.wm-icon {
	display: block;
	width: 64px;
	height: 64px;
	color: var(--wm-ink);
}

.wm-icon__accent {
	fill: var(--wm-yellow);
}

.wm-icon-block {
	line-height: 0;
}

.wm-icon-block .wm-icon[viewBox="0 0 48 48"] {
	width: 48px;
	height: 48px;
}

/* Square bullets. */
.wm-squares {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wm-squares li {
	position: relative;
	padding-left: 20px;
}

.wm-squares li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 8px;
	height: 8px;
	background: currentColor;
}

.wm-squares--yellow li::before {
	background: var(--wm-yellow);
}

/* Checkmark tile shown after a form is sent. */
.wm-done-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	background: var(--wm-yellow);
}

.wm-done-icon::after {
	content: "";
	width: 34px;
	height: 18px;
	margin-top: -8px;
	border-left: 6px solid var(--wm-ink);
	border-bottom: 6px solid var(--wm-ink);
	transform: rotate(-45deg);
}

/* ------------------------------------------------------------------ Scroll reveal */

.wm-delay-1 {
	--wm-delay: 80ms;
}

.wm-delay-2 {
	--wm-delay: 160ms;
}

.wm-delay-3 {
	--wm-delay: 240ms;
}

.wm-js .wm-reveal {
	opacity: 0;
	transform: translateY(48px);
	transition:
		opacity 0.8s var(--wm-ease) var(--wm-delay, 0ms),
		transform 0.9s var(--wm-ease) var(--wm-delay, 0ms),
		background-color 0.25s,
		color 0.25s;
}

.wm-js .wm-reveal--left {
	transform: translateX(-60px);
}

.wm-js .wm-reveal--right {
	transform: translateX(60px);
}

.wm-js .wm-reveal--layer {
	transform: translateY(-70px);
}

.wm-js .wm-reveal.is-visible,
.wm-reveal-all .wm-reveal {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.wm-js .wm-reveal {
		opacity: 1;
		transform: none;
		transition: background-color 0.25s, color 0.25s;
	}
}
