/* ==========================================================
   STYLE COMMUN : VILLA ET CHAMBRES
   Limité aux trois calendriers mensuels.
   ========================================================== */

/* Palette commune */
#pricing .vf-calendar {
  --vf-free: #46a915;
  --vf-hover: #aad79f;
  --vf-reserved: #c70000;
  --vf-empty: #000;
  --vf-border: #bdbdbd;
  --vf-toolbar: #2b2b2b;
  --vf-blue: #0d6efd;

  --fc-border-color: var(--vf-border);
  --fc-neutral-bg-color: var(--vf-empty);
  --fc-today-bg-color: transparent;
}

/* Barre du mois */
#pricing .vf-calendar .fc-header-toolbar {
  background: var(--vf-toolbar) !important;
  border-radius: 6px;
  padding: 6px !important;
}

#pricing .vf-calendar .fc-toolbar-title {
  color: #fff !important;
  font-weight: 700 !important;
}

#pricing .vf-calendar .fc-button {
  background: #2c3e50 !important;
  border: 1px solid #2c3e50 !important;
  color: #fff !important;
  box-shadow: none !important;
}

#pricing .vf-calendar .fc-button:hover {
  background: #38516a !important;
}

#pricing .vf-calendar .fc-button:disabled {
  opacity: .6 !important;
}

/* En-têtes des jours */
#pricing .vf-calendar .fc-col-header-cell {
  background: var(--vf-toolbar) !important;
}

#pricing .vf-calendar .fc-col-header-cell-cushion {
  color: #d1d1d1 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* Grille commune */
#pricing .vf-calendar .fc-scrollgrid {
  border-collapse: separate !important;
  border-spacing: 2px !important;
}

#pricing .vf-calendar .fc-scrollgrid,
#pricing .vf-calendar .fc-scrollgrid td,
#pricing .vf-calendar .fc-scrollgrid th {
  border-color: var(--vf-border) !important;
}

/* Fond des cases : noir par défaut */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.fc-daygrid-day {
  position: relative !important;
  overflow: hidden !important;
  background: var(--vf-empty) !important;
}

/*
 * Supprime les anciens calques.
 * Les diagonales et la sélection sont redessinées plus bas.
 */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td::before,
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td::after,
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
.fc-daygrid-day-frame::before,
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
.fc-daygrid-day-frame::after {
  content: none !important;
}

/* Les éléments intérieurs ne doivent pas recouvrir les couleurs */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
.fc-daygrid-day-frame {
  position: relative !important;
  z-index: auto !important;
  background: transparent !important;
}

#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
.fc-daygrid-day-bg {
  background: transparent !important;
  pointer-events: none !important;
}

/*
 * Les couleurs proviennent des classes des cellules.
 * Les événements restent présents pour les calculs de disponibilité.
 */
#pricing .vf-calendar .fc-bg-event,
#pricing .vf-calendar .fc-highlight {
  display: none !important;
}

/* Dates disponibles */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.free {
  background: var(--vf-free) !important;
}

#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.free:hover {
  background-color: var(--vf-hover) !important;
}

/* Jour de départ : diagonale */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.free.checkout {
  background-image: linear-gradient(
    135deg,
    var(--vf-reserved) 50%,
    transparent 50%
  ) !important;
}

/* Jour d'arrivée : diagonale inverse */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.free.checkin {
  background-image: linear-gradient(
    315deg,
    var(--vf-reserved) 50%,
    transparent 50%
  ) !important;
}

/* Arrivée et départ le même jour */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.free.checkin.checkout {
  background-image:
    linear-gradient(
      135deg,
      var(--vf-reserved) 50%,
      transparent 50%
    ),
    linear-gradient(
      315deg,
      var(--vf-reserved) 50%,
      transparent 50%
    ) !important;
}

/* Dates réservées ou en attente */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.confirmed,
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.pending {
  background: var(--vf-reserved) !important;
}

/*
 * Jours passés, désactivés ou hors du mois.
 * Inclut les cellules désactivées par FullCalendar,
 * qui pouvaient garder un fond gris.
 */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td:is(.past, .fc-day-disabled, .fc-day-other) {
  background: var(--vf-empty) !important;
}

#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td:is(.past, .fc-day-disabled, .fc-day-other)
.fc-daygrid-day-number {
  visibility: hidden !important;
}

/* Numéros des dates */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
.fc-daygrid-day-number {
  position: relative !important;
  z-index: 7 !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/*
 * Sélection commune : calque couvrant toute la cellule.
 * Le cadre ne dépend plus de la taille du contenu intérieur.
 */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.selected:not(.past):not(.fc-day-disabled):not(.fc-day-other)::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: 2px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  box-sizing: border-box !important;

  background: rgba(13, 110, 253, .45) !important;
  border: 2px solid var(--vf-blue) !important;
  border-radius: 6px !important;

  opacity: 1 !important;
  transform: none !important;
  pointer-events: none !important;
  z-index: 5 !important;
}
/* Fond des jours passés repris de rooms, pour les 3 calendriers */
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.fc-day-disabled,
#pricing :is(#calendar, #calendar-ch1, #calendar-ch2).vf-calendar.fc
td.past:not(.fc-day-other) {
  background: #4b4b4b !important;
}
