/* Page Concours V2. */

.hmv2-contest-page {
	--hmv2-contest-ink: #171717;
	--hmv2-contest-cream: #fbf6ee;
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: #fff;
	color: var(--hmv2-contest-ink);
	font-family: "Cormorant Garamond", Georgia, serif;
}

/* Neutralise l'espace final imposé aux contenus de page par le thème parent. */
body .site-main.hmv2-contest-page {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.hmv2-contest-page + .hmv2-site-footer {
	margin-top: 0 !important;
}

.hmv2-contest-page *,
.hmv2-contest-page *::before,
.hmv2-contest-page *::after {
	box-sizing: border-box;
}

.hmv2-contest-page__header {
	display: grid;
	place-items: center;
	min-height: clamp(170px, 13vw, 250px);
	padding: 42px 24px;
	background: #fff;
}

.hmv2-contest-page__header h1 {
	display: flex;
	align-items: center;
	gap: clamp(22px, 2.6vw, 48px);
	margin: 0;
	font-family: "Canela", "Cormorant Garamond", Georgia, serif;
	font-size: clamp(36px, 2.8vw, 54px);
	font-weight: 500;
	line-height: 1;
	text-align: center;
}

.hmv2-contest-page__header h1::before,
.hmv2-contest-page__header h1::after {
	width: clamp(48px, 5vw, 92px);
	height: 1px;
	background: currentColor;
	content: "";
}

.hmv2-contest-list {
	width: 100%;
}

.hmv2-contest-card {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-height: clamp(560px, 46vw, 840px);
	background: #fff;
}

.hmv2-contest-card__visual,
.hmv2-contest-card__copy {
	min-width: 0;
	min-height: inherit;
}

.hmv2-contest-card__visual {
	grid-column: 1;
	grid-row: 1;
	overflow: hidden;
	background: #eee9e2;
}

.hmv2-contest-card--reverse .hmv2-contest-card__visual {
	grid-column: 2;
}

.hmv2-contest-card__visual img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.hmv2-contest-card__copy {
	display: flex;
	grid-column: 2;
	grid-row: 1;
	align-items: center;
	justify-content: center;
	padding: clamp(54px, 5vw, 96px);
}

.hmv2-contest-card--reverse .hmv2-contest-card__copy {
	grid-column: 1;
}

.hmv2-contest-card__copy-inner {
	width: min(100%, 590px);
}

.hmv2-contest-card h2 {
	margin: 0 0 clamp(28px, 2.2vw, 42px);
	font-family: "Canela", "Cormorant Garamond", Georgia, serif;
	font-size: clamp(38px, 3.05vw, 58px);
	font-weight: 600;
	line-height: 1.04;
}

.hmv2-contest-card__description {
	font-size: clamp(20px, 1.42vw, 27px);
	line-height: 1.27;
}

.hmv2-contest-card__description > :first-child {
	margin-top: 0;
}

.hmv2-contest-card__description > :last-child {
	margin-bottom: 0;
}

.hmv2-contest-card__description p {
	margin: 0 0 1.1em;
}

.hmv2-contest-card__actions {
	display: flex;
	align-items: flex-start;
	flex-direction: column;
	gap: 15px;
	margin-top: 8px;
}

.hmv2-contest-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	margin: 0;
	padding: 12px 27px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font-family: Poppins, Arial, sans-serif;
	font-size: clamp(15px, 1vw, 19px);
	font-weight: 400;
	line-height: 1.2;
	text-transform: none;
	transition: background-color .2s ease, color .2s ease;
}

.hmv2-contest-card__button:hover,
.hmv2-contest-card__button:focus-visible {
	background: var(--hmv2-contest-ink);
	color: #fff;
}

.hmv2-contest-card__button:focus-visible,
.hmv2-contest-card__rules:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

.hmv2-contest-card__rules {
	color: inherit;
	font-family: Poppins, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.35;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.hmv2-contest-page__empty {
	display: grid;
	place-items: center;
	min-height: 420px;
	padding: 90px 24px;
	text-align: center;
}

.hmv2-contest-page__empty p {
	max-width: 800px;
	margin: 0;
	font-family: "Canela", "Cormorant Garamond", Georgia, serif;
	font-size: clamp(28px, 2.7vw, 48px);
	line-height: 1.2;
}

.hmv2-contest-categories-section {
	width: 100%;
	background: #fff;
}

.hmv2-contest-categories {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(24px, 2.2vw, 42px);
	width: min(calc(100% - 96px), 1540px);
	margin-inline: auto;
	padding: clamp(110px, 9vw, 170px) 0 clamp(90px, 8vw, 150px);
}

.hmv2-contest-categories a {
	display: block;
	min-width: 0;
	color: inherit;
	font-family: "Canela", "Cormorant Garamond", Georgia, serif;
	font-size: clamp(18px, 1.35vw, 26px);
	line-height: 1.15;
	text-decoration: none;
}

.hmv2-contest-categories img {
	display: block;
	width: 100%;
	max-width: none;
	aspect-ratio: 1.2 / 1;
	margin: 0 0 15px;
	object-fit: cover;
}

.hmv2-contest-categories span {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

body.hmv2-contest-modal-open {
	overflow: hidden;
}

.hmv2-contest-modal[hidden] {
	display: none !important;
}

.hmv2-contest-modal {
	position: fixed;
	z-index: 100100;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	opacity: 0;
	transition: opacity .18s ease;
}

.hmv2-contest-modal.is-open {
	opacity: 1;
}

.hmv2-contest-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, .38);
	backdrop-filter: blur(1px);
}

.hmv2-contest-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 820px);
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	overflow: auto;
	padding: clamp(42px, 3.5vw, 60px) clamp(42px, 6vw, 105px) clamp(34px, 3vw, 48px);
	border-radius: 32px;
	background: var(--hmv2-contest-cream);
	box-shadow: 8px 12px 14px rgba(0, 0, 0, .23);
	outline: none;
}

.hmv2-contest-modal__dialog > h2 {
	max-width: 620px;
	margin: 0 auto clamp(24px, 2.2vw, 36px);
	font-family: "Canela", "Cormorant Garamond", Georgia, serif;
	font-size: clamp(31px, 2.5vw, 44px);
	font-weight: 600;
	line-height: 1.08;
	text-align: center;
}

.hmv2-contest-modal__close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.hmv2-contest-modal__close span::before,
.hmv2-contest-modal__close span::after {
	position: absolute;
	top: 20px;
	left: 9px;
	width: 24px;
	height: 1px;
	background: currentColor;
	content: "";
}

.hmv2-contest-modal__close span::before {
	transform: rotate(45deg);
}

.hmv2-contest-modal__close span::after {
	transform: rotate(-45deg);
}

.hmv2-contest-modal__close:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

/* Harmonisation legere de Formidable sans imposer sa structure interne. */
.hmv2-contest-modal__form .frm_forms,
.hmv2-contest-modal__form .frm_form_fields,
.hmv2-contest-modal__form fieldset {
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
}

.hmv2-contest-modal__form input[type="text"],
.hmv2-contest-modal__form input[type="email"],
.hmv2-contest-modal__form input[type="tel"],
.hmv2-contest-modal__form input[type="number"],
.hmv2-contest-modal__form select,
.hmv2-contest-modal__form textarea {
	width: 100%;
	min-height: 48px;
	border: 1px solid #555;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.hmv2-contest-modal__form button,
.hmv2-contest-modal__form input[type="submit"] {
	min-height: 48px;
	padding: 11px 25px;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-family: Poppins, Arial, sans-serif;
	font-size: 15px;
	text-transform: none;
}

.hmv2-contest-modal__form .frm_form_field {
	margin-bottom: 14px;
}

.hmv2-contest-modal__form .frm_submit {
	margin-top: 16px;
}

.hmv2-contest-modal__form .frm_button_submit {
	margin-top: 0;
	margin-bottom: 0;
}

@media (max-width: 1050px) {
	.hmv2-contest-card {
		min-height: 590px;
	}

	.hmv2-contest-card__copy {
		padding: 54px 50px;
	}
}

@media (min-width: 761px) and (max-height: 800px) {
	.hmv2-contest-modal__dialog {
		padding-top: 38px;
		padding-bottom: 28px;
	}

	.hmv2-contest-modal__dialog > h2 {
		margin-bottom: 20px;
		font-size: 36px;
	}

	.hmv2-contest-modal__form input[type="text"],
	.hmv2-contest-modal__form input[type="email"],
	.hmv2-contest-modal__form input[type="tel"],
	.hmv2-contest-modal__form input[type="number"],
	.hmv2-contest-modal__form select,
	.hmv2-contest-modal__form textarea {
		min-height: 44px;
	}

	.hmv2-contest-modal__form .frm_form_field {
		margin-bottom: 10px;
	}
}

@media (max-width: 760px) {
	.hmv2-contest-page__header {
		min-height: 145px;
		padding: 34px 20px;
	}

	.hmv2-contest-page__header h1 {
		gap: 15px;
		font-size: 34px;
	}

	.hmv2-contest-page__header h1::before,
	.hmv2-contest-page__header h1::after {
		width: 34px;
	}

	.hmv2-contest-card,
	.hmv2-contest-card--reverse {
		display: flex;
		min-height: 0;
		flex-direction: column;
	}

	.hmv2-contest-card__visual,
	.hmv2-contest-card--reverse .hmv2-contest-card__visual {
		width: 100%;
		min-height: 0;
		aspect-ratio: 1 / 1.08;
	}

	.hmv2-contest-card__copy,
	.hmv2-contest-card--reverse .hmv2-contest-card__copy {
		width: 100%;
		min-height: 0;
		padding: 54px 28px 64px;
	}

	.hmv2-contest-card h2 {
		margin-bottom: 22px;
		font-size: 34px;
	}

	.hmv2-contest-card__description {
		font-size: 19px;
	}

	.hmv2-contest-card__actions {
		margin-top: 8px;
	}

	.hmv2-contest-card__button {
		min-height: 52px;
		font-size: 15px;
	}

	.hmv2-contest-categories {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 34px 18px;
		width: min(calc(100% - 40px), 620px);
		padding: 76px 0 82px;
	}

	.hmv2-contest-categories a {
		font-size: 19px;
	}

	.hmv2-contest-modal {
		align-items: center;
		padding: 16px;
	}

	.hmv2-contest-modal__dialog {
		max-height: calc(100vh - 32px);
		max-height: calc(100dvh - 32px);
		padding: 58px 23px 36px;
		border-radius: 22px;
	}

	.hmv2-contest-modal__dialog > h2 {
		margin-bottom: 34px;
		font-size: 31px;
	}

	.hmv2-contest-modal__close {
		top: 12px;
		right: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hmv2-contest-modal,
	.hmv2-contest-card__button {
		transition: none;
	}
}
