/* ===============================
   GRID
=============================== */

.wcg-grid{
  display: grid;
  grid-template-columns: repeat(var(--wcg-cols), minmax(0, 1fr));
  gap: 0;
  border: 1px solid #e6e6e6;
  background: #fff;
}

/* ===============================
   CARD
=============================== */

.wcg-card{
  position: relative;
  display: block;
  text-decoration: none;
  overflow: hidden;
  aspect-ratio: 1 / 1; /* carré parfait */
  border-right: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
}

/* ===============================
   IMAGE
=============================== */

.wcg-imgwrap{
  position: absolute;
  inset: 0;
}

.wcg-imgwrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

/* ===============================
   OVERLAY
=============================== */

.wcg-card::before{
  content:'';
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.35);
  transition: background .3s ease;
  z-index:1;
}

/* ===============================
   TITLE (CENTRÉ ET LISIBLE)
=============================== */

.wcg-title{
  position:absolute;
  inset: 0;               /* centrage parfait */
  z-index:2;

  display:flex;
  align-items:center;
  justify-content:center;

  padding: 18px;
  background: rgba(0,0,0,0.35);

  color:#fff;
  font-size: 20px;
  font-weight: 700;
  text-align:center;
  letter-spacing: .04em;
  line-height: 1.2;

  text-shadow: 0 2px 6px rgba(0,0,0,.6);
}

/* ===============================
   HOVER
=============================== */

.wcg-card:hover img{
  transform: scale(1.05);
}

.wcg-card:hover::before{
  background: rgba(0,0,0,0.55);
}

/* ===============================
   LOADING / EMPTY
=============================== */

.wcg-empty{
  padding: 12px 0;
  opacity: .8;
}

.wcg-sentinel{
  height: 1px;
}

.wcg-loading{
  text-align: center;
  padding: 12px 0;
  opacity: .75;
}

/* ===============================
   RESPONSIVE
=============================== */

@media (max-width: 900px){
  .wcg-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wcg-title{
    font-size: 18px;
  }
}

@media (max-width: 680px){
  .wcg-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wcg-title{
    font-size: 16px;
    padding: 14px;
  }
}