#dispo { --dispo-accent: #444; max-width: 640px; margin: 0 auto; }

.dispo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.dispo-nav-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  color: var(--dispo-accent);
}

.dispo-nav-btn:hover { background: #f5f5f5; }
.dispo-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.dispo-month-title {
  font: 600 1.05rem/1.4 system-ui;
  text-transform: capitalize;
  color: var(--dispo-accent);
  margin: 0;
  min-width: 140px;
  text-align: center;
}

.dispo-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.dispo-dow {
  font: 600 11px/1 system-ui;
  text-align: center;
  padding: 6px 0;
  color: #777;
}

.dispo-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
  font-size: clamp(15px, 4.5vw, 19px);
  font-weight: 600;
  border-radius: 4px;
}


.dispo-free { background: color-mix(in srgb, var(--dispo-accent) 50%, #fff); color: #fff; }
.dispo-busy { background: #eef2f5; color: #55606a; }
.dispo-empty { background: transparent; }
.dispo-today { outline: 2px solid #222; outline-offset: -2px; }
.dispo-past { opacity: 0.4; background: #eef2f5; color: #55606a; }

.dispo-busy .dispo-day-num {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.dispo-past .dispo-day-num {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.dispo-status {
  font: 400 12px/1.5 system-ui;
  color: #666;
  text-align: center;
  margin: 15px 0 0;
}

.dispo-error { color: #b3261e; }
.dispo-count { font-weight: 500; color: #333; }


/* --- Sélection de période ------------------------------------------- */

.dispo-clickable { cursor: pointer; }

.dispo-clickable:hover {
  box-shadow: inset 0 0 0 2px var(--dispo-accent);
}

.dispo-clickable:focus-visible {
  outline: 2px solid var(--dispo-accent);
  outline-offset: 2px;
}

/* Jours intermédiaires de la période */
.dispo-in-range {
  background: #ececec;                                              /* repli */
  background: color-mix(in srgb, var(--dispo-accent) 90%, #fff);
}

/* Bornes de la période */
.dispo-start,
.dispo-end {
  background: var(--dispo-accent);
  color: #fff;
  font-weight: 600;
}
.dispo-start .dispo-day-num,
.dispo-end .dispo-day-num { color: #fff; }

/* Message sous le calendrier */
.dispo-hint {
  margin-top: .75rem;
  min-height: 1.4em;
  font-size: .9rem;
  text-align: center;
  color: var(--gray, #666);
}
.dispo-hint.is-error {
  color: #c0392b;
  font-weight: 600;
}

/* Surbrillance du formulaire au moment du report */
.flash-target { animation: dispoFlash 1.4s ease-out; }

@keyframes dispoFlash {
  from { box-shadow: 0 0 0 3px rgba(109, 74, 255, .55); }
  to   { box-shadow: 0 0 0 3px rgba(109, 74, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .flash-target { animation: none; }
}
