/* === SCOPING DU WALL === */
body:not(.page-wall) #wall-container,
body:not(.page-wall) #wall,
body:not(.page-wall) .wall-editor,
body:not(.page-wall) .wall-card,
body:not(.page-wall) .post-comments,
body:not(.page-wall) .comment-form {
  display: none !important;
}

body:not(.page-wall) #wall-container {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Empêche wall.css de modifier le header */
body:not(.page-wall) header img,
body:not(.page-wall) .user-menu img,
body:not(.page-wall) .avatar {
  all: unset;
  border-radius: 50%;
  width: auto;
  height: auto;
}


/* ======== WALL LAYOUT ======== */
#wall-container {
  background: #041e42; /* fond bleu foncé */
  padding: 40px 0 100px;
}

#wall {
  margin: 0 auto;
  width: 95%;
  max-width: 950px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* === Boîte de publication === */
.wall-editor {
  background: rgba(255,255,255,0.97);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 900px;
  margin: 0 auto 25px;
  box-sizing: border-box;
}

.wall-editor img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid #0044cc;
  object-fit: cover;
}

/* === Titre / Auteur === */
.wall-header h3,
.post-author,
.author-name {
  color: #002266;
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 0 2px rgba(0,0,0,0.15);
}

.group-link {
  color: #0080ff;
  font-weight: 600;
}

/* === Bouton Publier === */
.btn-publish {
  background: linear-gradient(90deg, #007bff, #00aaff);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn-publish:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* === Carte de post === */
.wall-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.3s;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
}

.wall-card:hover {
  transform: scale(1.01);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.wall-card.pinned {
  outline: 2px dashed #f1c40f;
  outline-offset: 2px;
  background-color: #fffceb;
}

/* === En-tête du post === */
.wall-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
}

.wall-header img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0044cc;
}

.wall-header .meta {
  font-size: 12px;
  color: #777;
}

/* === Contenu du post === */
.post-body { margin-top: 10px; }

.post-content {
  color: #111;
  font-size: 15px;
  line-height: 1.35;
}

.wall-media img,
.wall-media video {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  max-height: 350px;
  object-fit: cover;
}

/* === Actions (éditer, supprimer, épingler) === */
.post-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.btn-post-action {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  transition: transform 0.2s, color 0.2s;
}

.btn-post-action:hover {
  transform: scale(1.3);
  color: #0044cc;
}

/* === Réactions === */
.post-reactions {
  display: flex;
  justify-content: flex-start;
  gap: 18px;
  align-items: center;
  margin-top: 10px;
}

.post-reactions button {
  background: none;
  border: none;
  color: #000;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s, color 0.2s;
}

.post-reactions button:hover {
  background: #e6e8eb;
  color: #0044cc;
  transform: translateY(-1px);
}

.like-count-up,
.like-count-down {
  font-weight: 600;
  font-size: 14px;
  color: #000;
}

/* === Éditeur principal (Quill) === */
.ql-toolbar {
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

.ql-editor {
  background: #fff;
  color: #000;
  font-size: 15px;
  line-height: 1.4;
  min-height: 120px;
}

/* === Animation apparition nouveau post === */
.wall-card.new {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease-in-out;
}
.wall-card.new.show {
  opacity: 1;
  transform: translateY(0);
}

/* === Zone d'édition inline === */
.edit-area {
  margin-top: 10px;
  border: 1px solid #0a3e5f;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.edit-area .ql-container {
  min-height: 120px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 8px;
}

.edit-area .btn-save-edit,
.edit-area .btn-cancel-edit {
  display: inline-block;
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.edit-area .btn-save-edit {
  background: linear-gradient(90deg, #007bff, #00aaff);
  color: #fff;
  margin-right: 10px;
}

.edit-area .btn-cancel-edit {
  background: #eee;
  color: #333;
}

.edit-area .btn-save-edit:hover { transform: scale(1.05); }
.edit-area .btn-cancel-edit:hover { background: #ddd; }

/* === COMMENTAIRES (mur) === */
.post-comments {
  margin-top: 10px;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === Chaque commentaire === */
.comment-item {
  display: flex;
  align-items: flex-start;
  background: #f9fafb;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  padding: 10px 14px;
  box-sizing: border-box;
  width: 100%;
  transition: background 0.2s ease;
}

.comment-item:hover {
  background: #f3f4f6;
}

/* Avatar utilisateur */
.comment-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
}

/* Bulle de texte du commentaire */
.comment-bubble {
  flex: 1;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  color: #111;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 0 3px rgba(0,0,0,0.08);
  position: relative;
}

/* En-tête du commentaire */
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.comment-header b {
  font-weight: 600;
  color: #222;
}

.comment-header .date {
  font-size: 12px;
  color: #888;
  margin-left: 8px;
}

/* Texte du commentaire */
.comment-text {
  font-size: 14px;
  color: #222;
  line-height: 1.4;
}

/* Images dans les commentaires */
.comment-text img {
  max-width: 180px;
  height: auto;
  border-radius: 8px;
  margin-top: 6px;
  display: block;
}

/* Bouton delete */
.comment-header .delete-comment {
  border: none;
  background: none;
  color: #777;
  font-size: 15px;
  cursor: pointer;
  margin-left: 8px;
  transition: color 0.2s;
}
.comment-header .delete-comment:hover {
  color: #e33;
}

/* === Formulaire de commentaire === */
.comment-form {
  background: #f9fafb;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
}

.comment-form .ql-toolbar.ql-snow {
  background: #f0f2f5;
  border: 1px solid #cdd3d9;
  border-radius: 8px 8px 0 0;
  padding: 6px;
}

.comment-form .ql-container.ql-snow {
  border: 1px solid #cdd3d9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fff;
  min-height: 100px;
  font-size: 14px;
}

.comment-form .ql-editor {
  color: #111;
  font-family: 'Inter', sans-serif;
  min-height: 80px;
}

/* === Actions : emoji + publier === */
.comment-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.comment-actions .btn-emoji {
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s ease;
}

.comment-actions .btn-emoji:hover {
  background: #e9ebee;
}

/* === Bouton envoyer === */
.btn-comment-send {
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #007bff, #00b8ff);
  color: #fff;
  font-weight: 600;
  padding: 6px 16px;
  cursor: pointer;
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-comment-send:hover {
  background: linear-gradient(135deg, #009cff, #33d1ff);
  transform: translateY(-1px);
}

/* Emoji picker */
#emoji-popup span:hover {
  background: #f2f2f2;
  border-radius: 6px;
}

/* === Images dans les posts === */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
  margin: 6px 0;
}

/* === Paragraphes dans les posts === */
.post-content p {
  margin: 4px 0 8px;
  line-height: 1.35;
}

.post-content br {
  line-height: 1.35;
}


posts-list .post-card .post-media img,
.posts-list .post-card .post-content img,
.post-body img {
  max-width: min(520px, 100%);  /* largeur plafond (ajuste si tu veux) */
  width: 100%;                  /* occupe la largeur dispo jusqu’au plafond */
  height: auto !important;      /* garde le ratio */
  max-height: none !important;  /* pas de coupe verticale */
  object-fit: contain !important; /* pas de recadrage */
  border-radius: 8px;
  display: block;
  margin: 10px auto;
}
/* Neutralise les tailles inline des imports */
.posts-list img[width],
.posts-list img[height],
.posts-list img[style*="width"],
.posts-list img[style*="height"] {
  width: auto !important;
  height: auto !important;
  max-width: min(520px, 100%) !important;
  object-fit: contain !important;