/* Conteneur principal */
.myfb2-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 2rem 0;
  justify-content: center;
  align-items: flex-start;
}

/* Post — carte avec image en fond */
.post {
  position: relative;
  border: none;
  border-radius: 16px;
  width: 360px;
  height: 480px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.post:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Image de fond — couvre toute la carte */
.post-image-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post:hover .post-image {
  transform: scale(1.05);
}

/* Overlay dégradé — uniquement au survol pour lisibilité du texte */
.post::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  transition: background 0.4s ease;
  pointer-events: none;
}

.post:hover::after {
  background: rgba(0, 0, 0, 0.6);
}

/* Zone contenu — masquée par défaut (0/3) */
.post-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 2;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: top 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

/* Au survol : le texte prend toute la carte (3/3) */
.post:hover .post-content {
  top: 0;
  padding-top: 1.5rem;
}

/* Texte — tronqué par overflow de la zone, pas d'ellipsis */
.post-content p {
  overflow: hidden;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #fff;
  margin: 0;
  flex: 1;
  min-height: 0;
}

/* Date */
.post-content .date {
  margin-top: auto;
  padding-top: 6px;
  text-align: right;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* Pied de page du post */
.post-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 0 1.25rem;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.post-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-footer a:hover {
  color: #fff;
}

/* Lien Voir sur Facebook */
.post-link {
  position: absolute;
  bottom: 50px;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  padding: 0 1.25rem 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.post:hover .post-link {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.post-link a {
  width: auto;
  min-width: 150px;
  padding: 7px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  background: #1877f2;
  color: #fff !important;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.post-link a:hover {
  background: #166fe5;
  transform: translateY(-1px);
}

/* Styles pour le lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-text {
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  max-width: 700px;
  width: 100%;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lightbox-date {
  margin-top: 0.5rem;
  padding: 0 1.5rem;
  max-width: 700px;
  width: 100%;
  text-align: right;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  padding: 0.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease;
}

.lightbox .close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Logo Facebook */
.facebook-logo {
  width: 24px !important;
  height: 24px;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s;
}

.facebook-logo:hover {
  transform: scale(1.2);
}
