/* AOrtho-RDV - panneau coulissant de prise de rendez-vous et horaires d'ouverture. */

.aortho-rdv-voile {
	position: fixed;
	inset: 0;
	z-index: 99998;
	background: rgba(10, 25, 45, .55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
	cursor: pointer;
}
.aortho-rdv-voile.est-visible { opacity: 1; visibility: visible; transition: opacity .3s ease; }

.aortho-rdv-panneau {
	--c: var(--aortho-rdv-couleur, #1565C0);
	position: fixed;
	top: 0;
	right: 0;
	z-index: 99999;
	width: min(480px, 100vw);
	height: 100vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1f2937;
	box-shadow: -6px 0 40px rgba(0, 0, 0, .2);
	transform: translateX(110%);
	transition: transform .38s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	outline: none;
}
@supports (height: 100dvh) { .aortho-rdv-panneau { height: 100dvh; } }
.aortho-rdv-panneau.est-ouvert { transform: translateX(0); }
body.aortho-rdv-ouvert { overflow: hidden; }

.aortho-rdv-panneau *, .aortho-rdv-panneau *::before, .aortho-rdv-panneau *::after { box-sizing: border-box; }

.aortho-rdv-entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px 14px;
	background: var(--c);
	color: #fff;
}
.aortho-rdv-entete h2 { margin: 0; font-size: 19px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.aortho-rdv-fermer {
	flex: none;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	color: #fff;
	cursor: pointer;
	transition: background .15s, transform .15s;
}
.aortho-rdv-fermer:hover { background: rgba(255, 255, 255, .3); transform: scale(1.06); }
.aortho-rdv-fermer:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.aortho-rdv-etapes { display: flex; margin: 0; padding: 0 20px; list-style: none; background: var(--c); counter-reset: etape; }
.aortho-rdv-etapes li {
	flex: 1;
	padding: 0 0 12px;
	color: rgba(255, 255, 255, .65);
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .05em;
	border-bottom: 3px solid transparent;
	counter-increment: etape;
}
.aortho-rdv-etapes li::before { content: counter(etape) ". "; }
.aortho-rdv-etapes li.est-active { color: #fff; border-color: #fff; }
.aortho-rdv-etapes li.est-faite { color: rgba(255, 255, 255, .9); }

.aortho-rdv-corps { flex: 1; overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.aortho-rdv-corps h3 { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #111827; }
.aortho-rdv-corps p { margin: 0 0 12px; }
.aortho-rdv-message { padding: 10px 12px; border-radius: 8px; background: #f1f5f9; font-size: 14px; }
.aortho-rdv-erreur { padding: 10px 12px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 14px; }
.aortho-rdv-attente { display: flex; justify-content: center; padding: 40px 0; }
.aortho-rdv-attente::after {
	content: "";
	width: 34px;
	height: 34px;
	border: 3px solid #e5e7eb;
	border-top-color: var(--c);
	border-radius: 50%;
	animation: aortho-rdv-tourne .8s linear infinite;
}
@keyframes aortho-rdv-tourne { to { transform: rotate(360deg); } }

.aortho-rdv-choix { display: grid; gap: 10px; margin-bottom: 18px; }
.aortho-rdv-choix.deux { grid-template-columns: 1fr 1fr; }
.aortho-rdv-option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	padding: 13px 14px;
	border: 1.5px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	color: #111827;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
.aortho-rdv-option small { font-weight: 400; color: #6b7280; }
.aortho-rdv-option:hover { border-color: var(--c); }
.aortho-rdv-option:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.aortho-rdv-option.est-choisi { border-color: var(--c); background: #f0f6fd; background: color-mix(in srgb, var(--c) 8%, #fff); box-shadow: inset 0 0 0 1px var(--c); }

.aortho-rdv-jours { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 6px; scroll-snap-type: x proximity; }
.aortho-rdv-jour {
	flex: none;
	width: 74px;
	padding: 8px 4px;
	border: 1.5px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	color: #111827;
	font: inherit;
	text-align: center;
	cursor: pointer;
	scroll-snap-align: start;
}
.aortho-rdv-jour span { display: block; font-size: 12px; color: #6b7280; text-transform: capitalize; }
.aortho-rdv-jour strong { display: block; font-size: 18px; }
.aortho-rdv-jour span.mois { text-transform: none; }
.aortho-rdv-recap strong { font-weight: 700; }
.aortho-rdv-jour.est-choisi { border-color: var(--c); background: var(--c); color: #fff; }
.aortho-rdv-jour.est-choisi span { color: rgba(255, 255, 255, .85); }
.aortho-rdv-heures { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.aortho-rdv-heure {
	padding: 9px 0;
	border: 0;
	border-radius: 8px;
	background: #e8f0fa;
	background: color-mix(in srgb, var(--c) 12%, #fff);
	color: var(--c);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.aortho-rdv-heure:hover, .aortho-rdv-heure:focus-visible { background: var(--c); color: #fff; outline: none; }

.aortho-rdv-recap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 16px;
	padding: 12px 14px;
	border-left: 4px solid var(--c);
	border-radius: 6px;
	background: #f8fafc;
}
.aortho-rdv-recap strong::first-letter { text-transform: uppercase; }
.aortho-rdv-formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aortho-rdv-champ { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; color: #374151; }
.aortho-rdv-champ.large { grid-column: 1 / -1; }
.aortho-rdv-champ input, .aortho-rdv-champ textarea {
	width: 100%;
	padding: 10px 11px;
	border: 1.5px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #111827;
	font: inherit;
	font-weight: 400;
}
.aortho-rdv-champ textarea { min-height: 70px; resize: vertical; }
.aortho-rdv-champ input:focus, .aortho-rdv-champ textarea:focus { border-color: var(--c); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.aortho-rdv-champ small { font-weight: 400; color: #6b7280; }
.aortho-rdv-accord { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #374151; }
.aortho-rdv-accord input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--c); }
.aortho-rdv-piege { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.aortho-rdv-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; grid-column: 1 / -1; }
.aortho-rdv-principal, .aortho-rdv-retour {
	padding: 11px 18px;
	border-radius: 999px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.aortho-rdv-principal { border: 0; background: var(--c); color: #fff; }
.aortho-rdv-principal:disabled { opacity: .6; cursor: wait; }
.aortho-rdv-retour { border: 1.5px solid #d1d5db; background: #fff; color: #374151; }
.aortho-rdv-principal:focus-visible, .aortho-rdv-retour:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

.aortho-rdv-fin { text-align: center; padding-top: 18px; }
.aortho-rdv-fin svg { width: 64px; height: 64px; color: #16a34a; margin-bottom: 10px; }

.aortho-rdv-bouton, .aortho-rdv-flottant {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--aortho-rdv-couleur, #1565C0);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: filter .15s, transform .15s;
}
.aortho-rdv-bouton:hover, .aortho-rdv-flottant:hover { filter: brightness(1.08); transform: translateY(-1px); }
.aortho-rdv-flottant { position: fixed; right: 20px; bottom: 20px; z-index: 9990; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
body.aortho-rdv-ouvert .aortho-rdv-flottant { display: none; }

@media (max-width: 520px) {
	.aortho-rdv-panneau { width: 100vw; }
	.aortho-rdv-formulaire { grid-template-columns: 1fr; }
	.aortho-rdv-choix.deux { grid-template-columns: 1fr; }
	.aortho-rdv-etapes li { font-size: 11px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) {
	.aortho-rdv-panneau, .aortho-rdv-voile { transition: none; }
}

/* Horaires [aortho_horaires] */
.aortho-horaires table { width: 100%; border-collapse: collapse; }
.aortho-horaires th, .aortho-horaires td { padding: 6px 8px; border-bottom: 1px solid rgba(0, 0, 0, .08); text-align: left; }
.aortho-horaires th { font-weight: 600; width: 40%; }
.aortho-horaires tr.ferme td { opacity: .6; }
.aortho-horaires tr.aujourdhui th, .aortho-horaires tr.aujourdhui td { font-weight: 700; color: var(--aortho-rdv-couleur, #1565C0); }
.aortho-horaires-fermetures { margin-top: 8px; font-size: .9em; }
