/* ══════════════════════════════════════════
   GROUPE BRUYAS — actualites.css
   Styles spécifiques à la page actualités
   ══════════════════════════════════════════ */

/* PAGE HEADER (similaire à projets) */
.page-header {
  background: var(--surface-2);
  padding: 160px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* GRID ACTUALITES */
.news-section {
  padding: 80px 0;
  background: var(--surface-1);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
}

a.news-card {
  text-decoration: none;
  color: inherit;
}

.news-card {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  appearance: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.news-card:hover,
.news-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.news-card:focus-visible {
  outline: 3px solid rgba(var(--brand-red-rgb), 0.34);
  outline-offset: 4px;
}

.news-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #eee;
}

.news-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.news-title {
  font-family: 'Syne', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.news-resume {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.news-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
  align-self: flex-start;
}

.news-link:hover,
.news-card:hover .news-link,
.news-card:focus-visible .news-link {
  color: var(--brand-red);
}

.news-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.news-link:hover svg,
.news-card:hover .news-link svg,
.news-card:focus-visible .news-link svg {
  transform: translateX(4px);
}

/* MODAL ARTICLE */
.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.article-modal.active {
  display: flex;
  animation: fadeIn 0.3s ease forwards;
}

.article-content {
  background: var(--surface-1);
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.article-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.article-close:hover {
  background: var(--border);
}

.article-header-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.article-body {
  padding: 40px;
}

.article-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  margin-bottom: 12px;
}

.article-body .date {
  color: var(--brand-red);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 24px;
  display: block;
}

.article-body .text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
  white-space: pre-wrap;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 52px 0 42px;
  }

  .page-header h1 {
    font-size: clamp(30px, 8vw, 36px);
  }

  .page-header p {
    font-size: 16px;
    line-height: 1.6;
  }

  .news-section {
    padding: 46px 0 64px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .news-image {
    height: 190px;
  }

  .news-content {
    padding: 20px;
  }

  .article-modal {
    padding: 10px;
  }

  .article-content {
    max-height: calc(100svh - 20px);
    border-radius: 12px;
  }

  .article-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .article-header-img {
    height: 190px;
  }

  .article-body {
    padding: 28px 20px;
  }

  .article-body h2 {
    font-size: 24px;
    line-height: 1.16;
  }

  .article-body .text {
    font-size: 16px;
    line-height: 1.7;
  }
}
