/* =====================================================================
   SE SPORT EVENTS — Page Événements
   ===================================================================== */

/* ----------------------------- PAGE HERO ----------------------------- */
.page-hero {
  position: relative;
  padding: 160px 0 80px;
  overflow: hidden;
  isolation: isolate;
}
.page-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('http://localhost/sportsevent/images/hero.png');
  background-size: cover;
  background-position: center 40%;
  z-index: -2;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(5, 7, 10, .75) 0%,
      rgba(5, 7, 10, .55) 40%,
      rgba(5, 7, 10, .9) 100%),
    linear-gradient(90deg, rgba(5, 7, 10, .7) 0%, rgba(5, 7, 10, .2) 70%);
}
.page-hero__inner { position: relative; }

.breadcrumb-se {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 1.2rem;
}
.breadcrumb-se a { color: rgba(255, 255, 255, .75); }
.breadcrumb-se a:hover { color: var(--se-cyan-2); }
.breadcrumb-se i { font-size: .65rem; color: rgba(255, 255, 255, .45); }
.breadcrumb-se span { color: #ffffff; }

.page-hero__title {
  font-family: var(--se-font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: #ffffff;
  margin: 0 0 1rem;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .55);
}
.page-hero__subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, .88);
  max-width: 620px;
  margin: 0;
  line-height: 1.6;
}

/* ----------------------------- SECTION ----------------------------- */
.events-page {
  padding: 60px 0 100px;
  background: var(--se-bg-alt);
}

/* ----------------------------- BARRE RECHERCHE ----------------------------- */
.events-search {
  display: flex;
  align-items: stretch;
  gap: .5rem;
  padding: .6rem;
  background: var(--se-bg);
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius-lg);
  box-shadow: 0 12px 30px -18px rgba(10, 13, 18, .2);
  margin-bottom: 2.5rem;
  margin-top: 84px;
}
.events-search__field {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 0 1rem;
  background: var(--se-bg-alt);
  border: 1px solid transparent;
  border-radius: var(--se-radius);
  transition: all var(--se-transition);
}
.events-search__field:focus-within {
  border-color: var(--se-cyan);
  background: var(--se-bg);
  box-shadow: 0 0 0 3px rgba(34, 184, 230, .12);
}
.events-search__field i {
  color: var(--se-cyan-dark);
  font-size: 1.1rem;
  margin-right: .7rem;
}
.events-search__field input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--se-text);
  font-family: inherit;
  font-size: .95rem;
  padding: 1rem 0;
}
.events-search__field input::placeholder { color: var(--se-text-soft); }

.events-search__submit {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: 0 2rem;
  background: var(--se-cyan);
  color: #00151f;
  border: none;
  border-radius: var(--se-radius);
  font-family: var(--se-font-display);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all var(--se-transition);
  flex-shrink: 0;
}
.events-search__submit:hover {
  background: var(--se-cyan-2);
  box-shadow: 0 10px 24px -10px var(--se-cyan-glow);
}
.events-search__submit i { transition: transform var(--se-transition); }
.events-search__submit:hover i { transform: translateX(4px); }

/* ----------------------------- LAYOUT ----------------------------- */
.events-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ----------------------------- SIDEBAR FILTRES ----------------------------- */
.events-filters {
  position: sticky;
  top: 100px;
  background: var(--se-bg);
  border: 1px solid var(--se-border);
  border-radius: var(--se-radius-lg);
  padding: 1.6rem 1.4rem;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.events-filters::-webkit-scrollbar { width: 6px; }
.events-filters::-webkit-scrollbar-thumb { background: #d0d6de; border-radius: 3px; }

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--se-border);
  margin-bottom: 1.4rem;
}
.filters-title {
  font-family: var(--se-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--se-text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.filters-title i { color: var(--se-cyan-dark); }
.filters-reset {
  background: transparent;
  border: none;
  color: var(--se-cyan-dark);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  padding: .25rem .1rem;
  transition: color var(--se-transition);
}
.filters-reset:hover { color: var(--se-cyan); }

.filter-group {
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--se-border);
}
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.filter-group__title {
  font-family: var(--se-font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--se-text-muted);
  margin: 0 0 .9rem;
}

.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

/* Checkbox custom */
.filter-check,
.filter-radio {
  display: flex;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
  font-size: .9rem;
  color: var(--se-text);
  padding: .25rem 0;
  transition: color var(--se-transition);
  user-select: none;
}
.filter-check:hover,
.filter-radio:hover { color: var(--se-cyan-dark); }

.filter-check input,
.filter-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filter-check__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--se-border-2);
  background: var(--se-bg);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--se-transition);
  position: relative;
}
.filter-check__box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform var(--se-transition);
  margin-bottom: 2px;
}
.filter-check input:checked ~ .filter-check__box {
  background: var(--se-cyan);
  border-color: var(--se-cyan);
}
.filter-check input:checked ~ .filter-check__box::after {
  transform: rotate(45deg) scale(1);
}
.filter-check input:focus-visible ~ .filter-check__box {
  box-shadow: 0 0 0 3px rgba(34, 184, 230, .2);
}

.filter-radio__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--se-border-2);
  background: var(--se-bg);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  transition: all var(--se-transition);
  position: relative;
}
.filter-radio__dot::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transform: scale(0);
  transition: transform var(--se-transition);
}
.filter-radio input:checked ~ .filter-radio__dot {
  background: var(--se-cyan);
  border-color: var(--se-cyan);
}
.filter-radio input:checked ~ .filter-radio__dot::after { transform: scale(1); }

.filter-check__label { flex: 1; }
.filter-check__count {
  color: var(--se-text-soft);
  font-size: .8rem;
}

/* ----------------------------- CONTENU ----------------------------- */
.events-content { min-width: 0; }

.events-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}
.events-count {
  margin: 0;
  font-size: .92rem;
  color: var(--se-text-muted);
}
.events-count strong { color: var(--se-text); font-weight: 700; }

.events-toolbar__actions {
  display: flex;
  align-items: center;
  gap: .8rem;
}

/* Bouton filtres mobile */
.btn-filter-mobile {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  background: var(--se-bg);
  border: 1px solid var(--se-border-2);
  border-radius: 999px;
  color: var(--se-text);
  font-family: var(--se-font-display);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all var(--se-transition);
  position: relative;
}
.btn-filter-mobile:hover { border-color: var(--se-cyan); color: var(--se-cyan-dark); }
.btn-filter-mobile__badge {
  background: var(--se-cyan);
  color: #00151f;
  font-size: .68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 .35rem;
}

/* Tri */
.events-sort {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  background: var(--se-bg);
  border: 1px solid var(--se-border-2);
  border-radius: 999px;
  font-size: .85rem;
  color: var(--se-text-muted);
  transition: all var(--se-transition);
}
.events-sort:hover { border-color: var(--se-cyan); }
.events-sort i { color: var(--se-cyan-dark); }
.events-sort select {
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--se-text);
  cursor: pointer;
  padding-right: .2rem;
  appearance: none;
  -webkit-appearance: none;
}

/* Chips filtres actifs */
.events-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .55rem .35rem .9rem;
  background: var(--se-cyan-soft);
  border: 1px solid rgba(34, 184, 230, .3);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--se-cyan-dark);
  font-weight: 600;
}
.chip button {
  background: transparent;
  border: none;
  color: var(--se-cyan-dark);
  cursor: pointer;
  font-size: .95rem;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all var(--se-transition);
  padding: 0;
}
.chip button:hover { background: rgba(34, 184, 230, .25); color: #00151f; }

/* Grille */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

/* Les cartes utilisent les styles .event-card déjà définis dans style.css */

/* Empty state */
.events-empty {
  text-align: center;
  padding: 5rem 1rem;
  background: var(--se-bg);
  border: 1px dashed var(--se-border-2);
  border-radius: var(--se-radius-lg);
}
.events-empty i {
  font-size: 2.5rem;
  color: var(--se-text-soft);
  display: block;
  margin-bottom: 1rem;
}
.events-empty h3 {
  font-family: var(--se-font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--se-text);
  margin: 0 0 .6rem;
}
.events-empty p {
  color: var(--se-text-muted);
  margin: 0 0 1.5rem;
  font-size: .92rem;
}

/* ----------------------------- PAGINATION ----------------------------- */
.events-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}
.events-pagination button,
.events-pagination a {
  min-width: 42px;
  height: 42px;
  padding: 0 .8rem;
  display: inline-grid;
  place-items: center;
  background: var(--se-bg);
  border: 1px solid var(--se-border-2);
  border-radius: 12px;
  color: var(--se-text);
  font-family: var(--se-font-display);
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--se-transition);
}
.events-pagination button:hover:not(:disabled),
.events-pagination a:hover {
  border-color: var(--se-cyan);
  color: var(--se-cyan-dark);
}
.events-pagination .is-active {
  background: var(--se-cyan);
  border-color: var(--se-cyan);
  color: #00151f;
}
.events-pagination .is-active:hover { color: #00151f; }
.events-pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.events-pagination .pagination-ellipsis {
  border: none;
  background: transparent;
  cursor: default;
  color: var(--se-text-soft);
}

/* ----------------------------- OVERLAY MOBILE ----------------------------- */
.filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, .5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity var(--se-transition);
}
.filters-overlay.is-visible { opacity: 1; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1199.98px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .events-layout { grid-template-columns: 250px 1fr; gap: 2rem; }
}

@media (max-width: 991.98px) {
  .events-layout { grid-template-columns: 1fr; }

  /* Sidebar devient un panneau latéral mobile */
  .events-filters {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 88vw;
    max-height: none;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--se-border);
    z-index: 1050;
    transform: translateX(-110%);
    transition: transform var(--se-transition);
    overflow-y: auto;
  }
  .events-filters.is-open { transform: translateX(0); }

  .btn-filter-mobile { display: inline-flex; }
}

@media (max-width: 767.98px) {
  .page-hero { padding: 120px 0 60px; }
  .events-page { padding: 40px 0 80px; }

  .events-search {
    flex-direction: column;
    gap: .5rem;
    padding: .5rem;
  }
  .events-search__field { padding: 0 .9rem; }
  .events-search__submit {
    width: 100%;
    padding: .95rem 1.4rem;
    justify-content: center;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .events-toolbar { gap: .8rem; }
  .events-count { order: -1; width: 100%; }
  .events-toolbar__actions { width: 100%; justify-content: space-between; }
}
/* Lien qui couvre toute la carte événement */
.event-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.event-card__link:hover {
    text-decoration: none;
    color: inherit;
}
/* Chip filtre actif */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .55rem .35rem .85rem;
    background: var(--se-cyan-soft);
    border: 1px solid rgba(34, 184, 230, .3);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--se-cyan-dark);
}
.filter-chip__remove {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: inherit;
    text-decoration: none;
    transition: background .2s ease;
}
.filter-chip__remove:hover {
    background: rgba(34, 184, 230, .25);
    color: #00151f;
}

/* Pagination custom */
.events-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 .85rem;
    display: inline-grid;
    place-items: center;
    background: var(--se-bg);
    border: 1px solid var(--se-border-2);
    border-radius: 10px;
    color: var(--se-text);
    font-family: var(--se-font-display);
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: all .25s ease;
}
.page-btn:hover:not(.is-disabled):not(.is-active) {
    border-color: var(--se-cyan);
    color: var(--se-cyan-dark);
}
.page-btn.is-active {
    background: var(--se-cyan);
    border-color: var(--se-cyan);
    color: #00151f;
}
.page-btn.is-disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}
.page-btn.is-ellipsis {
    border: none;
    background: transparent;
    cursor: default;
    color: var(--se-text-soft);
}

/* Sidebar mobile */
@media (max-width: 991.98px) {
    .events-filters {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 320px;
        max-width: 88vw;
        max-height: none;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--se-border);
        z-index: 1050;
        transform: translateX(-110%);
        transition: transform .3s ease;
        overflow-y: auto;
        padding: 1.5rem;
    }
    .events-filters.is-open {
        transform: translateX(0);
    }
    .btn-filter-mobile { display: inline-flex; }
}