/* Styles spécifiques à la page Actualités */

/* Grille de cartes : la plus récente « à la une » sur toute la largeur */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E1E4DC;
  border-radius: 22px;
  overflow: hidden;
  color: #1D1D1B;
  transition: border-color 150ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}
.news-card:hover {
  border-color: #79BA3E;
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(29, 29, 27, .10);
  color: #1D1D1B;
  text-decoration: none;
}

/* Visuel : image de l'article en fond, voile vert, catégorie et pictogramme */
.news-card__visuel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #4F5F27 0%, #79BA3E 100%);
}
.news-card__visuel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(29, 29, 27, 0) 45%, rgba(79, 95, 39, .72) 100%);
  pointer-events: none;
}
.news-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease-out;
}
.news-card:hover .news-card__img { transform: scale(1.05); }

/* Sans image : grand pictogramme en filigrane sur fond vert */
.news-card__motif {
  position: absolute;
  right: -6%;
  top: -14%;
  width: 62%;
  color: rgba(255, 255, 255, .22);
}
.news-card__motif svg { width: 100%; height: auto; display: block; }
.news-card--sans-image .news-card__visuel {
  background:
    radial-gradient(circle at 20% 110%, rgba(255, 255, 255, .18) 0 30%, transparent 31%),
    linear-gradient(135deg, #4F5F27 0%, #79BA3E 100%);
}

.news-card__categorie {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  background: #fff;
  color: #4F5F27;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.news-card__picto {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #0A66FF;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px #fff;
}
.news-card__picto svg { width: 26px; height: 26px; }

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.4rem 1.4rem;
}
.news-card__date {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  color: #5c5d55;
}
.news-card__body h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1D1D1B;
}
.news-card__extrait {
  margin: 0 0 1rem;
  color: #5c5d55;
  font-size: 0.9375rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__lire {
  margin-top: auto;
  font-weight: 700;
  color: #0A66FF;
}
.news-card__lire span { display: inline-block; transition: transform 150ms ease-out; }
.news-card:hover .news-card__lire span { transform: translateX(4px); }

/* À la une : visuel à gauche, texte à droite */
@media (min-width: 760px) {
  .news-card--une {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .news-card--une .news-card__visuel {
    flex: 0 0 55%;
    aspect-ratio: auto;
    min-height: 320px;
  }
  .news-card--une .news-card__body {
    justify-content: center;
    padding: 2rem 2.25rem;
  }
  .news-card--une .news-card__body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
  .news-card--une .news-card__extrait { -webkit-line-clamp: 5; font-size: 1.0625rem; }
  .news-card--une .news-card__picto { width: 60px; height: 60px; border-radius: 18px; }
  .news-card--une .news-card__picto svg { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .news-card, .news-card__img, .news-card__lire span { transition: none; }
  .news-card:hover, .news-card:hover .news-card__img, .news-card:hover .news-card__lire span { transform: none; }
}

/* Page d'un article
   ========================================================================== */

.news-article {
  max-width: 720px;
}

.news-article .article-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.news-article .article-date {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.news-article h1 {
  margin: 0 0 1rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body figure {
  margin: 1.5rem 0;
  text-align: center;
}

.article-body figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.article-body .figure-duo {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-body .figure-duo img {
  width: calc(50% - 0.5rem);
  max-width: 260px;
}

.article-body figcaption {
  flex-basis: 100%;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--color-primary-dark);
  background: var(--color-surface);
  border-radius: var(--radius);
  font-style: italic;
}

.article-body blockquote footer {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.article-body .table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-body th,
.article-body td {
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.article-body thead th {
  background: var(--color-primary-dark);
  color: #fff;
}

.article-body tbody th {
  white-space: nowrap;
}

.article-body .article-cta {
  margin: 1.5rem 0;
}

/* Articles « Nos solutions » : encart tarif et grille de fonctionnalités
   ========================================================================== */

.offre-prix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin: 1.75rem 0;
  padding: 1.5rem 1.75rem;
  background: #EEF3E6;
  border: 2px solid #79BA3E;
  border-radius: 22px;
}
.article-body .offre-prix p { margin: 0; }
.offre-prix__montant {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #4F5F27;
  white-space: nowrap;
}
.offre-prix__montant span { font-size: 0.45em; font-weight: 700; letter-spacing: 0; }
.offre-prix__unite { margin-top: 0.35rem !important; font-weight: 700; color: #1D1D1B; }
.offre-prix__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.offre-prix__lien { font-weight: 700; color: #0A66FF; }

.fonctions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.5rem;
}
.fonction {
  background: #fff;
  border: 1px solid #E1E4DC;
  border-left: 4px solid #79BA3E;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.article-body .fonction p { margin: 0; font-size: 0.9375rem; color: #5c5d55; }
.article-body .fonction .fonction__titre { margin-bottom: 0.25rem; font-weight: 700; color: #1D1D1B; }
