/* Page /defis-du-jour
   Style complémentaire à page-categorie.css : variations des cartes pour
   afficher format + métrique + description sans surcharger la lecture. */

.defis-jour-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 16px 0 40px;
  justify-items: center;
}

.defis-section-titre {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 24px 0 8px;
}
.defis-section-titre:first-of-type { margin-top: 8px; }

.defi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 330px;
  min-height: 330px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 35, 0.55);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.defi-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 12px 40px rgba(251, 191, 36, 0.18), 0 0 20px rgba(99, 102, 241, 0.1);
}

.defi-card .card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.defi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.85) 55%, rgba(15, 23, 42, 0.95) 100%);
  z-index: 1;
}

.defi-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  margin-top: auto;
}

.defi-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.defi-card-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.defi-card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.defi-card-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fef08a;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.6);
  background: rgba(120, 80, 0, 0.85);
}

.defi-card-format {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fef08a;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.defi-card-metric {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #c4b5fd;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.defi-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.5;
  color: #f1f5f9;
  margin: 4px 0 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.defi-card-cta {
  font-family: 'Sora', sans-serif;
  display: inline-block;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border: 1px solid rgba(251, 191, 36, 0.5);
  border-radius: 999px;
  padding: 8px 14px;
  align-self: flex-start;
  transition: box-shadow 0.3s, transform 0.2s;
}

.defi-card:hover .defi-card-cta {
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
}

/* Responsive */
@media (min-width: 708px) {
  .defis-jour-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1038px) {
  .defis-jour-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .defis-jour-grid { gap: 14px; margin: 16px 0 28px; }
  .defi-card { aspect-ratio: 1 / 1; min-height: 0; max-width: none; }
  .defi-card-inner { padding: 14px 14px 16px; gap: 6px; }
  .defi-card-title { font-size: 1.05rem; }
  .defi-card-desc { font-size: 0.78rem; }
  .defi-card-format,
  .defi-card-metric { font-size: 0.72rem; }
}

/* Scroll reveal - réutilise les keyframes définies dans page-categorie.css */
.defi-card.scroll-reveal { opacity: 0; }
.defi-card.scroll-reveal.visible {
  animation: revealScale 0.75s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
}
