/**
 * Styles publics du plugin eZee – Réservation de service.
 *
 * Le préfixe "ezee-reservation" évite que ces règles modifient les autres
 * formulaires, boutons ou fenêtres du site.
 */

:root {
	--ezee-reservation-text: #1d2419;
	--ezee-reservation-muted: #687064;
	--ezee-reservation-border: #dfe4da;
	--ezee-reservation-soft: #f4f7f1;
}

/* Empêche la page située derrière la modale de défiler. */
body.ezee-reservation-modal-open {
	overflow: hidden;
}

/* Bouton généré avec le shortcode [ezee_reservation]. */
.ezee-reservation-shortcode-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: #84d42a;
	color: #1d2419;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: transform 180ms ease, filter 180ms ease;
}

.ezee-reservation-shortcode-button:hover {
	filter: brightness(0.96);
	transform: translateY(-1px);
}

/* Conteneur plein écran de la modale. */
.ezee-reservation-modal {
	--ezee-primary: #84d42a;
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: "Open Sans", Arial, sans-serif;
	color: var(--ezee-reservation-text);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 180ms ease, visibility 180ms ease;
}

.ezee-reservation-modal.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

/* Fond sombre et légèrement flouté, inspiré de la modale eZee PRO. */
.ezee-reservation-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 12, 7, 0.64);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

/* Carte blanche principale. */
.ezee-reservation-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(100%, 720px);
	max-height: calc(100vh - 64px);
	max-height: min(820px, calc(100dvh - 64px));
	overflow: hidden;
	background: #ffffff;
	border-radius: 24px;
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.29);
	transform: translateY(14px) scale(0.985);
	transition: transform 200ms ease;
}

.ezee-reservation-modal.is-open .ezee-reservation-modal__dialog {
	transform: translateY(0) scale(1);
}

/* Barre supérieure fixe avec progression et croix de fermeture. */
.ezee-reservation-modal__topbar {
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 22px 34px 18px;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid #edf0e9;
}

/* Flèche discrète pour revenir à l'étape précédente. */
.ezee-reservation-modal__back {
	flex: 0 0 38px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f0f2ee;
	color: #7b8277;
	cursor: pointer;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.ezee-reservation-modal__back[hidden] {
	display: none !important;
}

.ezee-reservation-modal__back:hover {
	background: #e4e8e0;
	color: #3f463b;
	transform: translateX(-1px);
}

.ezee-reservation-modal__back svg {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.ezee-reservation-progress {
	display: grid;
	grid-template-columns: minmax(100px, 1fr) auto;
	align-items: center;
	gap: 14px;
	width: 100%;
}

.ezee-reservation-progress__track {
	height: 7px;
	overflow: hidden;
	background: #e9ede5;
	border-radius: 999px;
}

.ezee-reservation-progress__bar {
	display: block;
	width: 50%;
	height: 100%;
	background: var(--ezee-primary);
	border-radius: inherit;
	transition: width 250ms ease;
}

.ezee-reservation-progress__text {
	color: var(--ezee-reservation-muted);
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.ezee-reservation-modal__close {
	flex: 0 0 42px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--ezee-reservation-border);
	border-radius: 50%;
	background: #ffffff;
	color: var(--ezee-reservation-text);
	cursor: pointer;
	transition: background 160ms ease, transform 160ms ease;
}

.ezee-reservation-modal__close:hover {
	background: var(--ezee-reservation-soft);
	transform: rotate(4deg);
}

.ezee-reservation-modal__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.8;
}

/* La zone centrale défile sans déplacer la barre supérieure. */
.ezee-reservation-modal__content {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
}

.ezee-reservation-step {
	padding: 30px 34px 34px;
}

.ezee-reservation-step[hidden] {
	display: none !important;
}

.ezee-reservation-heading {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 15px;
	margin: -30px -34px 18px;
	padding: 26px 34px 16px;
	border-bottom: 1px solid #edf0e9;
	background: rgba(255, 255, 255, 0.97);
}

.ezee-reservation-heading__icon {
	flex: 0 0 54px;
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--ezee-primary) 20%, white);
	color: #3f7310;
}

.ezee-reservation-heading__icon svg {
	width: 30px;
	height: 30px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.ezee-reservation-heading__icon img {
	display: block;
	width: 31px;
	height: 31px;
	object-fit: contain;
}

.ezee-reservation-heading__eyebrow {
	margin: 0 0 3px;
	color: #578c22;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ezee-reservation-heading h2,
.ezee-reservation-step--complete h2 {
	margin: 0;
	color: var(--ezee-reservation-text);
	font-size: clamp(23px, 3vw, 29px);
	font-weight: 780;
	line-height: 1.15;
}

.ezee-reservation-introduction {
	margin: 0 0 20px;
	color: #50584d;
	font-size: 15px;
	line-height: 1.65;
}

.ezee-reservation-joy-message {
	margin: 0 0 22px;
	padding: 18px 20px;
	border-radius: 16px;
	background: var(--ezee-reservation-soft);
	color: #35402f;
	font-size: 17px;
	font-weight: 750;
	line-height: 1.5;
}

/* Cadre du calendrier externe TIMIFY. */
.ezee-reservation-timify {
	position: relative;
	min-height: 520px;
	overflow: hidden;
	border: 1px solid var(--ezee-reservation-border);
	border-radius: 18px;
	background: #f7f9f5;
}

.ezee-reservation-timify__loading {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: var(--ezee-reservation-muted);
	font-size: 14px;
	font-weight: 700;
}

.ezee-reservation-timify__frame {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 600px;
	border: 0;
	background: #ffffff;
}

.ezee-reservation-help {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 14px 16px;
	border-left: 4px solid var(--ezee-primary);
	border-radius: 0 12px 12px 0;
	background: var(--ezee-reservation-soft);
	color: #4d5748;
	font-size: 13px;
	line-height: 1.5;
}

.ezee-reservation-help strong {
	color: var(--ezee-reservation-text);
}

/* Pieds fixes : ils restent visibles sous le contenu qui défile. */
.ezee-reservation-modal__footer {
	display: grid;
	grid-template-columns: minmax(250px, 1fr) minmax(280px, auto);
	align-items: center;
	gap: 16px;
	padding: 16px 34px 20px;
	border-top: 1px solid #edf0e9;
	background: rgba(255, 255, 255, 0.98);
}

.ezee-reservation-modal__footer[hidden] {
	display: none !important;
}

.ezee-reservation-modal__footer .ezee-reservation-button {
	width: auto;
}

.ezee-reservation-modal__footer--loan {
	display: block;
}

.ezee-reservation-modal__footer--loan .ezee-reservation-actions {
	width: 100%;
}

.ezee-reservation-modal__footer--loan .ezee-reservation-button--primary {
	width: 100%;
}

/* Boutons partagés par les différentes étapes. */
.ezee-reservation-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	padding: 13px 24px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.ezee-reservation-button:hover {
	transform: translateY(-1px);
}

.ezee-reservation-button:focus-visible,
.ezee-reservation-modal__close:focus-visible,
.ezee-reservation-modal__back:focus-visible,
.ezee-reservation-shortcode-button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ezee-primary) 45%, white);
	outline-offset: 3px;
}

.ezee-reservation-button--primary {
	width: 100%;
	border: 1px solid var(--ezee-primary);
	background: var(--ezee-primary);
	color: #17200f;
}

.ezee-reservation-button--primary:hover {
	filter: brightness(0.96);
}

.ezee-reservation-button--secondary {
	border: 1px solid var(--ezee-reservation-border);
	background: #ffffff;
	color: var(--ezee-reservation-text);
}

.ezee-reservation-button--secondary:hover {
	background: var(--ezee-reservation-soft);
}

/* Bloc très visible rappelant les dates à saisir manuellement dans Lokki. */
.ezee-reservation-reminder {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 22px 0;
	padding: 18px;
	border: 1px solid color-mix(in srgb, var(--ezee-primary) 50%, white);
	border-radius: 16px;
	background: color-mix(in srgb, var(--ezee-primary) 12%, white);
}

.ezee-reservation-reminder--compact {
	align-items: center;
	margin: 0 0 12px;
	padding: 11px 13px;
	border-radius: 13px;
}

.ezee-reservation-reminder--compact .ezee-reservation-reminder__icon {
	flex-basis: 27px;
	width: 27px;
	height: 27px;
	font-size: 13px;
}

.ezee-reservation-reminder--compact strong {
	margin-bottom: 1px;
	font-size: 13px;
}

.ezee-reservation-reminder--compact p {
	font-size: 12px;
	line-height: 1.4;
}

.ezee-reservation-reminder__icon {
	flex: 0 0 30px;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--ezee-primary);
	color: #17200f;
	font-weight: 900;
}

.ezee-reservation-reminder strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
}

.ezee-reservation-reminder p {
	margin: 0;
	color: #46513f;
	font-size: 14px;
	line-height: 1.6;
}

.ezee-reservation-details {
	display: grid;
	gap: 12px;
	margin: 0 0 22px;
	padding: 0;
	list-style: none;
}

.ezee-reservation-details li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: #414a3d;
	font-size: 14px;
	line-height: 1.5;
}

.ezee-reservation-details li > span {
	color: #578c22;
	font-weight: 900;
}

.ezee-reservation-details li > .ezee-reservation-detail-copy {
	color: #414a3d;
	font-weight: 400;
}

.ezee-reservation-actions {
	display: grid;
	gap: 12px;
}

.ezee-reservation-actions--two {
	grid-template-columns: minmax(140px, 0.7fr) minmax(230px, 1.3fr);
}

.ezee-reservation-status {
	min-height: 21px;
	margin: 12px 0 0;
	color: #477a1a;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

/* Dernier écran, centré et volontairement très simple. */
.ezee-reservation-step--complete {
	padding-top: 54px;
	padding-bottom: 54px;
	text-align: center;
}

.ezee-reservation-step--complete .ezee-reservation-heading__eyebrow {
	margin-top: 14px;
}

.ezee-reservation-step--complete > p:not(.ezee-reservation-heading__eyebrow) {
	max-width: 520px;
	margin: 16px auto 24px;
	color: var(--ezee-reservation-muted);
	font-size: 15px;
	line-height: 1.65;
}

.ezee-reservation-step--complete .ezee-reservation-button {
	max-width: 320px;
}

.ezee-reservation-complete-icon {
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	margin: 0 auto;
	border-radius: 50%;
	background: color-mix(in srgb, var(--ezee-primary) 20%, white);
	color: #477a1a;
	font-size: 32px;
	font-weight: 900;
}

/* Adaptation tablette et téléphone. */
@media (max-width: 700px) {
	.ezee-reservation-modal {
		align-items: stretch;
		padding: 0;
	}

	.ezee-reservation-modal__dialog {
		width: 100%;
		max-height: 100dvh;
		border-radius: 0;
	}

	.ezee-reservation-modal__topbar {
		padding: 14px 16px 12px;
	}

	.ezee-reservation-step {
		padding: 22px 16px 26px;
	}

	.ezee-reservation-modal__footer {
		grid-template-columns: 1fr;
		gap: 10px;
		padding: 12px 16px 16px;
	}

	.ezee-reservation-modal__footer .ezee-reservation-help {
		display: flex;
		padding: 8px 10px;
		font-size: 11px;
		line-height: 1.35;
	}

	.ezee-reservation-modal__footer .ezee-reservation-button {
		width: 100%;
	}

	.ezee-reservation-modal__footer--loan .ezee-reservation-reminder {
		display: flex;
	}

	.ezee-reservation-heading {
		align-items: flex-start;
		margin: -22px -16px 16px;
		padding: 20px 16px 14px;
	}

	.ezee-reservation-heading__icon {
		flex-basis: 46px;
		width: 46px;
		height: 46px;
		border-radius: 14px;
	}

	.ezee-reservation-heading__icon svg {
		width: 26px;
		height: 26px;
	}

	.ezee-reservation-heading__icon img {
		width: 27px;
		height: 27px;
	}

	.ezee-reservation-timify {
		min-height: 480px;
		border-right: 0;
		border-left: 0;
		border-radius: 12px;
	}

	.ezee-reservation-timify__frame {
		height: 560px;
	}

	.ezee-reservation-actions--two {
		grid-template-columns: 1fr;
	}

	.ezee-reservation-actions--two .ezee-reservation-button--primary {
		grid-row: 1;
	}

}

@media (max-width: 420px) {
	.ezee-reservation-progress {
		gap: 8px;
	}

	.ezee-reservation-progress__text {
		font-size: 11px;
	}

	.ezee-reservation-modal__close {
		flex-basis: 38px;
		width: 38px;
		height: 38px;
	}

	.ezee-reservation-modal__back {
		flex-basis: 34px;
		width: 34px;
		height: 34px;
	}

	.ezee-reservation-heading h2,
	.ezee-reservation-step--complete h2 {
		font-size: 22px;
	}
}

/* Respecte la préférence système des personnes sensibles aux animations. */
@media (prefers-reduced-motion: reduce) {
	.ezee-reservation-modal,
	.ezee-reservation-modal__dialog,
	.ezee-reservation-button,
	.ezee-reservation-modal__close,
	.ezee-reservation-modal__back,
	.ezee-reservation-progress__bar {
		transition: none !important;
	}
}
