/* ============ LAYOUT PAGE + PUB/CAROUSEL (conserve) ============ */

:root{
  --pub-h: 20vh;
}

/* Conteneur de page avec bandeau pub en bas (mobile) */
.page-container{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

/* La zone des matchs scrolle au-dessus de la pub */
.match-block{
  flex:1;
  overflow-y:auto;
  padding:12px;
  padding-bottom: calc(var(--pub-h) + 12px);
  background:#e1e1e1;
}

/* Masquer la pub sur desktop/TV (la pub est mobile-only) */
@media (min-width: 800px) {
  .pub { 
    display: none !important;
  }
}

/* ---- Bandeau pub (carrousel en bas) ---- */
.pub{
  position:fixed;
  left:0; right:0; bottom:0;
  height:var(--pub-h);
  z-index:1000;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
  background-color: #ffffff;
}

/* Carrousel : une slide = 100% de la largeur */
.carousel{
  display:flex;
  width:100%;
  height:100%;
  overflow:hidden;
  scroll-behavior:smooth;
}

.carousel-items{
  flex:0 0 100%;
  height:100%;
}

.carousel-items img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  
}

/* Optionnel: sur mobile, un peu plus haut si besoin */
@media (max-width: 480px){
  :root { --pub-h: 20vh; }
}

/* ============ RECHERCHE / FILTRES (conserve) ============ */

.display-search{
  display: flex;
  align-items: center;
  justify-content: center;
}

.container-search {
  text-align: center;
  padding: 20px;
  padding-left: 50px ;
  padding-right: 50px;
  background-color: #ffffff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  max-width: 400px;
  max-height: 150px;
  width: 100%;
}

form.d-flex {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group.mb-3 {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.input-group.mb-3 input.form-control {
  flex: 1;
  padding: 5px 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.input-group.mb-3 button.btn {
  padding: 5px 12px;
  height: 40px;
  width: 120px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  background-color: #013d5b;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.input-group.mb-3 button.btn:hover {
  background-color: #00537c;
}


input::placeholder {
  color: #6c757d;
}

/* Recherche moderne - page matchs terminés (scopé) */
#finishedMatchBlock .display-search {
  width: min(1080px, 100%);
  margin: 14px auto 18px;
  padding: 0 12px;
}

#finishedMatchBlock .container-search {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f8fb, #eef3f8);
  border: 1px solid rgba(0, 63, 95, 0.12);
  box-shadow: 0 10px 26px rgba(0, 35, 55, 0.12);
  max-width: none;
  max-height: none;
  text-align: initial;
}

#finishedMatchBlock .finished-search-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

#finishedMatchBlock .search-field {
  min-height: 50px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #d8e3ec;
  background: #ffffff;
}

#finishedMatchBlock .search-field .form-control {
  border: 0;
  border-radius: 0;
  height: 100%;
  font-size: 15px;
  color: #003f5f;
  padding: 12px 14px;
}

#finishedMatchBlock .search-field .form-control::placeholder {
  color: #6b8495;
}

#finishedMatchBlock .search-field .form-control:focus {
  box-shadow: none;
}

#finishedMatchBlock .search-field.date .form-control[type="date"] {
  font-weight: 700;
  color: #003f5f;
}

#finishedMatchBlock .search-field.date .form-control[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.9;
}

#finishedMatchBlock .search-action {
  border: 0;
  border-left: 1px solid #e6edf3;
  border-radius: 0;
  padding: 0 16px;
  min-width: 124px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  background: linear-gradient(180deg, #005b85, #003f5f);
}

#finishedMatchBlock .search-action:hover,
#finishedMatchBlock .search-action:focus {
  color: #ffffff;
  background: linear-gradient(180deg, #0a6a97, #004d72);
  box-shadow: none;
}

@media (max-width: 900px) {
  #finishedMatchBlock .finished-search-form {
    grid-template-columns: 1fr;
  }

  #finishedMatchBlock .container-search {
    padding: 10px;
    border-radius: 14px;
  }

  #finishedMatchBlock .search-field {
    min-height: 46px;
    border-radius: 12px;
  }

  #finishedMatchBlock .search-action {
    min-width: 110px;
    font-size: 13px;
    padding: 0 12px;
  }
}

/* Datepicker moderne - page matchs terminés */
#finishedMatchBlock .datepicker-dropdown {
  margin-top: 8px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  border: 1px solid rgba(0, 63, 95, 0.14);
  background: linear-gradient(180deg, #ffffff, #f5f9fd);
  box-shadow: 0 14px 30px rgba(0, 35, 55, 0.22);
  z-index: 1200 !important;
}

#finishedMatchBlock .datepicker-dropdown::before,
#finishedMatchBlock .datepicker-dropdown::after {
  display: none !important;
}

#finishedMatchBlock .datepicker {
  padding: 0;
}

#finishedMatchBlock .datepicker table {
  margin: 0;
  border-collapse: separate;
  border-spacing: 4px;
}

#finishedMatchBlock .datepicker th,
#finishedMatchBlock .datepicker td {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

#finishedMatchBlock .datepicker th.datepicker-switch {
  color: #003f5f;
  font-size: 14px;
  font-weight: 800;
  text-transform: capitalize;
}

#finishedMatchBlock .datepicker th.prev,
#finishedMatchBlock .datepicker th.next {
  color: #003f5f;
  font-size: 18px;
  line-height: 1;
}

#finishedMatchBlock .datepicker th.prev:hover,
#finishedMatchBlock .datepicker th.next:hover {
  background: #e6f1fb;
}

#finishedMatchBlock .datepicker .dow {
  color: #6b8495;
  font-size: 11px;
  font-weight: 700;
}

#finishedMatchBlock .datepicker td.day {
  color: #003f5f;
}

#finishedMatchBlock .datepicker td.day:hover {
  background: #e6f1fb;
  color: #003f5f;
}

#finishedMatchBlock .datepicker td.today:not(.active),
#finishedMatchBlock .datepicker td.today:not(.active):hover {
  background: rgba(255, 216, 77, 0.28);
  color: #003f5f;
}

#finishedMatchBlock .datepicker td.active,
#finishedMatchBlock .datepicker td.active:hover,
#finishedMatchBlock .datepicker td.active.active {
  background: linear-gradient(180deg, #ffd84d, #efc21f);
  color: #003f5f;
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(0, 63, 95, 0.08);
}

#finishedMatchBlock .datepicker td.new,
#finishedMatchBlock .datepicker td.old {
  color: #9eb1bf;
}

@media (max-width: 560px) {
  #finishedMatchBlock .datepicker th,
  #finishedMatchBlock .datepicker td {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 12px;
  }

  #finishedMatchBlock .datepicker th.datepicker-switch {
    font-size: 13px;
  }
}

/* Barre au-dessus de la liste */
.filters-bar{
  display:flex;
  gap:8px;
  align-items:center;
  margin:12px 0;
}

.btn-filter, .btn-reset, .btn-apply, .btn-close{
  border:1px solid #ccc;
  background:#fff;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-size:14px;
  transition: background .2s;
}
.btn-filter:hover, .btn-reset:hover, .btn-apply:hover, .btn-close:hover{
  background:#f3f3f3;
}

/* Panneau de filtres */
.filter-panel {
  background: #fff;
  border: 1px solid #e6e6e6;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

/* Grille 2x2 : Nom/Club, Sexe/Date */
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr !important;
  grid-template-rows: auto auto;
  gap: 16px 20px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-field label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.filter-field input[type="search"],
.filter-field input[type="text"] {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.filter-field input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,.1);
}

/* Ligne radio (Sexe) */
.radio-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}

/* Actions en bas */
.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Message “pas de match” */
.no-match-message {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin: 20px 0;
}

/* ============ SUPPRESSIONS ============ */
/* Tout l’ancien style du scoreboard a été supprimé
   (scoreboard, match-container, match-court, player-*, set-*, Cours, ServiceDot, etc.)
   pour laisser la main à /css/scoreboard-modern.css */
