/* Un Verger en Ville, calendrier de disponibilités */

.uvev-cal {
	--uvev-green: #1E3D28;
	--uvev-green-soft: #2E5539;
	--uvev-cream: #F8F3EA;
	--uvev-paper: #FFFDF8;
	--uvev-terracotta: #C96B35;
	--uvev-gold: #C5963A;
	--uvev-ink: #1F2420;
	--uvev-muted: #8A8478;
	--uvev-booked: #E6DAC6;
	--uvev-booked-ink: #A39B8D;
	--uvev-line: rgba(30, 61, 40, 0.12);
	--uvev-radius: 6px;
	--uvev-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--uvev-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	font-family: var(--uvev-sans);
	color: var(--uvev-ink);
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
}

.uvev-cal *,
.uvev-cal *::before,
.uvev-cal *::after {
	box-sizing: border-box;
}

/* Barre de navigation */
.uvev-cal .uvev-cal__bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0 0 22px;
}

.uvev-cal .uvev-cal__nav {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--uvev-line);
	border-radius: 50%;
	background: var(--uvev-paper);
	color: var(--uvev-green);
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
	box-shadow: none;
	line-height: 1;
}

.uvev-cal .uvev-cal__nav:hover:not(:disabled) {
	background: var(--uvev-green);
	border-color: var(--uvev-green);
	color: var(--uvev-cream);
}

.uvev-cal .uvev-cal__nav:disabled {
	opacity: .35;
	cursor: default;
}

.uvev-cal .uvev-cal__jump {
	position: relative;
	margin: 0;
}

.uvev-cal .uvev-cal__select {
	appearance: none;
	-webkit-appearance: none;
	min-width: 210px;
	height: 44px;
	margin: 0;
	padding: 0 40px 0 18px;
	border: 1px solid var(--uvev-line);
	border-radius: 999px;
	background-color: var(--uvev-paper);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231E3D28' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	font-family: var(--uvev-sans);
	font-size: 15px;
	font-weight: 500;
	color: var(--uvev-green);
	text-align: center;
	cursor: pointer;
}

.uvev-cal .uvev-cal__select:focus-visible,
.uvev-cal .uvev-cal__nav:focus-visible,
.uvev-cal .uvev-cal__day:focus-visible {
	outline: 2px solid var(--uvev-gold);
	outline-offset: 2px;
}

.uvev-cal .uvev-cal__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Mois */
.uvev-cal .uvev-cal__months {
	display: grid;
	grid-template-columns: repeat(var(--uvev-cols, 3), minmax(0, 1fr));
	gap: 20px;
}

.uvev-cal .uvev-cal__month {
	background: var(--uvev-paper);
	border: 1px solid var(--uvev-line);
	border-radius: var(--uvev-radius);
	padding: 22px 18px 18px;
}

.uvev-cal .uvev-cal__title {
	margin: 0 0 16px;
	padding: 0;
	font-family: var(--uvev-serif);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--uvev-green);
	text-align: center;
	letter-spacing: 0;
}

.uvev-cal .uvev-cal__title span {
	color: var(--uvev-gold);
}

.uvev-cal .uvev-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.uvev-cal .uvev-cal__dow {
	display: block;
	padding: 0 0 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: center;
	color: var(--uvev-muted);
}

/* Jours */
.uvev-cal .uvev-cal__day {
	appearance: none;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	min-height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	font-family: var(--uvev-sans);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: var(--uvev-ink);
	text-decoration: none;
	box-shadow: none;
	user-select: none;
}

.uvev-cal .uvev-cal__day--empty {
	visibility: hidden;
}

.uvev-cal .uvev-cal__day--past {
	color: rgba(31, 36, 32, .22);
}

.uvev-cal .uvev-cal__day--free {
	background: #E6EEE1;
	color: var(--uvev-green);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.uvev-cal .uvev-cal__day--full {
	background: var(--uvev-booked);
	color: var(--uvev-booked-ink);
	text-decoration: line-through;
	text-decoration-color: rgba(163, 155, 141, .6);
}

/* Les dates libres sont de vrais liens : le thème ne doit pas les souligner ni les recolorer */
.uvev-cal a.uvev-cal__day,
.uvev-cal a.uvev-cal__day:visited {
	text-decoration: none !important;
	border-bottom: 0;
	box-shadow: none;
}

/* Fin de réservation : matin occupé, après-midi libre (arrivée possible) */
.uvev-cal .uvev-cal__day--out {
	background: linear-gradient(to bottom right, var(--uvev-booked) 0%, var(--uvev-booked) 49.5%, #E6EEE1 50.5%, #E6EEE1 100%);
	color: var(--uvev-green);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

/* Début de réservation : matin libre, après-midi occupé (arrivée impossible) */
.uvev-cal .uvev-cal__day--in {
	background: linear-gradient(to bottom right, #E6EEE1 0%, #E6EEE1 49.5%, var(--uvev-booked) 50.5%, var(--uvev-booked) 100%);
	color: var(--uvev-booked-ink);
}

.uvev-cal a.uvev-cal__day--free:hover,
.uvev-cal a.uvev-cal__day--out:hover,
.uvev-cal a.uvev-cal__day--free:focus-visible,
.uvev-cal a.uvev-cal__day--out:focus-visible {
	background: var(--uvev-green);
	color: var(--uvev-cream);
	transform: translateY(-1px);
}

.uvev-cal .uvev-cal__day.is-today::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 1.5px solid var(--uvev-gold);
	border-radius: 4px;
	pointer-events: none;
}

/* Légende */
.uvev-cal .uvev-cal__legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 26px;
	margin: 24px 0 0;
	font-size: 13px;
	color: var(--uvev-ink);
}

.uvev-cal .uvev-cal__key {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}

.uvev-cal .uvev-cal__swatch {
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 3px;
	flex: 0 0 auto;
}

.uvev-cal .uvev-cal__swatch--free { background: #E6EEE1; box-shadow: inset 0 0 0 1px rgba(30, 61, 40, .15); }
.uvev-cal .uvev-cal__swatch--booked { background: var(--uvev-booked); }
.uvev-cal .uvev-cal__swatch--out { background: linear-gradient(to bottom right, var(--uvev-booked) 49.5%, #E6EEE1 50.5%); box-shadow: inset 0 0 0 1px rgba(30, 61, 40, .1); }
.uvev-cal .uvev-cal__swatch--in { background: linear-gradient(to bottom right, #E6EEE1 49.5%, var(--uvev-booked) 50.5%); box-shadow: inset 0 0 0 1px rgba(30, 61, 40, .1); }

.uvev-cal .uvev-cal__note {
	margin: 14px auto 0;
	padding: 0;
	max-width: 640px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--uvev-muted);
	text-align: center;
}

.uvev-cal .uvev-cal__updated {
	display: block;
}

/* Mobile */
@media (max-width: 619px) {
	.uvev-cal .uvev-cal__bar { gap: 10px; }
	.uvev-cal .uvev-cal__select { min-width: 0; flex: 1 1 auto; width: 100%; }
	.uvev-cal .uvev-cal__jump { flex: 1 1 auto; }
	.uvev-cal .uvev-cal__month { padding: 18px 12px 14px; }
	.uvev-cal .uvev-cal__day { font-size: 15px; min-height: 40px; }
	.uvev-cal .uvev-cal__legend { justify-content: flex-start; gap: 10px 18px; }
	.uvev-cal .uvev-cal__note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.uvev-cal * { transition: none !important; }
}
