/* Styles mutualisés pour la barre de recherche compacte et le calendrier personnalisé */

.search-wrapper {
  max-width: 600px !important;
  margin: 0 auto !important;
}

.search-bar {
  padding: 8px 12px !important;
  min-height: 36px !important;
  gap: 8px !important;
}

.search-field {
  min-height: auto !important;
  flex: 1;
  max-width: 100px !important;
}

.date-field.search-field {
  max-width: 180px !important;
  min-width: 150px !important;
}

.field-title {
  font-size: 12px !important;
  margin-bottom: 2px !important;
}

.search-field input {
  padding: 6px 8px !important;
  font-size: 14px !important;
  height: 32px !important;
  box-sizing: border-box;
}

.search-field input[readonly] {
  cursor: pointer !important;
  background-color: white !important;
}

#date-start,
#date-end,
#date,
#destination {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-width: 0 !important;
  outline: none !important;
  cursor: pointer !important;
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 2px 4px !important;
  font-size: 14px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.date-single {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: fit-content !important;
}

.date-field {
  position: relative;
  flex: 1;
  min-width: 130px !important;
  max-width: 150px !important;
  background: transparent !important;
  overflow: hidden !important;
}

.date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
  height: auto;
}

.date-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toggle-label {
  font-size: 12px;
  color: #666;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 30px;
  height: 16px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 16px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #BB0B0B;
}

input:checked + .toggle-slider:before {
  transform: translateX(14px);
}

.date-range {
  display: none;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  width: fit-content !important;
}

.date-inputs {
  display: flex;
  align-items: center;
  gap: 0px;
  width: fit-content !important;
  justify-content: flex-start;
  flex-wrap: nowrap;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

#date-start {
  margin-right: 2px !important;
}

.date-separator {
  font-size: 12px;
  color: #666;
  margin: 0 1px;
  flex-shrink: 0;
}

.search-btn {
  padding: 4px 6px !important;
  min-width: auto !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.icon-search {
  width: 40px !important;
  height: 40px !important;
}

.custom-calendar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 9999 !important;
  display: none !important;
  margin-top: 2px;
  width: auto;
  min-width: 300px;
}

.custom-calendar.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.calendar-nav {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.calendar-nav:hover {
  background-color: #f5f5f5;
}

.calendar-nav svg {
  width: 16px;
  height: 16px;
}

.calendar-month {
  font-weight: 600;
  font-size: 16px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 10px;
}

.weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 8px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.1rem;
  margin-bottom: 15px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.75rem;
  color: #333;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.calendar-day:hover:not(:disabled):not(.start-date):not(.end-date):not(.in-range) {
  background-color: #f0f0f0;
  transform: scale(1.1);
}

.calendar-day:disabled {
  color: transparent;
  cursor: default;
}

.calendar-day.today {
  background-color: #f0f0f0;
  font-weight: 600;
}

.calendar-day.past-date,
.calendar-day.past-date:disabled {
  background-color: #f8f9fa;
  color: #adb5bd !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.calendar-day.past-date:hover {
  background-color: #f8f9fa !important;
  transform: none !important;
  cursor: not-allowed !important;
}

.calendar-day.start-date {
  background-color: #BB0B0B;
  color: white;
  font-weight: 600;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.calendar-day.end-date {
  background-color: #BB0B0B;
  color: white;
  font-weight: 600;
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.calendar-day.start-date.end-date {
  border-radius: 20px;
}

.calendar-day.in-range {
  background-color: rgba(187, 11, 11, 0.1);
  color: #BB0B0B;
  border-radius: 0;
}

.calendar-day.hover-range {
  background-color: rgba(187, 11, 11, 0.15);
  border-radius: 0;
}

.calendar-day.other-month {
  color: #ccc;
  opacity: 0.5;
}

.quick-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.quick-btn {
  padding: 8px 16px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.quick-btn:hover {
  background-color: #BB0B0B;
  color: white;
  border-color: #BB0B0B;
}

.calendar-help {
  text-align: center;
  font-size: 14px;
  color: #BB0B0B;
  margin-bottom: 15px;
  font-weight: 500;
}


