/* === Mur des derniers posts d'artisans (accueil) — reprend la carte de l'app === */
.af-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--green);
  background: #E7F4EC; border-radius: 999px; padding: 6px 14px; margin-top: 14px;
}
.af-live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: af-pulse 1.8s ease-out infinite;
}
@keyframes af-pulse {
  0% { box-shadow: 0 0 0 0 rgba(31,122,77,.5); }
  100% { box-shadow: 0 0 0 10px rgba(31,122,77,0); }
}

.af-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
@media (max-width: 960px) { .af-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .af-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

.af-card {
  background: #fff;
  border: 1px solid #F3F1EE;
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: af-in .4s ease both;
}
.af-card[hidden] { display: none; }
@keyframes af-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* En-tête */
.af-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.af-avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  background: var(--orange-soft); color: var(--orange-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.af-avatar img { width: 100%; height: 100%; object-fit: cover; }
.af-info { flex: 1; min-width: 0; }
.af-name {
  display: flex; align-items: center; gap: 4px;
  font-weight: 700; font-size: .95rem; color: var(--ink);
}
.af-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-name svg { flex: 0 0 auto; color: var(--orange); }
.af-sub { font-size: .8rem; color: #757575; margin-top: 2px; }
.af-rating { font-size: .78rem; color: #F5A623; margin-top: 2px; font-weight: 600; }
.af-type {
  flex: 0 0 auto; font-size: .78rem; font-weight: 600;
  padding: 4px 10px; border-radius: 8px; border: 1px solid;
}
.af-type-offer { color: #2E7D32; background: rgba(76,175,80,.1); border-color: rgba(76,175,80,.3); }
.af-type-request { color: #1565C0; background: rgba(33,150,243,.1); border-color: rgba(33,150,243,.3); }

/* Ville + temps */
.af-meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0 16px 10px;
  font-size: .8rem; color: var(--ink-mute);
}
.af-meta > span { display: inline-flex; align-items: center; gap: 4px; }

/* Texte */
.af-text {
  padding: 0 16px 12px; margin: 0;
  font-size: .95rem; line-height: 1.6; color: var(--ink);
  white-space: pre-line; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}

/* Vocal */
.af-audio {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 12px; padding: 10px 12px;
  background: rgba(255,127,36,.05); border: 1px solid rgba(255,127,36,.2); border-radius: 12px;
}
.af-play {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: rgba(255,127,36,.1); border: 1px solid rgba(255,127,36,.3); color: var(--orange);
}
.af-play.is-playing { background: #FFEBEE; border-color: #E57373; color: #E53935; }
.af-audio-body { flex: 1; min-width: 0; }
.af-wave { height: 26px; display: flex; align-items: center; gap: 2px; }
.af-wave span { flex: 1; min-width: 2px; border-radius: 2px; background: #E0E0E0; transition: background .15s; }
.af-wave span.on { background: var(--orange); }
.af-play.is-playing + .af-audio-body .af-wave span.on { background: #E53935; }
.af-audio-meta {
  display: flex; justify-content: space-between; margin-top: 4px;
  font-size: .74rem; color: var(--ink-mute);
}

/* Photos (carrousel swipe) */
.af-media { position: relative; background: var(--cream-deep); }
.af-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.af-track::-webkit-scrollbar { display: none; }
.af-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 3; }
.af-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.af-dots {
  position: absolute; bottom: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 2px; pointer-events: none;
}
.af-dots button {
  pointer-events: auto; cursor: pointer; border: 0; padding: 4px; background: none;
  display: flex; align-items: center;
}
.af-dots button::before {
  content: ""; display: block; width: 7px; height: 7px; border-radius: 4px;
  background: rgba(255,255,255,.6); box-shadow: 0 0 3px rgba(0,0,0,.3); transition: width .2s;
}
.af-dots button.on::before { background: #fff; width: 18px; }
.af-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  opacity: .9; transition: opacity .2s, transform .2s;
}
.af-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.06); }
.af-arrow[hidden] { display: none; }
.af-arrow-l { left: 10px; }
.af-arrow-r { right: 10px; }
@media (hover: hover) {
  .af-arrow { opacity: 0; }
  .af-media:hover .af-arrow { opacity: .95; }
}

/* Pied */
.af-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px 14px;
}
.af-activity {
  --c: #607D8B;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .8rem; font-weight: 600; color: var(--c);
  padding: 5px 10px; border-radius: 10px;
  background: color-mix(in srgb, var(--c) 10%, white);
  border: 1px solid color-mix(in srgb, var(--c) 30%, white);
}
.af-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.af-like { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-mute); font-size: .85rem; }
.af-like:hover { color: #E53935; }
.af-reply {
  display: inline-flex; align-items: center; gap: 6px;
  background: #F44336; color: #fff; font-weight: 600; font-size: .85rem;
  padding: 8px 14px; border-radius: 10px; transition: background .2s;
}
.af-reply:hover { background: #D32F2F; color: #fff; }
[dir="rtl"] .af-reply svg { transform: scaleX(-1); }

.af-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-mute); }
.af-more-wrap { text-align: center; margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.af-more-wrap [hidden] { display: none; }
