/* --- Grille responsive pour la page /actualites (Style : Champs) --- */
.view-actualites-grid .view-content {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

/* Chaque item = une carte */
.view-actualites-grid .views-row {
  display: flex !important;
  flex-direction: column;
  width: auto;
  max-width: none;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  transition: transform .15s ease-in-out, box-shadow .15s ease-in-out;
  padding: 0; /* on gère le padding par zones */
}

.view-actualites-grid .views-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --- Media (image en haut, ratio 16:9) --- */
.view-actualites-grid .views-field-field-image {
  margin: 0; /* reset */
}

.view-actualites-grid .views-field-field-image .field-content {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.view-actualites-grid .views-field-field-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Corps de carte (titre + date) --- */
.view-actualites-grid .views-field-title,
.view-actualites-grid .views-field-created {
  padding: 12px 14px;
}

/* Titre */
.view-actualites-grid .views-field-title {
  padding-bottom: 0; /* la date gère l’espacement dessous */
}

.view-actualites-grid .views-field-title .field-content {
  display: block;
  margin: 0;
}

.view-actualites-grid .views-field-title a {
  display: inline-block;
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  text-decoration: none;
}

.view-actualites-grid .views-field-title a:hover {
  text-decoration: underline;
}

/* Date sous le titre */
.view-actualites-grid .views-field-created .field-content {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.view-actualites-grid .views-field-created time {
  white-space: nowrap; /* évite les retours disgracieux */
}

/* --- Intro actualités (si utilisée sur la page) --- */
.actualites-intro {
  background-color: #f7f9fc;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  max-width: 1300px;
  margin: 0 auto 1.5rem; /* 0 en haut, 1.5rem en bas */
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: #333;
}

.actualites-intro h2 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #004c97;
}

.actualites-intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.actualites-intro strong {
  color: #d41c1c;
}

/* --- Petits resets utiles --- */
/* Certaines configs ajoutent encore .view-actualites-grid sur .views-row : force un layout propre */
.views-row.view-actualites-grid { display: flex !important; }

/* Évite que des styles du thème imposent des largeurs bizarres */
.view-actualites-grid .views-field { width: 100%; box-sizing: border-box; }

/* Contexte contextual links Drupal : pas d’impact visuel sur nos cartes */
.view-actualites-grid .contextual { position: static; }

