/**
 * Kapela — Style : Calendrier des réservations, aperçu de facture, groupe et impression
 * Auteur : Jacks Ngalangala
 */

/* ───────── Calendrier des réservations ───────── */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.day {
  flex-shrink: 0;
  width: 74px;
  height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surf);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.day .w {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}
.day .d {
  font-family: var(--f-disp);
  font-size: 24px;
  font-weight: var(--disp-w);
  line-height: 1;
}
.day .c {
  font-size: 11px;
  color: var(--acc);
  font-weight: 700;
  min-height: 14px;
}
.day.on {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--dark-t);
}
.day.on .w {
  color: var(--dark-m);
}
.rsv {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line2);
}
.rsv .h {
  font-family: var(--f-disp);
  font-size: 22px;
  font-weight: var(--disp-w);
  white-space: nowrap;
}
.rsv:last-child {
  border-bottom: 0;
}
@media (max-width: 860px) {
  .rsv {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .rsv .h {
    font-size: 18px;
  }
  .rsv .x {
    grid-column: 1/-1;
  }
}

/* ───────── Aperçu de facture ───────── */
.preview {
  background: #e9e5dc;
  border-radius: var(--r-card);
  padding: 20px;
  display: flex;
  justify-content: center;
  min-height: 400px;
}
.preview iframe {
  border: 0;
  width: 100%;
  height: 640px;
  background: #fff;
  border-radius: 4px;
}
.tplcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tplc {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surf);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.tplc.on {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.tplc b {
  font-size: 14px;
}
.tplc small {
  font-size: 12px;
  color: var(--muted);
}

/* ───────── Groupe : boîte de rapprochement ───────── */
.sites {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surf);
  cursor: grab;
}
.site.in {
  border-color: var(--ink);
  box-shadow: inset 4px 0 0 var(--acc);
}
.site .grip {
  color: var(--muted);
}
.site .v {
  font-family: var(--f-disp);
  font-size: 20px;
  font-weight: var(--disp-w);
  text-align: right;
}
.cmpbox {
  border: 2px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--surf);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.cmpbox.over {
  border-color: var(--acc);
  background: var(--bg);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 6px 0 12px;
  border-radius: var(--r-ui);
  background: var(--dark);
  color: var(--dark-t);
  font-size: 13px;
  font-weight: 600;
}
.pill button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--r-ui);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  cursor: pointer;
}

/* Impression */
@media print {
  .side,
  .top,
  .mhead,
  .mtabs,
  .noprint {
    display: none !important;
  }
  .page {
    padding: 0;
  }
}
