/* ==========================================================================
   PAGE ACTUALITÉS - LES SERRES DE MITRY
   ========================================================================== */

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, #826E08 0%, #5a6521 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  color: white;
  overflow: hidden;
}

.actualites-hero {
  background-image: 
    linear-gradient(135deg, rgba(130, 110, 8, 0.9) 0%, rgba(90, 101, 33, 0.85) 100%),
    url('../images/hero-actualites.jpg');
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(90, 101, 33, 0.3);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

/* Fil d'Ariane */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.breadcrumb-separator {
  opacity: 0.6;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  opacity: 0.95;
  line-height: 1.6;
}

/* ==========================================================================
   CONTAINER
   ========================================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   SECTION ACTUALITÉS
   ========================================================================== */
.news-section {
  padding: 3rem 0;
}

/* Compteur de résultats */
.news-count {
  margin-bottom: 2rem;
  text-align: center;
}

.news-count p {
  color: #666;
  font-size: 0.95rem;
}

.news-count strong {
  color: #826E08;
  font-weight: 600;
}

/* Grille d'actualités */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Article featured (premier article) */
.news-card-featured {
  grid-column: 1 / -1;
}

.news-card-featured .news-card-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.news-card-featured .news-card-image {
  height: 400px;
}

.news-card-featured .news-card-title {
  font-size: 2rem;
}

.news-card-featured .news-card-excerpt {
  font-size: 1.05rem;
}

/* Carte d'actualité */
.news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

/* Image de l'article */
.news-card-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f0f0f0;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-image {
  transform: scale(1.08);
}

.news-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Contenu de la carte */
.news-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

/* Meta informations */
.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: #999;
}

.news-date,
.news-reading-time {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-meta svg {
  flex-shrink: 0;
}

/* Titre */
.news-card-title {
  font-size: 1.4rem;
  line-height: 1.4;
  color: #826E08;
  margin: 0;
  font-weight: 600;
  transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
  color: #5a6521;
}

/* Extrait */
.news-card-excerpt {
  color: #666;
  line-height: 1.6;
  flex-grow: 1;
}

/* Lien "Lire la suite" */
.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #5b8c3e;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: auto;
  transition: all 0.3s ease;
}

.news-card:hover .news-read-more {
  gap: 0.75rem;
  color: #3f6b2a;
}

.news-read-more svg {
  transition: transform 0.3s ease;
}

.news-card:hover .news-read-more svg {
  transform: translateX(4px);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination-wrapper {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-wrapper .page-numbers li {
  display: inline-flex;
}

.pagination-wrapper a,
.pagination-wrapper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 1rem;
  background: #fdfcf5;
  color: #5a4a06;
  border: 2px solid #826E08;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-wrapper a:hover {
  background: #826E08;
  color: white;
  border-color: #826E08;
  transform: translateY(-2px);
}

.pagination-wrapper .current {
  background: #826E08;
  color: white;
  border-color: #826E08;
}

.pagination-wrapper .dots {
  border: none;
  background: transparent;
}

/* Précédent / Suivant : boutons pleins pour bien les distinguer des numéros de page */
.pagination-wrapper .prev,
.pagination-wrapper .next {
  background: #5b8c3e;
  color: white;
  border-color: #5b8c3e;
  padding: 0 1.25rem;
}

.pagination-wrapper .prev:hover,
.pagination-wrapper .next:hover {
  background: #3f6b2a;
  border-color: #3f6b2a;
  transform: translateY(-2px);
}

.pagination-wrapper svg {
  flex-shrink: 0;
}

/* ==========================================================================
   AUCUN RÉSULTAT
   ========================================================================== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.no-results-icon {
  margin-bottom: 2rem;
  color: #ccc;
}

.no-results h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 1rem;
}

.no-results p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ==========================================================================
   SECTION NEWSLETTER CTA
   ========================================================================== */
.newsletter-cta {
  background: linear-gradient(135deg, #826E08 0%, #5a6521 100%);
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.newsletter-cta-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.newsletter-cta-text {
  color: white;
  flex: 1;
}

.newsletter-cta-text h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: white;
}

.newsletter-cta-text p {
  font-size: 1.1rem;
  opacity: 0.95;
  line-height: 1.6;
}

.newsletter-cta-action {
  flex-shrink: 0;
}

.btn-newsletter-large {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #5b8c3e;
  color: white;
  border: 2px solid #5b8c3e;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-newsletter-large:hover {
  background: #3f6b2a;
  border-color: #3f6b2a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 140, 62, 0.4);
}

/* Le footer a un margin-top global (footer.css) prévu pour suivre du contenu
   neutre. Ici il suit directement le bloc CTA colorée : on l'annule pour
   éviter une bande blanche entre les deux. */
.newsletter-cta + .site-footer {
  margin-top: 0;
}

/* ==========================================================================
   RESPONSIVE - TABLETTE
   ========================================================================== */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }
  
  .news-card-featured .news-card-link {
    grid-template-columns: 1fr;
  }
  
  .news-card-featured .news-card-image {
    height: 300px;
  }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .page-hero {
    padding: 3rem 1rem 2rem;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .news-card-image,
  .news-card-featured .news-card-image {
    height: 220px;
  }
  
  .news-card-featured .news-card-title {
    font-size: 1.5rem;
  }
  
  .newsletter-cta {
    padding: 2rem 1rem;
  }
  
  .newsletter-cta-content {
    flex-direction: column;
    text-align: center;
  }
  
  .newsletter-cta-text h2 {
    font-size: 1.5rem;
  }
  
  .newsletter-cta-text p {
    font-size: 1rem;
  }
  
  .btn-newsletter-large {
    width: 100%;
    justify-content: center;
  }
  
  .pagination-wrapper .page-numbers {
    gap: 0.25rem;
  }
  
  .pagination-wrapper a,
  .pagination-wrapper span {
    min-width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.news-card:nth-child(1) { animation-delay: 0.05s; }
.news-card:nth-child(2) { animation-delay: 0.1s; }
.news-card:nth-child(3) { animation-delay: 0.15s; }
.news-card:nth-child(4) { animation-delay: 0.2s; }
.news-card:nth-child(5) { animation-delay: 0.25s; }
.news-card:nth-child(6) { animation-delay: 0.3s; }
.news-card:nth-child(7) { animation-delay: 0.35s; }
.news-card:nth-child(8) { animation-delay: 0.4s; }
.news-card:nth-child(9) { animation-delay: 0.45s; }

/* ==========================================================================
   ACCESSIBILITÉ
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-image,
  .news-read-more svg {
    animation: none !important;
    transition: none !important;
  }
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #5b8c3e;
  outline-offset: 2px;
}