/* Hacktualités Grid */

.hg-grid *, .hg-grid *::before, .hg-grid *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.hg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 600px) {
  .hg-grid { grid-template-columns: 1fr; }
}

/* ── Carte ── */
.hg-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  background: #1a1a1a;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.hg-card__link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  position: relative;
}

/* ── Image ── */
.hg-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
}

.hg-card:hover .hg-card__bg { transform: scale(1.03); }

.hg-card__bg--empty { background: #2a2a2a; }

/* ── Date — cachée par défaut, apparaît au survol ── */
.hg-card__date {
  position: absolute;
  bottom: calc(36% + 10px);
  right: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.08em;
  z-index: 4;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hg-card:hover .hg-card__date {
  opacity: 1;
  transform: translateY(0);
}

/* ── Bande titre semi-transparente ── */
.hg-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36%;
  z-index: 3;
  background: rgba(20, 20, 22, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
}

.hg-card__title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
  text-align: center;
  letter-spacing: 0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Vide ── */
.hg-empty {
  color: #888;
  font-size: 14px;
  text-align: center;
  padding: 20px;
}
