/* ══════════════════════════════════════════
   RÉSERVATION DE TERRAIN — USM/TCC
   Tennis Premium UI · Dark + Court Green
   ══════════════════════════════════════════ */

/* ─── Page Header ─── */
.res-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.res-page-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.res-tennis-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(45,106,79,.6));
}
.res-page-title-text {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  font-family: 'DM Serif Display', serif;
  letter-spacing: -.3px;
}
.res-page-subtitle {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
}
.res-stats-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
}
.res-stat-item.free  { color: #4ade80; font-weight: 600; }
.res-stat-item.booked { color: #f87171; font-weight: 600; }
.res-stat-sep { color: var(--line2); }

/* ─── Date Navigation ─── */
.res-date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 16px;
  position: relative;
}
.res-nav-btn {
  background: rgba(45,106,79,.15);
  border: 1px solid rgba(45,106,79,.3);
  color: #4ade80;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
}
.res-nav-btn:hover {
  background: rgba(45,106,79,.3);
  transform: scale(1.08);
}
.res-date-center {
  flex: 1;
  text-align: center;
}
.res-day-name {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}
.res-today-badge {
  display: inline-block;
  background: rgba(45,106,79,.2);
  border: 1px solid rgba(45,106,79,.4);
  color: #4ade80;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.res-date-full {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  font-family: 'DM Serif Display', serif;
}
.res-date-inp {
  position: absolute;
  right: 16px;
  opacity: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color-scheme: dark;
}
.res-date-inp + .res-date-cal-icon {
  position: absolute;
  right: 16px;
  font-size: 18px;
  cursor: pointer;
  opacity: .5;
  transition: opacity .15s;
}
.res-date-nav:hover .res-date-inp + .res-date-cal-icon { opacity: .9; }

/* ─── Filter Pills ─── */
.res-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.res-filter-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}
.res-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.res-fpill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line2);
  color: var(--muted);
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.res-fpill:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
}
.res-fpill.active {
  background: rgba(45,106,79,.2);
  border-color: rgba(45,106,79,.5);
  color: #4ade80;
  font-weight: 600;
}
.res-fdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Legend ─── */
.res-legend-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.res-leg-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}
.res-leg-box {
  width: 28px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.res-leg-box.libre  { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.res-leg-box.reserve { background: rgba(45,106,79,.25); border: 1px solid rgba(45,106,79,.45); }

/* ─── Courts Grid ─── */
.res-courts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .res-courts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .res-courts-grid { grid-template-columns: 1fr; } }

/* ─── Court Card ─── */
.res-court-card {
  background: rgba(255,255,255,.025);
  border: 1px solid var(--line2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.res-court-card:hover {
  border-color: rgba(45,106,79,.35);
  box-shadow: 0 4px 24px rgba(45,106,79,.08);
}
.res-court-hdr {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--line2);
}
.res-court-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.res-court-info { flex: 1; min-width: 0; }
.res-court-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-court-occ { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.res-court-gauge {
  width: 48px;
  flex-shrink: 0;
}
.res-gauge-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.res-gauge-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .3s;
}

/* ─── Slots List ─── */
.res-slots-list {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 3px;
  max-height: 520px;
  overflow-y: auto;
}
.res-slots-list::-webkit-scrollbar { width: 4px; }
.res-slots-list::-webkit-scrollbar-track { background: transparent; }
.res-slots-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* ─── Individual Slot ─── */
.res-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  min-height: 36px;
  transition: all .18s;
  position: relative;
}
.res-slot.libre {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
}
.res-slot.libre:not(.past):hover {
  background: rgba(45,106,79,.12);
  border-color: rgba(45,106,79,.3);
  transform: translateX(2px);
}
.res-slot.libre:not(.past):hover .res-slot-time { color: #4ade80; }
.res-slot.libre.past {
  opacity: .35;
  cursor: default;
}
.res-slot.reserve {
  background: rgba(45,106,79,.12);
  border: 1px solid rgba(45,106,79,.3);
  cursor: default;
}
.res-slot-time {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  min-width: 36px;
  letter-spacing: .3px;
}
.res-slot-libre-lbl {
  font-size: 11px;
  color: rgba(255,255,255,.2);
  flex: 1;
}
.res-slot-players {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  flex-wrap: wrap;
}
.res-player-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.res-player-badge.p1 {
  background: rgba(201,168,76,.15);
  color: #e8c86a;
  border: 1px solid rgba(201,168,76,.25);
}
.res-player-badge.p2 {
  background: rgba(96,165,250,.12);
  color: #93c5fd;
  border: 1px solid rgba(96,165,250,.25);
}
.res-vs {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.res-cancel-btn {
  background: none;
  border: none;
  color: rgba(248,113,113,.5);
  cursor: pointer;
  font-size: 11px;
  padding: 3px 5px;
  border-radius: 4px;
  transition: all .15s;
  flex-shrink: 0;
  margin-left: auto;
}
.res-cancel-btn:hover {
  color: #f87171;
  background: rgba(248,113,113,.1);
}

/* ─── Modal: Player Selection ─── */
.mo#mo-reservation .mo-box { max-width: 520px; }

.res-mo-selections {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line2);
  border-radius: 10px;
}
.res-mo-sel-item { flex: 1; min-width: 0; }
.res-mo-sel-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.res-mo-sel-disp {
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line2);
  border-radius: 7px;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 12.5px;
  transition: border-color .2s;
}
.res-mo-sel-item:first-child .res-mo-sel-disp.has-player {
  border-color: rgba(201,168,76,.35);
}
.res-mo-sel-item:last-child .res-mo-sel-disp.has-player {
  border-color: rgba(96,165,250,.35);
}
.res-mo-vs {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0;
  padding-top: 16px;
}
.res-sel-empty { color: var(--muted); font-size: 12px; }
.res-sel-name { color: var(--white); font-weight: 600; }

/* ─── Player List in Modal ─── */
.res-player-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: rgba(255,255,255,.02);
}
.res-player-list::-webkit-scrollbar { width: 4px; }
.res-player-list::-webkit-scrollbar-track { background: transparent; }
.res-player-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.res-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid rgba(255,255,255,.03);
}
.res-player-row:last-child { border-bottom: none; }
.res-player-row:hover { background: rgba(255,255,255,.05); }
.res-player-row.sel-p1 { background: rgba(201,168,76,.08); border-left: 3px solid rgba(201,168,76,.5); }
.res-player-row.sel-p2 { background: rgba(96,165,250,.08); border-left: 3px solid rgba(96,165,250,.5); }
.res-prow-info { flex: 1; min-width: 0; }
.res-prow-name { font-size: 12.5px; font-weight: 600; color: var(--white); }
.res-prow-league { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.res-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .6px;
  flex-shrink: 0;
}
.res-tag.p1 { background: rgba(201,168,76,.2); color: #e8c86a; border: 1px solid rgba(201,168,76,.3); }
.res-tag.p2 { background: rgba(96,165,250,.15); color: #93c5fd; border: 1px solid rgba(96,165,250,.3); }
