/* =====================================================
   news.css — Section "À la une" — CAROUSEL HORIZONTAL
   Regarde Movie
===================================================== */

#news-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 28px;
}

/* En-tête */
.news-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.news-section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 1.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-section-title::after {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* =====================================================
   FILTRES
===================================================== */
#news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.news-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 50px;
  padding: 4px 13px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.news-filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.news-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =====================================================
   WRAPPER CAROUSEL
===================================================== */
.news-carousel-wrapper {
  position: relative;
}

/* =====================================================
   GRILLE HORIZONTALE — scrollable
===================================================== */
#news-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 12px;
  /* Cache la scrollbar native — on utilise la custom */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#news-grid::-webkit-scrollbar { display: none; }

/* Chaque carte fait exactement 1/4 de la largeur */
#news-grid .news-card {
  flex: 0 0 calc(25% - 11px);
  min-width: 50px;
  max-width: 220px;
}

/* Plus de carte "featured" en carousel */
#news-grid .news-card--featured {
  flex: 0 0 calc(25% - 11px);
}

/* =====================================================
   SCROLLBAR CUSTOM EN BAS
===================================================== */
.news-scrollbar-track {
  width: 100%;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  margin-top: 10px;
  position: relative;
  cursor: pointer;
}

.news-scrollbar-thumb {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  left: 0;
  top: 0;
  transition: width 0.1s;
  cursor: grab;
  min-width: 40px;
}
.news-scrollbar-thumb:active { cursor: grabbing; }

/* =====================================================
   CARTE
===================================================== */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  flex-shrink: 0;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-color: var(--border-hover);
}

.news-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Image — ratio fixe 16/9 pour toutes les cartes */
.news-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-surface);
  flex-shrink: 0;
}

.news-card--featured .news-card-img-wrap {
  aspect-ratio: 16/9;
}

.news-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.news-card:hover .news-card-img-wrap img { transform: scale(1.05); }

/* Tag */
.news-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 50px;
  border: 1px solid;
  backdrop-filter: blur(4px);
}

/* Note */
.news-vote {
  position: absolute;
  top: 7px;
  right: 7px;
  background: rgba(0,0,0,0.7);
  color: #f5c518;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50px;
}

/* Corps */
.news-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

.news-card-title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card--featured .news-card-title { font-size: 0.82rem; }

.news-card-excerpt {
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Méta */
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}

.news-author {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-date {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =====================================================
   SKELETON
===================================================== */
.news-skeleton { pointer-events: none; flex: 0 0 calc(25% - 11px); min-width: 200px; }

.news-skeleton-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-surface);
  animation: news-shimmer 1.6s infinite;
}

.news-skeleton-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-skeleton-line {
  height: 9px;
  background: var(--bg-surface);
  border-radius: 5px;
  animation: news-shimmer 1.6s infinite;
}

@keyframes news-shimmer {
  0%,100% { opacity: 0.4; }
  50%     { opacity: 0.75; }
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
  #news-grid .news-card,
  #news-grid .news-card--featured,
  .news-skeleton { flex: 0 0 calc(33.33% - 10px); }
}

@media (max-width: 600px) {
  #news-section { padding: 18px 16px 22px; }
  #news-grid .news-card,
  #news-grid .news-card--featured,
  .news-skeleton { flex: 0 0 calc(50% - 7px); min-width: 150px; }
}
