/* Calendrier de créneaux — reprend les couleurs du thème quand elles existent. */
.alx-creneaux {
	--alx-vert: var(--wp--preset--color--vert, #3F7D58);
	--alx-texte: var(--wp--preset--color--texte, #29322F);
	--alx-doux: var(--wp--preset--color--texte-doux, #55605B);
	--alx-sable: var(--wp--preset--color--sable, #F6ECDD);
	--alx-fond: var(--wp--preset--color--fond, #FFF8EE);
	display: block;
	font-weight: 400;
}
.alx-creneaux[aria-busy="true"] .alx-creneaux__jours { opacity: 0.5; }
.alx-creneaux__chargement { color: var(--alx-doux); font-size: 0.9375rem; }

.alx-creneaux__entete { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.75rem; }
.alx-creneaux__titre { margin: 0; font-weight: 700; font-size: 1rem; text-align: center; color: var(--alx-texte); }
.alx-creneaux .alx-creneaux__nav {
	width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--alx-sable); color: var(--alx-texte); font: inherit; font-size: 1.125rem; font-weight: 700;
}
.alx-creneaux .alx-creneaux__nav:hover:not(:disabled) { background: var(--alx-vert); color: #fff; }
.alx-creneaux .alx-creneaux__nav:disabled { opacity: 0.35; cursor: default; }

.alx-creneaux__jours { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.625rem; align-items: start; }
.alx-jour { border: 0; margin: 0; padding: 0.625rem; min-width: 0; background: var(--alx-sable); border-radius: 18px; display: flex; flex-direction: column; gap: 0.375rem; }
.alx-jour legend { float: left; width: 100%; padding: 0 0 0.25rem; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.alx-jour legend + * { clear: both; }
.alx-jour__nom { font-weight: 700; font-size: 0.875rem; text-transform: capitalize; color: var(--alx-texte); }
.alx-jour__date { font-size: 0.8125rem; color: var(--alx-doux); }
.alx-jour__vide { margin: 0; text-align: center; font-size: 0.8125rem; color: var(--alx-doux); }

.alx-creneau { position: relative; display: block; cursor: pointer; }
.alx-creneau input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.alx-creneau span:first-of-type {
	display: block; text-align: center; padding: 8px 4px; border-radius: 999px; font-weight: 700; font-size: 0.9375rem;
	background: var(--alx-fond); color: var(--alx-texte); border: 1.5px solid transparent;
}
.alx-creneau:hover span:first-of-type { border-color: var(--alx-vert); }
.alx-creneau input:checked + span { background: var(--alx-vert); color: #fff; }
.alx-creneau input:focus-visible + span { outline: 2px solid var(--alx-texte); outline-offset: 2px; }
.alx-creneau.is-pris { cursor: not-allowed; }
.alx-creneau.is-pris span:first-of-type { background: #E4DED4; color: #8A8F8C; border-color: transparent; }
.alx-creneau.is-pris:hover span:first-of-type { border-color: transparent; }

.alx-creneaux__choix { margin: 0.75rem 0 0; font-size: 0.9375rem; color: var(--alx-doux); }
.alx-creneaux__choix.is-choisi { color: var(--alx-texte); font-weight: 700; }
.alx-creneaux.wpcf7-not-valid .alx-jour { box-shadow: inset 0 0 0 1.5px #A3321F; }

.alx-creneaux .screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}

/* ---------- Bouton d'ouverture + résumé dans le formulaire ---------- */
.alx-creneaux .alx-creneaux__choix { margin: 0 0 0.625rem; }
.alx-creneaux .alx-creneaux__ouvrir {
	display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
	background: var(--alx-sable); color: var(--alx-texte); border: 1.5px solid transparent; border-radius: 999px; padding: 12px 22px;
}
.alx-creneaux .alx-creneaux__ouvrir::before {
	content: ""; width: 20px; height: 20px; background: var(--alx-vert);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='3'/%3E%3Cpath d='M3 9h18M8 2v4M16 2v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='3'/%3E%3Cpath d='M3 9h18M8 2v4M16 2v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.alx-creneaux .alx-creneaux__ouvrir:hover { border-color: var(--alx-vert); }
.alx-creneaux .alx-creneaux__ouvrir:focus-visible { outline: 2px solid var(--alx-texte); outline-offset: 2px; }
.alx-creneaux.wpcf7-not-valid .alx-creneaux__ouvrir { border-color: #A3321F; }

/* ---------- Modale ---------- */
html.alx-modal-ouverte { overflow: hidden; }
.alx-modal {
	width: min(820px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; box-sizing: border-box;
	border: 0; border-radius: 28px; padding: clamp(1.25rem, 3vw, 2rem);
	background: var(--alx-fond); color: var(--alx-texte); box-shadow: 0 24px 64px rgba(41, 50, 47, 0.25);
}
.alx-modal::backdrop { background: rgba(41, 50, 47, 0.55); }
.alx-modal[aria-busy="true"] .alx-creneaux__jours { opacity: 0.5; }
.alx-modal__entete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.alx-modal__titre { margin: 0; font-size: 1.5rem; }
.alx-creneaux .alx-modal__fermer {
	width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--alx-sable); color: var(--alx-texte); font: inherit; font-size: 1.625rem; line-height: 1;
}
.alx-creneaux .alx-modal__fermer:hover { background: var(--alx-texte); color: var(--alx-fond); }
.alx-modal__aide { margin: 0.5rem 0 1.25rem; font-size: 0.9375rem; color: var(--alx-doux); }
.alx-modal .alx-jour { background: var(--alx-sable); }
.alx-modal__pied {
	position: sticky; bottom: calc(-1 * clamp(1.25rem, 3vw, 2rem)); margin: 1.25rem calc(-1 * clamp(1.25rem, 3vw, 2rem)) calc(-1 * clamp(1.25rem, 3vw, 2rem));
	padding: 1rem clamp(1.25rem, 3vw, 2rem); background: var(--alx-fond); border-top: 1px solid #E6DACA;
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.alx-modal__choix { margin: 0; font-weight: 700; }
.alx-creneaux .alx-modal__valider {
	font: inherit; font-weight: 700; font-size: 1.1875rem; cursor: pointer; border: 0; border-radius: 999px; padding: 14px 26px;
	background: var(--alx-vert); color: #fff;
}
.alx-creneaux .alx-modal__valider:disabled { opacity: 0.4; cursor: not-allowed; }
.alx-creneaux .alx-modal__valider:not(:disabled):hover { background: var(--alx-texte); }

@media (max-width: 600px) {
	.alx-modal { width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
	.alx-creneaux__jours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Protection contre le style global des boutons d'Elementor (kit) */
.alx-creneaux button { text-transform: none; letter-spacing: normal; line-height: 1.2; box-shadow: none; }
.alx-creneaux .alx-creneaux__nav, .alx-creneaux .alx-modal__fermer { padding: 0; font-family: inherit; }
.alx-creneaux .alx-creneaux__ouvrir { font-family: inherit; }

/* Mode « en ligne » : pas de bouton ni de modale, le calendrier est affiché dans le formulaire. */
.alx-creneaux[data-mode="inline"][aria-busy="true"] .alx-creneaux__jours { opacity: 0.5; }
.alx-creneaux[data-mode="inline"] .alx-creneaux__choix { margin: 0.75rem 0 0; }

/* ---------- Calendrier en ligne : mois / semaine, onglets jours, horaires ---------- */
.alx-cal { display: flex; flex-direction: column; gap: 14px; }
.alx-cal__filtres { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.alx-cal__champ { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; margin: 0; font-size: 0.8125rem; font-weight: 700; color: var(--alx-doux); }
.alx-creneaux .alx-cal__select {
	font: inherit; font-size: 0.9375rem; font-weight: 700; color: var(--alx-texte); width: 100%; box-sizing: border-box;
	background: #fff; border: 1.5px solid #E6DACA; border-radius: 12px; padding: 10px 12px; min-height: 44px; cursor: pointer;
}
.alx-creneaux .alx-cal__select:focus-visible { outline: 2px solid var(--alx-texte); outline-offset: 1px; }
.alx-cal__navs { display: flex; gap: 6px; }
.alx-creneaux .alx-cal__nav {
	width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #E6DACA; background: #fff; color: var(--alx-texte);
	font: inherit; font-size: 1.375rem; line-height: 1; padding: 0; cursor: pointer;
}
.alx-creneaux .alx-cal__nav:not(:disabled):hover { border-color: var(--alx-vert); color: var(--alx-vert); background: #fff; }
.alx-creneaux .alx-cal__nav:disabled { opacity: 0.35; cursor: not-allowed; }

.alx-cal__jours { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.alx-creneaux[aria-busy="true"] .alx-cal__jours, .alx-creneaux[aria-busy="true"] .alx-cal__heures { opacity: 0.5; }
.alx-creneaux .alx-cal__jour {
	display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 2px; cursor: pointer;
	font: inherit; color: var(--alx-texte); background: #fff; border: 1.5px solid #E6DACA; border-radius: 16px;
}
.alx-cal__jour-nom { font-size: 0.75rem; color: var(--alx-doux); text-transform: capitalize; }
.alx-cal__jour-num { font-weight: 700; font-size: 1.0625rem; }
.alx-cal__jour-dispo { font-size: 0.6875rem; color: var(--alx-vert); font-weight: 700; }
.alx-creneaux .alx-cal__jour:hover { border-color: var(--alx-vert); background: #fff; color: var(--alx-texte); }
.alx-creneaux .alx-cal__jour.is-complet { background: #F3EEE6; border-color: transparent; }
.alx-cal__jour.is-complet .alx-cal__jour-num, .alx-cal__jour.is-complet .alx-cal__jour-dispo { color: #A39A8E; font-weight: 600; }
.alx-creneaux .alx-cal__jour.is-actif { background: var(--alx-texte); border-color: var(--alx-texte); color: var(--alx-fond); }
.alx-cal__jour.is-actif .alx-cal__jour-nom, .alx-cal__jour.is-actif .alx-cal__jour-dispo { color: var(--alx-fond); opacity: 0.8; }
.alx-cal__jour.is-actif .alx-cal__jour-num { color: var(--alx-fond); }
.alx-creneaux .alx-cal__jour:focus-visible { outline: 2px solid var(--alx-texte); outline-offset: 2px; }

.alx-cal__heures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.alx-cal__heure { position: relative; margin: 0; }
.alx-cal__heure input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.alx-cal__heure > span:not(.screen-reader-text) {
	display: block; text-align: center; border-radius: 12px; padding: 11px 0; font-weight: 700; cursor: pointer;
	background: var(--alx-sable); border: 1.5px solid transparent; transition: border-color 0.15s, background-color 0.15s;
}
.alx-cal__heure:hover > span:not(.screen-reader-text) { border-color: var(--alx-vert); }
.alx-cal__heure input:checked + span { background: var(--alx-vert); color: #fff; }
.alx-cal__heure input:focus-visible + span { outline: 2px solid var(--alx-texte); outline-offset: 2px; }
.alx-cal__heure.is-pris > span:not(.screen-reader-text) { background: #EFE8DC; color: #A39A8E; text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.alx-cal__vide { grid-column: 1 / -1; margin: 0; padding: 14px; text-align: center; color: var(--alx-doux); background: var(--alx-sable); border-radius: 12px; }

.alx-creneaux[data-mode="inline"] .alx-creneaux__choix { color: var(--alx-doux); font-size: 0.9375rem; }
.alx-creneaux[data-mode="inline"] .alx-creneaux__choix.is-choisi { color: var(--alx-vert); font-weight: 700; }

@media (max-width: 480px) {
	.alx-cal__jours { gap: 5px; }
	.alx-creneaux .alx-cal__jour { padding: 8px 0; border-radius: 12px; }
	.alx-cal__jour-dispo { display: none; }
	.alx-cal__heures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Créneaux pris : liste d'attente ---------- */
.alx-creneaux .alx-cal__heure--attente {
	display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; box-shadow: none;
}
.alx-creneaux .alx-cal__heure--attente > span {
	display: block; text-align: center; border-radius: 12px; padding: 11px 0; font-weight: 700;
	background: #EFE8DC; color: #A39A8E; text-decoration: line-through; border: 1.5px dashed transparent; transition: border-color 0.15s;
}
.alx-creneaux .alx-cal__heure--attente:hover, .alx-creneaux .alx-cal__heure--attente:focus { background: none; color: inherit; }
.alx-creneaux .alx-cal__heure--attente:hover > span { border-color: #C9BFB1; }
.alx-creneaux .alx-cal__heure--attente[aria-expanded="true"] > span { border-color: var(--alx-texte); color: var(--alx-texte); }
.alx-creneaux .alx-cal__heure--attente:focus-visible > span { outline: 2px solid var(--alx-texte); outline-offset: 2px; }

.alx-attente { background: var(--alx-sable); border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.alx-attente[hidden] { display: none; }
.alx-attente p { margin: 0; }
.alx-attente__titre { font-weight: 700; }
.alx-attente__aide { font-size: 0.9375rem; color: var(--alx-doux); }
.alx-attente__ligne { display: flex; gap: 8px; flex-wrap: wrap; }
.alx-creneaux .alx-attente input[type="email"] {
	flex: 1 1 200px; min-height: 46px; box-sizing: border-box; font: inherit; font-size: 1rem; padding: 10px 14px;
	border: 1.5px solid #E6DACA; border-radius: 999px; background: #fff; color: var(--alx-texte);
}
.alx-creneaux .alx-attente__btn {
	font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer;
	background: var(--alx-texte); color: #fff; text-transform: none; letter-spacing: normal; line-height: 1.2;
}
.alx-creneaux .alx-attente__btn:hover { background: var(--alx-vert); color: #fff; }
.alx-creneaux .alx-attente__btn:disabled { opacity: 0.5; cursor: wait; }
.alx-attente__accord { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; font-size: 0.875rem !important; font-weight: 400 !important; color: var(--alx-doux); cursor: pointer; }
.alx-attente__accord input { margin-top: 3px; flex: none; }
.alx-attente__piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.alx-attente__msg:empty { display: none; }
.alx-attente__msg.is-erreur { color: #A3321F; font-weight: 600; font-size: 0.9375rem; }
.alx-attente__ok { color: #2C5A3F; font-weight: 700; }
