/* Annuaire des tournois : reprise de la page Événements de wls.gg (pages/events, CurrentEvent, EventCard). */
#cup-app .cup-main:has(> cup-directory) { width: 100%; max-width: none; padding: 0 0 32px; }
#cup-app:has(.edition-directory)::before { background: var(--fond) center / cover no-repeat; opacity: .6; }
.edition-directory { display: block; container: page / inline-size; }

/* En-tête : grand logo et filtres */
.dir-head { position: relative; background: rgb(9 9 9 / 60%); }
.dir-head::after { content: ""; position: absolute; inset: auto 0 0; height: .2rem; background: var(--grad-hot); }
.dir-head .wrap { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 16px 40px; padding-block: 16px 22px; }
.big-mark {
  width: 160px; height: 176px; flex: none;
  background: linear-gradient(180deg, #f34a53, #cb3c6d);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.filters { display: flex; flex-direction: column; width: min(100%, 300px); padding-block: 1rem; }
.filter { display: grid; }
.filter > span { padding: .1rem; font-size: 15px; font-weight: 500; line-height: 1.5; text-transform: uppercase; }
.filter > span::after { content: ":"; }
.skew { display: block; height: 3px; margin: 8px 0; background: var(--grad-hot); transform: skewX(-30deg); }
:root #cup-app .dir-head .field-in {
  height: 34px; padding: 4px 6px; border: 0; border-radius: 0;
  background-color: #0c0c0c; color: #fff; font-size: 16px; font-weight: 400;
}
:root #cup-app .dir-head select.field-in {
  padding-right: 28px;
  background: #0c0c0c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center / 12px no-repeat;
}
:root #cup-app .dir-head .field-in::placeholder { color: #8a8a8a; }
:root #cup-app .dir-head .field-in:focus-visible { outline: 2px solid var(--pink); outline-offset: 0; }

/* Sections « Bientôt » et « Terminés » */
.dir-body { width: min(1400px, 100% - 32px); margin: 2rem auto 0; }
.gwb { margin-bottom: 18px; }
.edition-directory .gwb-title { position: relative; isolation: isolate; margin-bottom: 1rem; padding: .5rem .5rem .5rem 2.5rem; font-size: 1rem; font-weight: 400; line-height: 1.5; }
.edition-directory .gwb-title::before {
  content: ""; position: absolute; inset: 0 10px; z-index: -1;
  border: 2px solid rgb(203 60 109 / 75%);
  background: linear-gradient(90deg, #952d32, #8a294b);
  box-shadow: 5px 5px 4px rgb(0 0 0 / 30%);
  transform: skewX(-20deg);
}
.gwb .empty { display: grid; place-items: center; height: 8rem; padding: 0; font-size: 1rem; color: #fff; }
.edition-directory .empty { margin: 0; }
.edition-directory .directory-past-empty { margin: 0; padding-block: 1.5rem; text-align: center; }

/* Événements à venir (CurrentEvent) */
.now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.ev {
  position: relative; display: flex; gap: 10px; min-width: 0; padding: 10px;
  background: #0a0a0ac7; color: #fff;
  transition: transform .15s ease-out, filter .3s ease-out, box-shadow .3s ease-out;
}
.ev[hidden] { display: none; }
/* L’affiche ouvre le tournoi sans changer la mise en page de la carte. */
.poster-link { display: contents; }
#cup-app .poster-link:hover { color: inherit; }
.poster-link .poster { cursor: pointer; }
/* Le lien « Voir plus » couvre toute la carte. */
.now .btn-ev::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.ev .poster { flex: none; width: 140px; align-self: flex-start; }
.ev-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; line-height: 1.2; }
.ev h3 { margin-bottom: 5px; font-size: 16px; font-weight: 600; color: var(--cup-brand-text, #fff); overflow-wrap: anywhere; }
.ev-details { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; font-size: 18px; font-weight: 600; }
.wtags { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.wtags span { padding: 0 6px; border-radius: 4px; background: #fff; color: #151515; font-size: 14px; font-weight: 700; line-height: 1.4; text-transform: uppercase; }
.ev-clock { margin: 12px 0 8px; text-align: center; }
.ev-clock small { display: block; margin-bottom: 2px; font-size: 13px; color: #afafaf; }
.ev-clock time { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; }
.ev-clock time span { display: grid; font-size: 18px; font-weight: 200; line-height: 1.4; text-transform: uppercase; }
.ev-clock time b { font-weight: 500; font-variant-numeric: tabular-nums; }
.ev-clock > b { font-size: 15px; font-weight: 500; }
.ev-clock > b.live { display: inline-block; padding: 6px 20px; background: #bd3232; color: #fff; }
.btn-ev {
  display: block; padding: 5px; border: 1px solid #00000080; background: var(--ev);
  font-size: 18px; font-weight: 600; text-align: center; transition: transform .25s;
}
.btn-ev:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .ev:hover { transform: translateY(-6px); filter: brightness(1.2); box-shadow: 0 6px 2px #0000002d; }
  .broadcast-event .btn-ev:hover { transform: scaleX(1.02); }
}

/* Le direct WLS précède la liste des éditions sur ordinateur. */
.directory-broadcast { display:grid;grid-template-columns:minmax(0,1fr) 200px;max-width:830px;margin:0 auto 2.5rem;background:#0c0c0c;box-shadow:0 3px 7px #000a }
@media (min-width:992px) {
  .dir-body:has(.directory-broadcast:not([hidden]))>.directory-broadcast + .gwb::before {
    content:"";display:block;height:3px;margin:-1rem 0 1.5rem;background:var(--grad-hot);
  }
}
.directory-broadcast[hidden] { display:none }
.broadcast-event { display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.5rem;padding:.75rem;background:color-mix(in srgb,var(--ev) 35%,#080808);text-align:center }
.broadcast-event .poster { width:clamp(78px,6.5vw,130px);flex:none;aspect-ratio:750/1080 }
.broadcast-event>div { display:grid;gap:.25rem;width:100%;min-width:0;overflow-wrap:anywhere }
.broadcast-event .btn-ev { margin-top:.5rem }
@media (max-width:991px) { .directory-broadcast { display:none } }

/* Événements terminés (EventCard), groupés par mois */
.edition-directory .month { margin-left: .625rem; font-size: 1.125rem; font-weight: 400; line-height: 1.5; text-transform: capitalize; text-shadow: 0 2px 4px rgb(0 0 0 / 60%); }
.past {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.125rem;
  margin: .75rem 1.125rem; padding: .75rem .75rem .75rem 1.5rem;
  border-left: 2px solid #64fbf8;
}
.pcard {
  position: relative; z-index: 0; display: flex; flex-direction: column; min-width: 0;
  box-shadow: 0 4px 6px rgb(0 0 0 / 30%); transition: all .2s ease-in-out;
}
.pcard[hidden] { display: none; }
.pcard:hover, .pcard:focus-visible { z-index: 1; transform: scale(1.1); box-shadow: 0 8px 15px rgb(0 0 0 / 50%); }
.pinfo {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .5rem; border: 2px solid var(--ev); border-top: 0; background: #000; text-align: center; overflow-wrap: anywhere;
}
.pinfo > b { font-size: 1rem; font-weight: 400; color: var(--cup-brand-text, #fff); }
.pinfo > small { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #afafaf; }
.pinfo > small .icon { flex: none; width: 13px; height: 13px; color: var(--ev); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; }
.pills span { margin: .125rem; padding: 0 .5rem; border-radius: .5rem; background: var(--ev); font-size: .75rem; font-weight: 600; line-height: 1.5; text-transform: uppercase; white-space: nowrap; }

@container page (min-width: 768px) { .past { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container page (min-width: 992px) { .past { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container page (min-width: 1200px) { .past { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@container page (min-width: 1400px) { .past { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@container page (max-width: 1100px) { .now { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container page (max-width: 700px) {
  .dir-head .wrap { flex-direction: column; gap: 0; padding-block: 18px 12px; }
  .big-mark { width: 120px; height: 132px; }
  .dir-body { width: calc(100% - 16px); margin-top: 1.5rem; }
  .now { grid-template-columns: minmax(0, 1fr); padding: 10px 0; }
  .ev .poster { width: 110px; }
  .ev-clock time span { font-size: 15px; }
  .btn-ev { font-size: 16px; }
  .past { margin: 1rem .5rem; padding: .75rem .5rem .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ev, .btn-ev, .pcard { transition: none; }
  .ev:hover, .broadcast-event .btn-ev:hover, .pcard:hover { transform: none; }
}
