/* -----------------------------------------------------------------
 | Surcouche du wizard hôtellerie — chargée APRÈS wizard.css
 | 1. Sémantique de couleur des bascules Oui/Non
 | 2. Champs date pilotés par Flatpickr
 | 3. Zone de dépôt de fichiers
 | ----------------------------------------------------------------- */

/* 1 — Oui/Non ------------------------------------------------------ */

.yn--danger input[type="radio"][value="yes"]:checked + label {
  background: #d9483b;
  border-color: #d9483b;
  color: #fff;
}

.yn--danger input[type="radio"][value="no"]:checked + label {
  background: #1f9d55;
  border-color: #1f9d55;
  color: #fff;
}

.yn--safe input[type="radio"][value="yes"]:checked + label {
  background: #1f9d55;
  border-color: #1f9d55;
  color: #fff;
}

.yn--safe input[type="radio"][value="no"]:checked + label {
  background: #d9483b;
  border-color: #d9483b;
  color: #fff;
}

/* 2 — Date --------------------------------------------------------- */

.field--date,
.field--date .field__label,
.field--date input.flatpickr-input {
  cursor: pointer;
}

.field--date input.flatpickr-input {
  width: 100%;
  background-image: none;
}

.flatpickr-calendar {
  font-family: inherit;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(38, 55, 70, .18);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #00a0e1;
  border-color: #00a0e1;
}

.flatpickr-day.today {
  border-color: #00a0e1;
}

.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
span.flatpickr-weekday {
  background: #263746;
  color: #fff;
  fill: #fff;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #fff;
}

/* 3 — Dépôt de fichiers -------------------------------------------- */

.dropzone {
  position: relative;
  display: block;
  border: 1.5px dashed #b8c4ce;
  border-radius: 10px;
  background: #f7f9fb;
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover,
.dropzone:focus-within {
  border-color: #00a0e1;
  background: #f1f8fc;
}

.dropzone.is-dragging {
  border-color: #00a0e1;
  border-style: solid;
  background: #e7f4fb;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone__icon {
  font-size: 26px;
  color: #00a0e1;
  margin-bottom: 8px;
  display: block;
}

.dropzone__title {
  font-weight: 600;
  color: #263746;
  font-size: 14.5px;
}

.dropzone__title span {
  color: #00a0e1;
  text-decoration: underline;
}

.dropzone__meta {
  font-size: 12.5px;
  color: #6b7c8c;
  margin-top: 4px;
}

.dropzone-files {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.dropzone-files li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #e2e8ee;
  border-radius: 8px;
  background: #fff;
  margin-top: 8px;
  font-size: 13.5px;
  text-align: left;
}

.dropzone-files i {
  color: #00a0e1;
}

.dropzone-files .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #263746;
}

.dropzone-files .size {
  color: #6b7c8c;
  font-size: 12.5px;
  flex-shrink: 0;
}

.dropzone-files .rm {
  border: 0;
  background: none;
  color: #b03a2e;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}

.dropzone-files .rm:hover {
  color: #d9483b;
}

.dropzone-error {
  color: #b03a2e;
  font-size: 12.5px;
  margin-top: 8px;
}

/* 4 — Horaire hebdomadaire ------------------------------------------ */

.hours {
  border: 1px solid #e2e8ee;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.hours__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #eef2f6;
}

.hours__row:last-child {
  border-bottom: 0;
}

.hours__row.is-closed .hours__times {
  opacity: .35;
  pointer-events: none;
}

.hours__day {
  width: 42px;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 13.5px;
  color: #263746;
  cursor: help;
}

.hours__state {
  width: 58px;
  flex-shrink: 0;
  font-size: 12.5px;
  color: #6b7c8c;
}

.hours__row.is-closed .hours__state {
  color: #b03a2e;
}

/* Interrupteur */
.hours__sw {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
  flex-shrink: 0;
  cursor: pointer;
}

.hours__sw input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.hours__sw span {
  position: absolute;
  inset: 0;
  background: #cfd8e0;
  border-radius: 999px;
  transition: background .15s;
}

.hours__sw span::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.hours__sw input:checked + span {
  background: #1f9d55;
}

.hours__sw input:checked + span::before {
  transform: translateX(17px);
}

.hours__times {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.hours__sep {
  font-size: 12.5px;
  color: #6b7c8c;
}

input.hours__t {
  width: 92px;
  text-align: center;
  padding: 6px 8px;
  border: 1px solid #d6dee6;
  border-radius: 7px;
  font-size: 13.5px;
  background: #fff;
  cursor: pointer;
}

input.hours__t:focus {
  border-color: #00a0e1;
  outline: none;
}

.hours__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 14px;
  background: #f7f9fb;
  border-top: 1px solid #e2e8ee;
}

.hours__copy {
  border: 1px solid #d6dee6;
  background: #fff;
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 12.5px;
  color: #263746;
  cursor: pointer;
  font-family: inherit;
}

.hours__copy:hover {
  border-color: #00a0e1;
  color: #00a0e1;
}

.hours__summary {
  font-size: 12.5px;
  color: #6b7c8c;
  flex: 1;
  min-width: 200px;
}

@media (max-width: 560px) {
  .hours__row {
    flex-wrap: wrap;
  }
  .hours__times {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* 5 — Champ avec unité ---------------------------------------------- */

.unit-field {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.unit-field > input {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.unit-field__u {
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 74px;
  width: 74px !important;
  max-width: 74px;
  border: 1px solid #d6dee6;
  border-left: 0;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  background: #f7f9fb;
  color: #263746;
  font-family: inherit;
  font-size: 13.5px;
  padding: 0 6px;
  cursor: pointer;
}

.unit-field__u:focus {
  outline: none;
  border-color: #00a0e1;
}

.dyn-table .unit-field__u {
  width: 66px;
}

/* 6 — Alignement des libellés en grille ------------------------------
 | Dans une grille multi-colonnes, un libellé qui passe sur deux lignes
 | décale son champ par rapport aux voisins. On force les colonnes à
 | s'étirer et les champs à s'aligner en bas de cellule.
 */

.grid-2,
.grid-3 {
  align-items: end;
}

.grid-2 > .field,
.grid-3 > .field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.grid-2 > .field > .field__label,
.grid-3 > .field > .field__label {
  flex: 1;
  display: flex;
  align-items: flex-end;
}

.grid-2 > .field > input,
.grid-2 > .field > select,
.grid-2 > .field > .unit-field,
.grid-3 > .field > input,
.grid-3 > .field > select,
.grid-3 > .field > .unit-field {
  margin-top: 6px;
}
