/* TlCalendar — calendrier des moteurs de recherche (public/themes/agency/js/tl-calendar.js).
   Couleur : var(--main-color) (Theme Builder). Bureau : fenêtre sous le champ, deux mois. Mobile : plein écran. */
.tl-cal{
  --tl-cal-accent: var(--main-color, #e8483b);
  --tl-cal-band: rgba(232, 72, 59, .12);
  --tl-cal-text: #1f2633;
  --tl-cal-muted: #9aa1ad;
  --tl-cal-line: #e8eaef;
  --tl-cal-bg: #ffffff;
  --tl-cal-soft: #f5f6f9;
  position: absolute;
  z-index: 1000000;
  box-sizing: border-box;
  background: var(--tl-cal-bg);
  color: var(--tl-cal-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
}
@supports (background: color-mix(in srgb, red 10%, white)){
  .tl-cal{ --tl-cal-band: color-mix(in srgb, var(--tl-cal-accent) 14%, white); }
}
.tl-cal *, .tl-cal *::before, .tl-cal *::after{ box-sizing: border-box; }
.tl-cal button{ font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.tl-cal button:focus-visible, .tl-cal select:focus-visible{ outline: 2px solid var(--tl-cal-accent); outline-offset: 2px; }
.tl-cal-input{ cursor: pointer; caret-color: transparent; }

/* ── Bureau ─────────────────────────────────────────────────────────────────────── */
.tl-cal--popover{
  width: min(760px, calc(100vw - 24px));
  padding: 18px 22px 16px;
  border: 1px solid var(--tl-cal-line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
}

/* En-tête : dates choisies */
.tl-cal__summary{ display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.tl-cal__pick{ font-size: 20px; font-weight: 700; padding-bottom: 6px; border-bottom: 3px solid transparent; }
.tl-cal__pick.is-active{ border-bottom-color: var(--tl-cal-accent); }
.tl-cal__pick.is-empty{ color: var(--tl-cal-muted); font-weight: 600; }
.tl-cal__arrow{ color: var(--tl-cal-muted); font-size: 18px; }

/* Mois */
.tl-cal__months{ position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.tl-cal__nav{
  position: absolute; top: -4px; width: 42px; height: 42px; border-radius: 50% !important;
  background: var(--tl-cal-soft) !important; color: var(--tl-cal-accent) !important; font-size: 26px !important; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; z-index: 1;
}
.tl-cal__nav--prev{ left: 0; }
.tl-cal__nav--next{ right: 0; }
.tl-cal--rtl .tl-cal__nav--prev{ left: auto; right: 0; transform: scaleX(-1); }
.tl-cal--rtl .tl-cal__nav--next{ right: auto; left: 0; transform: scaleX(-1); }
.tl-cal__nav:disabled{ opacity: .35; cursor: default; }
.tl-cal__monthTitle{ text-align: center; font-weight: 700; font-size: 17px; height: 34px; line-height: 34px; margin-bottom: 8px; }
.tl-cal__weekdays{ display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.tl-cal__weekdays span{ text-align: center; font-size: 13px; font-weight: 600; color: #4b5363; padding: 6px 0; }
.tl-cal__grid{ display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }

/* Jours */
.tl-cal__day, .tl-cal__blank{ position: relative; height: 46px; }
.tl-cal__day{
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px;
  font-variant-numeric: tabular-nums; z-index: 0;
}
.tl-cal__day::after{ /* pastille */
  content: ""; position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border-radius: 50%; z-index: -1; transition: background-color .12s;
}
.tl-cal__day:not(:disabled):hover::after{ background: var(--tl-cal-soft); }
.tl-cal__day.is-today{ text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.tl-cal__day.is-disabled{ color: #c9cdd5; cursor: default; }
.tl-cal__day.is-between, .tl-cal__day.is-preview-end{ background: var(--tl-cal-band); }
.tl-cal__day.is-start.has-range{ background: linear-gradient(to right, transparent 50%, var(--tl-cal-band) 50%); }
.tl-cal__day.is-end.has-range, .tl-cal__day.is-preview-end{ background: linear-gradient(to left, transparent 50%, var(--tl-cal-band) 50%); }
.tl-cal--rtl .tl-cal__day.is-start.has-range{ background: linear-gradient(to left, transparent 50%, var(--tl-cal-band) 50%); }
.tl-cal--rtl .tl-cal__day.is-end.has-range, .tl-cal--rtl .tl-cal__day.is-preview-end{ background: linear-gradient(to right, transparent 50%, var(--tl-cal-band) 50%); }
.tl-cal__day.is-preview-end::after{ border: 2px dashed var(--tl-cal-accent); }
.tl-cal__day.is-start, .tl-cal__day.is-end{ color: #fff; }
.tl-cal__day.is-start::after, .tl-cal__day.is-end::after,
.tl-cal__day.is-start:hover::after, .tl-cal__day.is-end:hover::after{ background: var(--tl-cal-accent); }
.tl-cal__day.is-too-short{ color: var(--tl-cal-muted); }

/* Pied : nuits, heure, actions */
.tl-cal__foot{
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--tl-cal-line);
}
.tl-cal__info{ font-weight: 700; }
.tl-cal__info.is-notice{ color: #c0262d; }
.tl-cal__actions{ display: inline-flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.tl-cal__clear{ font-weight: 600; color: #4b5363; text-decoration: underline; text-underline-offset: 3px; padding: 8px 6px !important; }
.tl-cal__confirm{
  min-width: 140px; padding: 12px 26px !important; border-radius: 999px !important; font-weight: 700;
  background: var(--tl-cal-accent) !important; color: #fff !important;
}
.tl-cal__confirm:disabled{ opacity: .4; cursor: default; }
.tl-cal__time{ display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin: 0; }
.tl-cal__time select{
  border: 1px solid var(--tl-cal-line); border-radius: 10px; padding: 8px 10px; background: var(--tl-cal-bg);
  font: inherit; font-weight: 600; color: inherit;
}

/* ── Mobile : plein écran ───────────────────────────────────────────────────────── */
html.tl-cal-lock, html.tl-cal-lock body{ overflow: hidden; }
.tl-cal--sheet{
  position: fixed; inset: 0; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) 0 0;
}
.tl-cal--sheet .tl-cal__head{ padding: 12px 16px 0; border-bottom: 1px solid var(--tl-cal-line); }
.tl-cal__bar{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tl-cal__title{ font-size: 17px; }
.tl-cal__close{ width: 40px; height: 40px; border-radius: 50% !important; background: var(--tl-cal-soft) !important; font-size: 26px !important; line-height: 1; }
.tl-cal--sheet .tl-cal__pick{ font-size: 17px; }
.tl-cal--sheet .tl-cal__summary{ margin-bottom: 10px; }
.tl-cal__weekdays--sticky{ padding: 4px 16px; border-bottom: 1px solid var(--tl-cal-line); margin: 0; }
.tl-cal__scroll{ flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 24px; overscroll-behavior: contain; }
.tl-cal--sheet .tl-cal__month{ margin-bottom: 18px; }
.tl-cal--sheet .tl-cal__monthTitle{ text-align: start; }
.tl-cal--sheet .tl-cal__day, .tl-cal--sheet .tl-cal__blank{ height: 48px; }
.tl-cal--sheet .tl-cal__foot{
  margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -6px 18px rgba(15, 23, 42, .06); background: var(--tl-cal-bg);
}
.tl-cal--sheet .tl-cal__confirm{ min-width: 0; flex: 1; }
.tl-cal--sheet .tl-cal__actions{ flex: 1; }
@media (max-width: 380px){
  .tl-cal--sheet .tl-cal__day::after{ width: 38px; height: 38px; margin: -19px 0 0 -19px; }
}
@media (prefers-reduced-motion: reduce){ .tl-cal__day::after{ transition: none; } }
/* Pastille d'une date proposée (départs d'un circuit) */
.tl-cal__dot{ position: absolute; bottom: 5px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; }
.tl-cal__day.is-start .tl-cal__dot, .tl-cal__day.is-end .tl-cal__dot{ box-shadow: 0 0 0 1.5px #fff; }
