/* Switch-multiple custom style */
.switch-multiple {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 2px solid var(--c-secondaire, #1976d2);
  border-radius: 0.6rem;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  width: fit-content;
  overflow: hidden;
  padding: 0.5rem;
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
  flex-grow: 0;
}

#switch-presentiel-rch {
  top: -1.8rem;
  left: 0.5rem;
}

.switch-multiple input[type="radio"] {
  display: none;
}

.switch-multiple label {
  cursor: pointer;
  padding: 0.15rem 0.7rem;
  border-radius: 0;
  transition: background 0.2s, color 0.2s;
  color: var(--c-secondaire, #1976d2) !important;
  background: transparent;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  line-height: normal;
  box-sizing: border-box;
  margin: 0;
}

.switch-multiple input[type="radio"]:checked + label {
  background: #d6f3fc;
  color: var(--c-secondaire, #1976d2);
  box-shadow: none;
  z-index: 2;
  padding: 0.15rem 0.7rem;
  height: auto;
  line-height: normal;
  border-radius: 0.4rem;
}

.switch-multiple label + label {
  border-left: 1px solid transparent;
}

.switch-multiple .slider-option {
  display: none;
}
#bSansAgrementRch ~ label,
#bSansAgrementRch + span,
.field.weight-400 {
  font-size: 1rem !important;
  font-weight: 400;
  white-space: nowrap;
}
.field_datepicker {
  align-items: center;
}

.field_datepicker i.material-icons {
  font-size: 2rem;
  vertical-align: middle;
  margin-right: 0.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
}

.field.weight-400 {
  font-size: 1.1rem;
}

#bSansAgrementRch ~ label,
#bSansAgrementRch + span,
.field.weight-400 {
  font-size: 1rem !important;
  font-weight: 400;
}

.field_datepicker {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex: 1 1 0;
}

.field_datepicker input[type="text"].datepicker {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


/* Layout du formulaire de recherche */
.filtre_recherche {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field-recherche {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
  color: var(--c-secondaire);
  margin-bottom: 0;
  width: 100%;
  flex-shrink: 0;
  flex-grow: 0;
  min-width: 0;
  box-sizing: border-box; 
}

div.field-recherche:nth-child(7) {
  flex: 1 1 0;
  flex-direction: column;
  padding-top: 0 !important;
}

div.filtre-haut {
  height: 3rem;
}

/* Forcer tous les <select> à occuper la même largeur que les champs date */
.field-recherche select {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.field_datepicker {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  flex: 1 1 0;
}

.field_datepicker input[type="text"].datepicker {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex:  1 1 0 !important;
  /* max-width: 33% !important; */
}

#bSansAgrementRch[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: block;
  z-index: 2;
}

#bSansAgrementRch[type="checkbox"]:checked::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 4px;
  height: 8px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  z-index: 3;
}

/* Checkbox rond pour #bSansAgrementRch */
#bSansAgrementRch[type="checkbox"] {
  width: 1.2rem !important;
  height: 1.2rem !important;
  border-radius: 50% !important;
  border: 2px solid var(--c-secondaire, #1976d2);
  accent-color: var(--c-secondaire, #1976d2);
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.2s;
}


#bSansAgrementRch[type="checkbox"]:checked {
  background: var(--c-secondaire, #1976d2);
  /* box-shadow: 0 0 0 2px #fff inset; */
}

#bSansAgrementRch[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px #90caf9;
}

.field-recherche > *:not(.switch-multiple) {
  flex: 1 1 0 !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.icon_filtre {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  justify-content: flex-end;
  padding-top: 0.6rem;
}

.field-ligne-2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 1.4rem !important;
}

@media (max-width: 900px) {
  .field-recherche.force-padding-05  {
   flex-direction: column;
  }
  .field.weight-400 {
    padding-left: 0;
  }
  .field-ligne-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  #sRechercheGeneral {
    width: 10rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    background-size: 1rem;
    background-position: 0.3rem center;
  }
  #sRechercheGeneral::placeholder {
    font-size: 0.7rem;
  }
}