/* Parcours de réservation [ci_reservation] — charte du site (Outfit pour les titres, Inter pour le texte,
   bouton vert du logo arrondi, jours ouverts en crème #F3EDE0, récapitulatif en beige #F3EBD3). Mobile d'abord. */

.ci-rdv { max-width: 720px; margin-inline: auto; }
.ci-rdv *, .ci-rdv *::before, .ci-rdv *::after { box-sizing: border-box; }
/* Les listes du thème (.entry-content ul/ol) ont un retrait à gauche : annulé pour les listes du parcours */
.ci-rdv ul[class], .ci-rdv ol[class] { margin-left: 0; padding-left: 0; }
.ci-rdv :focus-visible { outline: 3px solid var(--global-palette1, #3D6B67); outline-offset: 2px; }
/* Le titre de l'étape reçoit le focus par script (lecteurs d'écran) : pas de contour visible sur lui */
.ci-rdv-panel h2:focus { outline: none; }
.ci-rdv button { font: inherit; cursor: pointer; }
.ci-rdv button:disabled { cursor: default; }

/* --- Fil des étapes --- */
.ci-rdv-steps { display: flex; gap: .4rem; list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: step; font-size: .85rem; }
.ci-rdv-steps li { flex: 1; counter-increment: step; padding-top: .5rem; border-top: 3px solid #d9dde3; color: #767676; }
.ci-rdv-steps li::before { content: counter(step) ". "; }
.ci-rdv-steps li.is-done { border-color: var(--global-palette1, #3D6B67); color: #2d2d2d; }
.ci-rdv-steps li[aria-current="step"] { border-color: var(--global-palette1, #3D6B67); color: #1a1a1a; font-weight: 600; }

/* --- Rappel des choix déjà faits --- */
.ci-rdv-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.ci-rdv-summary li { display: inline-flex; align-items: center; gap: .5rem; background: #F3EDE0; border-radius: 999px; padding: .35rem .5rem .35rem .9rem; font-size: .9rem; }
.ci-rdv-summary button { background: none; border: 0; padding: .1rem .4rem; color: var(--global-palette1, #3D6B67); text-decoration: underline; font-size: .85rem; }

/* --- Panneau de l'étape --- */
.ci-rdv-panel h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.ci-rdv-panel h3 { font-size: 1.05rem; margin: 1.5rem 0 .6rem; }
.ci-rdv-help { color: #555; font-size: .95rem; margin: 0 0 1rem; }

/* Prestations et lieu : cartes sélectionnables */
.ci-rdv-cards { display: grid; gap: .75rem; grid-template-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.ci-rdv-card { width: 100%; text-align: left; background: #fff; border: 1px solid #d9dde3; border-radius: 12px; padding: .9rem 1rem; color: #2d2d2d; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ci-rdv-card:hover { border-color: #767676; }
.ci-rdv-card[aria-pressed="true"] { border: 2px solid var(--global-palette1, #3D6B67); background: #F3EDE0; padding: calc(.9rem - 1px) calc(1rem - 1px); }
.ci-rdv-card strong { font-weight: 600; }
.ci-rdv-card small { color: #555; font-size: .9rem; white-space: nowrap; }

/* Calendrier */
.ci-rdv-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.ci-rdv-cal-nav h3 { margin: 0; text-transform: capitalize; }
.ci-rdv-cal-nav button { background: #fff; border: 1px solid #d9dde3; border-radius: 999px; width: 2.4rem; height: 2.4rem; color: #1a1a1a; font-size: 1.6rem; line-height: 1; padding: 0 0 .15rem; }
.ci-rdv-cal-nav button:not(:disabled):hover { border-color: var(--global-palette1, #3D6B67); color: var(--global-palette1, #3D6B67); }
.ci-rdv-cal-nav button:disabled { opacity: .35; }
.ci-rdv-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; }
.ci-rdv-cal-head { text-align: center; font-size: .75rem; color: #767676; padding-bottom: .3rem; }
.ci-rdv-day { aspect-ratio: 1; border: 0; border-radius: 999px; background: transparent; color: #b5b9c0; font-size: .95rem; }
.ci-rdv-day.is-open { background: #F3EDE0; box-shadow: inset 0 0 0 1.5px var(--global-palette1, #3D6B67); color: #1a1a1a; font-weight: 600; }
.ci-rdv-day.is-open:hover { background: #E4ECEA; }
.ci-rdv-day[aria-pressed="true"] { background: var(--global-palette1, #3D6B67); color: #fff; }
.ci-rdv-empty { color: #555; margin: 1rem 0 0; }

/* Heures */
.ci-rdv-slots { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.ci-rdv-slot { background: #F3EDE0; border: 1px solid var(--global-palette1, #3D6B67); border-radius: 999px; padding: .6rem 1.2rem; color: #1a1a1a; font-weight: 600; }
.ci-rdv-slot:hover { border-color: var(--global-palette1, #3D6B67); }

/* Récapitulatif et formulaire */
.ci-rdv-recap { background: #F3EBD3; border-radius: 12px; padding: 1rem 1.25rem; margin: 0 0 1.5rem; }
.ci-rdv-recap dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.ci-rdv-recap dt { color: #555; }
.ci-rdv-recap dd { margin: 0; font-weight: 600; }
.ci-rdv-recap p { margin: .8rem 0 0; font-size: .9rem; }
.ci-rdv-fields { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.ci-rdv-field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.ci-rdv-field input { width: 100%; border: 1px solid #767676; border-radius: 6px; padding: .65rem .8rem; font: inherit; background: #fff; }
.ci-rdv-field input[aria-invalid="true"] { border-color: #b82105; }
.ci-rdv-error { color: #b82105; font-size: .85rem; margin: .3rem 0 0; }
.ci-rdv-captcha { margin: 1.25rem 0; min-height: 65px; }
.ci-rdv-privacy { color: #555; font-size: .85rem; margin: 0 0 1.25rem; }

/* Boutons */
.ci-rdv-actions { margin-top: 1.5rem; }
.ci-rdv-btn { background: var(--global-palette1, #3D6B67); color: #fff; border: 0; border-radius: 999px; padding: .75rem 2.4rem; font-weight: 600; }
.ci-rdv-btn:hover { background: var(--global-palette2, #2E524F); }
.ci-rdv-btn:disabled { background: #b5b9c0; }

/* Messages */
.ci-rdv-msg:empty { display: none; }
.ci-rdv-msg { border-radius: 8px; padding: .8rem 1rem; margin: 0 0 1.25rem; font-size: .95rem; }
.ci-rdv-msg.is-error { background: #fbe9e4; color: #7a1500; }
.ci-rdv-msg.is-info { background: #F3EDE0; color: #1a1a1a; }
.ci-rdv-done { background: #F3EBD3; border-radius: 12px; padding: 1.5rem; }
.ci-rdv-done h2 { margin-top: 0; }

/* Page ouverte depuis un lien d'e-mail : message, récapitulatif, bouton */
.ci-rdv-action { background: #F3EBD3; border-radius: 12px; padding: 1.5rem; }
.ci-rdv-message { font-weight: 600; margin: 0 0 1rem; }
.ci-rdv-recap { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; padding: 0; }
.ci-rdv-recap dt { color: #555; font-weight: 400; }
.ci-rdv-recap dd { margin: 0; }

/* Le thème Kadence colore tout <button> survolé ou ayant le focus (fond vert foncé, texte blanc, bordure 2px,
   ombre) avec un sélecteur plus fort que nos classes : la durée et le prix, en gris, devenaient illisibles.
   Ces règles préfixées par .ci-rdv redonnent à chaque bouton du parcours son apparence propre. */
.ci-rdv .ci-rdv-card:is(:hover, :focus, :active) { background: #fff; color: #2d2d2d; border: 1px solid var(--global-palette1, #3D6B67); box-shadow: none; }
.ci-rdv .ci-rdv-card[aria-pressed="true"] { border: 2px solid var(--global-palette1, #3D6B67); background: #F3EDE0; color: #2d2d2d; box-shadow: none; }
.ci-rdv .ci-rdv-cal-nav button:is(:hover, :focus, :active) { background: #fff; border: 1px solid #d9dde3; color: #1a1a1a; box-shadow: none; }
.ci-rdv .ci-rdv-cal-nav button:not(:disabled):hover { border-color: var(--global-palette1, #3D6B67); color: var(--global-palette1, #3D6B67); }
.ci-rdv .ci-rdv-day:is(:hover, :focus, :active) { background: transparent; color: #b5b9c0; border: 0; box-shadow: none; }
.ci-rdv .ci-rdv-day.is-open:is(:hover, :focus, :active) { background: #E4ECEA; color: #1a1a1a; box-shadow: inset 0 0 0 1.5px var(--global-palette1, #3D6B67); }
.ci-rdv .ci-rdv-day.is-open[aria-pressed="true"] { background: var(--global-palette1, #3D6B67); color: #fff; }
.ci-rdv .ci-rdv-slot:is(:hover, :focus, :active) { background: #E4ECEA; color: #1a1a1a; border: 1px solid var(--global-palette1, #3D6B67); box-shadow: none; }
.ci-rdv .ci-rdv-summary button:is(:hover, :focus, :active) { background: none; border: 0; color: var(--global-palette2, #2E524F); box-shadow: none; }
.ci-rdv .ci-rdv-btn:is(:hover, :focus, :active) { background: var(--global-palette2, #2E524F); color: #fff; border: 0; }
.ci-rdv .ci-rdv-btn:disabled { background: #b5b9c0; color: #fff; box-shadow: none; }

@media (min-width: 600px) {
    .ci-rdv-cards { grid-template-columns: 1fr 1fr; }
    .ci-rdv-fields { grid-template-columns: 1fr 1fr; }
    .ci-rdv-field--full { grid-column: 1 / -1; }
    .ci-rdv-steps li::before { content: counter(step) " · "; }
}
