/*
 * Skin WP Booking Calendar — Commune des Barils
 * Palette issue du thème WordPress les-barils.
 */

@import url("../../plugins/booking/css/skins/24_9__light.css");

/*
 * Les variables sont portées par le calendrier lui-même. Elles ne peuvent
 * ainsi pas être annulées par une variante :root.* du skin importé.
 */
html body .datepick-inline {
	/* Forme et dimensions */
	--wpbc_cal-day-cell-border-radius: .5rem;
	--wpbc_cal-day-cell-border-width: 1px;
	--wpbc_cal-day-bg-color-opacity: 100%;
	--wpbc_cal-selected-day-bg-color-opacity: 100%;
	--wpbc_cal-day-cells-padding: 6px;

	/* Typographie */
	--wpbc_cal-text-general-size: 16px;
	--wpbc_cal-text-cost-size: 70%;
	--wpbc_cal-text-header-size: 16px;
	--wpbc_cal-text-weekdays-size: 13px;
	--wpbc_cal-text-prev-next-links-size: 24px;

	/* Structure */
	--wpbc_cal-main-background-color: #ffffff;
	--wpbc_cal-header-text-color: #0f4c5c;
	--wpbc_cal-text-prev-next-links-color: #0f4c5c;
	--wpbc_cal-text-weekdays-color: #40514d;

	/* Jour disponible : Eau claire */
	--wpbc_cal-available-day-color: #e9f1ef;
	--wpbc_cal-available-text-color: #182322;

	/* Jour indisponible */
	--wpbc_cal-unavailable-day-color: #f2f5f4;
	--wpbc_cal-unavailable-text-color: #65716e;

	/* Réservation confirmée */
	--wpbc_cal-approved-day-color: #40514d;
	--wpbc_cal-approved-text-color: #ffffff;

	/* Réservation en attente : Tournesol */
	--wpbc_cal-pending-day-color: #e3b341;
	--wpbc_cal-pending-text-color: #182322;

	/* Jour sélectionné : Pétrole */
	--wpbc_cal-selected-day-color: #0f4c5c;
	--wpbc_cal-selected-text-color: #ffffff;

	/* Survol : Sarcelle */
	--wpbc_cal-hover-day-color: #2d6a63;
	--wpbc_cal-hover-text-color: #ffffff;

	/* Disponibilité partielle */
	--wpbc_cal-timespartly-day-color: #2d6a63;
	--wpbc_cal-timespartly-text-color: #ffffff;
}

/*
 * Couleurs de secours explicites pour les versions ou navigateurs qui ne
 * restituent pas correctement les couleurs calculées du skin moderne.
 */
html body .datepick-inline .date_available .wpbc-cell-box,
html body .block_hints .block_free {
	color: #182322 !important;
	background: #e9f1ef !important;
	border-color: #2d6a63 !important;
}

html body .datepick-inline .date_available a {
	color: #182322 !important;
}

html body .datepick-inline .datepick-unselectable .wpbc-cell-box {
	color: #65716e !important;
	background: #f2f5f4 !important;
	border-color: #d6dddb !important;
}

html body .datepick-inline .date_approved .wpbc-cell-box,
html body .block_hints .block_booked {
	color: #ffffff !important;
	background: #40514d !important;
	border-color: #40514d !important;
}

html body .datepick-inline .date_approved a,
html body .datepick-inline .date_approved span,
html body .block_hints .block_booked a {
	color: #ffffff !important;
}

html body .datepick-inline .date2approve .wpbc-cell-box,
html body .block_hints .block_pending {
	color: #182322 !important;
	background: #e3b341 !important;
	border-color: #e3b341 !important;
}

html body .datepick-inline .date2approve a,
html body .datepick-inline .date2approve span,
html body .block_hints .block_pending a {
	color: #182322 !important;
}

html body .datepick-inline .date_approved.timespartly .wpbc-cell-box,
html body .datepick-inline .date2approve.timespartly .wpbc-cell-box {
	color: #ffffff !important;
	background: #2d6a63 !important;
	border-color: #2d6a63 !important;
}

html body .datepick-inline .timespartly a,
html body .datepick-inline .timespartly span {
	color: #ffffff !important;
}

html body .datepick-inline .datepick-one-month .datepick td.datepick-current-day .wpbc-cell-box {
	color: #ffffff !important;
	background: #0f4c5c !important;
	border-color: #0f4c5c !important;
}

html body .datepick-inline td.datepick-current-day a,
html body .datepick-inline td.datepick-current-day span {
	color: #ffffff !important;
}

html body .datepick-inline .datepick .datepick-days-cell-over .wpbc-cell-box,
html body .datepick-inline .datepick .wpbc-cell-box:has(a:focus) {
	color: #ffffff !important;
	background: #2d6a63 !important;
	border-color: #2d6a63 !important;
}

html body .datepick-inline .datepick-days-cell-over a,
html body .datepick-inline .datepick td a:focus {
	color: #ffffff !important;
}

html body .datepick-inline .datepick-header,
html body .datepick-inline .datepick-header span,
html body .datepick-inline .calendar-links a {
	color: #0f4c5c !important;
}

html body .datepick-inline .datepick-title-row th {
	color: #40514d !important;
}

/*
 * WP Booking Calendar — intégration au thème des Barils.
 */

/* Conteneur et typographie */
.wpbc_container.wpbc_container_booking_form,
.booking_form_div {
	color: var(--wp--preset--color--ink, #182322);
	font-family: var(
		--wp--preset--font-family--interface,
		Arial,
		Atkinson Hyperlegible,
		Helvetica,
		sans-serif
	);
}

/* Libellés */
.booking_form .control-label,
.booking_form_div label {
	color: var(--wp--preset--color--ink, #182322);
	font-weight: 700;
}

/* Champs */
.booking_form_div select,
.booking_form_div textarea,
.booking_form_div input[type="text"],
.booking_form_div input[type="email"],
.booking_form_div input[type="tel"],
.booking_form_div input[type="number"] {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: .7rem .8rem;
	color: var(--wp--preset--color--ink, #182322);
	background: var(--wp--preset--color--white, #ffffff);
	border: 2px solid var(--wp--preset--color--muted, #40514d);
	border-radius: .5rem;
	font: inherit;
}

/* Focus clavier très visible */
.booking_form_div select:focus,
.booking_form_div textarea:focus,
.booking_form_div input:focus {
	border-color: var(--wp--preset--color--petrol, #0f4c5c);
	outline: 3px solid var(--wp--preset--color--sun, #e3b341);
	outline-offset: 2px;
}

/*
 * Bouton d’envoi — mêmes paramètres que les boutons du thème Les Barils.
 *
 * La forte spécificité et les !important neutralisent les règles .btn et
 * .wpbc_button_light chargées après le skin par WP Booking Calendar.
 */
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="button"],
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="submit"],
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"] {
	-webkit-appearance: none !important;
	appearance: none !important;
	box-sizing: border-box !important;
	display: inline-block !important;
	width: auto !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: .78rem 1.25rem !important;
	color: var(--wp--preset--color--white, #ffffff) !important;
	background-color: var(--wp--preset--color--petrol, #0f4c5c) !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-family: var(
		--wp--preset--font-family--interface,
		Arial,
		Atkinson Hyperlegible,
		Helvetica,
		sans-serif
	) !important;
	font-size: .92rem !important;
	font-style: normal !important;
	font-weight: 800 !important;
	line-height: 1.58 !important;
	letter-spacing: normal !important;
	text-align: center !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	text-transform: none !important;
	white-space: nowrap !important;
	vertical-align: middle !important;
	cursor: pointer !important;
	transition:
		transform .18s ease,
		box-shadow .18s ease,
		background-color .18s ease,
		color .18s ease;
}

html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="button"]:hover,
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="button"]:focus,
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="submit"]:hover,
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="submit"]:focus,
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light:hover,
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light:focus,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"]:hover,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"]:focus {
	color: var(--wp--preset--color--petrol, #0f4c5c) !important;
	background-color: var(--wp--preset--color--sun, #e3b341) !important;
	transform: translateY(-1px);
	box-shadow: 0 .5rem 1.25rem rgb(15 76 92 / 22%) !important;
}

html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="button"]:focus-visible,
html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light[type="submit"]:focus-visible,
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light:focus-visible,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"]:focus-visible {
	outline: .2rem solid var(--wp--preset--color--sun, #e3b341);
	outline-offset: .2rem;
	box-shadow: 0 0 0 .12rem var(--wp--preset--color--ink, #182322) !important;
}

html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light:active,
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light:active,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"]:active {
	transform: translateY(0);
}

html body .wpbc_container.wpbc_container_booking_form input.wpbc_button_light:disabled,
html body .wpbc_container.wpbc_container_booking_form button.wpbc_button_light:disabled,
html body input.wpbc_button_light.btn.btn[type="button"][onclick^="wpbc_booking_form_submit"]:disabled {
	opacity: .6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none !important;
}

/* Messages de confirmation */
.booking_form_div .alert-success {
	color: var(--wp--preset--color--ink, #182322);
	background: var(--wp--preset--color--water, #e9f1ef);
	border-left: 5px solid var(--wp--preset--color--teal, #2d6a63);
}

/* Messages d’erreur */
.booking_form_div .alert-danger {
	color: #721c24;
	background: #fff1f2;
	border-left: 5px solid #b4232f;
}

/* Respect de la préférence utilisateur */
@media (prefers-reduced-motion: reduce) {
	.wpbc_container *,
	.booking_form_div * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
