/* ============================================================
   Zisima Social — CSS PRINCIPAL
   Mobile-first · Thème sombre · Design premium
   ============================================================ */

:root,
html[data-zsm-theme="dark"] {
  --zsm-bg: #0d0d0d;
  --zsm-bg2: #141414;
  --zsm-bg3: #1c1c1c;
  --zsm-surface: #202020;
  --zsm-border: rgba(255, 255, 255, 0.08);
  --zsm-green: #1b5e20;
  --zsm-green-light: #2e7d32;
  --zsm-green-glow: rgba(27, 94, 32, 0.4);
  --zsm-pink: #c2185b;
  --zsm-pink-light: #e91e63;
  --zsm-pink-glow: rgba(194, 24, 91, 0.45);
  --zsm-white: #f5f5f5;
  --zsm-grey: #9e9e9e;
  --zsm-text: #eeeeee;
  --zsm-text-dim: #bdbdbd;
  --zsm-header-h: 60px;
  --zsm-bottom-h: 58px;
  --zsm-radius: 16px;
  --zsm-radius-sm: 10px;
  --zsm-font: "Roboto", sans-serif;
  --zsm-font-display: "Roboto", sans-serif;
  --zsm-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-zsm-theme="light"] {
  --zsm-bg: #f3f5f7;
  --zsm-bg2: #ffffff;
  --zsm-bg3: #eef2f6;
  --zsm-surface: #f7f9fc;
  --zsm-border: rgba(15, 23, 42, 0.12);
  --zsm-green: #1b5e20;
  --zsm-green-light: #2e7d32;
  --zsm-green-glow: rgba(46, 125, 50, 0.2);
  --zsm-pink: #c2185b;
  --zsm-pink-light: #e91e63;
  --zsm-pink-glow: rgba(194, 24, 91, 0.2);
  --zsm-white: #101418;
  --zsm-grey: #516173;
  --zsm-text: #0f172a;
  --zsm-text-dim: #334155;
}

/* ---- RESET ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: var(--zsm-bg);
  color: var(--zsm-text);
  font-family: var(--zsm-font);
}
a {
  text-decoration: none;
  color: inherit;
}
img,
video {
  max-width: 100%;
  display: block;
}

/* ---- zsm WRAPPER ---- */
.zsm-content {
  padding-top: calc(
    var(--zsm-header-h) + env(safe-area-inset-top, 0px) + 12px
  );
  padding-bottom: calc(
    var(--zsm-bottom-h) + env(safe-area-inset-bottom, 0px) + 20px
  );
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  min-height: 100vh;
}

/* ============================================================
   HEADER
   ============================================================ */
.zsm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Safe area iPhone notch */
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--zsm-header-h) + env(safe-area-inset-top, 0px));
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  z-index: 9999;
  /* Empêche tout thème de passer par-dessus */
  isolation: isolate;
}
html[data-zsm-theme="light"] .zsm-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(15, 23, 42, 0.12);
}

.zsm-logo a {
  display: flex;
  align-items: center;
}
.zsm-logo-svg {
  height: 42px;
  width: auto;
  display: block;
  transition: transform var(--zsm-transition);
}
.zsm-logo a:hover .zsm-logo-svg {
  transform: scale(1.04);
}
/* Garde les anciens spans au cas où */
.zsm-logo__main {
  font-family: var(--zsm-font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--zsm-green-light);
  letter-spacing: -0.5px;
}
.zsm-logo__sub {
  font-family: var(--zsm-font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--zsm-white);
  opacity: 0.85;
}

.zsm-search-wrap {
  flex: 1;
  position: relative;
  max-width: 320px;
}
.zsm-search {
  width: 100%;
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: 50px;
  padding: 8px 36px 8px 14px;
  color: var(--zsm-text);
  font-family: var(--zsm-font);
  font-size: 0.875rem;
  outline: none;
  transition: border var(--zsm-transition);
}
.zsm-search:focus {
  border-color: var(--zsm-green-light);
}
.zsm-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  color: var(--zsm-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.zsm-search-icon svg {
  stroke: var(--zsm-text);
}
.zsm-search::placeholder {
  color: var(--zsm-text-dim);
  opacity: 0.85;
}

.zsm-menu-btn {
  background: none;
  border: none;
  color: var(--zsm-white);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--zsm-radius-sm);
  transition: background var(--zsm-transition);
  flex-shrink: 0;
}
.zsm-menu-btn:hover {
  background: var(--zsm-surface);
}

/* Side Menu */
.zsm-side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 320px);
  background: linear-gradient(
    180deg,
    rgba(9, 11, 18, 0.98) 0%,
    rgba(16, 20, 30, 0.97) 55%,
    rgba(12, 16, 25, 0.98) 100%
  );
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.5);
  z-index: 10020;
  padding: 18px 0 20px;
  transform: translateX(-108%);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition:
    transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.2s ease,
    visibility 0s linear 0.28s;
}
html[data-zsm-theme="light"] .zsm-side-menu {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.99) 0%,
    rgba(247, 249, 252, 0.99) 55%,
    rgba(238, 242, 246, 0.99) 100%
  );
  border-right: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.18);
  color: var(--zsm-text);
}
html[data-zsm-theme="light"] .zsm-side-menu ul li a {
  color: var(--zsm-text);
}
html[data-zsm-theme="light"] .zsm-side-menu ul li a:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--zsm-pink);
}
html[data-zsm-theme="light"] .zsm-side-menu__divider {
  border-color: rgba(15, 23, 42, 0.1);
}
html[data-zsm-theme="light"] .zsm-menu-close {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  color: var(--zsm-text);
}
.zsm-side-menu.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.2s ease,
    visibility 0s linear 0s;
}
.zsm-menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.zsm-menu-close:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: rotate(90deg);
}
.zsm-side-menu__profile {
  width: calc(100% - 22px);
  margin: 12px 11px 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--zsm-white);
  text-align: left;
  transition:
    transform 0.2s,
    border-color 0.2s,
    background 0.2s;
  opacity: 0;
  filter: blur(3px);
  transform: translateX(-8px);
}
.zsm-side-menu__profile:hover {
  transform: translateY(-1px) translateX(0);
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
}
.zsm-side-menu__profile-avatar-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}
.zsm-side-menu__profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.zsm-side-menu__profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.zsm-side-menu__profile-title {
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.zsm-side-menu__profile-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zsm-side-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.zsm-side-menu__logo {
  padding: 10px 16px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.zsm-side-menu__auth {
  margin-top: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.zsm-side-menu__divider {
  height: 0;
  padding: 0;
  margin: 0;
}
.zsm-side-menu ul li a {
  display: block;
  margin: 2px 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 12px;
  opacity: 1 !important;
  filter: none !important;
  transform: none;
  transition:
    transform 0.18s,
    border-color 0.2s,
    background 0.2s;
}
.zsm-side-menu ul li a:hover {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}
.zsm-side-menu.open .zsm-side-menu__profile {
  transition:
    opacity 0.24s ease 0.1s,
    transform 0.28s ease 0.1s,
    filter 0.24s ease 0.1s,
    border-color 0.2s,
    background 0.2s;
}
.zsm-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 10, 0.58);
  backdrop-filter: blur(5px);
  z-index: 10010;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    visibility 0s linear 0.24s;
}
.zsm-menu-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.24s ease,
    visibility 0s linear 0s;
}

body.zsm-menu-open {
  overflow: hidden;
  touch-action: none;
}

@media (prefers-reduced-motion: reduce) {
  .zsm-side-menu,
  .zsm-menu-overlay,
  .zsm-side-menu__profile,
  .zsm-side-menu ul li a,
  .zsm-menu-close {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }
}

/* ============================================================
   BOTTOM BAR
   ============================================================ */
.zsm-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: var(--zsm-bottom-h);
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px 8px;
  z-index: 1000;
}

.zsm-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2px 10px;
  border-radius: var(--zsm-radius-sm);
  transition: all var(--zsm-transition);
  color: rgba(255, 255, 255, 0.72);
  flex: 1;
  max-width: 70px;
}
.zsm-nav-item:hover,
.zsm-nav-item.active {
  color: #fff;
}
.zsm-nav-item.active .zsm-nav-icon {
  transform: none;
  filter: none;
}
.zsm-nav-icon {
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: filter var(--zsm-transition);
}
.zsm-nav-icon svg,
.zsm-plus__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.zsm-nav-icon img,
.zsm-nav-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.zsm-plus__icon img,
.zsm-plus__icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
.zsm-nav-label {
  display: none;
}

/* Bouton PLUS central */
.zsm-plus {
  background: transparent !important;
  color: inherit !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  margin-top: -8px !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3) !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 0 !important;
  max-width: 44px !important;
  flex: 0 0 44px !important;
  transition: box-shadow var(--zsm-transition), filter var(--zsm-transition) !important;
}
html[data-zsm-theme="light"] .zsm-plus {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16) !important;
}
.zsm-plus:hover {
  transform: none !important;
  filter: none !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35) !important;
}
.zsm-plus:active {
  transform: none !important;
}
.zsm-plus__icon {
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  color: currentColor;
  text-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zsm-plus__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  filter: none;
}
html[data-zsm-theme="dark"] .zsm-plus {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

/* ============================================================
   FEED CARDS
   ============================================================ */
.zsm-feed {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zsm-card {
  background: var(--zsm-bg2);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius);
  overflow: hidden;
  transition:
    transform var(--zsm-transition),
    box-shadow var(--zsm-transition);
  animation: zsm-slide-in 0.4s ease both;
}
.zsm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

@keyframes zsm-slide-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zsm-card__media {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--zsm-bg3);
  cursor: pointer;
}
.zsm-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.zsm-card:hover .zsm-card__media img {
  transform: scale(1.04);
}

.zsm-card__video-thumb {
  position: relative;
  width: 100%;
  height: 100%;
}
.zsm-card__video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.zsm-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  font-size: 2.5rem;
  color: white;
  transition: background var(--zsm-transition);
}
.zsm-play-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* ============================================================
   REEL VIDÉO (style TikTok) dans le feed principal
   ============================================================ */
.zsm-card__media--video-reel {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16; /* Portrait vertical TikTok */
  max-height: 85vh; /* Ne jamais dépasser l'écran */
  background: #000;
  overflow: hidden;
  cursor: pointer;
}
.zsm-reel-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Couvre tout, comme TikTok */
  display: block;
}
/* Bouton play/pause flottant */
.zsm-reel-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  color: white;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    transform 0.2s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zsm-card__media--video-reel:hover .zsm-reel-play-btn,
.zsm-card__media--video-reel.paused .zsm-reel-play-btn {
  opacity: 1;
}
.zsm-reel-play-btn:active {
  transform: translate(-50%, -50%) scale(0.9);
}
/* Bouton mute */
.zsm-reel-mute-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border: none;
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.zsm-reel-mute-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}
/* Overlay dégradé bas comme TikTok */
.zsm-card__media--video-reel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.65) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.zsm-card__body {
  padding: 14px 14px 8px;
}
.zsm-card__title {
  font-family: var(--zsm-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--zsm-white);
  margin-bottom: 6px;
  line-height: 1.3;
}
.zsm-card__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.zsm-meta-item {
  font-size: 0.8rem;
  color: var(--zsm-grey);
  display: flex;
  align-items: center;
  gap: 3px;
}
.zsm-meta-item--price {
  color: var(--zsm-green-light);
  font-weight: 600;
}
.zsm-card__excerpt {
  font-size: 0.82rem;
  color: var(--zsm-text-dim);
  line-height: 1.5;
  font-style: italic;
}

/* Actions */
.zsm-card__actions {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px 10px;
  border-top: 1px solid var(--zsm-border);
  margin-top: 4px;
}
.zsm-action-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--zsm-surface);
  border: none;
  color: var(--zsm-grey);
  padding: 4px 8px;
  border-radius: 50px;
  font-size: 0.68rem;
  cursor: pointer;
  font-family: var(--zsm-font);
  transition: all var(--zsm-transition);
  position: relative;
}
.zsm-action-btn:hover {
  background: var(--zsm-bg3);
  color: var(--zsm-white);
}
.zsm-action-btn.liked {
  color: var(--zsm-pink);
}
.zsm-action-btn.liked:hover {
  background: rgba(194, 24, 91, 0.15);
}
.btn-icon {
  font-size: 0.8rem;
}
.zsm-wa-btn:hover {
  color: #25d366;
  background: rgba(37, 211, 102, 0.1);
}

/* Rating Stars Popup — handled by plugin CSS */
.zsm-rating-btn {
  cursor: pointer;
}

/* Load More */
.zsm-load-more-wrap {
  text-align: center;
  padding: 24px 0 8px;
}
.zsm-btn-load-more {
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  color: var(--zsm-text);
  padding: 12px 32px;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--zsm-font);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--zsm-transition);
}
.zsm-btn-load-more:hover {
  background: var(--zsm-green);
  border-color: var(--zsm-green);
  color: white;
}

/* Empty */
.zsm-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--zsm-grey);
}
.zsm-empty span {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}
.zsm-btn-primary {
  display: inline-block;
  margin-top: 16px;
  background: var(--zsm-pink);
  color: white;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-family: var(--zsm-font);
  transition: all var(--zsm-transition);
}
.zsm-btn-primary:hover {
  background: var(--zsm-pink-light);
  transform: translateY(-2px);
}

/* ============================================================
   VIDEO FEED (style TikTok)
   ============================================================ */
.zsm-video-feed {
  /* Plein écran entre header et bottom bar */
  position: fixed;
  top: var(--zsm-header-h);
  left: 0;
  right: 0;
  bottom: var(--zsm-bottom-h);
  overflow-y: scroll;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #000;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zsm-video-feed::-webkit-scrollbar {
  display: none;
}

/* Quand la section vidéo est active, on masque le scroll du body */
body.zsm-video-active {
  overflow: hidden;
}

.zsm-video-item {
  position: relative;
  /* Chaque item = hauteur plein écran disponible */
  width: 100%;
  height: calc(
    100vh - var(--zsm-header-h) - var(--zsm-bottom-h) - 6px
  );
  min-height: 300px;
  flex-shrink: 0;
  scroll-snap-align: start;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.zsm-video-player,
.zsm-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Couvre tout l'écran comme TikTok */
}

.zsm-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.75) 0%,
    transparent 50%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 16px;
}
.zsm-video-info {
  flex: 1;
  padding-right: 16px;
}
.zsm-video-info h3 {
  font-family: var(--zsm-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
}
.zsm-video-info p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2px;
}
.zsm-video-excerpt {
  font-style: italic;
  opacity: 0.7;
}

.zsm-video-actions {
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow-y: auto;
  scrollbar-width: none;
}
.zsm-vid-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-family: var(--zsm-font);
  font-size: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: transform var(--zsm-transition);
}
.zsm-vid-action span:first-child {
  font-size: 0.9rem;
}
.zsm-vid-action:hover {
  transform: scale(1.15);
}
.zsm-vid-action.liked span:first-child {
  filter: drop-shadow(0 0 6px var(--zsm-pink));
}

.zsm-video-play-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: none;
  color: white;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--zsm-transition);
}
.zsm-video-item:hover .zsm-video-play-toggle {
  opacity: 1;
}

/* ============================================================
   PHOTO GRID (2 colonnes)
   ============================================================ */
.zsm-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

.zsm-photo-item {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--zsm-radius-sm);
  cursor: pointer;
  background: var(--zsm-bg3);
}
.zsm-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.zsm-photo-item:hover img {
  transform: scale(1.06);
}
.zsm-photo-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.85) 0%,
    transparent 100%
  );
  padding: 30px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translateY(4px);
  transition: transform var(--zsm-transition);
}
.zsm-photo-item:hover .zsm-photo-info {
  transform: translateY(0);
}
.zsm-photo-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.zsm-photo-loc,
.zsm-photo-price {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}
.zsm-photo-price {
  color: var(--zsm-green-light);
  font-weight: 600;
}
.zsm-photo-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
  opacity: 0;
  transition: opacity var(--zsm-transition);
}
.zsm-photo-item:hover .zsm-photo-zoom {
  opacity: 1;
}

/* ============================================================
   PUBLICATION PAGE
   ============================================================ */
.zsm-publish-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 12px 24px;
}
.zsm-publish-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--zsm-border);
  margin-bottom: 20px;
}
.zsm-back-btn {
  background: var(--zsm-surface);
  border: none;
  color: var(--zsm-white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--zsm-transition);
  font-family: var(--zsm-font);
}
.zsm-back-btn:hover {
  background: var(--zsm-green);
}
.zsm-publish-header h2 {
  font-family: var(--zsm-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--zsm-white);
}

.zsm-publish-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zsm-form-card {
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius);
  padding: 16px;
  transition: border-color var(--zsm-transition);
}
.zsm-form-card:focus-within {
  border-color: var(--zsm-green-light);
}

.zsm-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--zsm-text-dim);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.zsm-label-icon {
  font-size: 1rem;
}

.zsm-input,
.zsm-textarea {
  width: 100%;
  background: var(--zsm-bg3);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius-sm);
  padding: 12px 14px;
  color: var(--zsm-text);
  font-family: var(--zsm-font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--zsm-transition);
}
.zsm-input:focus,
.zsm-textarea:focus {
  border-color: var(--zsm-green-light);
}
.zsm-input::placeholder,
.zsm-textarea::placeholder {
  color: var(--zsm-grey);
}
.zsm-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Media Upload — le <label> déclenche nativement l'input */
.zsm-media-upload-card {
  cursor: pointer;
  border-style: dashed;
  border-width: 2px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all var(--zsm-transition);
  font-weight: normal;
  width: 100%;
  margin-bottom: 0;
  -webkit-user-select: none;
  user-select: none;
}
.zsm-media-upload-card:hover,
.zsm-media-upload-card:focus-within {
  border-color: var(--zsm-green-light);
  background: rgba(46, 125, 50, 0.05);
}
.zsm-media-upload-card.drag-over {
  border-color: var(--zsm-pink);
  background: rgba(194, 24, 91, 0.08);
}

.zsm-media-placeholder {
  text-align: center;
  color: var(--zsm-grey);
  pointer-events: none;
}
.zsm-upload-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}
.zsm-media-placeholder p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--zsm-text-dim);
  margin-bottom: 4px;
}
.zsm-upload-hint {
  font-size: 0.75rem;
}

.zsm-media-preview {
  width: 100%;
  height: 200px;
  position: relative;
}
.zsm-media-preview img,
.zsm-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.zsm-remove-media {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Type Selector */
.zsm-type-selector {
  display: flex;
  gap: 10px;
}
.zsm-type-opt {
  flex: 1;
  cursor: pointer;
}
.zsm-type-opt input {
  display: none;
}
.zsm-type-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--zsm-radius-sm);
  background: var(--zsm-bg3);
  border: 2px solid var(--zsm-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--zsm-text-dim);
  transition: all var(--zsm-transition);
}
.zsm-type-opt input:checked + span {
  border-color: var(--zsm-green-light);
  color: var(--zsm-green-light);
  background: rgba(46, 125, 50, 0.1);
}

/* Publish Button */
.zsm-btn-publish {
  width: 100%;
  padding: 16px;
  background: linear-gradient(
    135deg,
    var(--zsm-pink),
    var(--zsm-pink-light)
  );
  border: none;
  border-radius: var(--zsm-radius);
  color: white;
  font-family: var(--zsm-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--zsm-pink-glow);
  transition: all var(--zsm-transition);
  margin-top: 8px;
}
.zsm-btn-publish:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px var(--zsm-pink-glow);
}
.zsm-btn-publish:active {
  transform: translateY(0);
}
.zsm-btn-publish:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Publish Msg */
#zsm-publish-msg {
  padding: 10px 14px;
  border-radius: var(--zsm-radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  display: none;
}
#zsm-publish-msg.success {
  background: rgba(46, 125, 50, 0.15);
  color: #66bb6a;
  border: 1px solid rgba(46, 125, 50, 0.3);
  display: block;
}
#zsm-publish-msg.error {
  background: rgba(194, 24, 91, 0.15);
  color: #f48fb1;
  border: 1px solid rgba(194, 24, 91, 0.3);
  display: block;
}

/* ============================================================
   PAYWALL
   ============================================================ */
.zsm-paywall {
  padding: 20px 12px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zsm-paywall__inner {
  max-width: 480px;
  width: 100%;
  text-align: center;
}
.zsm-paywall__icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}
.zsm-paywall__title {
  font-family: var(--zsm-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--zsm-white);
  margin-bottom: 10px;
}
.zsm-paywall__desc {
  color: var(--zsm-text-dim);
  margin-bottom: 28px;
}

.zsm-paywall__plans {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}
.zsm-paywall__plan {
  flex: 1;
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  position: relative;
  transition: all var(--zsm-transition);
}
.zsm-paywall__plan.featured {
  border-color: var(--zsm-pink);
  box-shadow: 0 0 20px var(--zsm-pink-glow);
}
.plan-badge {
  position: absolute;
  top: -10px;
  background: var(--zsm-pink);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.plan-duration {
  font-size: 0.85rem;
  color: var(--zsm-text-dim);
  font-weight: 600;
}
.plan-price {
  font-family: var(--zsm-font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--zsm-white);
}
.plan-btn {
  display: block;
  width: 100%;
  background: var(--zsm-green);
  color: white;
  padding: 10px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.88rem;
  text-align: center;
  transition: all var(--zsm-transition);
}
.plan-btn:hover {
  background: var(--zsm-green-light);
  transform: translateY(-1px);
}
.zsm-paywall__plan.featured .plan-btn {
  background: var(--zsm-pink);
}
.zsm-paywall__plan.featured .plan-btn:hover {
  background: var(--zsm-pink-light);
}

.zsm-paywall__license-form {
  text-align: center;
}
.zsm-paywall__license-form p {
  color: var(--zsm-text-dim);
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.zsm-license-input-row {
  display: flex;
  gap: 8px;
}
#zsm-license-key {
  flex: 1;
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: 50px;
  padding: 10px 16px;
  color: var(--zsm-text);
  font-family: var(--zsm-font);
  font-size: 0.88rem;
  outline: none;
}
#zsm-license-key:focus {
  border-color: var(--zsm-green-light);
}
.zsm-btn-activate {
  background: var(--zsm-green);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  font-family: var(--zsm-font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--zsm-transition);
}
.zsm-btn-activate:hover {
  background: var(--zsm-green-light);
}
#zsm-license-msg {
  margin-top: 10px;
  font-size: 0.85rem;
  min-height: 20px;
}

/* ============================================================
   SHOP PAGE
   ============================================================ */
.zsm-shop-page {
  padding: 20px 12px;
  max-width: 560px;
  margin: 0 auto;
}
.zsm-shop-header {
  text-align: center;
  margin-bottom: 28px;
}
.zsm-shop-header h2 {
  font-family: var(--zsm-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--zsm-white);
  margin-bottom: 6px;
}
.zsm-shop-header p {
  color: var(--zsm-text-dim);
}
.zsm-plans-grid {
  display: flex;
  gap: 14px;
  margin-bottom: 32px;
}
.zsm-plan-card {
  flex: 1;
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  position: relative;
  transition: all var(--zsm-transition);
}
.zsm-plan-card.featured {
  border-color: var(--zsm-pink);
  box-shadow: 0 0 28px var(--zsm-pink-glow);
}
.zsm-plan-badge {
  position: absolute;
  top: -12px;
  background: var(--zsm-pink);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.zsm-plan-icon {
  font-size: 2.2rem;
}
.zsm-plan-card h3 {
  font-family: var(--zsm-font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--zsm-white);
}
.zsm-plan-price {
  font-family: var(--zsm-font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--zsm-white);
}
.zsm-plan-price span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--zsm-text-dim);
}
.zsm-plan-features {
  list-style: none;
  width: 100%;
}
.zsm-plan-features li {
  font-size: 0.8rem;
  color: var(--zsm-text-dim);
  padding: 4px 0;
}
.zsm-plan-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--zsm-green);
  color: white;
  padding: 12px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--zsm-transition);
}
.zsm-plan-btn:hover {
  background: var(--zsm-green-light);
  transform: translateY(-2px);
}
.zsm-plan-btn--featured {
  background: var(--zsm-pink);
}
.zsm-plan-btn--featured:hover {
  background: var(--zsm-pink-light);
}

.zsm-shop-license-form {
  text-align: center;
}
.zsm-shop-license-form h3 {
  font-family: var(--zsm-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--zsm-white);
  margin-bottom: 14px;
}

/* ============================================================
   PUBLIC PAGE
   ============================================================ */
.zsm-public-page {
  padding: 20px 12px;
  max-width: 640px;
  margin: 0 auto;
}
.zsm-public-hero {
  text-align: center;
  padding: 28px 0;
}
.zsm-public-hero h2 {
  font-family: var(--zsm-font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--zsm-white);
  margin-bottom: 8px;
}
.zsm-public-hero p {
  color: var(--zsm-text-dim);
}
.zsm-public-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.zsm-info-card {
  background: var(--zsm-surface);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius);
  padding: 20px;
}
.zsm-info-card h3 {
  font-family: var(--zsm-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--zsm-white);
  margin-bottom: 10px;
}
.zsm-info-card p,
.zsm-info-card li {
  color: var(--zsm-text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}
.zsm-info-card ol {
  padding-left: 20px;
}
.zsm-info-card a {
  color: var(--zsm-green-light);
  text-decoration: underline;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.zsm-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.zsm-lightbox.open {
  display: flex;
}
.zsm-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}
.zsm-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: zsm-zoom-in 0.25s ease;
}
@keyframes zsm-zoom-in {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.zsm-lightbox__inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--zsm-radius);
}
.zsm-lightbox__close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background var(--zsm-transition);
}
.zsm-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   SMALL SCREENS — Header spacing fix
   ============================================================ */
@media (max-width: 399px) {
  .zsm-header {
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .zsm-search-wrap {
    flex: 0 0 auto;
    margin-right: auto;
    max-width: none;
    position: relative;
  }
  .zsm-search-wrap .zsm-search {
    display: none;
  }
  .zsm-search-wrap .zsm-search-icon {
    display: none;
  }
  .zsm-search-toggle {
    display: flex;
    position: relative;
    z-index: 10002;
  }
  .zsm-search-wrap.zsm-search--expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--zsm-header-h) + env(safe-area-inset-top, 0px));
    z-index: 10060;
    max-width: none;
    margin-right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    display: flex;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) 10px 0;
    gap: 8px;
  }
  html[data-zsm-theme="light"] .zsm-search-wrap.zsm-search--expanded {
    background: rgba(255, 255, 255, 0.98);
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search {
    display: block;
    flex: 1;
    min-width: 0;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-icon {
    display: inline-flex;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-toggle svg {
    display: none;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-toggle::after {
    content: "✕";
    font-size: 1.1rem;
  }
  .zsm-logo-svg {
    height: 30px;
  }
}

@media (max-width: 768px) {
  .zsm-search-wrap {
    flex: 0 0 auto;
    max-width: none;
    margin-right: auto;
    position: relative;
  }
  .zsm-search-wrap .zsm-search,
  .zsm-search-wrap .zsm-search-icon {
    display: none;
  }
  .zsm-search-toggle {
    display: flex !important;
    position: relative;
    z-index: 10002;
  }
  .zsm-search-wrap.zsm-search--expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--zsm-header-h) + env(safe-area-inset-top, 0px));
    z-index: 10060;
    max-width: none;
    margin-right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    display: flex;
    align-items: center;
    padding: env(safe-area-inset-top, 0px) 10px 0;
    gap: 8px;
  }
  html[data-zsm-theme="light"] .zsm-search-wrap.zsm-search--expanded {
    background: rgba(255, 255, 255, 0.98);
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search {
    display: block;
    flex: 1;
    min-width: 0;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-icon {
    display: inline-flex;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-toggle svg {
    display: none;
  }
  .zsm-search-wrap.zsm-search--expanded .zsm-search-toggle::after {
    content: "✕";
    font-size: 1.1rem;
  }
}

@media (max-width: 360px) {
  .zsm-header {
    gap: 4px;
    padding-left: 6px;
    padding-right: 6px;
  }
  .zsm-logo-svg {
    height: 26px;
  }
}

/* ============================================================
   DESKTOP (tablette+)
   ============================================================ */
@media (min-width: 600px) {
  .zsm-feed {
    max-width: 520px;
    margin: 0 auto;
  }
  .zsm-photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .zsm-bottom {
    max-width: 600px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--zsm-radius) var(--zsm-radius) 0 0;
  }
  .zsm-header {
    justify-content: center;
    gap: 20px;
  }
  .zsm-search-wrap {
    max-width: 400px;
  }
}

@media (min-width: 960px) {
  .zsm-photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .zsm-content {
    padding-top: calc(var(--zsm-header-h) + 24px);
  }
}

/* ============================================================
   ANIMATIONS UTILITAIRES
   ============================================================ */
.zsm-bounce {
  animation: zsm-bounce 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97)
    both;
}
@keyframes zsm-bounce {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.85);
  }
  60% {
    transform: scale(1.2);
  }
}

.zsm-pulse {
  animation: zsm-pulse 0.5s ease;
}
@keyframes zsm-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--zsm-pink-glow);
  }
  100% {
    box-shadow: 0 0 0 16px transparent;
  }
}

/* ============================================================
   LOGO ADMIN ÉDITABLE
   ============================================================ */
.zsm-logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.zsm-logo-text {
  font-family: var(--zsm-font-display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--zsm-green-light);
  letter-spacing: -0.5px;
}
.zsm-logo-svg {
  height: 44px;
  width: auto;
  display: block;
}

/* ============================================================
   CARD — NOUVEAU FORMAT FACEBOOK-STYLE
   ============================================================ */
.zsm-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
  cursor: pointer;
}
.zsm-card__author:hover .zsm-card__author-name {
  color: var(--zsm-green-light);
}
.zsm-card__author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--zsm-green);
  flex-shrink: 0;
}
.zsm-card__author-info {
  flex: 1;
}
.zsm-card__author-name {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--zsm-white);
  transition: color var(--zsm-transition);
}
.zsm-card__author-date {
  font-size: 0.72rem;
  color: var(--zsm-grey);
}

/* Compteurs style Facebook */
.zsm-card__counters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 14px 6px;
  font-size: 0.75rem;
  color: var(--zsm-grey);
  border-bottom: 1px solid var(--zsm-border);
}

/* Bouton WhatsApp avec SVG */
.zsm-wa-btn {
  color: #25d366 !important;
  display: flex;
  align-items: center;
  gap: 5px;
}
.zsm-wa-btn:hover {
  background: rgba(37, 211, 102, 0.12) !important;
}
.zsm-wa-btn svg {
  flex-shrink: 0;
}

/* ============================================================
   MODALS (Profile + Comments)
   ============================================================ */
.zsm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  align-items: flex-end;
  justify-content: center;
}
.zsm-modal.open {
  display: flex;
}
.zsm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}
.zsm-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--zsm-bg2);
  border-radius: var(--zsm-radius) var(--zsm-radius) 0 0;
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  animation: zsm-slide-up 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 92vh;
}
@keyframes zsm-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.zsm-modal__panel--profile {
  max-height: 92vh;
}
.zsm-modal__panel--comments {
  max-height: 80vh;
}

.zsm-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--zsm-border);
  flex-shrink: 0;
}
.zsm-modal__title {
  font-family: var(--zsm-font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--zsm-white);
  flex: 1;
}
.zsm-modal__back {
  background: none;
  border: none;
  color: var(--zsm-text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color var(--zsm-transition);
}
.zsm-modal__back:hover {
  color: var(--zsm-white);
}
.zsm-modal__close {
  background: var(--zsm-surface);
  border: none;
  color: var(--zsm-white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zsm-modal__body {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--zsm-surface) transparent;
}
.zsm-modal__footer {
  padding: 12px 14px;
  border-top: 1px solid var(--zsm-border);
  flex-shrink: 0;
}

/* ============================================================
   PROFIL (style Facebook)
   ============================================================ */
.zsm-profile__cover {
  height: 120px;
  background: linear-gradient(
    135deg,
    var(--zsm-green) 0%,
    var(--zsm-pink) 100%
  );
  flex-shrink: 0;
}
.zsm-profile__top {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
  border-bottom: 1px solid var(--zsm-border);
}
.zsm-profile__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--zsm-bg2);
  object-fit: cover;
  margin-top: -40px;
  flex-shrink: 0;
}
.zsm-profile__info {
  flex: 1;
  padding-top: 6px;
  min-width: 180px;
}
.zsm-profile__name {
  font-family: var(--zsm-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--zsm-white);
  margin-bottom: 4px;
}
.zsm-profile__loc {
  font-size: 0.82rem;
  color: var(--zsm-grey);
  margin-bottom: 4px;
}
.zsm-profile__bio {
  font-size: 0.85rem;
  color: var(--zsm-text-dim);
  margin-bottom: 8px;
  line-height: 1.5;
}
.zsm-profile__stats {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
}
.zsm-profile__stats span {
  font-size: 0.82rem;
  color: var(--zsm-text-dim);
}
.zsm-profile__stats strong {
  color: var(--zsm-white);
  font-weight: 700;
}
.zsm-profile__wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: white;
  padding: 9px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--zsm-transition);
}
.zsm-profile__wa-btn:hover {
  background: #20b858;
  transform: translateY(-1px);
}
.zsm-profile__divider {
  padding: 14px 16px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--zsm-grey);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--zsm-border);
}
.zsm-profile__annonces {
  padding: 0 8px;
}
.zsm-profile__annonces .zsm-card {
  margin: 12px 0;
}

/* ============================================================
   COMMENTAIRES MODAL
   ============================================================ */
.zsm-comments-list-wrap {
  padding: 12px;
}
.zsm-comment {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  animation: zsm-slide-in 0.25s ease;
}
.zsm-comment__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.zsm-comment__body {
  background: var(--zsm-surface);
  border-radius: 0 var(--zsm-radius-sm) var(--zsm-radius-sm)
    var(--zsm-radius-sm);
  padding: 8px 12px;
  flex: 1;
}
.zsm-comment__author {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--zsm-white);
  margin-bottom: 2px;
}
.zsm-comment__text {
  font-size: 0.88rem;
  color: var(--zsm-text-dim);
  line-height: 1.4;
}
.zsm-comment__time {
  font-size: 0.7rem;
  color: var(--zsm-grey);
  margin-top: 4px;
  display: block;
}
.zsm-no-comments {
  text-align: center;
  color: var(--zsm-grey);
  padding: 24px;
}

/* Formulaire commentaire modal */
.zsm-comment-form-modal .zsm-comment-author-modal {
  width: 100%;
  background: var(--zsm-bg3);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius-sm);
  padding: 8px 12px;
  color: var(--zsm-text);
  font-family: var(--zsm-font);
  font-size: 0.85rem;
  outline: none;
  margin-bottom: 8px;
}
.zsm-comment-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.zsm-comment-input-modal,
.zsm-comment-input {
  flex: 1;
  background: var(--zsm-bg3);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius-sm);
  padding: 10px 12px;
  color: var(--zsm-text);
  font-family: var(--zsm-font);
  font-size: 0.88rem;
  resize: none;
  outline: none;
}
.zsm-comment-input-modal:focus,
.zsm-comment-input:focus {
  border-color: var(--zsm-green-light);
}
.zsm-comment-submit-modal,
.zsm-comment-submit {
  background: var(--zsm-green);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--zsm-transition);
}
.zsm-comment-submit-modal:hover,
.zsm-comment-submit:hover {
  background: var(--zsm-green-light);
}

/* Loading spinner */
.zsm-loading {
  text-align: center;
  padding: 40px;
  color: var(--zsm-grey);
  font-size: 1rem;
}

/* ============================================================
   ADMIN LOGO SETTINGS (extra styles)
   ============================================================ */
.zsm-logo-preview-wrap {
  margin-top: 10px;
  padding: 12px;
  background: #1a1a2e;
  border-radius: 8px;
  display: inline-block;
}

/* ============================================================
   REEL VIDÉO style TikTok — Feed principal
   ============================================================ */
.zsm-card__media--video-reel {
  position: relative;
  width: 100%;
  /* Format portrait 9:16 comme TikTok / Reels */
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  border-radius: 0; /* flush avec la carte */
}

.zsm-reel-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* remplit tout l'espace, comme TikTok */
  display: block;
  background: #000;
}

/* Overlay dégradé bas (titre lisible sur la vidéo) */
.zsm-card__media--video-reel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.72) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Bouton play/pause centré */
.zsm-reel-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  color: white;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 1.7rem;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.22s ease,
    transform 0.15s ease;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Visible au hover ou quand en pause */
.zsm-card__media--video-reel:hover .zsm-reel-play-btn,
.zsm-card__media--video-reel.paused .zsm-reel-play-btn {
  opacity: 1;
}
.zsm-reel-play-btn:active {
  transform: translate(-50%, -50%) scale(0.88);
}

/* Bouton mute coin bas-droit */
.zsm-reel-mute-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.zsm-reel-mute-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ============================================================
   VIDEO FEED dédié — plein écran scroll-snap (page /zsm-videos/)
   ============================================================ */

/* Body bloqué quand on est sur la page vidéo */
body.zsm-video-active {
  overflow: hidden;
}

/* Conteneur plein écran entre header et bottom bar */
.zsm-content > .zsm-video-feed,
.zsm-video-feed {
  position: fixed !important;
  top: var(--zsm-header-h, 64px);
  left: 0;
  right: 0;
  bottom: var(--zsm-bottom-h, 72px);
  overflow-y: scroll;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #000;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zsm-video-feed::-webkit-scrollbar {
  display: none;
}

/* Chaque vidéo = une page entière */
.zsm-video-item {
  position: relative;
  width: 100%;
  height: calc(
    100vh - var(--zsm-header-h, 64px) - var(--zsm-bottom-h, 72px) -
      6px
  );
  min-height: 300px;
  flex-shrink: 0;
  scroll-snap-align: start;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

/* Vidéo remplit tout l'écran comme TikTok */
.zsm-video-item .zsm-video-player,
.zsm-video-item .zsm-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay actions en bas */
.zsm-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.78) 0%,
    transparent 55%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 28px 18px;
  z-index: 2;
}

/* Bouton play central sur la page vidéo */
.zsm-video-play-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zsm-video-item:hover .zsm-video-play-toggle,
.zsm-video-item.paused .zsm-video-play-toggle {
  opacity: 1;
}

/* ============================================================
   Responsive — sur desktop, centrer le reel (max 480px)
   ============================================================ */
@media (min-width: 600px) {
  .zsm-card__media--video-reel {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
  }
}

/* ============================================================
   APP NATIVE — body & html quand template zsm actif
   ============================================================ */
body.zsm-app-body {
  background: #0d0d0d !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Désactive le bounce scroll iOS au niveau du body */
  overscroll-behavior: none;
}

/* Neutraliser 100% des éléments du thème actif */
body.zsm-app-body #wpadminbar,
body.zsm-app-body #masthead,
body.zsm-app-body #colophon,
body.zsm-app-body .site-header,
body.zsm-app-body .site-footer,
body.zsm-app-body header.site-header,
body.zsm-app-body footer.site-footer,
body.zsm-app-body .wp-block-template-part[class*="header"],
body.zsm-app-body .wp-block-template-part[class*="footer"],
body.zsm-app-body .ast-above-header-wrap,
body.zsm-app-body .ast-header-wrap,
body.zsm-app-body .main-header-bar,
body.zsm-app-body .footer-widget-area,
body.zsm-app-body nav.site-navigation,
body.zsm-app-body .entry-header,
body.zsm-app-body .entry-footer,
body.zsm-app-body .post-navigation,
body.zsm-app-body .comments-area,
body.zsm-app-body #page > header,
body.zsm-app-body #page > footer {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Reset marges thème sur le conteneur principal */
body.zsm-app-body #page,
body.zsm-app-body #content,
body.zsm-app-body .site,
body.zsm-app-body main,
body.zsm-app-body .wp-site-blocks {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Selection text style app */
body.zsm-app-body ::selection {
  background: var(--zsm-pink);
  color: white;
}

/* Scrollbar invisible sur desktop */
body.zsm-app-body ::-webkit-scrollbar {
  width: 0;
  background: transparent;
}
body.zsm-app-body {
  scrollbar-width: none;
}

/* ── HEADER hauteur dynamique safe-area ── */
.zsm-app-body .zsm-content {
  padding-top: calc(
    var(--zsm-header-h) + env(safe-area-inset-top, 0px) + 8px
  );
  padding-bottom: calc(
    var(--zsm-bottom-h) + env(safe-area-inset-bottom, 0px) + 8px
  );
}

/* ── BOTTOM BAR hauteur dynamique safe-area ── */
.zsm-app-body .zsm-bottom {
  height: calc(
    var(--zsm-bottom-h) + env(safe-area-inset-bottom, 0px)
  );
  z-index: 9999;
}

/* ── Icône PWA / Standalone mode ── */
@media (display-mode: standalone) {
  .zsm-header {
    padding-top: max(20px, env(safe-area-inset-top));
    height: calc(
      var(--zsm-header-h) + max(20px, env(safe-area-inset-top))
    );
  }
  .zsm-bottom {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    height: calc(
      var(--zsm-bottom-h) + max(16px, env(safe-area-inset-bottom))
    );
  }
}

/* ============================================================
   SINGLE PAGE — Override reel-player pour affichage normal
   ============================================================ */
.zsm-single__media .zsm-reel-player {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}


/* ============================================================
   MARKETPLACE FEED — Override (ZSM-Media plugin)
   Annonces en grille 2 colonnes (style Facebook Marketplace).
   Les divertissements, carousels et group posts conservent leur
   layout d'origine en pleine largeur.
   ============================================================ */

/* Grille 2 colonnes pour le feed */
#zsm-feed.zsm-feed,
.zsm-feed {
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row dense;
  gap: 8px;
  align-items: start;
  flex-direction: initial; /* override flex column */
}
/* Tout sauf les cartes annonces marketplace s'étend sur 2 colonnes */
.zsm-feed > *:not(.zsm-card--annonce) {
  grid-column: 1 / -1;
}

/* === Carte marketplace (annonce uniquement) === */
.zsm-card.zsm-card--mkt,
.zsm-feed > .zsm-card--annonce {
  position: relative;
  background: var(--zsm-bg2);
  border: 1px solid var(--zsm-border);
  border-radius: var(--zsm-radius-sm);
  overflow: visible;
  display: flex;
  flex-direction: column;
  margin: 0;
  top: 0;
  transform: none;
  animation: zsm-slide-in 0.4s ease both;
  z-index: 1;
}
.zsm-card--mkt:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Média marketplace : ratio 3:4, image qui couvre */
.zsm-card--mkt .zsm-card__media-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.zsm-card--mkt .zsm-card__media,
.zsm-card--mkt .zsm-card__media--video-reel {
  position: relative;
  width: 100%;
  max-width: 100%;      /* neutralise max-width:480px from @media(min-width:600px) */
  margin: 0;            /* neutralise margin:auto from @media(min-width:600px) */
  aspect-ratio: 1/1;
  max-height: none;
  background: #111;
  overflow: hidden;
  border-radius: var(--zsm-radius-sm) var(--zsm-radius-sm) 0 0;
  cursor: pointer;
}
.zsm-card--mkt .zsm-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.zsm-card--mkt:hover .zsm-card__media img {
  transform: scale(1.04);
}
.zsm-card--mkt .zsm-reel-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Pas d'overlay sombre sur les images marketplace, léger sur vidéo */
.zsm-card--mkt .zsm-card__media::after {
  content: none;
}
.zsm-card--mkt .zsm-card__media--video-reel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(0deg, rgba(0,0,0,.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.zsm-card--mkt .zsm-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zsm-bg3);
}
.zsm-card--mkt .zsm-card__no-img {
  font-size: 2rem;
  opacity: .4;
}
/* Cacher boutons reel TikTok dans cartes marketplace */
.zsm-card--mkt .zsm-reel-play-btn,
.zsm-card--mkt .zsm-reel-mute-btn {
  display: none;
}

/* Menu contextuel (⋮) en haut à droite sur chaque annonce marketplace */
.zsm-card--mkt .zsm-ctx {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 60;
}
.zsm-card--mkt .zsm-ctx__btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.zsm-card--mkt .zsm-ctx__menu {
  z-index: 80;
  right: 0;
  top: 32px;
}

/* Page principale: n'afficher que Like + Chat + WhatsApp */
.zsm-feed--main .zsm-card--mkt .zsm-rating-btn,
.zsm-feed--main .zsm-card--mkt .zsm-comment-btn,
.zsm-feed--main .zsm-card--mkt .zsm-share-btn {
  display: none;
}
.zsm-feed--main .zsm-card--mkt .zsm-card__actions-bar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 6px 8px;
}

/* Body marketplace : prix + titre + meta + auteur */
.zsm-card--mkt .zsm-card__body {
  padding: 8px 10px 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 112px;
}
.zsm-card--mkt .zsm-card__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--zsm-pink-light);
  line-height: 1.2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}
.zsm-card--mkt .zsm-card__title {
  font-family: var(--zsm-font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--zsm-text);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.zsm-card--mkt .zsm-card__title a {
  color: inherit;
  text-decoration: none;
}
.zsm-card--mkt .zsm-card__title a:hover {
  color: var(--zsm-pink-light);
}
.zsm-card--mkt .zsm-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0;
  overflow: hidden;
}
.zsm-card--mkt .zsm-card__cat {
  order: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ee7b2;
  background: rgba(46, 125, 50, 0.18);
  border: 1px solid rgba(46, 125, 50, 0.45);
  border-radius: 999px;
  padding: 3px 8px;
  max-width: 62%;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zsm-card--mkt .zsm-card__loc {
  order: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #9fd8ff;
  background: rgba(21, 101, 192, 0.2);
  border: 1px solid rgba(21, 101, 192, 0.46);
  border-radius: 999px;
  padding: 3px 8px;
  max-width: 62%;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zsm-card--mkt .zsm-card__views {
  order: 4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #c9d3df;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px 7px;
  white-space: nowrap;
  margin-left: auto;
}

/* Auteur compact en bas du body */
.zsm-card--mkt .zsm-card__author-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
}
.zsm-card--mkt .zsm-card__author-line .zsm-card__author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--zsm-pink);
  flex-shrink: 0;
}
.zsm-card--mkt .zsm-card__author-line .zsm-card__author-info {
  flex: 1;
  min-width: 0;
}
.zsm-card--mkt .zsm-card__author-line .zsm-card__author-name {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--zsm-white);
}
.zsm-card--mkt .zsm-card__author-line .zsm-card__author-name-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zsm-card--mkt .zsm-card__author-line .zsm-verified-badge {
  flex-shrink: 0;
}
.zsm-card--mkt .zsm-card__author-line .zsm-card__author-date {
  display: block;
  font-size: 0.62rem;
  color: var(--zsm-grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Barre d'actions horizontale en bas */
.zsm-card--mkt .zsm-card__actions-bar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: 0;
  padding: 5px 6px;
  border-top: 1px solid var(--zsm-border);
  background: var(--zsm-bg);
  border-radius: 0 0 var(--zsm-radius-sm) var(--zsm-radius-sm);
  flex-shrink: 0;
}
.zsm-card--mkt .zsm-mkt-action {
  display: grid;
  grid-template-rows: 18px 10px;
  align-items: center;
  justify-items: center;
  row-gap: 1px;
  line-height: 1;
  background: none;
  border: none;
  color: var(--zsm-text);
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: none;
  transition: transform var(--zsm-transition), color var(--zsm-transition);
  width: 100%;
  min-width: 0;
}
.zsm-card--mkt .zsm-mkt-action:hover {
  transform: scale(1.15);
  color: var(--zsm-pink-light);
}
.zsm-card--mkt .zsm-mkt-icon {
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  grid-row: 1;
}
.zsm-card--mkt .zsm-mkt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--zsm-grey);
  min-height: 10px;
  grid-row: 2;
}
.zsm-card--mkt .zsm-like-btn .zsm-mkt-icon {
  transform: translateY(1px);
}
.zsm-card--mkt .zsm-share-btn::after,
.zsm-card--mkt .zsm-chat-btn::after,
.zsm-card--mkt .zsm-mkt-wa::after {
  content: "";
  display: block;
  width: 1px;
  height: 10px;
  grid-row: 2;
}
.zsm-card--mkt .zsm-mkt-action.liked .zsm-mkt-icon {
  color: var(--zsm-pink-light);
  filter: none;
  text-shadow: 0 0 5px rgba(255, 45, 117, 0.45);
}
.zsm-card--mkt .zsm-mkt-action.zsm-mkt-wa .zsm-mkt-icon {
  color: #fff;
}
.zsm-card--mkt .zsm-mkt-action.zsm-mkt-wa .zsm-mkt-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Stars popup ratings (marketplace) */
.zsm-card--mkt .zsm-rating-btn {
  position: relative;
}
.zsm-card--mkt .zsm-stars-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 8px;
  border-radius: 16px;
  gap: 4px;
  z-index: 12;
  white-space: nowrap;
  margin-bottom: 6px;
}
.zsm-card--mkt .zsm-rating-btn--open .zsm-stars-popup,
.zsm-card--mkt .zsm-rating-btn:focus-within .zsm-stars-popup {
  display: flex;
}
.zsm-card--mkt .zsm-star {
  font-size: 0.95rem;
  color: #888;
  cursor: pointer;
  transition: color .15s;
}
.zsm-card--mkt .zsm-star--active,
.zsm-card--mkt .zsm-star:hover {
  color: #ffd54f;
}

/* Badges */
.zsm-card--mkt .zsm-ad-badge,
.zsm-card--mkt .zsm-sponsored-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-weight: 600;
}
.zsm-card--mkt .zsm-sponsored-badge {
  background: var(--zsm-pink);
}
.zsm-card--mkt .zsm-badge-periode,
.zsm-card--mkt .zsm-badge-offre {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.zsm-card--mkt .zsm-badge-offre {
  order: 2;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 2px;
  background: #ff6d00;
  color: #fff;
  text-shadow: none;
}

/* Espacement vertical des injections groupes dans la grille */
.zsm-feed > .zsm-card--group-post {
  margin-top: 2px !important;
  margin-bottom: 8px !important;
}
.zsm-feed > .zsm-groups-carousel {
  margin: 10px 0 8px !important;
}
.zsm-card--mkt .zsm-badge-periode {
  background: transparent;
  color: #00e5ff;
  font-size: 0.78rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Reset les styles desktop qui contraignaient le feed à 480px */
@media (min-width: 768px) {
  .zsm-feed {
    max-width: none;
    margin: 0 auto;
  }
}

/* Mobile fine-tuning */
@media (max-width: 480px) {
  .zsm-feed {
    padding: 4px;
    gap: 6px;
  }
  .zsm-card--mkt .zsm-card__author-line {
    gap: 5px;
  }
  .zsm-card--mkt .zsm-card__author-line .zsm-card__author-avatar {
    width: 20px;
    height: 20px;
  }
  .zsm-card--mkt .zsm-card__author-line .zsm-card__author-name {
    font-size: 0.68rem;
    gap: 3px;
  }
  .zsm-card--mkt .zsm-card__author-line .zsm-verified-badge svg {
    width: 14px;
    height: 14px;
  }
  .zsm-card--mkt .zsm-card__author-line .zsm-card__author-date {
    font-size: 0.58rem;
  }
  .zsm-card--mkt .zsm-ctx {
    top: 6px;
    right: 6px;
  }
  .zsm-card--mkt .zsm-ctx__btn {
    width: 26px;
    height: 26px;
    font-size: 18px;
    padding: 0;
  }
  .zsm-card--mkt .zsm-card__title {
    font-size: 0.78rem;
  }
  .zsm-card--mkt .zsm-card__price {
    font-size: 0.85rem;
  }
  .zsm-card--mkt .zsm-mkt-icon {
    font-size: 0.95rem;
  }
  .zsm-card--mkt .zsm-mkt-count {
    font-size: 0.55rem;
  }
}