/*
 * MTCCS Ressources : affichage du bloc « Animation MTCCS ».
 * Le thème MTCCS complète ces règles ; elles suffisent avec un autre thème.
 * --mtccs-offset : hauteur occupée au-dessus de l'animation (en-tête collant + barre d'outils).
 */

.mtccs-anim {
	--mtccs-anim-ink: #16181D;
	--mtccs-anim-line: #E3E5E9;
	position: relative;
	margin-block: 0;
	background: #fff;
}

.mtccs-anim__stage {
	position: relative;
	border-block: 1px solid var(--mtccs-anim-line);
	background: #F4F5F7;
}

.mtccs-anim__frame {
	display: block;
	width: 100%;
	border: 0;
	background: #fff;
}

.mtccs-anim.is-mode-ecran .mtccs-anim__frame {
	height: calc(100vh - var(--mtccs-offset, 58px));
	min-height: 520px;
}

@supports (height: 100svh) {
	.mtccs-anim.is-mode-ecran .mtccs-anim__frame {
		height: calc(100svh - var(--mtccs-offset, 58px));
	}
}

.mtccs-anim.is-mode-auto .mtccs-anim__frame {
	height: 70vh;
	min-height: 320px;
}

.mtccs-anim__noscript {
	margin: 0;
	padding: 24px;
}

.mtccs-anim__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px 8px;
	padding: 8px 12px;
}

.mtccs-anim__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 4px;
	background: none;
	color: var(--mtccs-anim-ink);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.mtccs-anim__btn:hover {
	border-color: var(--mtccs-anim-line);
}

.mtccs-anim__btn:focus-visible {
	outline: 2px solid var(--mtccs-anim-ink);
	outline-offset: 2px;
}

.mtccs-anim__btn svg {
	flex: none;
}

.mtccs-anim__when-full {
	display: none;
}

.mtccs-anim.is-fullscreen .mtccs-anim__when-full {
	display: inline;
}

.mtccs-anim.is-fullscreen .mtccs-anim__when-normal {
	display: none;
}

.mtccs-anim.is-fullscreen {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	background: #fff;
}

.mtccs-anim.is-fullscreen .mtccs-anim__stage {
	flex: 1 1 auto;
	min-height: 0;
	border-top: 0;
}

.mtccs-anim.is-fullscreen .mtccs-anim__frame {
	height: 100%;
	min-height: 0;
}

/* ---------- Code du jour ---------- */

.mtccs-anim__frame[hidden],
.mtccs-gate[hidden] {
	display: none;
}

.mtccs-anim.is-locked .mtccs-anim__bar {
	display: none;
}

.mtccs-gate,
.mtccs-gate * {
	box-sizing: border-box;
}

.mtccs-gate {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(560px, 72vh);
	padding: clamp(32px, 6vw, 64px) 20px;
	background: #F4F5F7;
}

.mtccs-anim:not(.is-asking) .mtccs-gate__form {
	visibility: hidden;
}

.mtccs-gate__form {
	flex: 0 1 440px;
	min-width: 0;
}

.mtccs-gate .mtccs-gate__title {
	margin: 0;
	color: #16181D;
	font: 400 clamp(26px, 1.4vw + 16px, 34px)/1.15 var(--serif, "LM Roman", "Latin Modern Roman", Georgia, serif);
	line-height: 1.15;
	text-wrap: balance;
}

.mtccs-gate .mtccs-gate__help {
	margin: 14px 0 0;
	color: #5A606B;
	font-size: 15px;
	line-height: 1.5;
}

.mtccs-gate__label {
	display: block;
	margin: 28px 0 8px;
	color: #16181D;
	font-size: 14px;
	font-weight: 600;
}

.mtccs-gate__row {
	display: flex;
	gap: 10px;
}

.mtccs-gate__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 54px;
	padding: 0 16px;
	border: 1px solid #C9CDD4;
	border-radius: 6px;
	background: #FFFFFF;
	color: #16181D;
	font: 600 22px/1 var(--sans, Inter, system-ui, sans-serif);
	font-variant-numeric: tabular-nums;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.mtccs-gate__input:focus {
	border-color: #16181D;
	outline: 2px solid #16181D;
	outline-offset: 2px;
}

.mtccs-gate__input[aria-invalid="true"] {
	border-color: #C1352B;
}

.mtccs-gate__btn {
	flex: none;
	height: 54px;
	padding: 0 24px;
	border: 1px solid #16181D;
	border-radius: 6px;
	background: #16181D;
	color: #FFFFFF;
	font: 600 15px/1 var(--sans, Inter, system-ui, sans-serif);
	cursor: pointer;
}

.mtccs-gate__btn:hover {
	background: #2B2E36;
}

.mtccs-gate__btn:focus-visible {
	outline: 2px solid #16181D;
	outline-offset: 3px;
}

.mtccs-gate__btn:disabled {
	opacity: .6;
	cursor: progress;
}

.mtccs-gate .mtccs-gate__msg {
	min-height: 1.5em;
	margin: 12px 0 0;
	color: #C1352B;
	font-size: 14px;
	line-height: 1.5;
}

@media (max-width: 420px) {
	.mtccs-gate__row {
		flex-direction: column;
	}

	.mtccs-gate__btn {
		width: 100%;
	}
}
