.wpresa-form {
	max-width: 34rem;
	margin: 0 auto;
}

.wpresa-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1rem;
}

.wpresa-field label {
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.wpresa-field input,
.wpresa-field select,
.wpresa-field textarea {
	width: 100%;
	padding: 0.5rem;
	box-sizing: border-box;
}

.wpresa-mode {
	margin-bottom: 1rem;
	padding: 0.75rem;
	border: 1px solid #ddd;
}

.wpresa-mode legend {
	font-weight: 600;
	padding: 0 0.5rem;
}

.wpresa-mode label {
	display: inline-block;
	margin-right: 1rem;
}

.wpresa-note {
	color: #666;
	font-size: 0.9em;
	margin-top: 0.25rem;
}

/* Honeypot : masqué aux humains, laissé au DOM pour les bots. */
.wpresa-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wpresa-submit button {
	padding: 0.6rem 1.4rem;
	cursor: pointer;
}

.wpresa-errors {
	border: 1px solid #d63638;
	background: #fcf0f1;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
}

.wpresa-errors ul {
	margin: 0;
	padding-left: 1.2rem;
}

.wpresa-confirmation {
	border: 1px solid #2271b1;
	background: #f0f6fc;
	padding: 1rem;
}

.wpresa-confirmation a {
	word-break: break-all;
}

/* ---- Agenda graphique ---- */

.wpresa-agenda {
	margin: 0 0 1.25rem;
}

.wpresa-agenda-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.35rem;
}

.wpresa-agenda-head {
	text-align: center;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: capitalize;
	color: #555;
	padding-bottom: 0.15rem;
}

.wpresa-agenda-cell {
	min-height: 5.5rem;
	min-width: 0;
	border-radius: 0.4rem;
}

.wpresa-agenda-cell.is-empty {
	background: transparent;
}

.wpresa-agenda-day {
	border: 1px solid #ddd;
	padding: 0.3rem;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
}

.wpresa-agenda-daylabel {
	display: none;
	font-size: 0.78rem;
	font-weight: 600;
	text-transform: capitalize;
}

.wpresa-agenda-day.is-selectable {
	cursor: pointer;
}

.wpresa-agenda-day.is-selectable:hover {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1 inset;
}

.wpresa-agenda-day.is-selectable:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.wpresa-agenda-day.is-selected {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px #2271b1 inset;
}

.wpresa-agenda-day.is-closed {
	background: #f4f4f4;
	color: #999;
}

.wpresa-agenda-dom {
	font-size: 0.8rem;
	font-weight: 600;
}

.wpresa-agenda-closed {
	font-size: 0.75rem;
	font-style: italic;
}

.wpresa-agenda-conditions {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.wpresa-pastille {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 0.15rem 0.35rem;
	border-radius: 0.35rem;
	color: #fff;
	font-size: 0.68rem;
	line-height: 1.3;
	text-shadow: 0 1px 1px rgba( 0, 0, 0, 0.25 );
}

.wpresa-pastille-name {
	font-weight: 600;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
	line-height: 1.15;
}

.wpresa-pastille-meta {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}

.wpresa-pastille-val {
	font-weight: 600;
}

.wpresa-icon {
	display: inline-flex;
	align-items: center;
}

.wpresa-agenda-slots {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: auto;
}

.wpresa-slot-chip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.1rem 0.4rem;
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	box-sizing: border-box;
	border: 1px solid #bbb;
	background: #f3f3f3;
	color: #444;
	border-radius: 0.5rem;
	padding: 0.4rem 0.5rem;
	font-size: 0.85rem;
	font-family: inherit;
	text-align: center;
}

.wpresa-slot-icon {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.wpresa-slot-icon svg {
	display: block;
	width: 16px;
	height: 16px;
}

.wpresa-slot-time {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}

.wpresa-slot-state {
	flex-basis: 100%;
	text-align: center;
	line-height: 1.15;
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	opacity: 0.85;
	white-space: nowrap;
}

.wpresa-slot-chip.is-free {
	border-color: #1a7f37;
	background: #edf7ee;
	color: #135e2b;
	cursor: pointer;
}

.wpresa-slot-chip.is-free:hover,
.wpresa-slot-chip.is-free.is-selected {
	background: #1a7f37;
	color: #fff;
}

.wpresa-slot-chip.is-reserved {
	border-color: #d68000;
	background: #fdf4e7;
	color: #8a5300;
	cursor: not-allowed;
}

.wpresa-slot-chip.is-confirmed {
	border-color: #2271b1;
	background: #eaf2fb;
	color: #124a7a;
	cursor: not-allowed;
}

.wpresa-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
	font-size: 0.78rem;
}

.wpresa-legend li {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.wpresa-legend-dot {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.wpresa-legend-dot svg {
	width: 0.85rem;
	height: 0.85rem;
}

.wpresa-legend-dot.is-free {
	background: #1a7f37;
}

.wpresa-legend-dot.is-reserved {
	background: #d68000;
}

.wpresa-legend-dot.is-confirmed {
	background: #2271b1;
}

.wpresa-selection {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin: 0.75rem 0;
	padding: 0.6rem 0.75rem;
	border: 1px solid #2271b1;
	border-left-width: 4px;
	border-radius: 0.4rem;
	background: #f0f6fc;
}

.wpresa-selection[hidden] {
	display: none;
}

.wpresa-selection-label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #124a7a;
}

.wpresa-selection-value {
	font-size: 1.05rem;
	font-weight: 600;
	color: #1d2327;
}

.wpresa-selection-value:empty {
	display: none;
}

.wpresa-selection-note {
	font-size: 0.82rem;
	color: #555;
}

.wpresa-selection-note:empty {
	display: none;
}

/* Champ flatpickr : apparence de datepicker (icône calendrier + curseur). */
input.wpresa-datepicker-input {
	cursor: pointer;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: right 0.6rem center;
	background-size: 1.1rem;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cline x1='3' y1='9' x2='21' y2='9'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3C/svg%3E" );
	padding-right: 2.2rem;
}

/* Dates fermées / indisponibles : nettement distinctes des jours des mois voisins. */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
	color: #b32d2e;
	background-color: #fbeaea;
	cursor: not-allowed;
	opacity: 1;
	border-color: transparent;
}

/* Mobile : jours empilés en une colonne. */
@media ( max-width: 600px ) {
	.wpresa-agenda-grid {
		grid-template-columns: 1fr;
	}

	.wpresa-agenda-head {
		display: none;
	}

	.wpresa-agenda-cell.is-empty {
		display: none;
	}

	.wpresa-agenda-cell {
		min-height: 0;
	}

	.wpresa-agenda-dom {
		display: none;
	}

	.wpresa-agenda-daylabel {
		display: block;
	}

	.wpresa-agenda-conditions {
		flex-direction: row;
		flex-wrap: wrap;
	}

	/* Colonne pleine largeur : créneau sur une seule ligne, libellé à droite. */
	.wpresa-slot-chip {
		flex-wrap: nowrap;
		justify-content: flex-start;
		text-align: left;
	}

	.wpresa-slot-state {
		flex-basis: auto;
		margin-left: auto;
		text-align: right;
	}
}

