/* La Fosca Bay — Calendrier de réservation des fiches logement, look
   booking.thekaraokekillers.com (Conv.36) : cases arrondies pleines, numéro du
   jour AU-DESSUS, prix petit et gras EN DESSOUS, jours pris barrés en diagonale.
   Chargé après booking.css (dépendance) : ces règles priment sur l'ancien skin.
   Palette = celle du thème clair de booking.tkk ; seule la sélection prend le
   bleu La Fosca. */

.lfb-avail-cal {
  --tk-panel: #ffffff;
  --tk-panel2: #eef0f7;
  --tk-line: #d6dae7;
  --tk-fg: #15161d;
  --tk-muted: #5b6076;
  --tk-busy-bg: #f2dde5;
  --tk-busy-fg: #6e5060;
  --tk-busy-line: #b98ea1;
}

/* Carte du mois (.card p-3 de booking.tkk) */
.lfb-avail-cal .date-picker-wrapper {
  background: var(--tk-panel) !important;
  border: 1px solid var(--tk-line);
  border-radius: 16px;
  box-shadow: none;
  padding: 12px !important;
  font-family: var(--font-body);
}
.lfb-avail-cal .month-wrapper table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.lfb-avail-cal .month-wrapper td { padding: 0 !important; }

/* Titre « septembre 2026 » centré, semi-gras, sans effet */
.lfb-avail-cal .month-element {
  font-family: var(--font-body) !important;
  font-size: 16px !important; font-weight: 600 !important;
  color: var(--tk-fg) !important; letter-spacing: 0;
}
/* Flèches ← → : boutons « ghost » bordés */
.lfb-avail-cal .caption .prev,
.lfb-avail-cal .caption .next {
  width: 40px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid var(--tk-line);
  color: var(--tk-fg); font-size: 0;
}
.lfb-avail-cal .caption .prev::before { content: "←"; font-size: 18px; }
.lfb-avail-cal .caption .next::before { content: "→"; font-size: 18px; }
.lfb-avail-cal .caption .prev:hover,
.lfb-avail-cal .caption .next:hover { background: var(--tk-panel2); color: var(--tk-fg); }

/* En-têtes L M M J V S D : 11 px, discrets, une seule lettre */
.lfb-avail-cal .week-name th {
  font-size: 0 !important; color: var(--tk-muted) !important;
  font-weight: 400 !important; text-transform: none; letter-spacing: 0; padding-bottom: 4px;
}
.lfb-avail-cal .week-name th::first-letter { font-size: 11px; }

/* Case jour : colonne centrée, numéro puis prix */
.lfb-avail-cal .month-wrapper table .day {
  box-sizing: border-box;
  width: auto !important; min-width: 0 !important; height: auto !important;
  min-height: 52px;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 2px 0 !important;
  border-radius: 8px; box-shadow: none !important;
  font-size: 14px; font-weight: 400; line-height: 1.1;
  text-decoration: none !important;
}
.lfb-avail-cal .day > span:first-child { line-height: 1.1; }
.lfb-avail-cal .day .day-price { display: none !important; }   /* prix natif JetBooking (« €150 ») : remplacé par .lfb-dayprice */
.lfb-avail-cal .day .lfb-dayprice { display: block; font-size: 10px; font-weight: 700; opacity: .85; line-height: 1; }

/* Libre */
.lfb-avail-cal .month-wrapper table .day.valid {
  background: var(--tk-panel2) !important; color: var(--tk-fg) !important; cursor: pointer;
}
.lfb-avail-cal .month-wrapper table .day.valid:hover { background: var(--tk-line) !important; }

/* Passé : même aplat que « indisponible », non barré */
.lfb-avail-cal .month-wrapper table .day.invalid:not(.has-tooltip) {
  background: var(--tk-busy-bg) !important; color: var(--tk-busy-fg) !important; opacity: 1 !important;
}
/* Déjà réservé : chiffre effacé, trait en diagonale */
.lfb-avail-cal .month-wrapper table .day.has-tooltip.invalid {
  position: relative;
  background: var(--tk-busy-bg) !important; color: transparent !important;
  opacity: 1 !important; font-weight: 400;
}
.lfb-avail-cal .month-wrapper table .day.has-tooltip.invalid::after {
  content: ""; position: absolute; inset: 7px;
  background: linear-gradient(to bottom right,
    transparent calc(50% - 1px), var(--tk-busy-line) calc(50% - 1px),
    var(--tk-busy-line) calc(50% + 1px), transparent calc(50% + 1px));
}
.lfb-avail-cal .month-wrapper table .day.has-tooltip.invalid:hover { background: var(--tk-busy-bg) !important; }

/* Jours hors mois : cases vides, comme booking.tkk */
.lfb-avail-cal .month-wrapper table .day.lastMonth,
.lfb-avail-cal .month-wrapper table .day.nextMonth { visibility: hidden !important; }

/* Aujourd'hui : pas de traitement spécial (booking.tkk n'en a pas) */
.lfb-avail-cal .month-wrapper table .day.real-today.valid { background: var(--tk-panel2) !important; color: var(--tk-fg) !important; font-weight: 400; }

/* Sélection : aplat plein, gras, texte blanc — prix hérite */
.lfb-avail-cal .month-wrapper table .day.checked,
.lfb-avail-cal .month-wrapper table .day.hovering {
  background: var(--c-azur, #8FC1D4) !important; color: #fff !important; font-weight: 700;
}
.lfb-avail-cal .month-wrapper table .day.first-date-selected,
.lfb-avail-cal .month-wrapper table .day.last-date-selected {
  background: var(--c-primary, #1A5E7A) !important; color: #fff !important; font-weight: 700;
}
.lfb-avail-cal .day.checked .lfb-dayprice,
.lfb-avail-cal .day.hovering .lfb-dayprice,
.lfb-avail-cal .day.first-date-selected .lfb-dayprice,
.lfb-avail-cal .day.last-date-selected .lfb-dayprice { color: inherit; opacity: .9; }
/* Pendant le choix, jours hors séjour mini : estompés, pas « pris » */
.lfb-avail-cal .month-wrapper table .day.invalid.tmp:not(.has-tooltip):not(.first-date-selected) {
  background: var(--tk-panel2) !important; color: var(--tk-muted) !important; opacity: .55 !important;
}
.lfb-avail-cal .day.invalid:not(.tmp) .lfb-dayprice { display: none; }

@media (max-width: 600px) {
  .lfb-avail-cal .date-picker-wrapper { padding: 12px 8px !important; }
  .lfb-avail-cal .month-wrapper table .day { width: auto !important; height: auto !important; min-width: 0 !important; font-size: 14px; }
}
@media (max-width: 400px) { .lfb-avail-cal .day .lfb-dayprice { font-size: 9px; } }

/* =========================================================================
 * Section Réservation (Conv.37) : calendrier + formulaire JetFormBuilder #1490
 * l'un sous l'autre, sur toute la largeur du contenu.
 * ===================================================================== */
.lfb-avail-sec { --resa-w: 1080px; }
.lfb-avail-sec .lfb-avail-cal .date-picker-wrapper { width: 100% !important; max-width: var(--resa-w); }
.lfb-avail-sec .lfb-avail-cal { width: 100%; max-width: var(--resa-w); margin-inline: auto; }

.lfb-resa-form, .lfb-avail-sec .lfb-booking-price, .lfb-avail-sec .lfb-book-fine-wrap,
.lfb-avail-sec .lfb-book-note { width: 100%; max-width: var(--resa-w); margin-inline: auto; }

.lfb-resa-form .jet-form-builder {
  background: var(--c-white); border: 1px solid #d6dae7; border-radius: 16px;
  padding: clamp(16px, 3vw, 28px); margin-top: 18px;
}
.lfb-resa-form .wp-block-columns { display: flex; gap: 16px; margin: 0; }
.lfb-resa-form .wp-block-column { flex: 1 1 0; min-width: 0; }
.lfb-resa-form .jet-form-builder-row { margin-bottom: 14px; }
.lfb-resa-form .jet-form-builder__label-text,
.lfb-resa-form .jet-abaf-separate-field__label {
  font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 6px;
}
.lfb-resa-form .jet-form-builder__required { color: var(--c-cta); }
.lfb-resa-form .jet-form-builder__desc { font-size: 12px; color: var(--tk-muted, #5b6076); margin-top: 4px; }

.lfb-resa-form input.jet-form-builder__field,
.lfb-resa-form select.jet-form-builder__field,
.lfb-resa-form textarea.jet-form-builder__field {
  box-sizing: border-box; width: 100%;
  background: var(--c-bg); border: 1px solid var(--c-sand); border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 16px; /* 16 px : pas de zoom auto sur iPhone */
  color: var(--c-ink);
}
.lfb-resa-form select.jet-form-builder__field {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2323303A' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.lfb-resa-form input.jet-form-builder__field:focus,
.lfb-resa-form textarea.jet-form-builder__field:focus { outline: 2px solid var(--c-azur); outline-offset: 1px; }

/* Dates : « Vos dates » est redondant avec Arrivée / Départ ; les deux côte à côte.
   Elles se choisissent dans le grand calendrier au-dessus → champs en lecture seule,
   pas de second datepicker. */
.lfb-resa-form .field-type-check-in-out > .jet-form-builder__label { display: none; }
.lfb-resa-form abbr.required, .lfb-resa-form .jet-form-builder__required abbr { text-decoration: none; border: 0; }
.lfb-resa-form .jet-abaf-separate-fields { display: flex; gap: 16px; margin: 0; }
.lfb-resa-form .jet-abaf-separate-field { flex: 1 1 0; min-width: 0; max-width: none; padding: 0 !important; }
.lfb-resa-form .jet-abaf-field__input { pointer-events: none; font-weight: 600; }
.lfb-resa-form .date-picker-wrapper { display: none !important; }

/* Bouton Réserver : terracotta, pleine largeur */
.lfb-resa-form .jet-form-builder__action-button-wrapper { margin-top: 6px; }
.lfb-resa-form .jet-form-builder__submit {
  width: 100%; background: var(--c-cta); color: #fff; border: 0; border-radius: 12px;
  padding: 16px 20px; font-size: 18px; font-weight: 700; letter-spacing: .02em; cursor: pointer;
  text-align: center; justify-content: center;
}
.lfb-resa-form .jet-form-builder__submit:hover { background: var(--c-cta-hover); }

.lfb-avail-sec .lfb-booking-price { margin-top: 18px; }

@media (max-width: 600px) {
  .lfb-resa-form .wp-block-columns { flex-direction: column; gap: 0; }
}

/* =========================================================================
 * Contrat de location dans le formulaire (Conv.39)
 * ===================================================================== */
.lfb-resa-form .lfb-ct-h {
  font-family: var(--font-title); font-size: 20px; font-weight: 600; color: var(--c-ink);
  margin: 26px 0 12px; padding-top: 18px; border-top: 1px solid #e6e8ef;
}
.lfb-resa-form .lfb-ct-apercu {
  max-height: 340px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--c-bg); border: 1px solid var(--c-sand); border-radius: 12px;
  padding: 14px 16px; font-size: 13.5px; line-height: 1.55; color: var(--c-ink);
}
.lfb-resa-form .lfb-ct-apercu h2 { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--c-primary); margin: 14px 0 4px; }
.lfb-resa-form .lfb-ct-apercu h2:first-child { margin-top: 0; }
.lfb-resa-form .lfb-ct-apercu p { margin: 0 0 8px; }
.lfb-resa-form .lfb-ct-var { background: rgba(143,193,212,.28); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.lfb-resa-form .lfb-ct-var.is-empty { background: rgba(204,122,82,.16); color: #9a5a3a; font-weight: 400; }
.lfb-resa-form .lfb-ct-rgpd { font-size: 12px; color: var(--tk-muted, #5b6076); margin: 8px 0 14px; }

.lfb-resa-form .lfb-ct-sign { margin: 6px 0 14px; }
.lfb-resa-form .lfb-ct-sign-label { font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 6px; }
.lfb-resa-form .lfb-ct-sign-label::after { content: " *"; color: var(--c-cta); }
.lfb-resa-form .lfb-ct-canvas {
  display: block; width: 100%; height: 170px; touch-action: none; cursor: crosshair;
  background: #fff; border: 2px dashed var(--c-sand); border-radius: 12px;
}
.lfb-resa-form .lfb-ct-clear {
  margin-top: 8px; background: none; border: 1px solid var(--c-sand); border-radius: 8px;
  padding: 8px 14px; font: inherit; font-size: 14px; color: var(--c-ink); cursor: pointer;
}
/* Le champ texte « signature » transporte l'image : on ne le montre pas. */
.lfb-resa-form .lfb-ct-sig-field, .lfb-resa-form .jet-form-builder-row:has(> .lfb-ct-sig-field),
.lfb-resa-form .field-type-text-field:has(input[name="signature"]) { display: none !important; }

.lfb-resa-form .lfb-ct-sugg {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0;
  list-style: none; background: var(--c-white); border: 1px solid #d6dae7; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(35,48,58,.14); max-height: 260px; overflow-y: auto;
}
.lfb-resa-form .lfb-ct-sugg li { padding: 10px 14px; font-size: 15px; cursor: pointer; }
.lfb-resa-form .lfb-ct-sugg li:hover { background: var(--c-bg); }
.lfb-resa-form select.jet-form-builder__field, .lfb-resa-form input[type="date"].jet-form-builder__field { min-height: 48px; }

/* Pays en boutons, façon booking.tkk (Conv.39) */
.lfb-resa-form .lfb-pays-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.lfb-resa-form .lfb-pays-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  background: var(--c-white); border: 1px solid var(--c-sand); border-radius: 12px;
  font: inherit; font-size: 15px; color: var(--c-ink); cursor: pointer;
}
.lfb-resa-form .lfb-pays-btn.is-on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
.lfb-resa-form .jet-form-builder-row[hidden] { display: none !important; }
.lfb-resa-form .lfb-ct-next { font-size: 14.5px; line-height: 1.5; background: rgba(143,193,212,.16); border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; }
