/**
 * CND — Page Actu automatique
 */

/* ============================================================
   1. Wrapper
   ============================================================ */

.cnd-actu {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 1rem;
}

.cnd-actu-section + .cnd-actu-section {
  margin-top: clamp(3rem, 6vw, 5rem);
}

.cnd-actu-section-kicker {
  margin: 0 0 1rem;
  color: var(--cnd-primary, #030081);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cnd-actu-empty,
.cnd-actu-error {
  margin: 1rem 0 0;
  color: var(--cnd-text, #263047);
  font-size: 1rem;
  line-height: 1.6;
}

.cnd-actu-error {
  color: #b42318;
  text-align: center;
}

/* ============================================================
   2. Article à la une
   ============================================================ */

.cnd-actu-featured-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(3, 0, 129, 0.08);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(1, 0, 69, 0.08);
}

.cnd-actu-featured-link {
  display: grid;
  color: inherit;
  text-decoration: none;
}

.cnd-actu-featured-link:hover,
.cnd-actu-featured-link:focus {
  color: inherit;
  text-decoration: none;
}

.cnd-actu-featured-media {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background: #eaf1ff;
}

.cnd-actu-featured-img,
.cnd-actu-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease;
}

.cnd-actu-featured-link:hover .cnd-actu-featured-img,
.cnd-actu-card-link:hover .cnd-actu-card-img {
  transform: scale(1.035);
}

.cnd-actu-featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.cnd-actu-featured-title {
  max-width: 620px;
  margin: 0.4rem 0 0.85rem;
  color: var(--cnd-navy, #010045);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 850;
  line-height: 1.08;
}

.cnd-actu-featured-excerpt {
  max-width: 620px;
  margin: 0;
  color: var(--cnd-text, #4b5565);
  font-size: 1rem;
  line-height: 1.65;
}

/* ============================================================
   3. Grille articles
   ============================================================ */

.cnd-actu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.cnd-actu-card {
  overflow: hidden;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(3, 0, 129, 0.08);
  border-radius: 0.9rem;
  box-shadow: 0 8px 24px rgba(1, 0, 69, 0.055);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.cnd-actu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(3, 0, 129, 0.16);
  box-shadow: 0 14px 30px rgba(1, 0, 69, 0.09);
}

.cnd-actu-card-link {
  display: flex;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.cnd-actu-card-link:hover,
.cnd-actu-card-link:focus {
  color: inherit;
  text-decoration: none;
}

.cnd-actu-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eaf1ff;
}

.cnd-actu-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.cnd-actu-card-title {
  margin: 0.4rem 0 0.65rem;
  color: var(--cnd-navy, #010045);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.cnd-actu-card-excerpt {
  margin: 0;
  color: var(--cnd-text, #4b5565);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ============================================================
   4. Date / badges / lien
   ============================================================ */

.cnd-actu-date {
  display: block;
  color: #8a94a6;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.cnd-actu-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.6rem);
  min-height: 1.75rem;
  padding: 0.35rem 0.7rem;
  color: var(--cnd-primary, #030081);
  background: #eef3ff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.cnd-actu-badge--inscription {
  color: var(--cnd-primary, #030081);
  background: #eef3ff;
}

.cnd-actu-badge--competition {
  color: #005d8f;
  background: #e5f7ff;
}

.cnd-actu-badge--vie-du-club {
  color: #12663a;
  background: #e7f8ef;
}

.cnd-actu-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  color: var(--cnd-primary, #030081);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.cnd-actu-card-content .cnd-actu-read-more {
  margin-top: auto;
  padding-top: 1rem;
}

/* ============================================================
   5. Image fallback
   ============================================================ */

.cnd-actu-img-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  color: rgba(3, 0, 129, 0.24);
  background:
    linear-gradient(135deg, rgba(3, 0, 129, 0.08), rgba(3, 0, 129, 0.02)),
    #eef3ff;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* ============================================================
   6. Voir plus
   ============================================================ */

.cnd-actu-load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
}

.cnd-actu-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.85rem 1.6rem;
  color: #ffffff;
  background: var(--cnd-primary, #030081);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.cnd-actu-load-more:hover,
.cnd-actu-load-more:focus {
  background: var(--cnd-primary-hover, #02005f);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(3, 0, 129, 0.18);
}

.cnd-actu-load-more:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   7. Responsive
   ============================================================ */

@media (min-width: 768px) {
  .cnd-actu {
    padding-inline: 1.5rem;
  }

  .cnd-actu-featured-link {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  }

  .cnd-actu-featured-media {
    min-height: 340px;
  }

  .cnd-actu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .cnd-actu {
    padding-inline: 0;
  }
}

@media (max-width: 767px) {
  .cnd-actu-featured-card,
  .cnd-actu-card {
    border-radius: 0.8rem;
  }

  .cnd-actu-featured-media {
    aspect-ratio: 16 / 10;
    min-height: auto;
  }

  .cnd-actu-featured-content {
    padding: 1.25rem;
  }

  .cnd-actu-featured-title {
    font-size: 1.55rem;
  }

  .cnd-actu-load-more {
    width: 100%;
    max-width: 320px;
  }
}



/* ============================================================
   Homepage — Derniers articles
   ============================================================ */

.cnd-home-latest-posts {
  width: 100%;
}

.cnd-home-latest-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.cnd-home-post-card {
  overflow: hidden;
  height: 100%;
  background: #ffffff;
  border: 1px solid rgba(3, 0, 129, 0.06);
  border-radius: 1.15rem;
  box-shadow: 0 10px 28px rgba(1, 0, 69, 0.06);
}

.cnd-home-post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(3, 0, 129, 0.14);
  box-shadow: 0 16px 34px rgba(1, 0, 69, 0.1);
}

.cnd-home-post-card-media {
  aspect-ratio: 16 / 8.7;
}

.cnd-home-post-card-content {
  padding: clamp(1.25rem, 2.5vw, 1.6rem);
}

.cnd-home-post-date {
  color: #9aa3b2;
  font-size: 0.9rem;
  font-weight: 600;
}

.cnd-home-post-title {
  margin: 0.55rem 0 0.85rem;
  color: var(--cnd-navy, #010045);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 850;
  line-height: 1.25;
}

.cnd-home-post-excerpt {
  color: #4b5565;
  font-size: 1rem;
  line-height: 1.6;
}

.cnd-home-post-read-more {
  margin-top: 1.25rem;
  color: var(--cnd-primary, #030081);
  font-size: 0.9rem;
  font-weight: 850;
}

/* Badges homepage */

.cnd-home-latest-posts .cnd-actu-badge {
  top: 1rem;
  left: 1rem;
  min-height: 2rem;
  padding: 0.45rem 0.8rem;
  color: #ffffff;
  background: var(--cnd-primary, #030081);
  font-size: 0.8rem;
  font-weight: 850;
}

.cnd-home-latest-posts .cnd-actu-badge--inscription {
  color: #ffffff;
  background: var(--cnd-action, #f59e0b);
}

.cnd-home-latest-posts .cnd-actu-badge--competition {
  color: #ffffff;
  background: var(--cnd-primary, #030081);
}

.cnd-home-latest-posts .cnd-actu-badge--vie-du-club {
  color: #ffffff;
  background: var(--cnd-primary, #030081);
}

.cnd-home-latest-posts-empty {
  margin: 0;
  color: var(--cnd-text, #4b5565);
  font-size: 1rem;
  line-height: 1.6;
}

/* Responsive */

@media (min-width: 768px) {
  .cnd-home-latest-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .cnd-home-post-card {
    border-radius: 0.9rem;
  }

  .cnd-home-post-card-media {
    aspect-ratio: 16 / 9;
  }

  .cnd-home-post-card-content {
    padding: 1.25rem;
  }
}