#choix-date {
  box-sizing: border-box;
  width: min(26rem, calc(100vw - 1.5rem));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  margin: auto;
  padding: 0;
  border: 1px solid #726546;
  border-radius: 1.1rem;
  overflow-y: auto;
  background: #1a1c1a;
  color: #f6f2e9;
  color-scheme: dark;
  font-family: inherit;
  box-shadow: 0 1.5rem 5rem #0009;
}

#choix-date::backdrop { background: #0c0e0bd4; }
.cal-contenu { padding: clamp(1rem, 4vw, 1.55rem); }
.cal-entete, .cal-navigation, .cal-horaire, .cal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}

#choix-date .cal-entete { position: static; border: 0; background: transparent; padding: 0; }
#choix-date h2 { font: inherit; font-size: 1.3rem; font-weight: 650; letter-spacing: -.035em; color: inherit; margin: 0; }
#choix-date button, #choix-date input, #choix-date select { font: inherit; }
#choix-date button { cursor: pointer; }
#choix-date button:focus-visible, #choix-date input:focus-visible, #choix-date select:focus-visible {
  outline: 2px solid #e7c889; outline-offset: 2px;
}

.cal-navigation { margin: 1rem 0 .5rem; }
#cal-mois { text-transform: capitalize; font-size: .98rem; }
.cal-fermer, .cal-avant, .cal-apres {
  display: grid; place-items: center; padding: 0;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: transparent; border: 1px solid #5e6059; color: inherit;
}
#choix-date :is(.cal-fermer, .cal-avant, .cal-apres) { font-size: 1.35rem; line-height: 1; }
.cal-semaine, .cal-jours { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-semaine { color: #c3c2b9; text-align: center; padding: .45rem 0; font-size: .73rem; }
.cal-jours button {
  display: grid; place-items: center; min-height: 2.75rem; padding: 0; border: 0;
  border-radius: .55rem; color: inherit; background: transparent; font-variant-numeric: tabular-nums;
}
.cal-jours button[aria-current="date"] { text-decoration: underline; text-underline-offset: .25em; }
#choix-date button:disabled { color: #8a8d82; opacity: .6; cursor: default; }
.cal-jours button:not(:disabled):hover, .cal-avant:not(:disabled):hover, .cal-apres:hover, .cal-fermer:hover {
  background: #35372f;
}
.cal-jours button[aria-pressed="true"], .cal-jours button[aria-pressed="true"]:hover {
  background: #dabe83; color: #171810; font-weight: 700;
}
.cal-horaire { border-top: 1px solid #45463c; padding-top: 1rem; margin-top: .75rem; }
.cal-horaire label { display: grid; gap: .16rem; font-size: .9rem; }
.cal-date-selection { color: #cdcbbd; font-size: .77rem; }
#cal-heure {
  box-sizing: border-box; max-width: 100%; min-height: 2.75rem; min-width: 0; border: 1px solid #626459;
  border-radius: .55rem; padding: .35rem .5rem; background: #242621; color: inherit;
}
@media (max-width: 480px) {
  .cal-horaire { display: grid; }
  #cal-heure { width: 100%; }
}
.cal-erreur { color: #ffbea8; font-size: .88rem; line-height: 1.45; margin: .7rem 0 0; }
.cal-erreur:empty { display: none; }
.cal-actions { margin-top: 1.2rem; }
.cal-actions button { min-height: 2.75rem; padding: .45rem 1rem; border: 0; border-radius: .6rem; }
.cal-effacer { background: transparent; color: #e4dfce; text-decoration: underline; text-underline-offset: .25em; }
.cal-appliquer { background: #dabe83; color: #171810; font-weight: 650; }

@media (max-height: 530px) {
  .cal-contenu { padding: .8rem; }
  .cal-navigation, .cal-actions { margin-top: .5rem; }
}
