body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
}

header {
  background-color: #4267b2;
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 1.5rem;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
  align-items: flex-start; /* Assure que les éléments prennent toute la hauteur possible */
}

.post {
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 350px; /* Largeur fixe pour l'effet mosaïque */
  min-height: 200px; /* Hauteur minimale pour l'effet mosaïque */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post img {
  width: 100%;
  height: auto; /* Ajuste la hauteur de l'image à sa largeur */
  border-bottom: 1px solid #ddd;
}

.post-content {
  padding: 1rem;
  flex-grow: 1; /* Permet au contenu de s'étendre pour remplir l'espace restant */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Ajuste l'espacement entre les éléments */
}

.post-content p {
  margin: 0 0 1rem;
  color: #333;
  word-break: break-word; /* Gère les mots longs pour éviter qu'ils débordent */
}

.post-content .date {
  font-size: 0.8rem;
  color: #777;
}
/* Styles pour le lightbox */
.lightbox {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.66);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border: 4px solid white;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.post-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #555;
}
.post-footer a {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.post-footer a .material-icons {
  margin-right: 4px;
}

.post-footer a:hover {
  color: #29487d; /* Couleur plus sombre au survol */
}

.post-link a {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}

.post-link a:hover {
  color: #29487d; /* Couleur plus sombre au survol */
}

.facebook-logo {
  width: 24px !important;
  height: 24px;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s;
}

.facebook-logo:hover {
  transform: scale(1.2);
}
