/* Fond de l'article avec contour léger et largeur adaptative */
.single-post .entry-content {
    background-color: #e1e1e1;         /* Gris style journal */
    border: 5px solid #333333;        /* Contour noir allégé */
    padding: 40px 20px;
    margin: 40px auto;
    width: 90%;                        /* S'adapte à la largeur de l'écran */
    max-width: 800px;                  /* Ne dépasse pas 800px */
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    color: #333;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    line-height: 1.6;
    font-size: clamp(1.1rem, 2vw, 1.4rem);  /* Ajouté pour gestion responsive de la taille du texte */
}

/* Espacement entre paragraphes pour aérer le texte */
.single-post .entry-content p {
    margin-bottom: 1em;
}

/* Conteneur image + texte */
.single-post .entry-content .image-text-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 30px;
}

/* Image à gauche sur grand écran */
.single-post .entry-content .image-left {
    flex: 0 0 40%;
    padding-right: 20px;
    margin-right: 20px;
}

/* Texte à droite de l'image */
.single-post .entry-content .text-right {
    flex: 1;
    padding-left: 20px;
}

/* Responsivité mobile/tablette */
@media (max-width: 768px) {
    /* Image en haut et texte en dessous */
    .single-post .entry-content .image-left {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
    }
    .single-post .entry-content .image-text-container {
        flex-direction: column !important;
        margin: 0 !important;
    }
    .single-post .entry-content .text-right {
        width: 100% !important;
        padding-left: 0 !important;
    }
}

/* Responsive font-size pour les titres */
.single-post .entry-content h1,
.single-post .entry-content h2 {
    color: #c62828;
    font-size: clamp(1.5rem, 3vw, 2.5rem);  /* Responsive, tu ajustes selon ton goût */
}

/* News grid */
.news-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 300px)); /* 4 colonnes, max 300px */
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.news-block {
  width: 100%;
  max-width: 300px;
}

.news-item {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;      /* carré 1:1 */
  overflow: hidden;
  background-color: #f4f4f4;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
}

.news-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-title {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  margin: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  padding: 0.5em;
}

.news-excerpt {
  margin: 10px 0 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: #fff;            /* <-- texte blanc */
  text-align: left;
  background: rgba(0,0,0,0.5); /* optionnel : fond semi-transparent */
  padding: 0.5em;              /* optionnel : un peu de padding */
}

/* Mobile / tablette : 1 colonne */
@media (max-width: 768px) {
  .news-container {
    grid-template-columns: 1fr;
  }
}