/* ============================================================
   AS Romagnat Athlétisme — Actualités (liste + article)
   Réutilise les tokens du design system (styles.css).
   ============================================================ */

/* ---- En-tête de page (réutilise .club-hero) ---- */
.news-hero .club-hero__lead { max-width: 70ch; }

/* ---- Barre de filtres ---- */
.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 36px;
}
.news-filter {
  border: 2px solid var(--c-black);
  background: #fff;
  color: var(--c-black);
  font: 600 .9rem/1 "Inter", sans-serif;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.news-filter:hover { transform: translateY(-2px); }
.news-filter.is-active { background: var(--c-black); color: var(--c-yellow); }

/* ---- Grille d'articles ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid var(--c-black);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--c-black);
  transition: transform .15s ease, box-shadow .15s ease;
  text-decoration: none;
  color: inherit;
}
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--c-black); }

.post-card__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #111, #2a2a2a);
  position: relative;
  overflow: hidden;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__media--ph {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,213,0,.25), transparent 60%),
    var(--c-black);
}
.post-card__media--ph svg { width: 64px; height: 64px; color: var(--c-yellow); opacity: .9; }

.post-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; }
.post-card__cat {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--c-yellow);
  color: var(--c-black);
}
.post-card__cat[data-cat="Vie du club"] { background: #1a1a1a; color: var(--c-yellow); }
.post-card__cat[data-cat="La Romagnatoise"] { background: #5b2a86; color: #fff; }
.post-card__date { color: var(--c-text-muted); }
.post-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; color: var(--c-black); }
.post-card__excerpt { color: var(--c-text-muted); margin: 0; font-size: .95rem; }
.post-card__more {
  margin-top: auto;
  font-weight: 700;
  color: var(--c-black);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-card:hover .post-card__more { gap: 12px; }

/* Carte mise en avant (1ère, pleine largeur) */
.post-card--featured { grid-column: 1 / -1; flex-direction: row; }
.post-card--featured .post-card__media { aspect-ratio: auto; flex: 1 1 46%; min-height: 280px; }
.post-card--featured .post-card__body { flex: 1 1 54%; justify-content: center; gap: 14px; }
.post-card--featured h3 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.post-card--featured .post-card__excerpt { font-size: 1.05rem; }

.news-empty { text-align: center; padding: 60px 0; color: var(--c-text-muted); }

/* ---- Article : en-tête ---- */
.article-hero { background: var(--c-black); color: #fff; padding: 120px 0 56px; }
.article-hero__inner { max-width: 820px; margin: 0 auto; padding: 0 var(--pad); }
.article-hero__crumbs { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }
.article-hero__crumbs a { color: rgba(255,255,255,.6); }
.article-hero__crumbs a:hover { color: var(--c-yellow); }
.article-hero__meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; font-size: .85rem; }
.article-hero__cat {
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 12px; border-radius: 6px; background: var(--c-yellow); color: var(--c-black);
}
.article-hero__cat[data-cat="Vie du club"] { background: #fff; }
.article-hero__cat[data-cat="La Romagnatoise"] { background: #5b2a86; color: #fff; }
.article-hero__date { color: rgba(255,255,255,.65); }
.article-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 16px; }
.article-hero__excerpt { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 64ch; }
.article-hero__cover { margin-top: 32px; border-radius: var(--radius); overflow: hidden; max-height: 420px; }
.article-hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Article : corps ---- */
.article-body { max-width: 820px; margin: 0 auto; padding: 48px var(--pad) 16px; }
.article-body .intro {
  font-size: 1.2rem; line-height: 1.6; color: var(--c-black);
  border-left: 4px solid var(--c-yellow); padding-left: 20px; margin: 0 0 36px;
}

/* Stats résumé */
.article-stats { display: flex; flex-wrap: wrap; gap: 28px; margin: 0 0 40px; padding: 22px 26px; background: #faf7e8; border: 2px solid var(--c-black); border-radius: var(--radius); }
.article-stats div { display: flex; flex-direction: column; }
.article-stats strong { font-size: 1.8rem; font-family: "Space Grotesk", sans-serif; line-height: 1; }
.article-stats span { font-size: .85rem; color: var(--c-text-muted); margin-top: 4px; }

/* Résultats groupés par course */
.race-block { margin-bottom: 34px; }
.race-block__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 3px solid var(--c-black);
}
.race-block__head h2 { margin: 0; font-size: 1.4rem; }
.race-block__loc { color: var(--c-text-muted); font-weight: 600; font-size: .95rem; }
.race-block__chips { display: flex; gap: 8px; margin-left: auto; }
.race-chip {
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--c-black); color: var(--c-yellow);
}
.race-chip--elev { background: #fff; color: var(--c-black); border: 1.5px solid var(--c-black); }

.results-table { width: 100%; border-collapse: collapse; }
.results-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--c-text-muted); padding: 8px 12px; border-bottom: 1px solid #e3e3e3;
}
.results-table td { padding: 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.results-table tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: #fcfbf3; }
.res-rank { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.res-rank small { color: var(--c-text-muted); font-weight: 400; font-size: .8rem; }
.res-rank.is-podium { color: #b8860b; }
.res-athlete { font-weight: 600; }
.res-time { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.res-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.res-cat {
  font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  background: #f0ecd8; color: #7a6500;
}
.res-cat--podium { background: #fff3cd; color: #8a6d00; }

/* Vue mobile en cartes (au lieu du tableau) */
.res-cards { display: none; flex-direction: column; gap: 12px; }
.res-card { border: 1.5px solid #e3e3e3; border-radius: 12px; padding: 14px 16px; }
.res-card__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.res-card__name { font-weight: 700; }
.res-card__sub { color: var(--c-text-muted); font-size: .85rem; margin-top: 4px; }

/* Blocs d'article texte (type post) */
.article-prose > * { margin: 0 0 20px; }
.article-prose h2 { font-size: 1.5rem; margin-top: 36px; }
.article-prose h3 { font-size: 1.2rem; margin-top: 28px; }
.article-prose p { line-height: 1.7; color: #2a2a2a; font-size: 1.05rem; }
.article-prose ul { padding-left: 22px; line-height: 1.7; }
.article-prose img { width: 100%; border-radius: var(--radius); display: block; }
.article-prose figure figcaption { font-size: .85rem; color: var(--c-text-muted); margin-top: 8px; text-align: center; }
.article-prose blockquote {
  border-left: 4px solid var(--c-yellow); padding: 4px 0 4px 20px; color: #333; font-style: italic; font-size: 1.1rem;
}
.article-prose a { color: #0a0a0a; text-decoration: underline; text-decoration-color: var(--c-yellow); text-decoration-thickness: 3px; }

/* Pied d'article : partage + retour */
.article-foot { max-width: 820px; margin: 0 auto; padding: 16px var(--pad) 64px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; border-top: 1px solid #e3e3e3; margin-top: 24px; }
.share { display: flex; gap: 10px; align-items: center; }
.share span { font-weight: 700; font-size: .9rem; }
.share a, .share button {
  width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--c-black);
  background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--c-black);
}
.share a:hover, .share button:hover { background: var(--c-yellow); }
.share svg { width: 18px; height: 18px; }

.article-loading, .article-error { max-width: 820px; margin: 0 auto; padding: 80px var(--pad); text-align: center; color: var(--c-text-muted); }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card__media { min-height: 200px; }
  .results-table { display: none; }
  .res-cards { display: flex; }
  .race-block__chips { margin-left: 0; width: 100%; }
}
