/* ============================================================
   GRILLE DES ACTIVITÉS — version moderne (mosaïque)
   ============================================================ */
.sport-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  grid-template-rows:repeat(2,clamp(250px,26vw,310px)) clamp(210px,20vw,240px);
  grid-auto-rows:clamp(250px,26vw,310px);
  gap:16px;
}
.sport-card{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  isolation:isolate;
  overflow:hidden;
  border-radius:20px;
  color:#fff;
  background:#151515;
  box-shadow:0 1px 2px rgba(10,10,10,.08),0 14px 34px -14px rgba(10,10,10,.45);
  outline-offset:3px;
}
.sport-card:focus-visible{outline:3px solid #ff2a2a}

/* Placement desktop */
.sport-card--football{grid-column:span 7}
.sport-card--basketball{grid-column:span 5}
.sport-card--badminton,
.sport-card--volleyball,
.sport-card--musculation{grid-column:span 4}
.sport-card--event{grid-column:span 12;grid-row:span 1}

.sport-card picture,
.sport-card img{position:absolute;inset:0;width:100%;height:100%;display:block}
.sport-card img{
  object-fit:cover;
  object-position:var(--pos,50% 50%);
  transform:scale(var(--zoom,1));
  transition:transform .6s cubic-bezier(.2,.7,.2,1);
  z-index:-2;
}
.sport-card:hover img{transform:scale(calc(var(--zoom,1) * 1.05))}

/* Voile : sombre uniquement en bas pour garder la photo lisible */
.sport-card::before{
  content:"";
  position:absolute;inset:0;z-index:-1;
  background:
    linear-gradient(to top,rgba(8,8,8,.88) 0%,rgba(8,8,8,.55) 32%,rgba(8,8,8,0) 62%);
}

.sport-tag{
  position:absolute;top:16px;left:16px;
  padding:6px 12px;
  border-radius:999px;
  font-size:.78rem;font-weight:600;
  color:#fff;
  background:rgba(15,15,15,.55);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border:1px solid rgba(255,255,255,.22);
}

.sport-body{
  display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  padding:22px 22px 22px 24px;
}
.sport-text{min-width:0}
.sport-text h3{
  font-size:clamp(1.5rem,2.4vw,2rem);
  font-weight:800;
  letter-spacing:-.02em;
  line-height:1.1;
  margin-bottom:6px;
  text-shadow:0 1px 14px rgba(0,0,0,.35);
}
.sport-text p{
  max-width:42ch;
  font-size:.92rem;
  line-height:1.45;
  color:rgba(255,255,255,.86);
}
.sport-go{
  flex:none;
  display:inline-flex;align-items:center;gap:10px;
  height:48px;padding:0 6px 0 18px;
  border-radius:999px;
  background:#fff;color:#151515;
  font-size:.9rem;font-weight:700;
  white-space:nowrap;
  transition:background .25s,color .25s,padding .25s;
}
.sport-go i{
  display:grid;place-items:center;
  width:36px;height:36px;border-radius:50%;
  background:#e00000;color:#fff;
  transition:transform .3s;
}
.sport-go svg{width:16px;height:16px}
.sport-card:hover .sport-go{background:#e00000;color:#fff}
.sport-card:hover .sport-go i{background:#fff;color:#e00000;transform:translateX(2px)}

/* Cartes étroites : le bouton passe sous le texte, en rond seul */
.sport-card--badminton .sport-go,
.sport-card--volleyball .sport-go,
.sport-card--musculation .sport-go{padding:0;width:48px;justify-content:center;background:#e00000}
.sport-card--badminton .sport-go span,
.sport-card--volleyball .sport-go span,
.sport-card--musculation .sport-go span{display:none}
.sport-card--badminton .sport-go i,
.sport-card--volleyball .sport-go i,
.sport-card--musculation .sport-go i{background:transparent;width:48px;height:48px}

/* Bandeau événement */
.sport-card--event::before{
  background:linear-gradient(90deg,rgba(8,8,8,.88) 0%,rgba(8,8,8,.6) 40%,rgba(8,8,8,.05) 75%);
}
.sport-card--event{justify-content:center}
.sport-card--event .sport-body{align-items:center;padding:28px 32px}
.sport-card--event .sport-text p{max-width:46ch}

/* Tablette */
@media (max-width:1000px){
  .sport-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:260px}
  .sport-card--football,.sport-card--basketball,
  .sport-card--badminton,.sport-card--volleyball,
  .sport-card--musculation{grid-column:span 1}
  .sport-card--event{grid-column:span 2}
}
/* Mobile */
@media (max-width:620px){
  .sport-grid{grid-template-columns:1fr;grid-template-rows:none;grid-auto-rows:auto;gap:14px}
  .sport-card,.sport-card--event{grid-column:span 1;min-height:280px}
  .sport-card--event::before{background:linear-gradient(to top,rgba(8,8,8,.88) 0%,rgba(8,8,8,.5) 45%,rgba(8,8,8,0) 75%)}
  .sport-card--event{justify-content:flex-end}
  .sport-card--event .sport-body{padding:20px;flex-direction:column;align-items:flex-start}
  .sport-card--event .sport-go{align-self:flex-start}
  .sport-body{padding:18px}
}
@media (prefers-reduced-motion:reduce){
  .sport-card img,.sport-go,.sport-go i{transition:none}
  .sport-card:hover img{transform:scale(var(--zoom,1))}
}

/* Variante à 5 cartes (page de réservation) : Badminton et Volleyball sur 2 colonnes */
@media (min-width:1001px){
  .sport-grid--five .sport-card--badminton,
  .sport-grid--five .sport-card--volleyball{grid-column:span 6}
}
/* Sur la page de réservation les boutons des cartes étroites gardent leur texte */
.sport-grid--five .sport-card--badminton .sport-go,
.sport-grid--five .sport-card--volleyball .sport-go{padding:0 6px 0 18px;width:auto;background:#fff}
.sport-grid--five .sport-card--badminton .sport-go span,
.sport-grid--five .sport-card--volleyball .sport-go span{display:inline}
.sport-grid--five .sport-card--badminton .sport-go i,
.sport-grid--five .sport-card--volleyball .sport-go i{background:#e00000;width:36px;height:36px}
@media (max-width:620px){
  .sport-grid--five .sport-card--badminton .sport-go,
  .sport-grid--five .sport-card--volleyball .sport-go{padding:0 6px 0 16px}
}
