/*
Theme Name: EPMT
Author: ReflexGroup
Author URI: https://www.reflexgroup.com
Description: Custom-made theme for EPMT
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.0
Version: 1.5.21
Text Domain: epmt
*/

:root {
	--yellow: #cea645;
}

@view-transition {
	navigation: auto;
}

@font-face {
	font-family: 'Avenir Next';
	font-style: normal;
	font-weight: 300;
	src: url(/wp-content/themes/epmt/assets/fonts/AvenirNext-Regular.woff2) format('woff2');
}

@font-face {
	font-family: 'Avenir Next';
	font-style: italic;
	font-weight: 300;
	src: url(/wp-content/themes/epmt/assets/fonts/AvenirNext-Italic.woff2) format('woff2');
}

@font-face {
	font-family: 'Avenir Next';
	font-style: normal;
	font-weight: 500;
	src: url(/wp-content/themes/epmt/assets/fonts/AvenirNext-DemiBold.woff2) format('woff2');
}

@font-face {
	font-family: 'Avenir Next';
	font-style: italic;
	font-weight: 500;
	src: url(/wp-content/themes/epmt/assets/fonts/AvenirNext-DemiBoldItalic.woff2) format('woff2');
}

@font-face {
	font-family: 'Avenir Next';
	font-style: normal;
	font-weight: 700;
	src: url(/wp-content/themes/epmt/assets/fonts/AvenirNext-Heavy.woff2) format('woff2');
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font: 300 10px 'Avenir Next', sans-serif;
}

body:not(.wp-admin) {
	a {
		text-decoration: none;
	}
	p > a, li > a {
		text-decoration: underline;
		color: currentColor;
	}
}

body.wp-admin {
	p, a {
		font-size: 14px !important;
	}
}

button, input, textarea, select, a {
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

section,
.app-diploma-detail > div,
.app-training-detail > div,
.app-project-detail > div,
.app-testimony-detail > div,
.app-search-results > div {
	margin-block: 45px;
	&:first-child, &:has(.app-banner:first-child) {
		margin-top: 0;
	}
	@media (width > 1024px) {
		margin-block: 60px;
	}
}

h1, h2, h3, h4 {
	text-wrap: balance;
	line-height: 1.2;
}

.editor-styles-wrapper {
	font: 300 10px 'Avenir Next', sans-serif;
	a {
		text-decoration: none !important;
		&:hover {
			color: currentColor;
		}
	}
	.wp-block {
		margin-block: 15px;
		background-color: #f0f0f0;
	}
	section {
		margin-block: 0;
	}
}

.dashicons-epmt {
	background: url(/wp-content/themes/epmt/assets/images/logo-admin.svg) no-repeat center center / contain;
}

h1, .app-h1, h2 {
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: .1em;
}

h2, .app-h2 {
	font-size: 2.2rem;
	font-weight: 700;
	color: var(--yellow);
	@media (width > 1024px) {
		font-size: 2.6rem;
	}
	@media (width > 1280px) {
		font-size: 3rem;
	}
}
section > h2:first-child {
	margin-top: 30px;
	margin-bottom: 15px;
	@media (width > 768px) {
		margin-top: 45px;
		margin-bottom: 30px;
	}
	@media (width > 1024px) {
		margin-top: 60px;
		margin-bottom: 45px;
	}
}

h3, .app-h3 {
	letter-spacing: .05em;
	font-size: 2rem;
	font-weight: 700;
	@media (width > 1024px) {
		font-size: 2.2rem;
	}
	@media (width > 1280px) {
		font-size: 2.6rem;
	}
}
h4 {
	font-size: 1.8rem;
	font-weight: 500;
	@media (width > 1024px) {
		font-size: 2rem;
	}
	@media (width > 1280px) {
		font-size: 2.2rem;
	}
}

p {
	text-wrap: pretty;
	line-height: 1.4;
	strong, b {
		font-weight: 700;
	}
	em {
		font-style: italic;
	}
}
p, table, ol, li, div {
	font-size: 1.4rem;
	@media (width > 1024px) {
		font-size: 1.5rem;
	}
	@media (width > 1280px) {
		font-size: 1.6rem;
	}
}

.app-max-md-hidden {
	@media (width < 768px) {
		display: none;
	}
}
.app-min-md-hidden {
	@media (width >= 768px) {
		display: none;
	}
}

.app-container, .forminator-guttenberg, .sib_loader, .sib_msg_disp {
	width: calc(100vw - 30px);
	margin-inline: auto;
	@media (width >= 768px) {
		width: 90%;
	}
	@media (width > 1024px) {
		width: 85%;
	}
	@media (width > 1280px) {
		width: 80%;
	}
	@media (width >= 1536px) {
		width: 75%;
		max-width: 1200px;
	}
}

.app-link {
	padding: 5px 40px 5px 0;
	text-transform: uppercase;
	background: url(/wp-content/themes/epmt/assets/images/circle-arrow.svg) no-repeat right center / auto 26px;
	letter-spacing: .05em;
	font-weight: 300;
	font-size: 1.6rem;
	color: currentColor;
	cursor: pointer;
	@media (width >= 768px) {
		font-size: 1.8rem;
	}
	&.app-link-white {
		background-image: url(/wp-content/themes/epmt/assets/images/circle-arrow-white.svg);
	}
}

.app-link-in-grid {
	border-bottom: 1px solid #000;
	padding-right: 30px;
	text-transform: uppercase;
	font-weight: 400;
	font-size: 1.4rem;
	color: currentColor;
	letter-spacing: .1em;
	background: url(/wp-content/themes/epmt/assets/images/arrow-right.svg) no-repeat right center / auto 12px;
}

.block-editor-iframe__body {
	padding: 0 30px;
}
.block-editor-block-inspector img {
	width: 100%;
}
.block-editor-block-inspector .components-button.is-primary {
	margin-bottom: 8px;
}

.app-indent {
	@media (width >= 1024px) {
		padding-inline: 45px;
	}
	@media (width >= 1280px) {
		padding-inline: 60px;
	}
}

.app-banner h1, .app-full-image-slider:first-child h2 {
	max-width: 800px;
	margin: .75em auto;
	font-size: 2.4rem;
	color: currentColor;
	@media (width > 1024px) {
		max-width: 1000px;
		font-size: 3.2rem;
	}
	@media (width > 1280px) {
		max-width: 1200px;
		font-size: 4.2rem;
	}
}

.app-banner {
	position: relative;
	width: 100%;
	height: 100dvh;
	padding: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	text-align: center;
	color: #fff;
	background-color: #2c2621;
	text-shadow: 0 0 3px #000;

	&:first-child {
		margin-top: 0;
	}

	@media (width >= 768px) {
		height: 40vw;
	}

	> * {
		position: relative;
		z-index: 1;
	}

	> div {
		width: 100%;
		height: 40%;
		display: flex;
		flex-direction: column;
		&:nth-child(1) {
			justify-content: flex-end;
		}
		&:nth-child(3) {
			justify-content: flex-start;
		}
	}

	.app-note {
		text-transform: uppercase;
		font-weight: 200;
		font-size: 1.4rem;
		letter-spacing: .1em;
		@media (width > 1024px) {
			font-size: 1.6rem;
		}
	}

	.app-subtitle {
		position: relative;
		display: block;
		padding-block: 8px;
		width: fit-content;
		margin: 0 auto 2.4rem;
		text-transform: uppercase;
		font-weight: 500;
		font-size: 1.2rem;
		letter-spacing: .3em;
		@media (width > 1024px) {
			margin-bottom: 3.2rem;
			font-size: 1.4rem;
			padding-block: 12px;
		}
		@media (width > 1280px) {
			margin-bottom: 4.2rem;
		}

		&::before, &::after {
			content: '';
			position: absolute;
			background: #fff;
			height: 1px;
			left: 50%;
			width: calc(100% + 30px);
			transform: translateX(-50%);
		}
		&::before {
			top: 0;
		}
		&::after {
			bottom: 0;
		}
	}

	picture {
		filter: brightness(0.5);
	}
	picture, img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		position: absolute;
		z-index: 0;
		inset: 0;
	}

	p {
		margin: 0 auto;
		padding-inline: 15px;
		@media (width >= 1280px) {
			max-width: 80%;
		}
	}

	a {
		width: fit-content;
		margin: 15px auto;
		border-bottom: 1px solid var(--yellow);
		padding: 0 30px 5px 0;
		display: block;
		text-transform: uppercase;
		font-weight: 500;
		font-size: 1.4rem;
		letter-spacing: .1em;
		color: var(--yellow);
		background: url(/wp-content/themes/epmt/assets/images/circle-arrow-gold.svg) no-repeat right top / auto 20px;
		@media (width >= 768px) {
			font-size: 1.6rem;
		}
	}
}

.app-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	font-size: 1.6rem;
	line-height: 1.8;
	@media (width < 768px) {
		font-size: 1.4rem;
	}
	a {
		position: relative;
		width: fit-content;
		padding-right: 30px;
		font-weight: 500;
		color: rgba(0, 0, 0, .5);
		opacity: .5;
		&::after {
			content: '';
			position: absolute;
			right: 12px;
			width: 6px;
			height: 100%;
			top: 0;
			background: url(/wp-content/themes/epmt/assets/images/arrow-right.svg) no-repeat right center / 100% auto;
		}

		&:first-child {
			width: 55px;
			min-height: 20px;
			background: url(/wp-content/themes/epmt/assets/images/home.svg) no-repeat left center / 20px auto;
		}
	}
}

.app-text {
	&.app-text-centered {
		text-align: center;
		@media (width >= 768px) {
			padding-inline: 45px;
		}
		@media (width >= 1024px) {
			padding-inline: 75px;
		}
		@media (width >= 1280px) {
			padding-inline: 105px;
		}
	}
	h2, .app-h2 {
		margin-bottom: 30px;
	}

	iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	@media (width < 768px) {
		img {
			float: none;
			display: block;
			width: 100%;
			height: auto;
			margin: 15px auto;
			max-width: fit-content;
		}
	}

	> a {
		display: block;
		margin: 0 auto;
		width: fit-content;
	}
}

.app-tabs {
	> div {
		border-bottom: 1px solid #000;
		padding-block: 15px;
		> span {
			display: block;
			position: relative;
			padding-right: 45px;
			letter-spacing: .05em;
			font-size: 2rem;
			font-weight: 300;
			color: var(--yellow);
			cursor: pointer;
			@media (width >= 768px) {
				padding-inline: 30px 60px;
				font-size: 2.4rem;
			}
			@media (width >= 1280px) {
				font-size: 2.6rem;
			}
			&::after {
				position: absolute;
				content: '';
				width: 32px;
				height: 32px;
				top: -2px;
				right: 0;
				transition: transform .2s;
				background: url(/wp-content/themes/epmt/assets/images/circle-arrow.svg) no-repeat center center / contain;
				@media (width >= 768px) {
					width: 38px;
					height: 38px;
					top: 0;
					right: 30px;
				}
			}
			&.active::after {
				transform: rotate(90deg);
			}
		}
		> div {
			display: none;
			padding-top: 15px;
			@media (width >= 768px) {
				padding-inline: 30px;
			}
			p {
				margin-bottom: 15px;
				&:last-child {
					margin-bottom: 0;
				}
			}
			ul {
				margin-left: 15px;
				list-style-type: disc;
				li::marker {
					color: var(--yellow);
				}
			}
		}

		&:first-of-type {
			border-top: 1px solid #000;
		}
	}
}

.app-agenda {
	> ul {
		margin-bottom: 45px;
		padding: 0;
		> li {
			list-style: none;
			padding: 15px 0;
			border-top: 1px solid #000;
			@media (width >= 768px) {
				font-size: 3rem;
			}
			&:last-child {
				border-bottom: 1px solid #000;
			}

			> div:nth-child(1) {
				display: flex;
				justify-content: flex-start;
				align-items: center;
				gap: 10px;
				font-size: 1.1rem;
				cursor: pointer;
				&:has(.app-link) {
					cursor: pointer;
				}
				@media (width >= 768px) {
					font-size: 1.4rem;
				}
				@media (width >= 1024px) {
					font-size: 1.6rem;
				}

				.app-date {
					font-weight: 500;
					color: var(--yellow);
					span {
						display: block;
					}
					@media (width < 768px) {
						min-width: 120px;
						max-width: 120px;
					}
					@media (width >= 768px) {
						width: 20%;
					}
				}
				> span:nth-child(2) {
					text-transform: none;
					font-weight: 500;
					@media (width < 768px) {
						min-width: 120px;
						max-width: 120px;
					}
					@media (width >= 768px) {
						width: calc(45% - 30px);
					}
				}
				> span:nth-child(3) {
					flex-grow: 1;
				}
				.app-link {
					justify-self: flex-end;
					height: 40px;
					background-position: center center;
					transition: transform .2s;
					&.app-unfolded {
						transform: rotate(90deg);
					}
					@media (width < 768px) {
						padding-right: 30px;
						height: 30px;
						background-size: auto 20px;
					}

				}
			}

			> div:nth-child(2) {
				display: none;
				padding-top: 45px;
				padding-bottom: 45px;
				p {
					margin-bottom: 15px;
				}

				h3 + span, .app-subtitle {
					display: block;
					font-size: 2rem;
					letter-spacing: .1em;
				}
				h3 + span {
					margin: 5px 0 30px;
				}
				.app-subtitle {
					margin-bottom: 30px;
				}

				.app-link {
					display: block;
					width: fit-content;
					margin: 30px auto 0;
					border-bottom: 1px solid #000;
					font-size: 2rem;
				}
			}
		}
	}
	> div {
		display: flex;
		justify-content: flex-end;
	}
	.app-container {
		width: 100% !important;
	}
}

.app-video {
	position: relative;
	aspect-ratio: 16/9;

	video {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		filter: brightness(0.5);
		cursor: pointer;
		&.playing {
			filter: none;
		}
	}

	span {
		position: absolute;
		z-index: 1;
		width: 80px;
		height: 80px;
		top: calc(50% - 40px);
		left: calc(50% - 40px);
		background: url(/wp-content/themes/epmt/assets/images/play.svg) no-repeat center center / contain;
		cursor: pointer;
		filter: drop-shadow(3px 3px 3px rgba(0, 0, 0, 0.3));
	}
}

.app-posts {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	@media (width >= 768px) {
		gap: 30px;
	}

	h2 {
		width: 100%;
	}

	> a {
		width: calc(25% - 22.5px);
		margin-bottom: 15px;
		color: currentColor;
		@media (width < 768px) {
			width: calc(50% - 2.5px);
			margin-bottom: 15px;
		}
		&.app-highlighted {
			order: -1;
		}
	}

	a > img {
		object-fit: cover;
		width: 100%;
		aspect-ratio: 3 / 4;
		@media (width < 768px) {
			max-height: 250px;
			margin-bottom: -5px;
		}
	}

	span:nth-of-type(1) {
		display: block;
		margin: 15px 0 5px;
		font-weight: 400;
		font-size: 1.8rem;
	}
}

.app-miscellaneous-links {
	img {
		&[class^="app-logo-"] {
			padding-inline: 28%;
			object-fit: contain;
		}
		&.app-logo-1 {
			background-color: var(--yellow);
		}
		&.app-logo-2 {
			background-color: #D3D3D3;
		}
		&.app-logo-3 {
			background-color: #BE954B;
		}
		&.app-logo-0 {
			background-color: #212121;
		}
		& + span {
			color: var(--yellow);
		}
	}
}

.app-testimonies {
	a {
		span {
			display: block;
			&:nth-of-type(1) {
				position: relative;
				margin-bottom: 5px;
				text-transform: uppercase;
				letter-spacing: .1em;
				color: var(--yellow);
				&::after {
					position: absolute;
					content: '';
					left: 0;
					bottom: -2px;
					height: 1px;
					width: 15px;
					background-color: var(--yellow);
				}
			}
			&:nth-of-type(2) {
				font-size: 2rem;
			}
			&:nth-of-type(3),
			&:nth-of-type(4) {
				font-size: 1.4rem;
			}
			&:nth-of-type(5) {
				margin-top: 5px;
				width: fit-content;
			}
		}
	}
}

.app-testimony {
	.app-name {
		margin-bottom: 15px;
		text-transform: uppercase;
		letter-spacing: 1px;
		font-size: 1.8rem;
		color: var(--yellow);
	}

	.app-video {
		margin: 30px 0;
	}

	p {
		white-space: pre-line;
	}

	a {
		display: block;
		margin: 30px auto 0;
		width: fit-content;
	}
}

.forminator-guttenberg, .app-newsletter-subscription, dialog {
	h2, h3 {
		margin-top: 30px;
	}
	input, textarea, .select2-selection {
		border-radius: 30px !important;
		border: 1px solid #000 !important;
		padding: 8px 15px !important;
		letter-spacing: .1em;
		font: 400 1.4rem 'Avenir', sans-serif !important;
		background-color: #fff !important;
		&::placeholder {
			text-transform: uppercase;
			color: #000;
		}
	}
	.forminator-description {
		display: none !important;
	}
	.select2-selection {
		padding: 0 15px !important;
	}
	.select2-selection__rendered {
		padding: 0 !important;
	}
	.select2-selection__placeholder {
		text-transform: uppercase;
		font-size: 1.4rem !important;
	}
	.select2-results__option {
		background-color: #fff !important;
	}
	.select2-container--open .selection .select2-selection--single {
		border-radius: 30px 30px 0 0 !important;
		border-bottom: none !important;
	}
	.select2-selection__arrow [class*=forminator-icon-]:before {
		color: #000 !important;
	}
	.forminator-button {
		float: right;
	}
	.forminator-button, .sib-default-btn {
		text-transform: uppercase;
		border-radius: 30px !important;
		font-weight: normal !important;
		letter-spacing: .1em;
		background-color: var(--yellow) !important;
		color: #fff;
		&:hover {
			box-shadow: none !important;
		}
	}

	@media (width >= 768px) {
		input[placeholder="Ville"] {
			width: calc(50% - 15px) !important;
		}
	}
}

.forminator-select-dropdown-container--open {
	.select2-results__option--highlighted {
		background-color: #fff !important;
	}
	.forminator-dropdown--default {
		border-radius: 0 0 30px 30px !important;
		border-color: #000 !important;
		background-color: #fff !important;
		overflow: hidden;
	}
}

.forminator-success {
	box-shadow: none !important;
	background-color: var(--yellow) !important;
	p {
		color: #fff !important;
	}
}

.app-newsletter-subscription {
	h2 {
		padding-bottom: 0;
	}
	.app-subscription-inputs {
		display: flex;
		justify-content: flex-end;
		flex-wrap: wrap;
		margin: 30px 0 0;
		@media (width > 1024px) {
			margin: 30px 60px 0;
		}
		> * {
			margin: 15px;
			flex-grow: 1;
			&[type="email"] {
				margin-bottom: -5px;
				width: calc(100% - 30px);
			}
		}
		.sib-default-btn {
			flex-grow: 0;
			border: none !important;
		}
		input[type="checkbox"] {
			accent-color: var(--yellow);
		}
		label {
			font-weight: 300;
		}
	}
}

.sib_loader {
	margin: 15px auto;
	text-align: center;
}

p.sib-alert-message-success {
	margin-top: 15px;
	text-align: center;
	background-color: transparent !important;
	border-color: transparent !important;
	color: var(--yellow) !important;
}

.app-side-links {
	display: none;
	position: fixed;
	z-index: 1;
	top: 50%;
	transform: translateY(-50%);
	left: 0;
	list-style: none;
	cursor: pointer;
	@media (width >= 768px) {
		display: block;
	}
	li {
		padding: 25px 15px 25px 40px;
		position: relative;
		span {
			opacity: 0;
			transition: opacity .3s;
			position: absolute;
			top: 16px;
			left: 35px;
			width: 80px;
			text-transform: uppercase;
			font-size: 1.1rem;
		}
		&::before, &::after {
			position: absolute;
			content: '';
			border-radius: 50%;
		}
		&::before {
			top: 22px;
			left: 22px;
			width: 4px;
			height: 4px;
			background-color: #000;
		}
		&::after {
			opacity: 0;
			transition: opacity .3s;
			top: 18px;
			left: 18px;
			width: 10px;
			height: 10px;
			border: 1px solid #000;
		}
		&.app-active, &:hover {
			span, &::after {
				opacity: 1;
			}
		}
	}
}

details summary {
	margin-block: 15px;
	font-size: 1.4rem;
	font-weight: 300 !important;
	color: var(--yellow) !important;
}

.interface-complementary-area__fill,
.interface-complementary-area {
	min-width: 400px !important;
}
input[type=checkbox], input[type=radio] {
	width: 1.5rem;
	height: 1.5rem;
	&:checked:before {
		width: 1.8rem;
		height: 1.8rem;
	}
}

.wp-block {
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
}
.wp-admin .wp-block section {
	margin-block: 15px;
}

.app-rich-text {
	h2, h3 {
		margin-bottom: 15px;
	}
	p, li {
		margin-block: 15px;
		a {
			text-decoration: underline;
			color: inherit;
		}
	}
	ol, ul {
		margin-left: 17px;
	}
	ul {
		list-style-image: url(/wp-content/themes/epmt/assets/images/dot.svg);
	}
	.app-read-more {
		position: relative;
		display: inline-block;
		width: fit-content;
		margin-block: 15px;
		padding-right: 30px;
		font-weight: 500;
		font-size: 2rem;
		color: var(--yellow);
		cursor: pointer;
		&::after {
			content: '';
			position: absolute;
			width: 25px;
			height: 25px;
			top: 1px;
			right: 0;
			background: url(/wp-content/themes/epmt/assets/images/circle-arrow-gold.svg) no-repeat center right / contain;
			transition: transform .2s;
		}
		&.app-shown::after {
			transform: rotate(90deg);
		}
		& ~ * {
			height: 0;
			margin-block: 0;
			interpolate-size: allow-keywords;
			transition: all .1s;
			overflow: hidden;
			&.app-shown {
				height: auto;
				margin-block: 15px;
			}
		}
	}
}

.app-close {
	position: absolute;
	top: 0;
	right: 0;
	width: 60px;
	height: 60px;
	background: url(/wp-content/themes/epmt/assets/images/close.svg) no-repeat center center / 15px auto;
	cursor: pointer;
}

.app-youtube {
	width: 100vw;
	height: 56.25vw;
}

/* classes from WP text editor */
img.aligncenter {
	display: block;
	margin-inline: auto;
}
img.alignright {
	display: block;
	margin-left: auto;
}
