/* ===== GD – Grille des réalisations ===== */
.gd-reals-grid {
  display: grid;
  grid-template-columns: repeat(var(--gd-cols-d,5), minmax(0,1fr));
  column-gap: var(--gd-gap-x,20px);
  row-gap: var(--gd-gap-y,40px);
  align-items: start;
}

/* Tablet */
@media (max-width: 1024px) {
  .gd-reals-grid {
    grid-template-columns: repeat(var(--gd-cols-t,3), minmax(0,1fr));
  }
}

/* Mobile */
@media (max-width: 767px) {
  .gd-reals-grid {
    grid-template-columns: repeat(var(--gd-cols-m,1), minmax(0,1fr));
    gap: 20px;
  }
}

/* Cartes */
.gd-real-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Conteneur image */
.gd-real-thumb {
  position: relative;
  display: flex;
  align-items: flex-end; /* permet d'aligner les images en bas quand JS fixe la hauteur */
  overflow: hidden;
}

/* Placeholder quand il n'y a pas d'image à la une */
.gd-real-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--e-global-color-accent);
}

/* Pastille rang concours */
.gd-real-rang {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  color: white;
  padding: 0.4rem 0.4rem;
  border-radius: 50px;
  line-height: 1;
  border: 1px solid white;
  margin: 0;
}

/* Image */
.gd-real-img {
  width: 100%;
  height: auto;
  display: block;
  /* Protection contre le clic droit */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Bloc texte */
.gd-real-meta {
  margin-top: .6rem;
  display: flex;
  flex-direction: column;
}

/* Titre */
.gd-real-title {
  margin: 0 0 .25rem 0;
  font-weight: 700;
  line-height: 1.2;
}
.gd-real-title a {
  text-decoration: none;
  color: inherit;
}

/* Catégories */
.gd-real-cats {
  opacity: .8;
  line-height: 1.3;
}

/* Fix Elementor */
.elementor .gd-reals-grid { display: grid !important; }

/* Respecte les préférences d’accessibilité */
@media (prefers-reduced-motion: reduce){
  .gd-real-card{
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.gd-real-img {
  transition: filter 0.3s ease;
}

.gd-real-thumb:hover .gd-real-img {
  filter: grayscale(100%);
}
.gd-real-cats .cat-special {
  color: var(--e-global-color-accent); /* bronze Elementor */
}

.gd-term-item{
 font-size: 1rem; 
}

.gd-reals-infinite {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gd-reals-infinite[data-state="loading"] {
  opacity: 0.8;
}

.gd-reals-infinite[data-state="done"] {
  display: none;
}

.gd-reals-infinite__label {
  margin: 0;
  color: var(--e-global-color-accent);
}