/* PDV Réservations : pages publiques. Couleurs reprises du thème (variables --color-*). */
.resa {
  --resa-c: var(--color-primary, #1f6b52);
  --resa-ink: var(--color-default, #1b1f1d);
  --resa-line: color-mix(in srgb, var(--resa-ink) 18%, transparent);
  --resa-soft: color-mix(in srgb, var(--resa-c) 8%, #fff);
  --resa-mute: color-mix(in srgb, var(--resa-ink) 68%, #fff);
  --resa-busy: #f6d9d4;
  --resa-busy-ink: #8c2a1c;
  --resa-pend: #fbe7c1;
  --resa-pend-ink: #6e4700;
  --resa-ok: #e3f1e8;
  --resa-ok-ink: #1d5c37;
  color: var(--resa-ink);
  padding-block: 24px 56px;
}
.resa *, .resa *::before, .resa *::after { box-sizing: border-box; }
.resa .title { margin-bottom: .4em; }
.resa-lead { max-width: 64ch; font-size: 1.05em; margin: 0 0 1em; }
.resa-meta { color: var(--resa-mute); font-size: .9em; font-weight: 400; }
.resa-h2 { font-size: 1.35em; margin: 1.6em 0 .6em; }
.resa-back { margin: 0 0 .5em; }
.resa-back a { text-decoration: underline; }

/* Catalogue */
.resa-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0 1.5em; }
.resa-chip { border: 1px solid var(--resa-line); border-radius: 999px; padding: 7px 16px; text-decoration: none; color: inherit; }
.resa-chip:hover, .resa-chip:focus-visible { border-color: var(--resa-c); }
.resa-chip[aria-current] { background: var(--resa-c); border-color: var(--resa-c); color: #fff; }
.resa-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.resa-card { position: relative; border: 1px solid var(--resa-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.resa-card:hover, .resa-card:focus-within { border-color: var(--resa-c); }
.resa-card-img { aspect-ratio: 16 / 10; background: var(--resa-soft); overflow: hidden; }
.resa-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resa-card-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--resa-soft), color-mix(in srgb, var(--resa-c) 25%, #fff)); }
.resa-card-body { padding: 14px 16px 18px; display: grid; gap: 4px; }
.resa-card-body p { margin: 0; }
.resa-card-title { font-size: 1.2em; margin: 0; }
.resa-card-title a { color: inherit; text-decoration: none; }
.resa-card-title a::after { content: ""; position: absolute; inset: 0; }
.resa-card-title a:focus-visible { outline: none; }
.resa-card:focus-within { outline: 3px solid var(--resa-c); outline-offset: 2px; }
.resa-tag { display: inline-block; justify-self: start; font-size: .8em; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--resa-soft); color: var(--resa-c); }
.resa-price { font-weight: 700; color: var(--resa-c); margin-top: 4px !important; }
.resa-empty { padding: 2em 0; }

/* Fiche */
.resa-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.resa-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 1em 0; }
.resa-dl dt { font-weight: 700; }
.resa-dl dd { margin: 0; }
.resa-table-wrap { overflow-x: auto; }
.resa-table { border-collapse: collapse; width: 100%; font-size: .95em; }
.resa-table th, .resa-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--resa-line); white-space: nowrap; }
.resa-table thead th { font-size: .9em; }
.resa-table tbody th { font-weight: 400; white-space: normal; }
.resa-creneaux-list { padding-left: 1.2em; margin: .8em 0; }
.resa-docs { padding-left: 1.2em; }
.resa-docs a { text-decoration: underline; }

/* Formulaire */
.resa-book { border: 1px solid var(--resa-line); border-radius: 10px; padding: 20px 22px 24px; background: #fff; }
.resa-book .resa-h2 { margin-top: 0; }
.resa-form { display: grid; gap: 4px; }
.resa-fs { border: 0; border-top: 1px solid var(--resa-line); margin: 12px 0 0; padding: 16px 0 4px; min-width: 0; }
.resa-fs legend { font-weight: 700; font-size: 1.1em; padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.resa-fs > legend ~ * { clear: both; }
.resa-field { display: grid; gap: 5px; margin-bottom: 14px; }
.resa-field label, .resa-label { font-weight: 600; margin: 0; }
.resa-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.resa-form input[type="text"], .resa-form input[type="email"], .resa-form input[type="tel"], .resa-form input[type="date"],
.resa-form input[type="number"], .resa-form select, .resa-form textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--resa-ink) 45%, transparent); border-radius: 6px; background: #fff; color: inherit;
}
.resa-form input[type="file"] { font: inherit; }
.resa-form input:focus-visible, .resa-form select:focus-visible, .resa-form textarea:focus-visible, .resa button:focus-visible, .resa a:focus-visible {
  outline: 3px solid var(--resa-c); outline-offset: 2px;
}
.resa-form [aria-invalid="true"] { border-color: #b3261e; }
.resa-inline { grid-template-columns: 90px minmax(0, 1fr); align-items: center; }
.resa-inline input { order: -1; }
.resa-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.resa-radio { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--resa-line); border-radius: 8px; padding: 10px 14px; cursor: pointer; font-weight: 400 !important; flex: 1 1 auto; }
.resa-radio input { margin-top: 4px; accent-color: var(--resa-c); width: 18px; height: 18px; flex: none; }
.resa-radio:has(input:checked) { border-color: var(--resa-c); background: var(--resa-soft); }
.resa-radio:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.resa-slots { flex-direction: column; }
.resa-slot-state { color: var(--resa-mute); font-size: .9em; }
.resa-sub { margin-top: 12px; }
.resa-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.resa-check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--resa-c); }
.resa-check label { font-weight: 400; }
.resa-check a { text-decoration: underline; }
.resa-consent { border-top: 1px solid var(--resa-line); padding-top: 12px; margin-top: 8px; }
.resa-error { color: #b3261e; font-weight: 600; margin: 2px 0 0; font-size: .95em; }
.resa-error::before { content: "⚠ "; }
.resa-alert { border: 2px solid #b3261e; background: #fdf0ef; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.resa-alert p { margin: 0 0 6px; }
.resa-alert ul { margin: 0; padding-left: 1.2em; }
.resa-alert a { color: #8c1d16; text-decoration: underline; }
.resa-success { border-left: 5px solid var(--resa-ok-ink); background: var(--resa-ok); padding: 14px 18px; border-radius: 4px; margin: 0 0 16px; }
.resa-success .title { margin-top: 0; }
.resa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.resa-submit { margin-top: 8px; }

/* Montant estimé */
.resa-sum:not(:empty) { background: var(--resa-soft); border-radius: 8px; padding: 14px 16px; margin: 14px 0 4px; }
.resa-sum-title { font-size: 1em; margin: 0 0 6px; }
.resa-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.resa-sum-row span:last-child { white-space: nowrap; }
.resa-sum-total { border-top: 1px solid var(--resa-line); margin-top: 4px; padding-top: 8px; font-weight: 800; }
.resa-sum .resa-meta { margin: 6px 0 0; }

/* Calendrier */
.resa-cal { border: 1px solid var(--resa-line); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.resa-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.resa-cal-title { font-size: 1.05em; margin: 0; text-transform: capitalize; }
.resa .resa-cal-nav { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--resa-line); border-radius: 6px; background: #fff; color: var(--resa-c); cursor: pointer; }
.resa .resa-cal-nav svg { display: block; width: 20px; height: 20px; }
.resa .resa-cal-nav:hover:not(:disabled) { border-color: var(--resa-c); background: var(--resa-soft); }
.resa .resa-cal-nav:focus-visible { outline: 3px solid var(--resa-c); outline-offset: 2px; }
.resa .resa-cal-nav:disabled { color: var(--resa-mute); opacity: .4; cursor: default; }
.resa-cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.resa-cal-grid th { font-size: .8em; color: var(--resa-mute); font-weight: 600; text-transform: capitalize; padding-bottom: 2px; }
.resa-cal-grid td { padding: 0; }
.resa .resa-day { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: #f1f3f2; font: inherit; font-weight: 600; text-align: center; cursor: pointer; color: inherit; }
.resa .resa-day:focus-visible { outline: 3px solid var(--resa-c); outline-offset: 2px; }
.resa .resa-day:hover:not([aria-disabled]) { border-color: var(--resa-c); }
.resa .resa-day.is-partiel { background: linear-gradient(135deg, #f1f3f2 50%, var(--resa-busy) 50%); }
.resa .resa-day.is-en_cours { background: var(--resa-pend); color: var(--resa-pend-ink); }
.resa .resa-day.is-complet, .resa .resa-day.is-ferme { background: var(--resa-busy); color: var(--resa-busy-ink); text-decoration: line-through; cursor: not-allowed; }
.resa .resa-day.is-passe, .resa .resa-day.is-trop_tot, .resa .resa-day.is-trop_loin { background: transparent; color: var(--resa-mute); cursor: not-allowed; opacity: .6; }
.resa .resa-day.is-selected { background: var(--resa-c); color: #fff; border-color: var(--resa-c); }
.resa-cal-legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85em; color: var(--resa-mute); }
.resa-cal-legend span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; background: #f1f3f2; border: 1px solid var(--resa-line); }
.resa-cal-legend .is-partiel { background: linear-gradient(135deg, #f1f3f2 50%, var(--resa-busy) 50%); }
.resa-cal-legend .is-en_cours { background: var(--resa-pend); }
.resa-cal-legend .is-complet { background: var(--resa-busy); }

/* Suivi */
.resa-suivi, .resa-avis { max-width: 820px; }
.resa-flow { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: resa; }
.resa-flow li { counter-increment: resa; padding: 8px 14px; border-radius: 999px; background: #f1f3f2; color: var(--resa-mute); font-weight: 600; font-size: .95em; }
.resa-flow li::before { content: counter(resa) ". "; }
.resa-flow li.is-done { background: var(--resa-ok); color: var(--resa-ok-ink); }
.resa-flow li.is-done::before { content: "✓ "; }
.resa-flow li.is-current { background: var(--resa-c); color: #fff; }
.resa-cancel { margin-top: 2em; border-top: 1px solid var(--resa-line); padding-top: 1em; }
.resa-cancel summary { cursor: pointer; font-weight: 600; text-decoration: underline; }
.resa-contact { margin-top: 2em; }

@media (max-width: 900px) {
  .resa-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  .resa-book { padding: 16px 14px; border-radius: 0; border-inline: 0; margin-inline: -4px; }
  .resa-dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .resa-dl dd { margin-bottom: 8px; }
  .resa-cal-grid { border-spacing: 2px; }
  .resa .resa-day { min-height: 38px; font-size: .95em; }
}

/* Espace sous le titre de bloc (la marge d'une légende flottante n'est pas prise en compte) ; colonne Profil lisible. */
.resa .resa-fs > legend { margin-bottom: 0; padding-bottom: 12px; }
.resa .resa-table tbody th { min-width: 150px; }

/* Choix du profil : une colonne, cases de même largeur, regroupées par type de demandeur. */
.resa .resa-profils { display: grid; gap: 14px; }
.resa .resa-profil-title { margin: 0 0 6px; font-size: .95em; font-weight: 700; }
.resa .resa-radios-col { flex-direction: column; gap: 6px; }
.resa .resa-radios-col .resa-radio { flex: none; width: 100%; padding: 9px 14px; align-items: center; }
.resa .resa-radios-col .resa-radio input { margin-top: 0; }

/* Documents de l'espace : un bouton de téléchargement par fichier (classes btn du thème). */
.resa .resa-docs-btns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.resa .resa-docs-btns li { margin: 0; }
.resa .resa-doc-btn { display: inline-flex; align-items: center; gap: 10px; text-align: left; text-decoration: none; }
.resa .resa-doc-icon { display: inline-flex; flex: none; }
.resa .resa-doc-icon svg { width: 20px; height: 20px; display: block; }
.resa .resa-doc-icon svg path:not([stroke]) { fill: currentColor; }
.resa .resa-doc-txt { display: grid; line-height: 1.25; }
.resa .resa-doc-meta { font-size: .8em; font-weight: 400; opacity: .85; }

/* Tarifs : en-têtes sur plusieurs lignes pour tenir dans la colonne, renvois par astérisques vers les horaires. */
.resa .resa-table thead th { white-space: normal; vertical-align: bottom; }
.resa .resa-renvoi { margin-left: 2px; color: var(--resa-c); text-decoration: none; font-weight: 700; }
.resa .resa-renvoi:hover { text-decoration: underline; }
.resa .resa-creneaux-list { list-style: none; padding: 0; margin: .8em 0; font-size: .95em; display: grid; gap: 4px; }
.resa .resa-creneaux-list li { margin: 0; }
.resa .resa-renvoi-mark { display: inline-block; min-width: 2.2em; color: var(--resa-c); font-weight: 700; }

/* Informations de l'espace : tableau à deux colonnes, même style que les tarifs. */
.resa .resa-infos { margin: 1em 0 0; }
.resa .resa-infos tbody th { width: 34%; font-weight: 700; vertical-align: top; }
.resa .resa-infos td { white-space: normal; }
.resa .resa-infos tr:first-child th, .resa .resa-infos tr:first-child td { border-top: 1px solid var(--resa-line); }

/* Fiche : sections séparées par un filet, grand titre, équipements en grille. */
.resa .resa-sec { border-top: 1px solid var(--resa-line); padding: 26px 0 28px; }
.resa .resa-sec-desc { border-top: 0; padding-top: 4px; }
.resa .resa-sec > :last-child { margin-bottom: 0; }
.resa .resa-sec p { margin: 0 0 .4em; }
.resa .resa-sec-title { font-family: var(--font-title, inherit); font-size: 1.5em; font-weight: 800; line-height: 1.15; margin: 0 0 16px; }
.resa .resa-equip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 20px; }
.resa .resa-equip li { display: flex; align-items: center; gap: 10px; margin: 0; }
.resa .resa-equip-icon { flex: none; color: var(--resa-c); }
.resa .resa-conditions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.resa .resa-conditions li { margin: 0; }
.resa .resa-sec .resa-table-wrap { margin-bottom: 4px; }
.resa .resa-sec-desc p { margin: 0 0 1em; }

/* Tarifs : balisage du module tableau du thème ; ajustements à la colonne étroite. */
.resa .resa-module-table { margin: 0 0 8px; }
.resa .resa-module-table .bloc-table__table { font-size: .92em; }
.resa .resa-module-table .bloc-table__table th, .resa .resa-module-table .bloc-table__table td { padding: .6rem .7rem; }
.resa .resa-module-table td { white-space: nowrap; }
.resa .resa-module-table .resa-renvoi { color: inherit; }

/* Équipements : icône dessinée + libellé. */
.resa .resa-equip li { align-items: flex-start; }
.resa .resa-equip .resa-equip-icon { width: 22px; height: 22px; margin-top: 1px; }

/* Galerie : balisage du module galerie du thème (voile et « Agrandir » au survol fournis par gallery.css). */
.resa .resa-gallery-module { margin: 0 0 1.2em; }
.resa .resa-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.resa .resa-gallery-item { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; }
.resa .resa-gallery-item.is-main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.resa .resa-gallery-btn { display: block; width: 100%; height: 100%; padding: 0; background: none; cursor: zoom-in; }
.resa .resa-gallery-btn .illus-wrapper { display: block; width: 100%; height: 100%; }
.resa .resa-gallery-btn .illus { width: 100%; height: 100%; object-fit: cover; }
.resa .resa-gallery-btn:focus-visible { outline: 3px solid var(--resa-c); outline-offset: 2px; }
.resa .resa-gallery-item:not(.is-main) .overlay { top: 50%; right: 50%; transform: translate(50%, -40%); }
.resa .resa-gallery-item:not(.is-main) .link:hover .overlay, .resa .resa-gallery-item:not(.is-main) .link:focus-visible .overlay { transform: translate(50%, -50%); }
.resa .resa-gallery-more { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.5em; font-weight: 800; }

/* Champs obligatoires */
.resa .resa-req { color: #b3261e; font-weight: 700; margin-left: 3px; }

/* Créneau sur plusieurs jours : période surlignée dans le calendrier. */
.resa .resa-day.is-range, .resa .resa-day.is-range-end { background: var(--resa-c); color: #fff; border-color: var(--resa-c); }
