/* Panneau de droite : jour choisi, créneaux, formulaire, confirmation (clair/sombre). */
.panel {
  --bg: #ffffff;
  --fg: #1f2630;
  --muted: #6b7380;
  --line: #d5d9e0;
  --banner: #eef0f3;
  --accent: #3d4654;
  --accent-fg: #ffffff;
  --error-bg: #fdecec;
  --error-fg: #9b1c1c;
  background: var(--bg);
  color: var(--fg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}
@media (prefers-color-scheme: dark) {
  .panel {
    --bg: #1f242c;
    --fg: #e9ecf1;
    --muted: #9aa3b0;
    --line: #3a424e;
    --banner: #2a313b;
    --accent: #e9ecf1;
    --accent-fg: #1f242c;
    --error-bg: #3b1f22;
    --error-fg: #ffb4b4;
  }
}
.panel > div:not([hidden]) { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.day-banner {
  background: var(--banner);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 500;
}
.facts { margin: 0 0 12px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.facts small { display: block; color: var(--muted); font-size: 0.78rem; }
.muted { color: var(--muted); font-size: 0.9rem; }

.slots {
  list-style: none;
  margin: 4px 0 0;
  padding: 2px 4px 2px 2px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  max-height: 340px;
}
.slots button {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.slots button:hover { border-color: var(--accent); }

.notice {
  background: var(--error-bg);
  color: var(--error-fg);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.back {
  align-self: flex-start;
  border: 0; background: transparent; color: var(--muted);
  padding: 4px 0; margin-bottom: 8px;
}
.back:hover { color: var(--fg); }

form { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 4px; }
.field label { font-size: 0.88rem; font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
input, textarea {
  font: inherit;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
}
textarea { resize: vertical; min-height: 90px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error-fg); }
.primary {
  border: 0; border-radius: 10px;
  padding: 12px 16px;
  background: var(--accent); color: var(--accent-fg);
  font-weight: 600;
}
.primary:disabled { opacity: 0.6; cursor: progress; }
.legal { color: var(--muted); font-size: 0.78rem; margin: 0; }

/* Champ piège : hors écran, jamais visible ni atteignable au clavier. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.done { text-align: center; margin: auto 0; padding: 16px 4px; }
.done h2 { font-size: 1.3rem; font-weight: 500; margin: 8px 0; }
.done h2:focus { outline: none; }
.done-when { font-size: 1.05rem; margin: 0 0 12px; }
.done a { color: inherit; font-weight: 500; overflow-wrap: anywhere; }
.check {
  width: 56px; height: 56px; margin: 0 auto;
  border-radius: 50%;
  background: #2f8f5b; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}

@media (max-width: 760px) {
  .panel { min-height: 0; padding: 18px 16px; }
  .slots { max-height: none; overflow: visible; grid-template-columns: repeat(3, 1fr); }
  .row { grid-template-columns: 1fr; }
}
.muted:empty, .notice:empty { display: none; }
