/* ==========================================================================
   Meyazon — Section "Stories de vendeurs"
   Toutes les classes/id préfixées par "mttz".
   CSS protégé contre le thème Electro : reset local + spécificité élevée
   via le wrapper #mttz-stories-app (et #mttz-portal-root pour les overlays).
   ========================================================================== */

/* ---- Reset local (protège contre Electro sans polluer le reste du site) ---- */
#mttz-stories-app,
#mttz-stories-app *,
#mttz-stories-app *::before,
#mttz-stories-app *::after,
#mttz-portal-root,
#mttz-portal-root *,
#mttz-portal-root *::before,
#mttz-portal-root *::after {
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  list-style: none;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: normal;
  text-transform: none;
  float: none;
  box-shadow: none;
  font-family: inherit;
}

#mttz-stories-app,
#mttz-portal-root {
  --mttz-primary: #0749C4;
  --mttz-primary-dark: #063a9c;
  --mttz-primary-light: #eaf1ff;
  --mttz-text-muted: #64748b;
  --mttz-card-radius: 16px;
  --mttz-font: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--mttz-font) !important;
}

#mttz-stories-app {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto !important;
  padding: 24px 8px 40px !important;
  color: #0f172a;
  line-height: 1.4 !important;
  text-align: left !important;
  position: relative;
  z-index: 1;
}

#mttz-stories-app img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ------------------------------- Header --------------------------------- */
#mttz-stories-app .mttz-stories-header {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
  gap: 16px;
  margin-bottom: 22px !important;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

#mttz-stories-app .mttz-stories-title {
  font-size: 34px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  color: var(--mttz-primary) !important;
  margin: 0 0 6px !important;
  letter-spacing: -0.5px !important;
}

#mttz-stories-app .mttz-stories-subtitle {
  font-size: 15px !important;
  color: var(--mttz-text-muted) !important;
  font-weight: 400 !important;
  margin: 0 !important;
}

/* Bouton "Voir plus de stories" — radius 5px, pas de lueur, hover = bordure bleue + fond blanc */
#mttz-stories-app .mttz-stories-more-btn {
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  gap: 10px;
  background: var(--mttz-primary) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 13px 24px !important;
  border-radius: 5px !important;
  border: 2px solid var(--mttz-primary) !important;
  cursor: pointer;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
  box-shadow: none !important;
  white-space: nowrap;
}

#mttz-stories-app .mttz-stories-more-btn:hover {
  background: #fff !important;
  color: var(--mttz-primary) !important;
  border: 2px solid var(--mttz-primary) !important;
  box-shadow: none !important;
  -webkit-transform: none;
  transform: none;
}

#mttz-stories-app .mttz-stories-more-btn svg {
  width: 18px;
  height: 18px;
}

/* --------------------------- Carousel viewport --------------------------- */
#mttz-stories-app .mttz-stories-viewport {
  position: relative;
}

#mttz-stories-app .mttz-stories-track {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 6px 4px 14px !important;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
#mttz-stories-app .mttz-stories-track::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

/* Chaque cellule : largeur = 1/N colonnes (piloté par --mttz-cols) */
#mttz-stories-app .mttz-cell {
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  width: calc((100% - (var(--mttz-cols, 7) - 1) * var(--mttz-gap, 16px)) / var(--mttz-cols, 7));
  scroll-snap-align: start;
}

/* Carte "Créer" toujours visible en 1ère position (sticky) chez le vendeur */
#mttz-stories-app .mttz-create-cell {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 6;
  scroll-snap-align: start;
}
/* léger fond pour que les cartes défilantes ne transparaissent pas dessous */
#mttz-stories-app .mttz-create-cell::before {
  content: "";
  position: absolute;
  inset: -6px -8px -14px -8px;
  background: linear-gradient(90deg,
      #ffffff 0%, #ffffff 72%, rgba(255, 255, 255, 0) 100%);
  z-index: -1;
}

/* ---------------------------- Créer card -------------------------------- */
#mttz-stories-app .mttz-create-card {
  width: 100%;
  height: 380px;
  border: 1.5px dashed #c9d6ef !important;
  border-radius: var(--mttz-card-radius) !important;
  background: #fff !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  padding: 16px !important;
  -webkit-transition: border-color 0.25s ease;
  transition: border-color 0.25s ease;
  cursor: pointer;
}
#mttz-stories-app .mttz-create-card:hover {
  border-color: var(--mttz-primary) !important;
}

#mttz-stories-app .mttz-create-badge {
  background: var(--mttz-primary-light) !important;
  color: var(--mttz-primary) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  align-self: center;
}

#mttz-stories-app .mttz-create-center {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  gap: 12px;
  text-align: center;
}

#mttz-stories-app .mttz-create-icon {
  width: 66px;
  height: 66px;
  border-radius: 50% !important;
  background: var(--mttz-primary-light) !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  color: var(--mttz-primary) !important;
  -webkit-transition: transform 0.25s ease;
  transition: transform 0.25s ease;
}
#mttz-stories-app .mttz-create-card:hover .mttz-create-icon {
  -webkit-transform: scale(1.06);
  transform: scale(1.06);
}
#mttz-stories-app .mttz-create-icon svg {
  width: 28px;
  height: 28px;
}

#mttz-stories-app .mttz-create-title {
  color: var(--mttz-primary) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}
#mttz-stories-app .mttz-create-hint {
  color: var(--mttz-text-muted) !important;
  font-size: 12.5px !important;
}
#mttz-stories-app .mttz-create-quota {
  color: #b45309 !important;
  background: #fff7ed !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  text-align: center;
  line-height: 1.3 !important;
}

/* ---------------------------- Story card -------------------------------- */
#mttz-stories-app .mttz-story-card {
  width: 100%;
  height: 380px;
  border-radius: var(--mttz-card-radius) !important;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12) !important;
  -webkit-transition: transform 0.3s ease, box-shadow 0.3s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#mttz-stories-app .mttz-story-card:hover {
  -webkit-transform: translateY(-6px);
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22) !important;
}

#mttz-stories-app .mttz-story-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
  -webkit-transition: transform 0.5s ease;
  transition: transform 0.5s ease;
}
#mttz-stories-app .mttz-story-card:hover .mttz-story-img {
  -webkit-transform: scale(1.07);
  transform: scale(1.07);
}

#mttz-stories-app .mttz-story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.12) 28%,
      rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.62) 100%);
}

#mttz-stories-app .mttz-story-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start !important;
  gap: 9px;
}

#mttz-stories-app .mttz-story-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
  border: 2px solid var(--mttz-primary) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6) !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

#mttz-stories-app .mttz-story-meta {
  min-width: 0;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  padding-top: 2px;
}
#mttz-stories-app .mttz-story-name {
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
#mttz-stories-app .mttz-story-time {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

#mttz-stories-app .mttz-story-count {
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 3px;
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 7px !important;
  border-radius: 8px !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
#mttz-stories-app .mttz-story-count svg {
  width: 13px;
  height: 13px;
}

#mttz-stories-app .mttz-story-remaining {
  position: absolute;
  top: 60px;
  left: 12px;
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 5px;
  background: rgba(0, 0, 0, 0.5) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
#mttz-stories-app .mttz-story-remaining svg {
  width: 13px;
  height: 13px;
}

#mttz-stories-app .mttz-story-bottom {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
}
#mttz-stories-app .mttz-story-stat {
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 5px;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
#mttz-stories-app .mttz-story-stat svg {
  width: 15px;
  height: 15px;
}
#mttz-stories-app .mttz-story-stat.mttz-like svg {
  color: #ff5a7a;
}

/* ------------------------- Arrows navigation ---------------------------- */
#mttz-stories-app .mttz-nav-btn {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  background: #fff !important;
  color: var(--mttz-primary) !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2) !important;
  z-index: 5;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-stories-app .mttz-nav-btn:hover {
  background: var(--mttz-primary) !important;
  color: #fff !important;
}
#mttz-stories-app .mttz-nav-btn svg {
  width: 20px;
  height: 20px;
}
#mttz-stories-app .mttz-nav-prev {
  left: -14px;
}
#mttz-stories-app .mttz-nav-next {
  right: -14px;
}

/* ------------------------------ Dots ------------------------------------ */
#mttz-stories-app .mttz-stories-dots {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 8px;
  margin-top: 18px !important;
}
#mttz-stories-app .mttz-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px !important;
  background: #c9d6ef !important;
  cursor: pointer;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
  padding: 0 !important;
}
#mttz-stories-app .mttz-dot.mttz-dot-active {
  width: 26px;
  background: var(--mttz-primary) !important;
}

/* ======================================================================== */
/*                          PORTAL : Modale + Viewer                        */
/* ======================================================================== */
#mttz-portal-root {
  position: relative;
  z-index: 999999;
}

#mttz-portal-root .mttz-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(8, 15, 40, 0.72) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  padding: 20px !important;
  z-index: 999999 !important;
  -webkit-animation: mttz-fade 0.25s ease;
  animation: mttz-fade 0.25s ease;
}
@-webkit-keyframes mttz-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mttz-fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------- Modale create -------------------------- */
#mttz-portal-root .mttz-modal {
  background: #fff !important;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border-radius: 18px !important;
  overflow: hidden;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4) !important;
  -webkit-animation: mttz-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  animation: mttz-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@-webkit-keyframes mttz-pop { from { -webkit-transform: scale(0.92); opacity: 0; } to { -webkit-transform: scale(1); opacity: 1; } }
@keyframes mttz-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#mttz-portal-root .mttz-modal-head {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
  padding: 18px 22px !important;
  border-bottom: 1px solid #eef2f8 !important;
}
#mttz-portal-root .mttz-modal-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}
#mttz-portal-root .mttz-modal-sub {
  font-size: 13px !important;
  color: var(--mttz-text-muted) !important;
  margin-top: 2px !important;
}
#mttz-portal-root .mttz-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  cursor: pointer;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}
#mttz-portal-root .mttz-icon-btn:hover { background: #e2e8f0 !important; }
#mttz-portal-root .mttz-icon-btn svg { width: 20px; height: 20px; }

#mttz-portal-root .mttz-modal-body {
  padding: 20px 22px !important;
  overflow-y: auto;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

/* Dropzone */
#mttz-portal-root .mttz-dropzone {
  border: 2px dashed #c9d6ef !important;
  border-radius: 14px !important;
  padding: 34px 20px !important;
  text-align: center;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  background: #f8faff !important;
}
#mttz-portal-root .mttz-dropzone.mttz-drag-over {
  border-color: var(--mttz-primary) !important;
  background: var(--mttz-primary-light) !important;
}
#mttz-portal-root .mttz-dropzone-icon {
  width: 58px;
  height: 58px;
  border-radius: 50% !important;
  background: var(--mttz-primary-light) !important;
  color: var(--mttz-primary) !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  margin: 0 auto 12px !important;
}
#mttz-portal-root .mttz-dropzone-icon svg { width: 26px; height: 26px; }
#mttz-portal-root .mttz-dropzone-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}
#mttz-portal-root .mttz-dropzone-hint {
  font-size: 12.5px !important;
  color: var(--mttz-text-muted) !important;
  margin-top: 4px !important;
}
#mttz-portal-root .mttz-dropzone-browse {
  color: var(--mttz-primary) !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
}

/* Compteur / quota */
#mttz-portal-root .mttz-quota-bar {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
  margin: 16px 0 10px !important;
  font-size: 13px !important;
}
#mttz-portal-root .mttz-quota-count { font-weight: 600 !important; color: #0f172a !important; }
#mttz-portal-root .mttz-quota-full { color: #b45309 !important; font-weight: 600 !important; }

/* Grille des photos réorganisables */
#mttz-portal-root .mttz-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
#mttz-portal-root .mttz-photo-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px !important;
  overflow: hidden;
  border: 2px solid transparent !important;
  cursor: grab;
  -webkit-transition: border-color 0.2s, transform 0.15s;
  transition: border-color 0.2s, transform 0.15s;
}
#mttz-portal-root .mttz-photo-item:active { cursor: grabbing; }
#mttz-portal-root .mttz-photo-item.mttz-dragging {
  opacity: 0.4;
  border-color: var(--mttz-primary) !important;
}
#mttz-portal-root .mttz-photo-item.mttz-drop-target {
  border-color: var(--mttz-primary) !important;
  -webkit-transform: scale(1.04);
  transform: scale(1.04);
}
#mttz-portal-root .mttz-photo-item img {
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
}
#mttz-portal-root .mttz-photo-index {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 22px;
  border-radius: 6px !important;
  background: var(--mttz-primary) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
}
#mttz-portal-root .mttz-photo-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  gap: 4px;
}
#mttz-portal-root .mttz-photo-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.6) !important;
  color: #fff !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  cursor: pointer;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}
#mttz-portal-root .mttz-photo-btn:hover { background: rgba(0, 0, 0, 0.85) !important; }
#mttz-portal-root .mttz-photo-btn.mttz-del:hover { background: #dc2626 !important; }
#mttz-portal-root .mttz-photo-btn svg { width: 13px; height: 13px; }
#mttz-portal-root .mttz-photo-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Footer modale */
#mttz-portal-root .mttz-modal-foot {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: end;
  -ms-flex-pack: end;
  justify-content: flex-end !important;
  gap: 12px;
  padding: 16px 22px !important;
  border-top: 1px solid #eef2f8 !important;
}
#mttz-portal-root .mttz-btn {
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 12px 22px !important;
  border-radius: 5px !important;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  border: 2px solid transparent !important;
}
#mttz-portal-root .mttz-btn-ghost {
  background: #fff !important;
  color: #475569 !important;
  border: 2px solid #e2e8f0 !important;
}
#mttz-portal-root .mttz-btn-ghost:hover { background: #f1f5f9 !important; }
#mttz-portal-root .mttz-btn-primary {
  background: var(--mttz-primary) !important;
  color: #fff !important;
  border: 2px solid var(--mttz-primary) !important;
}
#mttz-portal-root .mttz-btn-primary:hover:not(:disabled) {
  background: #fff !important;
  color: var(--mttz-primary) !important;
}
#mttz-portal-root .mttz-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------- Viewer --------------------------------- */
#mttz-portal-root .mttz-viewer {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 88vh;
  max-height: 820px;
  border-radius: 18px !important;
  overflow: hidden;
  background: #000 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
  -webkit-animation: mttz-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  animation: mttz-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
#mttz-portal-root .mttz-viewer-img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
}
#mttz-portal-root .mttz-viewer-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 22%,
      rgba(0,0,0,0) 62%, rgba(0,0,0,0.75) 100%);
}

/* Barres de progression */
#mttz-portal-root .mttz-progress-row {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  gap: 5px;
  z-index: 4;
}
#mttz-portal-root .mttz-progress {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  height: 3px;
  border-radius: 3px !important;
  background: rgba(255, 255, 255, 0.4) !important;
  overflow: hidden;
}
#mttz-portal-root .mttz-progress-fill {
  height: 100%;
  width: 0%;
  background: #fff !important;
  border-radius: 3px !important;
}
#mttz-portal-root .mttz-progress-fill.mttz-done { width: 100%; }
#mttz-portal-root .mttz-progress-fill.mttz-active {
  -webkit-animation: mttz-fill 4s linear forwards;
  animation: mttz-fill 4s linear forwards;
}
@-webkit-keyframes mttz-fill { from { width: 0%; } to { width: 100%; } }
@keyframes mttz-fill { from { width: 0%; } to { width: 100%; } }

/* Header viewer */
#mttz-portal-root .mttz-viewer-head {
  position: absolute;
  top: 24px;
  left: 12px;
  right: 12px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 10px;
  z-index: 4;
}
#mttz-portal-root .mttz-viewer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
  border: 2px solid #fff !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
#mttz-portal-root .mttz-viewer-shop { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; min-width: 0; }
#mttz-portal-root .mttz-viewer-name {
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mttz-portal-root .mttz-viewer-time {
  color: rgba(255,255,255,0.85) !important;
  font-size: 11.5px !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
#mttz-portal-root .mttz-follow-btn {
  background: var(--mttz-primary) !important;
  color: #fff !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 7px 14px !important;
  border-radius: 5px !important;
  cursor: pointer;
  border: 2px solid var(--mttz-primary) !important;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 5px;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
#mttz-portal-root .mttz-follow-btn:hover { background: var(--mttz-primary-dark) !important; border-color: var(--mttz-primary-dark) !important; }
#mttz-portal-root .mttz-follow-btn.mttz-following { background: #fff !important; color: var(--mttz-primary) !important; }
#mttz-portal-root .mttz-follow-btn svg { width: 14px; height: 14px; }
#mttz-portal-root .mttz-viewer-close {
  width: 34px; height: 34px;
  border-radius: 50% !important;
  background: rgba(0,0,0,0.4) !important;
  color: #fff !important;
  cursor: pointer;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
#mttz-portal-root .mttz-viewer-close:hover { background: rgba(0,0,0,0.7) !important; }
#mttz-portal-root .mttz-viewer-close svg { width: 18px; height: 18px; }

/* Zones de tap navigation */
#mttz-portal-root .mttz-viewer-tap {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32%;
  z-index: 3;
  cursor: pointer;
}
#mttz-portal-root .mttz-tap-left { left: 0; }
#mttz-portal-root .mttz-tap-right { right: 0; }

/* Flèches viewer */
#mttz-portal-root .mttz-viewer-arrow {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.9) !important;
  color: var(--mttz-primary) !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  cursor: pointer;
  z-index: 5;
  -webkit-transition: background 0.2s;
  transition: background 0.2s;
}
#mttz-portal-root .mttz-viewer-arrow:hover { background: #fff !important; }
#mttz-portal-root .mttz-viewer-arrow svg { width: 20px; height: 20px; }
#mttz-portal-root .mttz-va-left { left: 10px; }
#mttz-portal-root .mttz-va-right { right: 10px; }

/* Footer viewer : stats + voir boutique */
#mttz-portal-root .mttz-viewer-foot {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 16px;
  z-index: 4;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  gap: 12px;
}
#mttz-portal-root .mttz-viewer-stats {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 18px;
}
#mttz-portal-root .mttz-viewer-stat {
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 6px;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
  cursor: pointer;
}
#mttz-portal-root .mttz-viewer-stat svg { width: 18px; height: 18px; }
#mttz-portal-root .mttz-viewer-stat.mttz-liked svg { color: #ff5a7a; }
#mttz-portal-root .mttz-shop-btn {
  width: 100%;
  background: #fff !important;
  color: var(--mttz-primary) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  padding: 13px !important;
  border-radius: 5px !important;
  cursor: pointer;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  gap: 8px;
  border: 2px solid #fff !important;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-portal-root .mttz-shop-btn:hover { background: var(--mttz-primary) !important; color: #fff !important; }
#mttz-portal-root .mttz-shop-btn svg { width: 17px; height: 17px; }

/* Toast */
#mttz-portal-root .mttz-toast {
  position: fixed !important;
  bottom: 26px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  background: #0f172a !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 13px 22px !important;
  border-radius: 10px !important;
  z-index: 9999999 !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 9px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35) !important;
  -webkit-animation: mttz-toast-in 0.3s ease;
  animation: mttz-toast-in 0.3s ease;
}
#mttz-portal-root .mttz-toast svg { width: 18px; height: 18px; color: #4ade80; }
@-webkit-keyframes mttz-toast-in { from { -webkit-transform: translate(-50%, 20px); opacity: 0; } to { -webkit-transform: translate(-50%, 0); opacity: 1; } }
@keyframes mttz-toast-in { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* -------- Topbar : rôle + cloche -------- */
#mttz-stories-app .mttz-topbar {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
  gap: 12px;
  margin-bottom: 18px !important;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}

/* -------- Note démo (aperçu) -------- */
#mttz-stories-app .mttz-demo-note {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 12px;
  margin-bottom: 18px !important;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
}
#mttz-stories-app .mttz-demo-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #94a3b8 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

/* -------- Role switch (démo) -------- */
#mttz-stories-app .mttz-role-switch {
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 4px;
  background: #eef2f8 !important;
  padding: 4px !important;
  border-radius: 8px !important;
}

/* -------- Cloche de notifications -------- */
#mttz-stories-app .mttz-bell-wrap {
  position: relative;
}
#mttz-stories-app .mttz-bell-btn {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--mttz-primary) !important;
  border: 2px solid #e2e8f0 !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-stories-app .mttz-bell-btn:hover {
  border-color: var(--mttz-primary) !important;
  background: var(--mttz-primary-light) !important;
}
#mttz-stories-app .mttz-bell-btn svg { width: 22px; height: 22px; }
#mttz-stories-app .mttz-bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  border: 2px solid #fff !important;
  -webkit-animation: mttz-pulse 1.6s ease infinite;
  animation: mttz-pulse 1.6s ease infinite;
}
@-webkit-keyframes mttz-pulse { 0%,100% { -webkit-transform: scale(1); } 50% { -webkit-transform: scale(1.15); } }
@keyframes mttz-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* Panneau des notifications */
#mttz-stories-app .mttz-notif-panel {
  position: absolute;
  top: 56px;
  right: 0;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: #fff !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid #eef2f8 !important;
  z-index: 50;
  overflow: hidden;
  -webkit-animation: mttz-drop 0.2s ease;
  animation: mttz-drop 0.2s ease;
}
@-webkit-keyframes mttz-drop { from { opacity: 0; -webkit-transform: translateY(-8px); } to { opacity: 1; -webkit-transform: translateY(0); } }
@keyframes mttz-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

#mttz-stories-app .mttz-notif-head {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid #eef2f8 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}
#mttz-stories-app .mttz-notif-close {
  width: 30px; height: 30px;
  border-radius: 8px !important;
  background: #f1f5f9 !important;
  color: #475569 !important;
  cursor: pointer;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
}
#mttz-stories-app .mttz-notif-close:hover { background: #e2e8f0 !important; }
#mttz-stories-app .mttz-notif-close svg { width: 16px; height: 16px; }

#mttz-stories-app .mttz-notif-list {
  max-height: 380px;
  overflow-y: auto;
}
#mttz-stories-app .mttz-notif-empty {
  padding: 34px 20px !important;
  text-align: center;
  color: var(--mttz-text-muted) !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 8px;
}
#mttz-stories-app .mttz-notif-empty svg { width: 34px; height: 34px; color: #c9d6ef; }
#mttz-stories-app .mttz-notif-empty span { font-size: 14px !important; font-weight: 600 !important; color: #475569 !important; }
#mttz-stories-app .mttz-notif-empty small { font-size: 12px !important; max-width: 220px; }

#mttz-stories-app .mttz-notif-item {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start !important;
  gap: 12px;
  padding: 12px 16px !important;
  border-bottom: 1px solid #f4f7fb !important;
  -webkit-transition: background 0.15s;
  transition: background 0.15s;
}
#mttz-stories-app .mttz-notif-item:hover { background: #f8faff !important; }
#mttz-stories-app .mttz-notif-avatar-wrap {
  position: relative;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}
#mttz-stories-app .mttz-notif-avatar {
  width: 42px; height: 42px;
  border-radius: 50% !important;
  -o-object-fit: cover;
  object-fit: cover !important;
}
#mttz-stories-app .mttz-notif-icon {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 20px; height: 20px;
  border-radius: 50% !important;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  border: 2px solid #fff !important;
  color: #fff !important;
}
#mttz-stories-app .mttz-notif-icon svg { width: 11px; height: 11px; }
#mttz-stories-app .mttz-ni-view { background: #0ea5e9 !important; }
#mttz-stories-app .mttz-ni-like { background: #ff5a7a !important; }
#mttz-stories-app .mttz-ni-like svg { color: #fff; }
#mttz-stories-app .mttz-ni-follow { background: var(--mttz-primary) !important; }
#mttz-stories-app .mttz-ni-newstory { background: #f59e0b !important; }
#mttz-stories-app .mttz-notif-body { min-width: 0; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; }
#mttz-stories-app .mttz-notif-text {
  font-size: 13.5px !important;
  color: #1e293b !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}
#mttz-stories-app .mttz-notif-time {
  font-size: 11.5px !important;
  color: var(--mttz-text-muted) !important;
  margin-top: 3px !important;
}
#mttz-stories-app .mttz-role-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  cursor: pointer;
  color: #475569 !important;
  background: transparent !important;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-stories-app .mttz-role-btn.mttz-role-active {
  background: var(--mttz-primary) !important;
  color: #fff !important;
}

/* ---------------------------- Responsive -------------------------------- */
@media (max-width: 1100px) {
  #mttz-stories-app { --mttz-cols: 4; }
}
@media (max-width: 760px) {
  /* 3 cartes visibles sur mobile/tablette */
  #mttz-stories-app { --mttz-cols: 3; --mttz-gap: 12px; }
  #mttz-stories-app .mttz-stories-track { gap: 12px; }
  #mttz-portal-root .mttz-photo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  #mttz-stories-app .mttz-stories-title { font-size: 26px !important; }
  /* boutons de navigation conservés sur mobile */
  #mttz-stories-app .mttz-nav-btn {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    width: 38px;
    height: 38px;
  }
  #mttz-stories-app .mttz-nav-prev { left: -6px; }
  #mttz-stories-app .mttz-nav-next { right: -6px; }
  #mttz-stories-app .mttz-stories-more-btn { width: 100% !important; }
  #mttz-stories-app .mttz-stories-header {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch !important;
  }
  #mttz-stories-app .mttz-topbar {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch !important;
  }
  #mttz-stories-app .mttz-role-switch { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center !important; }
  #mttz-stories-app .mttz-bell-wrap { align-self: flex-end; }
  #mttz-stories-app .mttz-create-card,
  #mttz-stories-app .mttz-story-card { height: 300px; }
}
@media (max-width: 420px) {
  /* toujours 3 cartes sur petit mobile */
  #mttz-stories-app { --mttz-cols: 3; --mttz-gap: 10px; }
  #mttz-stories-app .mttz-stories-track { gap: 10px; }
  #mttz-stories-app .mttz-story-name { font-size: 11px !important; }
  #mttz-stories-app .mttz-story-time { font-size: 10px !important; }
  #mttz-stories-app .mttz-story-avatar { width: 32px; height: 32px; }
  #mttz-stories-app .mttz-story-remaining { font-size: 9.5px !important; top: 50px; padding: 3px 7px !important; }
  #mttz-stories-app .mttz-create-card,
  #mttz-stories-app .mttz-story-card { height: 260px; }
  #mttz-portal-root .mttz-photo-grid { grid-template-columns: repeat(2, 1fr); }
  #mttz-portal-root .mttz-viewer { height: 100vh; max-height: none; border-radius: 0 !important; }
  #mttz-portal-root .mttz-backdrop { padding: 0 !important; }
}

/* ======================================================================== */
/*                 Ajouts spécifiques au plugin WordPress                   */
/* ======================================================================== */

/* Le bouton "Voir plus" est un <a> dans le plugin */
#mttz-stories-app a.mttz-stories-more-btn { text-decoration: none !important; }
#mttz-stories-app .mttz-stories-more-btn span { color: inherit !important; }

/* -------------------------------- Grille -------------------------------- */
#mttz-stories-app .mttz-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--mttz-cols, 7), 1fr);
  gap: var(--mttz-gap, 16px);
  padding: 6px 4px 14px !important;
}
#mttz-stories-app.mttz-is-grid .mttz-cell { width: 100% !important; }
#mttz-stories-app.mttz-is-grid .mttz-nav-btn { display: none !important; }

/* --------------------------- Pagination : numéros ----------------------- */
#mttz-stories-app .mttz-page-nums {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px !important;
}
#mttz-stories-app .mttz-page-num {
  min-width: 38px;
  height: 38px;
  padding: 0 10px !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #475569 !important;
  border: 2px solid #e2e8f0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-stories-app .mttz-page-num:hover { border-color: var(--mttz-primary) !important; color: var(--mttz-primary) !important; }
#mttz-stories-app .mttz-page-num.mttz-page-active {
  background: var(--mttz-primary) !important;
  color: #fff !important;
  border-color: var(--mttz-primary) !important;
}

/* -------------------------- Bouton "Charger plus" ----------------------- */
#mttz-stories-app .mttz-loadmore-btn {
  display: block;
  margin: 20px auto 0 !important;
  background: #fff !important;
  color: var(--mttz-primary) !important;
  border: 2px solid var(--mttz-primary) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 12px 32px !important;
  border-radius: 5px !important;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
#mttz-stories-app .mttz-loadmore-btn:hover {
  background: var(--mttz-primary) !important;
  color: #fff !important;
}

/* --------------------------- Scroll infini ------------------------------ */
#mttz-stories-app .mttz-infinite-sentinel { width: 100%; height: 1px; }

/* -------------------------- État vide (aucune story) -------------------- */
#mttz-stories-app .mttz-empty {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  min-width: 260px;
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center !important;
  gap: 12px;
  padding: 60px 20px !important;
  text-align: center;
  color: #94a3b8 !important;
  background: #fff !important;
  border: 1.5px dashed #d7e0f2 !important;
  border-radius: var(--mttz-card-radius) !important;
}
#mttz-stories-app .mttz-empty svg { width: 46px; height: 46px; color: #c9d6ef; }
#mttz-stories-app .mttz-empty span { font-size: 15px !important; font-weight: 600 !important; color: #64748b !important; }

/* -------------------- Bouton "Publier" — taille normale ----------------- */
#mttz-portal-root .mttz-modal-foot .mttz-btn-primary {
  font-size: 15px !important;
  font-weight: 600 !important;
  padding: 12px 22px !important;
  line-height: 1.2 !important;
  display: -webkit-inline-box !important;
  display: -ms-inline-flexbox !important;
  display: inline-flex !important;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center !important;
  gap: 8px;
}
#mttz-portal-root .mttz-modal-foot .mttz-btn-primary svg {
  width: 16px !important;
  height: 16px !important;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

/* "Voir la boutique" est un <a> dans le viewer */
#mttz-portal-root a.mttz-shop-btn { text-decoration: none !important; }
