/* ==========================================================================
   AES Social AI Feed — Styles Front-end v2
   ========================================================================== */

:root {
  --aes-primary: #1877f2;
  --aes-primary-hover: #166fe5;
  --aes-bg: #f0f2f5;
  --aes-card-bg: #ffffff;
  --aes-border: #dddfe2;
  --aes-text: #1c1e21;
  --aes-text-light: #65676b;
  --aes-radius: 8px;
  --aes-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --aes-green: #1a7a2e;
  --aes-green-light: #e8f5e9;
  --aes-red: #e74c3c;
  --aes-orange: #f39c12;
  /* Badge */
  --aes-badge-bg: #1a5276;
  --aes-badge-border: #155e2a;
}

/* ---------- Feed Container ---------- */
#aes-feed-container {
  max-width: 680px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  float: none !important;
}

/* ---------- Post Card ---------- */
.aes-post-card {
  background: var(--aes-card-bg);
  border-radius: var(--aes-radius);
  box-shadow: var(--aes-shadow);
  overflow: visible;
  border: 1px solid var(--aes-border);
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative;
}

/* ---------- Stats Bar ---------- */
.aes-post-stats-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--aes-text-light);
  border-bottom: 1px solid var(--aes-border);
  flex-wrap: wrap;
}
.aes-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- Post Header ---------- */
.aes-post-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 10px;
  position: relative;
}
.aes-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aes-post-meta {
  flex: 1;
  min-width: 0;
}
.aes-post-author-line {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.aes-post-author {
  font-weight: 700;
  color: var(--aes-text);
  text-decoration: none;
  font-size: 15px;
}
.aes-post-author:hover {
  text-decoration: underline;
}
.aes-post-date {
  color: var(--aes-text-light);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1px;
}

/* ============================================================
   BADGE VERIFIÉ — cercle vert + checkmark blanc, style Facebook
   ============================================================ */
.aes-verified-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  cursor: default;
  margin-left: 2px;
  vertical-align: middle;
}
.aes-badge-svg {
  display: block;
  transition: transform 0.15s;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.aes-verified-badge:hover .aes-badge-svg {
  transform: scale(1.15);
}

/* ---------- Type badges ---------- */
.aes-badge-type {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.aes-badge-annonce {
  background: var(--aes-green-light);
  color: var(--aes-green);
}
.aes-badge-moderation {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}
.aes-badge-ai {
  font-size: 14px;
}

/* ---------- Post title ---------- */
.aes-post-title {
  padding: 0 16px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
}
.aes-post-title a {
  color: var(--aes-text);
  text-decoration: none;
}
.aes-post-title a:hover {
  text-decoration: underline;
}

/* ---------- Post content ---------- */
.aes-post-content {
  padding: 0 16px 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--aes-text);
  word-wrap: break-word;
}
.aes-read-more {
  display: inline-block;
  margin-top: 3px;
  color: var(--aes-primary);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ---------- Post image ---------- */
.aes-post-image {
  width: 100%;
  overflow: hidden;
}
.aes-post-image img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

/* ---------- Hashtags ---------- */
.aes-post-hashtags {
  padding: 6px 16px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.aes-hashtag {
  color: var(--aes-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.aes-hashtag:hover {
  text-decoration: underline;
}

/* ---------- Actions menu ---------- */
.aes-post-actions-menu {
  position: relative !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.aes-post-menu-btn {
  background: rgba(0, 0, 0, 0.06) !important;
  border: none !important;
  cursor: pointer !important;
  padding: 6px 8px !important;
  border-radius: 50% !important;
  color: #555 !important;
  transition: background 0.18s !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  box-shadow: none !important;
}
.aes-post-menu-btn:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #222 !important;
}
.aes-post-menu-dropdown {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 6px) !important;
  background: #ffffff !important;
  border: 1px solid #dddfe2 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18) !important;
  z-index: 9999 !important;
  min-width: 200px !important;
  padding: 6px 0 !important;
  margin: 0 !important;
  list-style: none !important;
}
/* Tous les items du dropdown — on utilise des <div> maintenant */
.aes-post-menu-dropdown .aes-menu-item {
  display: block !important;
  width: 100% !important;
  text-align: left !important;
  padding: 10px 16px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: #1c1e21 !important;
  text-decoration: none !important;
  transition: background 0.12s !important;
  line-height: 1.4 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  outline: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.aes-post-menu-dropdown .aes-menu-item:hover {
  background: #f0f2f5 !important;
  color: #1c1e21 !important;
  text-decoration: none !important;
}
.aes-post-menu-dropdown .aes-menu-item.aes-menu-item-danger {
  color: #e74c3c !important;
}
.aes-post-menu-dropdown .aes-menu-item.aes-menu-item-danger:hover {
  background: #fff0f0 !important;
  color: #c0392b !important;
}
.aes-post-menu-dropdown .aes-menu-item.aes-menu-item-report {
  color: #e67e22 !important;
}
.aes-post-menu-dropdown .aes-menu-item.aes-menu-item-report:hover {
  background: #fff8f0 !important;
  color: #d35400 !important;
}
.aes-post-menu-dropdown .aes-menu-separator {
  height: 1px !important;
  background: #dddfe2 !important;
  margin: 4px 0 !important;
  display: block !important;
}

/* ============================================================
   Barre d'interactions — icônes seulement
   ============================================================ */
.aes-interactions-bar {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--aes-border);
}
.aes-interact-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-right: 1px solid var(--aes-border);
  cursor: pointer;
  padding: 11px 4px;
  color: var(--aes-text-light);
  transition:
    background 0.18s,
    color 0.15s,
    transform 0.1s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 0;
}
.aes-interact-btn:last-child {
  border-right: none;
}
.aes-interact-btn:hover {
  background: var(--aes-bg);
  color: var(--aes-text);
}
.aes-interact-btn:active {
  transform: scale(0.93);
}
.aes-interact-btn svg {
  pointer-events: none;
  flex-shrink: 0;
}
.aes-like-btn.aes-liked {
  color: var(--aes-red);
}
.aes-like-btn.aes-liked:hover {
  background: #fef0f0;
}

/* --- Rating étoiles inline --- */
.aes-rating-inline {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border-right: 1px solid var(--aes-border);
  padding: 6px 2px;
}
.aes-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  transition: transform 0.12s;
  display: flex;
  align-items: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.aes-star-btn:hover {
  transform: scale(1.3);
}
.aes-star-btn svg {
  pointer-events: none;
}

/* ============================================================
   Section Commentaires
   ============================================================ */
.aes-comments-section {
  border-top: 1px solid var(--aes-border);
  padding: 10px 14px 14px;
  background: #fafbfc;
}
.aes-comments-list {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
}
.aes-comment-item {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}
.aes-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aes-comment-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aes-comment-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aes-comment-bubble {
  background: var(--aes-bg);
  border-radius: 14px;
  padding: 8px 13px;
  display: inline-block;
  max-width: 100%;
}
.aes-comment-author {
  font-weight: 700;
  font-size: 12px;
  color: var(--aes-text);
  display: block;
  margin-bottom: 2px;
}
.aes-comment-text {
  display: block;
  font-size: 14px;
  color: var(--aes-text);
  line-height: 1.4;
}
.aes-comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
  padding-left: 4px;
}
.aes-comment-date {
  font-size: 11px;
  color: var(--aes-text-light);
}
.aes-reply-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: var(--aes-text-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
  font-family: inherit;
}
.aes-reply-toggle-btn:hover {
  color: var(--aes-primary);
}
.aes-reply-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  margin-left: 10px;
}
.aes-reply-input {
  flex: 1;
  border: 1px solid var(--aes-border);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.aes-reply-input:focus {
  border-color: var(--aes-primary);
}
.aes-reply-send-btn {
  background: var(--aes-primary);
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  color: #fff;
  transition: background 0.18s;
}
.aes-reply-send-btn:hover {
  background: var(--aes-primary-hover);
}
.aes-comment-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.aes-comment-input {
  flex: 1;
  border: 1px solid var(--aes-border);
  border-radius: 20px;
  padding: 9px 15px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
  background: #fff;
}
.aes-comment-input:focus {
  border-color: var(--aes-primary);
  box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.12);
}
.aes-comment-send-btn {
  background: var(--aes-primary);
  border: none;
  cursor: pointer;
  padding: 9px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition:
    background 0.18s,
    transform 0.1s;
}
.aes-comment-send-btn:hover {
  background: var(--aes-primary-hover);
  transform: scale(1.08);
}

/* ============================================================
   Annonce Card
   ============================================================ */
.aes-annonce-card {
  border-left: 4px solid var(--aes-green);
}
.aes-annonce-details {
  padding: 0 16px 12px;
}
.aes-annonce-title {
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 700;
}
.aes-annonce-title a {
  color: var(--aes-text);
  text-decoration: none;
}
.aes-annonce-title a:hover {
  text-decoration: underline;
}
.aes-annonce-short-desc {
  font-size: 14px;
  color: var(--aes-text);
  line-height: 1.5;
  margin: 0 0 8px;
}
.aes-annonce-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.aes-annonce-price,
.aes-annonce-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}
.aes-annonce-price {
  background: var(--aes-green-light);
  color: var(--aes-green);
}
.aes-annonce-location {
  background: #e7f3ff;
  color: var(--aes-primary);
}
.aes-annonce-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f9ee;
  border-radius: 6px;
  padding: 4px 8px;
  transition: transform 0.2s ease;
}
.aes-annonce-whatsapp:hover {
  transform: scale(1.1);
  background: #d4f5e0;
}

/* ============================================================
   Annonce Photos Preview (multi-upload)
   ============================================================ */
.aes-photos-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 16px 10px;
  align-items: center;
}
.aes-photos-preview:empty {
  display: none;
}
.aes-photo-thumb {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--aes-border, #e0e0e0);
  flex-shrink: 0;
}
.aes-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.aes-btn-remove-thumb {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.aes-btn-remove-thumb:hover {
  background: rgba(220, 0, 0, 0.85);
}

/* ============================================================
   Load More
   ============================================================ */
#aes-load-more-wrap {
  text-align: center;
  padding: 16px 0;
}
.aes-btn-load {
  background: var(--aes-card-bg);
  border: 1px solid var(--aes-border);
  color: var(--aes-text);
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
}
.aes-btn-load:hover {
  background: var(--aes-bg);
}
.aes-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--aes-border);
  border-top-color: var(--aes-primary);
  border-radius: 50%;
  animation: aes-spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes aes-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Post Form
   ============================================================ */
.aes-post-form-wrapper {
  max-width: 680px;
  margin: 0 auto 16px;
  background: #fff;
  border-radius: var(--aes-radius);
  box-shadow: var(--aes-shadow);
  border: 1px solid var(--aes-border);
  overflow: hidden;
}
.aes-form-tabs {
  display: flex;
  border-bottom: 1px solid var(--aes-border);
}
.aes-form-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--aes-text-light);
  transition:
    color 0.18s,
    border-color 0.18s,
    background 0.18s;
  font-family: inherit;
  outline: none;
}
.aes-form-tab:hover {
  color: var(--aes-text);
  background: var(--aes-bg);
}
.aes-form-tab.aes-tab-active {
  color: var(--aes-primary);
  border-bottom-color: var(--aes-primary);
}
.aes-form-panel {
  display: none;
}
.aes-form-panel.aes-panel-active {
  display: block;
}
.aes-form-body {
  padding: 14px 16px;
}
.aes-form-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.aes-form-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.aes-post-textarea {
  flex: 1;
  border: none;
  resize: none;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  min-height: 60px;
  color: var(--aes-text);
  background: transparent;
}
.aes-post-textarea::placeholder {
  color: var(--aes-text-light);
}
.aes-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--aes-border);
  flex-wrap: wrap;
  gap: 8px;
}
.aes-form-extras {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aes-form-extras-row {
  padding: 10px 16px;
  border-top: 1px solid var(--aes-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aes-form-input {
  border: 1px solid var(--aes-border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.aes-form-input:focus {
  border-color: var(--aes-primary);
}
.aes-btn {
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 0.18s,
    transform 0.1s;
  font-family: inherit;
}
.aes-btn:active {
  transform: scale(0.97);
}
.aes-btn-primary {
  background: var(--aes-primary);
  color: #fff;
}
.aes-btn-primary:hover {
  background: var(--aes-primary-hover);
}
.aes-btn-primary:disabled {
  background: #b0c4de;
  cursor: not-allowed;
}
.aes-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--aes-text-light);
  transition:
    background 0.18s,
    color 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
}
.aes-icon-btn:hover {
  background: var(--aes-bg);
  color: var(--aes-text);
}
.aes-form-status {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  margin: 8px 16px;
  text-align: center;
}
.aes-form-status.aes-success {
  background: #e8f5e9;
  color: var(--aes-green);
  border: 1px solid var(--aes-green);
}
.aes-form-status.aes-error {
  background: #fef0f0;
  color: var(--aes-red);
  border: 1px solid var(--aes-red);
}
.aes-form-status.aes-loading {
  background: #e7f3ff;
  color: var(--aes-primary);
  border: 1px solid var(--aes-primary);
}
.aes-image-preview-wrap {
  padding: 8px 16px;
  position: relative;
  display: inline-block;
}
.aes-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  display: block;
}
.aes-remove-img {
  position: absolute;
  top: 12px;
  right: 20px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.aes-login-notice {
  text-align: center;
  color: var(--aes-text-light);
  padding: 14px;
  font-size: 15px;
}
.aes-no-posts {
  text-align: center;
  color: var(--aes-text-light);
  padding: 32px;
  font-size: 15px;
}

/* ============================================================
   Report modal
   ============================================================ */
.aes-report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aes-report-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
}
.aes-report-modal h3 {
  margin: 0 0 14px;
  font-size: 17px;
}
.aes-report-modal textarea {
  width: 100%;
  border: 1px solid var(--aes-border);
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  box-sizing: border-box;
}
.aes-report-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.aes-btn-secondary {
  background: var(--aes-bg);
  color: var(--aes-text);
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.aes-btn-secondary:hover {
  background: #d8dadf;
}

/* ============================================================
   Contact toast
   ============================================================ */
.aes-contact-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: aes-toast-in 0.3s ease;
}
.aes-contact-toast a {
  color: #7ec8ff;
  text-decoration: underline;
}
@keyframes aes-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ============================================================
   MESSAGERIE STYLE WHATSAPP
   ============================================================ */
.aes-msg-app {
  display: flex;
  height: 82vh;
  min-height: 480px;
  max-height: 800px;
  max-width: 960px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--aes-border);
  background: #fff;
  font-family: inherit;
}

/* --- Sidebar conversations --- */
.aes-msg-sidebar {
  width: 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--aes-border);
  background: #fff;
}
.aes-msg-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #075e54;
  color: #fff;
  gap: 10px;
}
.aes-msg-me {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.aes-msg-me-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aes-msg-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.aes-msg-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.aes-msg-search-wrap {
  padding: 8px 12px;
  background: #f0f2f5;
}
.aes-msg-search {
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
  color: var(--aes-text);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.aes-msg-conv-list {
  flex: 1;
  overflow-y: auto;
}
.aes-msg-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
  position: relative;
}
.aes-msg-conv-item:hover,
.aes-msg-conv-item.aes-active {
  background: #f0f2f5;
}
.aes-msg-conv-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aes-msg-conv-info {
  flex: 1;
  min-width: 0;
}
.aes-msg-conv-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--aes-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aes-msg-conv-preview {
  font-size: 13px;
  color: var(--aes-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.aes-msg-conv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.aes-msg-conv-time {
  font-size: 11px;
  color: var(--aes-text-light);
}
.aes-msg-unread-badge {
  background: #25d366;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.aes-msg-empty-conv {
  text-align: center;
  padding: 40px 20px;
  color: var(--aes-text-light);
  font-size: 14px;
}

/* --- Chat panel --- */
.aes-msg-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #e5ddd5
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9c0b4' fill-opacity='0.18'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  min-width: 0;
}
.aes-msg-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #888;
  gap: 16px;
  text-align: center;
  padding: 40px;
}
.aes-msg-empty-icon {
  opacity: 0.35;
}
.aes-msg-empty p {
  font-size: 15px;
  margin: 0;
}
.aes-msg-chat-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Chat header */
.aes-msg-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #075e54;
  color: #fff;
  flex-shrink: 0;
}
.aes-msg-back-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 4px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.aes-msg-chat-info {
  flex: 1;
  min-width: 0;
}
.aes-msg-chat-name {
  font-weight: 700;
  font-size: 16px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aes-msg-chat-status {
  font-size: 12px;
  opacity: 0.8;
}

/* Bubbles */
.aes-msg-bubble-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: smooth;
}
.aes-msg-day-label {
  text-align: center;
  margin: 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.aes-msg-day-label span {
  background: rgba(255, 255, 255, 0.75);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
}
.aes-msg-bubble-row {
  display: flex;
  margin-bottom: 2px;
}
.aes-msg-bubble-row.aes-from-me {
  justify-content: flex-end;
}
.aes-msg-bubble-row.aes-from-other {
  justify-content: flex-start;
}
.aes-msg-bubble {
  max-width: 72%;
  padding: 8px 12px 6px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.13);
}
.aes-from-me .aes-msg-bubble {
  background: #dcf8c6;
  border-bottom-right-radius: 2px;
  color: #111;
}
.aes-from-other .aes-msg-bubble {
  background: #fff;
  border-bottom-left-radius: 2px;
  color: #111;
}
.aes-msg-bubble-time {
  font-size: 10px;
  color: #888;
  display: block;
  text-align: right;
  margin-top: 3px;
}
.aes-msg-bubble-read {
  color: #34b7f1;
  margin-left: 2px;
}

/* Input bar */
.aes-msg-input-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  background: #f0f2f5;
  flex-shrink: 0;
}
.aes-msg-input-wrap {
  flex: 1;
  background: #fff;
  border-radius: 24px;
  padding: 8px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.aes-msg-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.45;
  max-height: 120px;
  overflow-y: auto;
  background: transparent;
  color: var(--aes-text);
  display: block;
}
.aes-msg-textarea::placeholder {
  color: #aaa;
}
.aes-msg-send-btn {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: #075e54;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition:
    background 0.18s,
    transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.aes-msg-send-btn:hover:not(:disabled) {
  background: #128c7e;
  transform: scale(1.06);
}
.aes-msg-send-btn:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* Spinner */
.aes-msg-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.aes-msg-spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid #ddd;
  border-top-color: #075e54;
  border-radius: 50%;
  animation: aes-spin 0.7s linear infinite;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  #aes-feed-container,
  .aes-post-form-wrapper,
  #aes-load-more-wrap {
    max-width: 100%;
    margin-left: 4px;
    margin-right: 4px;
  }
  .aes-post-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .aes-annonce-card {
    border-left: 4px solid var(--aes-green);
  }
  .aes-interact-btn {
    padding: 12px 2px;
  }
  .aes-rating-inline {
    gap: 0;
  }
  .aes-star-btn {
    padding: 4px 1px;
  }
  .aes-msg-app {
    height: 100svh;
    max-height: none;
    border-radius: 0;
  }
  .aes-msg-sidebar {
    width: 100%;
    min-width: 0;
    display: none;
  }
  .aes-msg-sidebar.aes-show {
    display: flex;
  }
  .aes-msg-chat {
    width: 100%;
    display: none;
  }
  .aes-msg-chat.aes-show {
    display: flex;
  }
  .aes-msg-back-btn {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .aes-post-header {
    padding: 10px 12px;
    gap: 8px;
  }
  .aes-post-title {
    font-size: 15px;
  }
  .aes-post-content {
    font-size: 14px;
  }
}

/* ============================================================
   CORRECTIFS v2.1
   ============================================================ */

/* --- Bouton Contacter (annonce) couleur verte --- */
.aes-contact-author-btn {
  color: var(--aes-green) !important;
}
.aes-contact-author-btn:hover {
  background: var(--aes-green-light) !important;
}

/* --- Lien Google Maps --- */
a.aes-annonce-location.aes-map-link {
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
a.aes-annonce-location.aes-map-link:hover {
  background: #d0e9ff;
  color: #0058a3;
}

/* --- Prix FCFA --- */
.aes-annonce-price strong {
  font-size: 12px;
  margin-left: 2px;
}

/* --- Bouton IA (récupéré) --- */
.aes-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--aes-text-light);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition:
    background 0.18s,
    color 0.15s;
  font-family: inherit;
}
.aes-action-btn:hover {
  background: var(--aes-bg);
  color: var(--aes-text);
}
.aes-ai-btn {
  color: #7c3aed;
}
.aes-ai-btn:hover {
  background: #f3e8ff;
  color: #5b21b6;
}
.aes-ai-label {
  font-weight: 700;
}
.aes-ai-dropdown {
  position: relative;
  display: inline-block;
}
.aes-ai-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--aes-border);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  z-index: 300;
  min-width: 200px;
  overflow: hidden;
  padding: 4px 0;
}
.aes-ai-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--aes-text);
  transition: background 0.15s;
  font-family: inherit;
}
.aes-ai-option:hover {
  background: var(--aes-bg);
}

/* ============================================================
   MESSAGERIE NATIVE v2.1 — Mobile-first, compact
   ============================================================ */
.aes-msg-app {
  display: flex;
  height: 75vh;
  min-height: 420px;
  max-height: 680px;
  max-width: 820px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.15);
  background: #fff;
  border: 1px solid var(--aes-border);
}

/* -- Sidebar -- */
.aes-msg-sidebar {
  width: 300px;
  min-width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
  background: #fff;
}

.aes-msg-header {
  background: #075e54;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.aes-msg-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.aes-msg-header-title {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.aes-msg-header-name {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aes-msg-avatar-xs {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.aes-msg-avatar-md {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.aes-msg-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f5f5f5;
  flex-shrink: 0;
}
.aes-msg-search-input {
  flex: 1;
  border: none;
  background: #fff;
  border-radius: 18px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  color: var(--aes-text);
}

.aes-msg-list-wrap {
  flex: 1;
  overflow-y: auto;
}

/* Conv item */
.aes-msg-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f8f8f8;
  transition: background 0.12s;
  position: relative;
}
.aes-msg-conv-item:hover,
.aes-msg-conv-item.aes-active {
  background: #f0f2f5;
}
.aes-msg-conv-img-wrap {
  position: relative;
  flex-shrink: 0;
}
.aes-msg-conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.aes-online-dot-sm {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #25d366;
  border: 2px solid #fff;
  position: absolute;
  bottom: 0;
  right: 0;
}
.aes-msg-conv-body {
  flex: 1;
  min-width: 0;
}
.aes-msg-conv-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--aes-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aes-msg-conv-last {
  font-size: 12px;
  color: var(--aes-text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.aes-msg-conv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.aes-msg-conv-time {
  font-size: 11px;
  color: var(--aes-text-light);
}
.aes-msg-unread {
  background: #25d366;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Section headers (Conversations / Suggestions) */
.aes-msg-section-header {
  padding: 8px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--aes-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.aes-msg-see-more-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px;
  background: none;
  border: none;
  border-top: 1px solid #f0f0f0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--aes-primary);
  transition: background 0.15s;
  font-family: inherit;
}
.aes-msg-see-more-btn:hover {
  background: #f0f2f5;
}

/* Skeleton */
.aes-msg-skeleton {
  padding: 8px 0;
}
.aes-msg-skel-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
}
.aes-skel-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eee;
  flex-shrink: 0;
  animation: aes-pulse 1.4s ease infinite;
}
.aes-skel-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aes-skel-line {
  height: 10px;
  border-radius: 5px;
  background: #eee;
  animation: aes-pulse 1.4s ease infinite;
}
.aes-skel-lg {
  width: 65%;
}
.aes-skel-sm {
  width: 40%;
}
@keyframes aes-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* -- Chat panel -- */
.aes-msg-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ece5dd;
  min-width: 0;
}
.aes-msg-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #888;
  text-align: center;
  padding: 32px;
  background: #fff;
}
.aes-msg-welcome-icon {
  font-size: 52px;
}
.aes-msg-welcome h3 {
  margin: 0;
  font-size: 18px;
  color: var(--aes-text);
}
.aes-msg-welcome p {
  margin: 0;
  font-size: 14px;
}

.aes-msg-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Thread header */
.aes-msg-thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #075e54;
  flex-shrink: 0;
}
.aes-msg-back-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 4px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.aes-msg-thread-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.aes-online-dot {
  width: 12px;
  height: 12px;
  background: #25d366;
  border: 2px solid #075e54;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}
.aes-msg-thread-info {
  flex: 1;
  min-width: 0;
}
.aes-msg-thread-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aes-msg-thread-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* Bubbles */
.aes-msg-bubbles {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scroll-behavior: smooth;
  background: #ece5dd
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9b99a' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.aes-msg-day-sep {
  text-align: center;
  margin: 10px 0;
}
.aes-msg-day-sep span {
  background: rgba(225, 215, 200, 0.9);
  color: #666;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  display: inline-block;
}
.aes-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  max-width: 78%;
}
.aes-bubble-row.aes-me {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.aes-bubble-row.aes-other {
  align-self: flex-start;
}
.aes-bubble {
  padding: 8px 11px 5px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  max-width: 100%;
}
.aes-me .aes-bubble {
  background: #dcf8c6;
  border-bottom-right-radius: 2px;
}
.aes-other .aes-bubble {
  background: #fff;
  border-bottom-left-radius: 2px;
}
.aes-bubble-meta {
  font-size: 10px;
  color: #888;
  text-align: right;
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}
.aes-tick {
  color: #aaa;
}
.aes-tick.aes-read {
  color: #34b7f1;
}

.aes-msg-bubble-loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.aes-typing-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.aes-typing-dots span {
  width: 8px;
  height: 8px;
  background: #075e54;
  border-radius: 50%;
  animation: aes-typing 1.2s ease infinite;
}
.aes-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.aes-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes aes-typing {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Saisie */
.aes-msg-compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  background: #f0f2f5;
  flex-shrink: 0;
}
.aes-msg-compose-inner {
  flex: 1;
  background: #fff;
  border-radius: 22px;
  padding: 8px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.aes-msg-compose-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.45;
  max-height: 100px;
  overflow-y: auto;
  background: transparent;
  display: block;
  color: var(--aes-text);
}
.aes-msg-compose-textarea::placeholder {
  color: #bbb;
}
.aes-msg-send {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: #25d366;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition:
    background 0.18s,
    transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.aes-msg-send:hover:not(:disabled) {
  background: #1da855;
  transform: scale(1.06);
}
.aes-msg-send:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
  .aes-msg-app {
    height: 100svh;
    max-height: none;
    border-radius: 0;
    border: none;
  }
  .aes-msg-sidebar {
    width: 100%;
    display: flex;
  }
  .aes-msg-sidebar.aes-hide {
    display: none;
  }
  .aes-msg-chat-panel {
    width: 100%;
    display: none;
  }
  .aes-msg-chat-panel.aes-show {
    display: flex;
  }
  .aes-msg-back-btn {
    display: flex !important;
  }
}

/* ============================================================
   BADGE cercle — surcharge finale pour s'assurer du rendu
   ============================================================ */
.aes-badge-svg circle {
  fill: #1a7a2e;
}
.aes-badge-svg polyline {
  stroke: #ffffff;
}

/* ============================================================
   DESCRIPTION PLIABLE STYLE FACEBOOK — Annonces
   ============================================================ */
.aes-annonce-desc-wrap {
  position: relative;
}

.aes-annonce-short-desc {
  font-size: 15px;
  color: var(--aes-text);
  line-height: 1.55;
  margin: 0 0 6px;
  white-space: pre-line;
}

.aes-annonce-long-desc {
  font-size: 14px;
  color: var(--aes-text);
  line-height: 1.55;
  margin-top: 4px;
}

/* Bouton Voir plus / Voir moins */
.aes-desc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--aes-text-light);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
  font-family: inherit;
  line-height: 1;
}

.aes-desc-toggle:hover {
  color: var(--aes-text);
}

.aes-desc-toggle-icon {
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.aes-desc-toggle[data-expanded="1"] .aes-desc-toggle-icon {
  transform: rotate(180deg);
}

/* Animation d'ouverture douce */
.aes-annonce-long-desc {
  overflow: hidden;
}

/* ============================================================
   CORRECTIFS v3 — Ajouts finaux
   ============================================================ */

/* Badge ondulé : override du cercle simple pour forcer la forme path */
.aes-badge-svg circle {
  display: none;
}
.aes-badge-svg path {
  display: block;
}

/* Bouton contact vert */
.aes-contact-author-btn {
  color: var(--aes-green) !important;
}
.aes-contact-author-btn:hover {
  background: var(--aes-green-light) !important;
}

/* Liens Maps */
a.aes-annonce-location.aes-map-link {
  background: #e7f3ff;
  color: var(--aes-primary);
  text-decoration: none;
  transition: background 0.15s;
}
a.aes-annonce-location.aes-map-link:hover {
  background: #d0e9ff;
}

/* Prix FCFA */
.aes-annonce-price strong {
  font-size: 11px;
  margin-left: 2px;
}

/* Interactions bar — nowrap horizontal scroll */
.aes-interactions-bar {
  flex-wrap: nowrap;
  overflow: visible;
}
.aes-interact-btn {
  flex-shrink: 0;
  min-width: 40px;
}

/* Form actions — nowrap */
.aes-form-actions {
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
}
.aes-form-actions::-webkit-scrollbar {
  display: none;
}
.aes-form-actions-left {
  flex-wrap: nowrap;
  gap: 2px;
}

/* WP Better Messages notice */
.aes-msg-notice {
  text-align: center;
  padding: 40px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-width: 420px;
  margin: 24px auto;
}
.aes-msg-notice-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.aes-msg-notice h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--aes-text);
}
.aes-msg-notice p {
  margin: 0 0 16px;
  color: var(--aes-text-light);
  font-size: 15px;
}
.aes-msg-redirect {
  text-align: center;
  padding: 32px 20px;
}
.aes-msg-redirect .aes-msg-notice-icon {
  font-size: 40px;
}
.aes-msg-redirect p {
  color: var(--aes-text-light);
  margin: 8px 0 16px;
}

/* Publicités */
.aes-ad-slot {
  background: #fff;
  border-radius: var(--aes-radius);
  box-shadow: var(--aes-shadow);
  border: 1px solid #e8d5b7;
  overflow: hidden;
  position: relative;
}
.aes-ad-label {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 1;
}
.aes-ad-custom-link {
  display: block;
  text-decoration: none;
  color: var(--aes-text);
  transition: opacity 0.15s;
}
.aes-ad-custom-link:hover {
  opacity: 0.88;
}
.aes-ad-image img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}
.aes-ad-body {
  padding: 12px 16px 14px;
}
.aes-ad-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--aes-text);
  margin-bottom: 4px;
}
.aes-ad-desc {
  font-size: 13px;
  color: var(--aes-text-light);
  line-height: 1.4;
  margin-bottom: 8px;
}
.aes-ad-cta {
  display: inline-block;
  background: var(--aes-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 6px;
}
.aes-ad-adsense {
  padding: 8px;
  text-align: center;
}

/* Description pliable annonce */
.aes-annonce-desc-wrap {
  position: relative;
}
.aes-annonce-long-desc {
  overflow: hidden;
}
.aes-desc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--aes-text-light);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: inherit;
  transition: color 0.15s;
}
.aes-desc-toggle:hover {
  color: var(--aes-text);
}
.aes-desc-toggle-icon {
  transition: transform 0.2s ease;
}
.aes-desc-toggle[data-expanded="1"] .aes-desc-toggle-icon {
  transform: rotate(180deg);
}

/* ============================================================
   ANNONCE — Popup commentaire (hors barre, pas de clipping)
   ============================================================ */

/* Barre annonce : overflow visible pour que le popup sorte */
.aes-annonce-bar {
  overflow: visible !important;
}

/* Popup masqué par défaut */
.aes-annonce-cmt-popup {
  display: none !important;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
/* Ouvert */
.aes-annonce-cmt-popup.aes-popup-open {
  display: block !important;
}

.aes-annonce-popup-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid #e4e6eb;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1c1e21;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.aes-annonce-popup-btn:last-child {
  border-bottom: none;
}
.aes-annonce-popup-btn:hover,
.aes-annonce-popup-btn:active {
  background: #f0f2f5;
}
.aes-annonce-popup-btn svg {
  color: #1877f2;
  flex-shrink: 0;
}
.aes-annonce-popup-contact {
  color: #1a7a2e;
}
.aes-annonce-popup-contact svg {
  color: #1a7a2e;
}

/* Bouton trigger actif */
.aes-annonce-cmt-trigger.aes-cmt-active {
  color: #1877f2;
}

/* Modal contact — bottom sheet */
.aes-contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.aes-contact-modal {
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 20px 18px 32px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.18);
  animation: aes-sheet-up 0.22s ease;
}
@keyframes aes-sheet-up {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.aes-contact-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1c1e21;
}
.aes-contact-modal-header svg {
  color: #1a7a2e;
}
.aes-contact-modal-hint {
  font-size: 13px;
  color: #65676b;
  margin: 0 0 10px;
}
.aes-contact-modal-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dddfe2;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 110px;
  outline: none;
  color: #1c1e21;
  transition: border-color 0.15s;
}
.aes-contact-modal-textarea:focus {
  border-color: #1877f2;
}
.aes-contact-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* =============================================
   Modales d'action (Modifier / Supprimer / Signaler)
   ============================================= */
.aes-action-modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.55) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}
.aes-action-modal-box {
  background: #ffffff !important;
  border-radius: 14px !important;
  padding: 24px !important;
  width: 100% !important;
  max-width: 480px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-sizing: border-box !important;
}
.aes-am-header {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1c1e21 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
}
.aes-am-close {
  background: none !important;
  border: none !important;
  font-size: 18px !important;
  cursor: pointer !important;
  color: #888 !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  line-height: 1 !important;
}
.aes-am-close:hover {
  background: #f0f2f5 !important;
  color: #333 !important;
}

.aes-am-label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #444 !important;
  margin-bottom: 4px !important;
}
.aes-am-hint,
.aes-am-confirm-text {
  font-size: 14px !important;
  color: #555 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}
.aes-am-input {
  width: 100% !important;
  border: 1.5px solid #dddfe2 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  color: #1c1e21 !important;
  background: #fff !important;
}
.aes-am-input:focus {
  border-color: #1877f2 !important;
}

.aes-am-textarea {
  width: 100% !important;
  border: 1.5px solid #dddfe2 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  outline: none !important;
  box-sizing: border-box !important;
  color: #1c1e21 !important;
  background: #fff !important;
  resize: vertical !important;
  min-height: 110px !important;
  line-height: 1.5 !important;
}
.aes-am-textarea:focus {
  border-color: #1877f2 !important;
}
.aes-am-reason {
  min-height: 80px !important;
}

.aes-am-charcount {
  font-size: 12px !important;
  color: #888 !important;
  text-align: right !important;
  margin-top: -8px !important;
}
.aes-am-error {
  font-size: 13px !important;
  color: #e74c3c !important;
  margin: 0 !important;
  font-weight: 600 !important;
}
.aes-am-footer {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 4px !important;
}
.aes-am-btn {
  padding: 10px 20px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  transition: opacity 0.15s !important;
  text-decoration: none !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  line-height: 1.4 !important;
}
.aes-am-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}
.aes-am-btn-sec {
  background: #f0f2f5 !important;
  color: #1c1e21 !important;
}
.aes-am-btn-sec:hover {
  background: #e0e2e5 !important;
}
.aes-am-btn-pri {
  background: #1877f2 !important;
  color: #fff !important;
}
.aes-am-btn-pri:hover {
  background: #1565d8 !important;
}
.aes-am-btn-danger {
  background: #e74c3c !important;
  color: #fff !important;
}
.aes-am-btn-danger:hover {
  background: #c0392b !important;
}
.aes-am-btn-report {
  background: #e67e22 !important;
  color: #fff !important;
}
.aes-am-btn-report:hover {
  background: #d35400 !important;
}

/* Toast notification */
.aes-action-toast {
  position: fixed !important;
  bottom: 28px !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(20px) !important;
  background: #1c1e21 !important;
  color: #fff !important;
  padding: 12px 22px !important;
  border-radius: 24px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  z-index: 99999 !important;
  opacity: 0 !important;
  transition:
    opacity 0.25s,
    transform 0.25s !important;
  pointer-events: none !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}
.aes-action-toast.aes-toast-show {
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* ================================================================
   Modifier / Supprimer les commentaires — v2.7
================================================================ */

/* Conteneur vertical Modifier / Supprimer — toujours visible */
.aes-comment-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  margin-top: 5px !important;
  padding-left: 4px !important;
}

/* Boutons d'action */
.aes-cmeta-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: none !important;
  border: none !important;
  padding: 3px 8px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: #65676b !important;
  cursor: pointer !important;
  border-radius: 4px !important;
  transition:
    background 0.15s,
    color 0.15s !important;
  line-height: 1.4 !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.aes-cmeta-btn:hover {
  background: #f0f2f5 !important;
  color: #1877f2 !important;
}
.aes-cmeta-btn-danger {
  color: #888 !important;
}
.aes-cmeta-btn-danger:hover {
  background: #fde8e8 !important;
  color: #e74c3c !important;
}
.aes-cmeta-btn svg {
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

/* Zone d'édition inline du commentaire */
.aes-comment-edit-zone {
  margin-top: 6px !important;
  padding: 8px !important;
  background: #f0f6ff !important;
  border-radius: 8px !important;
  border: 1px solid #c5d8f0 !important;
}
.aes-comment-edit-input {
  width: 100% !important;
  min-height: 64px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  font-family: inherit !important;
  border: 1px solid #ccd0d4 !important;
  border-radius: 6px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}
.aes-comment-edit-input:focus {
  border-color: #1877f2 !important;
}
.aes-cedit-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 6px !important;
  align-items: center !important;
}
.aes-cedit-save-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: #1877f2 !important;
  color: #fff !important;
  border: none !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}
.aes-cedit-save-btn:hover {
  background: #1565d8 !important;
}
.aes-cedit-save-btn:disabled {
  opacity: 0.6 !important;
  cursor: default !important;
}
.aes-cedit-cancel-btn {
  background: none !important;
  border: 1px solid #ccd0d4 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  color: #65676b !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}
.aes-cedit-cancel-btn:hover {
  background: #f0f2f5 !important;
}

/* ── Bouton Signaler visible dans la barre d'interactions ── */
.aes-report-btn-visible {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: none !important;
  border: 1px solid #f0a070 !important;
  color: #e67e22 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition:
    background 0.15s,
    border-color 0.15s !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}
.aes-report-btn-visible:hover {
  background: #fff4ec !important;
  border-color: #e67e22 !important;
}
@media (max-width: 480px) {
  .aes-comment-actions {
    padding-left: 0;
  }
  .aes-report-btn-visible {
    font-size: 11px !important;
    padding: 3px 8px !important;
  }
}

/* ============================================================
   Single Annonce — Page détail
   ============================================================ */
.aes-single-annonce-wrap {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.aes-single-annonce {
  background: var(--aes-card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid var(--aes-border);
}

/* ---------- Galerie ---------- */
.aes-single-gallery {
  background: #f8f9fa;
}
.aes-gallery-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  max-height: 500px;
  overflow: hidden;
  background: #000;
}
.aes-gallery-main img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  display: block;
}
.aes-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  background: #f0f2f5;
}
.aes-gallery-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid transparent;
  cursor: pointer;
  background: none;
  padding: 0;
  transition: border-color 0.2s;
}
.aes-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.aes-gallery-thumb.aes-thumb-active,
.aes-gallery-thumb:hover {
  border-color: var(--aes-green);
}

/* ---------- Contenu ---------- */
.aes-single-content {
  padding: 24px;
}
.aes-single-content .aes-badge-annonce {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
}
.aes-single-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--aes-text);
  margin: 0 0 12px;
  line-height: 1.3;
}
.aes-single-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}
.aes-single-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--aes-green);
  background: var(--aes-green-light);
  padding: 8px 16px;
  border-radius: 8px;
}
.aes-single-price strong {
  font-weight: 800;
  font-size: 14px;
}
.aes-single-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--aes-primary);
  background: #e7f3ff;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.aes-single-location:hover {
  background: #d0e6ff;
  text-decoration: none;
}
.aes-single-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--aes-text-light);
  margin-bottom: 4px;
}
.aes-single-separator {
  border: none;
  border-top: 1px solid var(--aes-border);
  margin: 16px 0;
}

/* ---------- Description ---------- */
.aes-single-desc h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--aes-text);
  margin: 0 0 8px;
}
.aes-single-short-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--aes-text);
  margin: 0 0 10px;
}
.aes-single-long-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--aes-text);
}
.aes-single-long-desc p {
  margin: 0 0 10px;
}

/* ---------- Actions (WhatsApp, Partager) ---------- */
.aes-single-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.aes-single-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.2s;
}
.aes-single-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}
.aes-btn-whatsapp {
  background: #25d366;
  color: #ffffff;
}
.aes-btn-whatsapp:hover {
  background: #1fb855;
  color: #ffffff;
}
.aes-btn-share {
  background: var(--aes-bg);
  color: var(--aes-text);
  border: 1px solid var(--aes-border);
}
.aes-btn-share:hover {
  background: #e4e6e9;
}

/* ---------- Seller card ---------- */
.aes-single-seller h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--aes-text);
  margin: 0 0 12px;
}
.aes-seller-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--aes-bg);
  border-radius: 10px;
  border: 1px solid var(--aes-border);
}
.aes-seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.aes-seller-info {
  flex: 1;
  min-width: 0;
}
.aes-seller-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--aes-text);
  text-decoration: none;
}
.aes-seller-name:hover {
  text-decoration: underline;
}
.aes-seller-since {
  font-size: 12px;
  color: var(--aes-text-light);
  margin-top: 2px;
}
.aes-seller-profile-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--aes-primary);
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.aes-seller-profile-btn:hover {
  background: var(--aes-primary-hover);
  color: #fff;
  text-decoration: none;
}

/* ---------- Interactions single ---------- */
.aes-single-interactions {
  margin-top: 0;
}
.aes-single-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--aes-text-light);
}
.aes-single-interactions .aes-interactions-bar {
  border-radius: 0 0 12px 12px;
}

/* ---------- Annonces reliées ---------- */
.aes-single-related {
  margin-top: 24px;
}
.aes-related-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--aes-text);
  margin: 0 0 14px;
}
.aes-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.aes-related-card {
  display: block;
  background: var(--aes-card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--aes-border);
  text-decoration: none;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.aes-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}
.aes-related-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.aes-related-info {
  padding: 12px;
}
.aes-related-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--aes-text);
  margin: 0 0 6px;
  line-height: 1.3;
}
.aes-related-price {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--aes-green);
  margin-bottom: 2px;
}
.aes-related-loc {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--aes-text-light);
}

/* ---------- Single annonce responsive ---------- */
@media (max-width: 600px) {
  .aes-single-annonce-wrap {
    padding: 0 8px;
    margin: 12px auto;
  }
  .aes-single-content {
    padding: 16px;
  }
  .aes-single-title {
    font-size: 20px;
  }
  .aes-single-price {
    font-size: 17px;
    padding: 6px 12px;
  }
  .aes-single-actions {
    flex-direction: column;
  }
  .aes-single-btn {
    justify-content: center;
    width: 100%;
  }
  .aes-seller-card {
    flex-wrap: wrap;
  }
  .aes-seller-profile-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }
  .aes-related-grid {
    grid-template-columns: 1fr;
  }
  .aes-gallery-main {
    min-height: 200px;
    max-height: 350px;
  }
}

/* ============================================================
   Promoted Annonce Slot (monetization)
   ============================================================ */
.aes-promoted-slot {
  position: relative;
  border: 1px solid var(--aes-border, #e0e0e0);
  border-left: 4px solid #f5a623;
  border-radius: var(--aes-radius, 8px);
  background: linear-gradient(135deg, #fffbe6 0%, #fff 60%);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.aes-promoted-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ================================================================== */
/*  Notification Bell + Panel                                          */
/* ================================================================== */

.aes-notif-bell-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.aes-notif-bell-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aes-notif-bell-btn:hover,
.aes-notif-bell-btn.aes-notif-bell-active {
  background: #f0f0f0;
  color: #1d4ed8;
}

.aes-notif-badge {
  position: absolute;
  top: 0;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  padding: 2px 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: aes-badge-pop 0.3s ease;
}

@keyframes aes-badge-pop {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.aes-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 450px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  overflow: hidden;
  animation: aes-panel-in 0.2s ease;
}

@keyframes aes-panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.aes-notif-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0f0;
}
.aes-notif-panel-header strong {
  font-size: 15px;
  color: #1a1a1a;
}

.aes-notif-mark-all {
  background: none;
  border: none;
  color: #1d4ed8;
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.aes-notif-mark-all:hover {
  background: #eff6ff;
}

.aes-notif-list {
  overflow-y: auto;
  max-height: 380px;
}

.aes-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}
.aes-notif-item:hover {
  background: #fafafa;
}
.aes-notif-item.aes-notif-unread {
  background: #eff6ff;
}
.aes-notif-item.aes-notif-unread:hover {
  background: #dbeafe;
}

.aes-notif-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
}
.aes-notif-icon-comment {
  background: #dbeafe;
  color: #1d4ed8;
}
.aes-notif-icon-report {
  background: #fef3c7;
  color: #d97706;
}
.aes-notif-icon-moderation {
  background: #d1fae5;
  color: #059669;
}
.aes-notif-icon-post {
  background: #ede9fe;
  color: #7c3aed;
}
.aes-notif-icon-threshold {
  background: #fee2e2;
  color: #dc2626;
}
.aes-notif-icon-safe {
  background: #d1fae5;
  color: #059669;
}
.aes-notif-icon-system {
  background: #f0f0f0;
  color: #555;
}

.aes-notif-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.aes-notif-msg {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  word-break: break-word;
}
.aes-notif-unread .aes-notif-msg {
  font-weight: 600;
  color: #1a1a1a;
}

.aes-notif-time {
  font-size: 11px;
  color: #999;
}

.aes-notif-loading,
.aes-notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #999;
  font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
  .aes-notif-panel {
    width: calc(100vw - 24px);
    right: -8px;
    max-height: 70vh;
  }
}

/* ======================================================================
   AES Pay – Section de paiement dans le formulaire d'annonce
   ====================================================================== */
.aes-pay-section {
  margin: 12px 0 4px;
  border: 1px solid #f0a500;
  border-radius: 10px;
  background: #fffaf0;
  padding: 14px 16px;
}
.aes-pay-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 15px;
}
.aes-pay-icon {
  font-size: 20px;
}
.aes-pay-price {
  margin-left: auto;
  font-weight: 700;
  color: #f0a500;
  font-size: 16px;
}
.aes-pay-instructions {
  font-size: 12.5px;
  color: #666;
  margin: 0 0 10px;
  line-height: 1.5;
}
.aes-pay-fields {
  display: flex;
  gap: 10px;
}
.aes-pay-field {
  flex: 1;
}
.aes-pay-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}
.aes-pay-field label .required {
  color: #e74c3c;
}
.aes-pay-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.aes-pay-field input:focus {
  border-color: #f0a500;
  outline: none;
  box-shadow: 0 0 0 2px rgba(240, 165, 0, 0.15);
}
@media (max-width: 480px) {
  .aes-pay-fields {
    flex-direction: column;
    gap: 8px;
  }
}

/* ======================================================================
   Notification — Bouton flottant
   ====================================================================== */
.aes-notif-floating {
  position: fixed;
  z-index: 99998;
}
.aes-notif-floating-bottom-right {
  bottom: 24px;
  right: 24px;
}
.aes-notif-floating-bottom-left {
  bottom: 24px;
  left: 24px;
}
.aes-notif-floating-top-right {
  top: 24px;
  right: 24px;
}
.aes-notif-floating-top-left {
  top: 24px;
  left: 24px;
}

.aes-notif-floating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: #1877f2;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  position: relative;
  transition:
    background 0.2s,
    transform 0.2s;
}
.aes-notif-floating-btn:hover {
  background: #1565c0;
  transform: scale(1.08);
}
.aes-notif-floating-btn:active {
  transform: scale(0.95);
}
.aes-notif-floating-btn .aes-notif-badge {
  top: -2px;
  right: -2px;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
}

/* Panel ancré au bouton flottant */
.aes-notif-floating .aes-notif-floating-panel {
  position: absolute;
  width: 360px;
  max-height: 450px;
}
.aes-notif-floating-bottom-right .aes-notif-floating-panel,
.aes-notif-floating-bottom-left .aes-notif-floating-panel {
  bottom: calc(100% + 12px);
  top: auto;
}
.aes-notif-floating-top-right .aes-notif-floating-panel,
.aes-notif-floating-top-left .aes-notif-floating-panel {
  top: calc(100% + 12px);
  bottom: auto;
}
.aes-notif-floating-bottom-right .aes-notif-floating-panel,
.aes-notif-floating-top-right .aes-notif-floating-panel {
  right: 0;
  left: auto;
}
.aes-notif-floating-bottom-left .aes-notif-floating-panel,
.aes-notif-floating-top-left .aes-notif-floating-panel {
  left: 0;
  right: auto;
}

@media (max-width: 480px) {
  .aes-notif-floating {
    bottom: 16px !important;
    top: auto !important;
  }
  .aes-notif-floating-bottom-right,
  .aes-notif-floating-top-right {
    right: 16px;
  }
  .aes-notif-floating-bottom-left,
  .aes-notif-floating-top-left {
    left: 16px;
  }
  .aes-notif-floating .aes-notif-floating-panel {
    width: calc(100vw - 32px);
    right: auto;
    left: auto;
    bottom: calc(100% + 10px);
    top: auto;
  }
  .aes-notif-floating-bottom-right .aes-notif-floating-panel {
    right: 0;
    left: auto;
    transform: translateX(min(0px, calc(100vw - 100% - 48px)));
  }
  .aes-notif-floating-bottom-left .aes-notif-floating-panel {
    left: 0;
    right: auto;
  }
}

/* ======================================================================
   Notification — Icône menu [aes_notice]
   ====================================================================== */
.aes-notif-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  vertical-align: middle;
  cursor: pointer;
  line-height: 1;
}
.aes-notif-menu-icon .dashicons {
  display: block;
  font-size: 20px;
  width: 20px;
  height: 20px;
  line-height: 1;
}
.aes-notif-menu-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 16px;
  height: 16px;
  padding: 2px 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: aes-badge-pop 0.3s ease;
}
/* Masquer le texte "aes_notice" brut si shortcode pas exécuté */
.menu-item a .aes-notif-menu-icon {
  margin: 0;
}
