c/* =============================================== */
/*              SECTION COMMENTAIRES              */
/* =============================================== */

.comment-form, .comments-list {
  max-width: 800px;
  margin: 1.5rem auto; /* RÉDUIT : de 2rem à 1.5rem */
}

.comment-form textarea {
  width: 100%;
  padding: 0.8rem; /* RÉDUIT : de 1rem à 0.8rem */
  border-radius: 6px; /* RÉDUIT : de 8px à 6px */
  border: 1px solid var(--border);
  margin-bottom: 0.8rem; /* RÉDUIT : de 1rem à 0.8rem */
  min-height: 80px; /* RÉDUIT : de 100px à 80px */
}

.comment {
  background: white;
  padding: 1rem; /* RÉDUIT : de 1.5rem à 1rem */
  border-radius: 6px; /* RÉDUIT : de 8px à 6px */
  margin-bottom: 0.8rem; /* RÉDUIT : de 1rem à 0.8rem */
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* RÉDUIT : ombre plus discrète */
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px; /* RÉDUIT : de 10px à 8px */
  margin-bottom: 0.4rem; /* RÉDUIT : de 0.5rem à 0.4rem */
  font-weight: 600;
}

.comment-date {
  color: var(--text-light);
  font-size: 0.75rem; /* RÉDUIT : de 0.8rem à 0.75rem */
}

.comment-actions {
  margin-top: 0.8rem; /* RÉDUIT : de 1rem à 0.8rem */
}

.report-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.75rem; /* RÉDUIT : de 0.8rem à 0.75rem */
}

/* =============================================== */
/*              SECTION FORUM RÉCENTE             */
/* =============================================== */

#recent-comments-section {
  margin-top: 2rem; /* RÉDUIT : de 3rem à 2rem */
  padding: 1.5rem 0; /* RÉDUIT : de 2rem à 1.5rem */
}

#recent-comments-section h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem; /* RÉDUIT : de 1.8rem à 1.6rem */
  color: var(--secondary);
  margin-bottom: 1rem; /* RÉDUIT : de 1.5rem à 1rem */
  text-align: center;
}

.share-btn-container {
  text-align: center;
  margin-bottom: 1.5rem; /* RÉDUIT : de 2rem à 1.5rem */
}

/* Style pour les annonces du forum (ultra compactes) */
.announcement-card {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px; /* ENCORE RÉDUIT : de 6px à 4px */
  padding: 0.3rem 0.6rem; /* ULTRA RÉDUIT : encore plus compact */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* ULTRA RÉDUIT : ombre minimale */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 0.3rem; /* RÉDUIT : de 0.4rem à 0.3rem */
  max-width: 750px; /* ÉLARGI : de 480px à 750px */
}

.announcement-card:hover {
  transform: translateY(-1px); /* RÉDUIT : effet hover plus subtil */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* En-tête de l'annonce */
.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem; /* ULTRA RÉDUIT : de 0.3rem à 0.2rem */
}

/* Informations utilisateur */
.announcement-card .user-info {
  display: flex;
  align-items: center;
  gap: 0.4rem; /* ULTRA RÉDUIT : de 0.5rem à 0.4rem */
}

/* CORRECTION RENFORCÉE : Suppression complète du background noir */
.announcement-card .user-info img,
.user-info img,
.user-info a img,
.user-avatar img {
  width: 32px !important; /* ENCORE RÉDUIT : de 36px à 32px */
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background: transparent !important; /* PLUS FORT que none */
  background-color: transparent !important;
  border: none !important; 
  box-shadow: none !important; 
  outline: none !important; 
  position: relative;
}

/* Suppression des pseudo-éléments qui pourraient créer le carré */
.announcement-card .user-info img::before,
.announcement-card .user-info img::after,
.user-info img::before,
.user-info img::after {
  display: none !important;
  content: none !important;
}

.announcement-card .user-info strong {
  font-size: 0.85rem; /* RÉDUIT : de 0.9rem à 0.85rem */
  color: var(--secondary);
  font-weight: 600;
}

/* Timestamp */
.announcement-header span {
  font-size: 0.7rem; /* RÉDUIT : de 0.75rem à 0.7rem */
  color: var(--text-light);
}

/* Contenu du message */
.announcement-content {
  margin-bottom: 0.3rem; /* RÉDUIT : de 0.8rem à 0.3rem */
}

.announcement-card p {
  margin: 0 !important;
  color: #000 !important;
  font-size: 0.85rem !important; /* RÉDUIT : de 0.9rem à 0.85rem */
  line-height: 1.3 !important; /* RÉDUIT : de 1.4 à 1.3 */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* RÉDUIT : de 4 à 3 lignes max */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Bouton "Voir l'offre" */
.announcement-card a {
  display: inline-block;
  margin-top: 0.3rem; /* RÉDUIT : de 0.6rem à 0.3rem */
  background-color: #333;
  color: white;
  padding: 0.3rem 0.6rem; /* RÉDUIT : padding plus compact */
  border-radius: 3px; /* RÉDUIT : de 4px à 3px */
  font-weight: 600;
  text-decoration: none;
  font-size: 0.75rem; /* RÉDUIT : de 0.8rem à 0.75rem */
  transition: background-color 0.3s ease;
}

.announcement-card a:hover {
  background-color: #555;
}

/* Bouton "Lire plus" */
.read-more {
  background: none;
  border: none;
  color: #333;
  font-size: 0.75rem; /* RÉDUIT : de 0.8rem à 0.75rem */
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 0.2rem; /* RÉDUIT : de 0.3rem à 0.2rem */
  display: block;
}

.read-more:hover {
  color: #666;
}

/* =============================================== */
/*              MODAL                              */
/* =============================================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  margin: 15% auto;
  padding: 1.5rem; /* RÉDUIT : de 2rem à 1.5rem */
  width: 80%;
  max-width: 500px;
  border-radius: 8px; /* RÉDUIT : de 10px à 8px */
}

.modal.active {
  display: block;
}

/* =============================================== */
/*              RESPONSIVE                         */
/* =============================================== */

@media (max-width: 768px) {
  .announcement-card {
    max-width: none;
    margin: 0 0 0.5rem 0; /* RÉDUIT : espacement sur mobile */
    padding: 0.4rem 0.6rem; /* ENCORE PLUS COMPACT sur mobile */
  }
  
  .announcement-card .user-info img {
    width: 32px !important; /* ENCORE PLUS PETIT sur mobile */
    height: 32px !important;
  }
  
  #recent-comments-section {
    padding: 1rem 0.5rem !important; /* RÉDUIT pour mobile */
  }
  
  #recent-comments-section h2 {
    font-size: 1.4rem; /* RÉDUIT : de 1.5rem à 1.4rem sur mobile */
  }
  
  .comment-form, .comments-list {
    margin: 1rem auto; /* RÉDUIT sur mobile */
  }
}
/* =============================================== */
/*   CORRECTION DÉFINITIVE FOND NOIR AVATARS     */
/* =============================================== */

/* Force la suppression du fond noir - ULTRA SPÉCIFIQUE */
.announcement-card .user-info img,
.user-info img,
#comments-list .announcement-card .user-info img,
#comments-list .user-info img,
.announcement-header .user-info img,
div[id="comments-list"] .user-info img,
.author-info .user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 2px solid #f0f0f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.announcement-card .user-info img::before,
.announcement-card .user-info img::after,
.user-info img::before,
.user-info img::after,
.author-info .user-avatar::before,
.author-info .user-avatar::after {
  display: none !important;
  content: none !important;
}

/* Si c'est un lien qui entoure l'image */
.user-info a,
.announcement-card .user-info a,
#comments-list .user-info a {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  display: inline-block !important;
  line-height: 0 !important;
}

/* Container parent - au cas où */
.announcement-card .user-info,
#comments-list .announcement-card .user-info {
  background: transparent !important;
  background-color: transparent !important;
}

/* Force sur tout élément img dans les commentaires */
#comments-list img[src*="default-profile"],
#comments-list img[src*=".avif"],
#comments-list img[alt*="profile"],
#comments-list img[alt*="Profil"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  all: unset !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: inline-block !important;
}
/* AJOUTEZ CES RÈGLES À LA FIN DE VOTRE comments.css */

/* Correction pour le débordement horizontal des textes longs */
.announcement-card p {
  margin: 0 !important;
  color: #000 !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /* AJOUT IMPORTANT : */
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

/* Quand le texte est expansé (après clic sur "Lire plus") */
.announcement-card p.expanded {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  /* IMPORTANT : Maintenir la coupure des mots longs */
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

/* Sécurité pour tous les conteneurs de message */
.announcement-content,
.announcement-card {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Sécurité générale pour éviter tout débordement horizontal */
.announcement-card * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}