/* Extrait de feed.html (ancien <style>) */
/* --- Feed : défilement naturel (page), pas de snap 100vh --- */
.page-feed .feed-container {
  scroll-snap-type: none;
  overflow: visible;
  height: auto;
  -webkit-overflow-scrolling: auto;
}

/* --- Page feed : structure intuitive --- */
.feed-main {
  max-width: 800px;
  margin: 16px auto 24px;
  padding: 0 12px;
  scroll-margin-top: 120px;
}

.feed-main__head {
  margin-bottom: 14px;
}

.feed-main__title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f4f4f5;
}

.feed-main__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #a1a1aa;
  line-height: 1.4;
}

.feed-empty-state {
  background: #09090b;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 18px;
  color: #a1a1aa;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.feed-main.is-empty .feed-empty-state {
  display: block;
}

.feed-main:not(.is-empty) .feed-empty-state {
  display: none;
}

.feed-main .feed-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: none;
  background: transparent;
  padding: 0;
}

.feed-main .slider-item {
  height: auto;
  min-height: 0;
  overflow: visible;
  scroll-snap-align: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #18181b 0%, #09090b 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  position: relative;
}

.feed-main .post-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-main .post-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.feed-main .post-user-info strong,
.feed-main .post-user-name {
  color: #f4f4f5;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.feed-main .post-title {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #fafafa !important;
  margin: 0 !important;
  line-height: 1.3;
}

.feed-main .post-desc {
  color: #a1a1aa !important;
  font-size: 0.92rem !important;
  line-height: 1.5;
  margin: 0 !important;
}

.feed-main .post-meta {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #27272a;
}

.feed-main .post-meta small {
  color: #71717a;
  font-size: 0.8rem;
}

/* Actions sous le contenu, pas en overlay */
.feed-main .carousel-wrapper {
  border-radius: 12px;
  overflow: hidden;
}

.feed-main .instagram-style-actions {
  display: flex !important;
  position: static !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 8px !important;
  margin: 10px 0 0 !important;
  padding: 10px 0 0;
  border-top: 1px solid #27272a;
  pointer-events: auto;
  z-index: auto !important;
}

.feed-main .action-button {
  width: auto !important;
  height: auto !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 0.85rem !important;
  background: #18181b !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.feed-main .action-count {
  position: static !important;
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
  min-width: 0 !important;
}

.feed-publish-panel {
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 0 12px;
  background: transparent !important;
  border: none !important;
}

.feed-publish-panel__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  color: #d4d4d8;
}

.feed-publish-panel__summary::-webkit-details-marker {
  display: none;
}

.feed-publish-panel[open] .feed-publish-panel__summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.feed-publish-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.feed-publish-panel__hint {
  font-size: 0.8rem;
  color: #a1a1aa;
}

.feed-publish-panel__body {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  border-radius: 0 0 12px 12px;
  background: #09090b;
}

.feed-publish-panel__tip {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #a1a1aa;
}

.feed-advanced-panel {
  margin-top: 14px;
  border: 1px solid #27272a;
  border-radius: 10px;
  padding: 0 12px;
  background: #18181b;
}

.feed-advanced-panel summary {
  cursor: pointer;
  padding: 10px 0;
  color: #a1a1aa;
  font-size: 0.85rem;
}

.feed-advanced-panel__body {
  padding-bottom: 12px;
}

.feed-advanced-panel__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: #a1a1aa;
  font-size: 0.85rem;
}

.feed-search-panel {
  max-width: 800px;
  margin: 0 auto 32px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  scroll-margin-top: 120px;
}

.feed-search-panel__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d4d4d8;
}

.feed-search-panel__input-wrap {
  position: relative;
}

.feed-search-panel__input-wrap input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #09090b;
  color: #fff;
  font-size: 1rem;
}

.feed-search-panel__input-wrap i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #71717a;
  pointer-events: none;
}

.feed-search-panel__hint {
  margin: 10px 0 0;
  text-align: center;
  color: #71717a;
  font-size: 0.85rem;
}

.feed-section.stories-section {
  max-width: 800px;
  margin: 8px auto 24px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  scroll-margin-top: 120px;
}

.feed-stories-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.feed-stories-title {
  margin: 0;
  font-size: 1.05rem;
  color: #d4d4d8;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feed-stories-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #09090b;
  color: #a1a1aa;
  cursor: pointer;
  font-size: 0.85rem;
}

.feed-stories-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-stories-loading {
  text-align: center;
  color: #71717a;
  padding: 16px;
}

.feed-stories-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--okdak-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 8px;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #09090b;
}

/* --- Styles pour les boutons de mode --- */
#feed-mode-buttons {
  background: #18181b;
  border-radius: 10px;
  padding: 8px;
  margin: 12px 0;
  border: 1px solid #27272a;
  flex-direction: column;
  gap: 6px;
}

.mode-button:hover {
  background: #3f3f46 !important;
  transform: translateY(-1px);
}

/* --- Styles pour les boutons d'abonnement --- */
.subscription-button {
  transition: all 0.3s ease;
}

.subscription-button:hover {
  transform: scale(1.05);
}

/* --- Amélioration des actions TikTok style --- */
.tiktok-style-actions button {
  transition: all 0.2s ease;
  padding: 4px;
  min-width: auto;
}

.tiktok-style-actions button:hover {
  transform: scale(1.1);
}

.tiktok-style-actions span {
  font-size: 12px !important;
  color: #ccc;
  min-width: auto;
}

/* --- Indicateur de mode actif --- */
.mode-active {
  position: relative;
}

.mode-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--okdak-accent);
  border-radius: 1px;
}

/* --- Formulaire compact --- */
.modern-post-form {
  background: #18181b;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.13);
  padding: 1.1rem 1rem 0.7rem 1rem;
  margin: 1.2rem auto 1.2rem auto;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border: 1px solid #27272a;
}
.modern-post-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.modern-post-form label {
  font-weight: 500;
  color: #bfcfff;
  margin-bottom: 0.1rem;
  font-size: 0.97rem;
}
.modern-post-form input[type="text"],
.modern-post-form textarea,
.modern-post-form select {
  background: #09090b;
  color: #f3f3fa;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.97rem;
  transition: border 0.2s;
  outline: none;
  resize: vertical;
}
.modern-post-form input[type="text"]:focus,
.modern-post-form textarea:focus,
.modern-post-form select:focus {
  border-color: var(--okdak-accent);
}
.modern-post-form textarea {
  min-height: 38px;
  max-height: 120px;
}
.modern-post-form input[type="file"] {
  background: none;
  color: #bfcfff;
  border: none;
  padding: 0;
  font-size: 0.97rem;
}
#postImagesPreview img {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.13);
  max-width: 60px;
  max-height: 60px;
  object-fit: cover;
  border: 1px solid #27272a;
}
.button-modern {
  background: linear-gradient(90deg, var(--okdak-accent) 0%, var(--okdak-accent) 100%);
  color: #09090b;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.3rem;
  box-shadow: 0 1px 4px rgba(var(--okdak-accent-rgb), 0.06);
  transition: background 0.2s, transform 0.1s;
}
.button-modern:hover {
  background: linear-gradient(90deg, var(--okdak-accent) 0%, var(--okdak-accent) 100%);
  transform: translateY(-1px) scale(1.01);
}
@media (max-width: 600px) {
  .modern-post-form {
    padding: 0.7rem 0.3rem 0.5rem 0.3rem;
    max-width: 99vw;
  }

  .feed-mode-chip {
    flex: 1 1 calc(33% - 6px);
    min-width: 0;
    font-size: 0.78rem !important;
    padding: 8px 6px !important;
  }
}
/* Halo animé autour de la photo de profil si story active */
.story-halo {
  border: 3px solid var(--okdak-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--okdak-accent) 50%, transparent), 0 0 12px 6px color-mix(in srgb, var(--okdak-accent) 33%, transparent);
  pointer-events: none;
  opacity: 0.95;
}
.story-halo-anim {
  animation: storyPulse 1.2s infinite alternate;
}
@keyframes storyPulse {
  0% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--okdak-accent) 50%, transparent), 0 0 12px 6px color-mix(in srgb, var(--okdak-accent) 33%, transparent);
    border-color: var(--okdak-accent);
  }
  100% {
    box-shadow: 0 0 0 6px var(--okdak-accent), 0 0 24px 12px color-mix(in srgb, var(--okdak-accent) 50%, transparent);
    border-color: var(--okdak-accent);
  }
}
.story-halo-live {
  border: 3px solid #ff4757;
  box-shadow: 0 0 0 2px #ff475780, 0 0 12px 6px #ff475755;
  animation: livePulse 1.2s infinite alternate;
}
@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 2px #ff475780, 0 0 12px 6px #ff475755;
    border-color: #ff4757;
  }
  100% {
    box-shadow: 0 0 0 6px #ff4757, 0 0 24px 12px #ff475780;
    border-color: #ff4757;
  }
}
.badge-certif {
  background: rgba(76, 175, 80, 0.15);
  color: #43a047;
  padding: 1px 7px 1px 5px;
  border-radius: 8px;
  font-size: 0.82em;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
  border: 1px solid #43a04722;
  box-shadow: 0 1px 4px rgba(67, 160, 71, 0.07);
  letter-spacing: 0.01em;
}
.badge-certif i {
  width: 15px !important;
  height: 15px !important;
  color: #43a047 !important;
  margin-right: 2px;
  vertical-align: middle;
}

/* --- Styles améliorés pour les images et boutons d'interaction --- */

/* Conteneur d'image standardisé */
.post-image-container {
  position: relative;
  width: 100%;
  height: 400px; /* Hauteur fixe pour toutes les images */
  overflow: hidden;
  border-radius: 12px;
  background: #09090b;
  margin: 12px 0;
}

/* Image standardisée */
.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cadrage uniforme */
  object-position: center; /* Centrage par défaut */
  transition: transform 0.3s ease;
  cursor: pointer;
}

.post-image:hover {
  transform: scale(1.02);
}

/* Carrousel d'images amélioré */
.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 400px; /* Hauteur fixe */
  overflow: hidden;
  border-radius: 12px;
  background: #09090b;
  margin: 12px 0;
}

.carousel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden; /* Cache le débordement vertical mais garde horizontal */
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-item {
  scroll-snap-align: center;
  flex: 0 0 100%;
  position: relative;
  height: 100%;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.carousel-image:hover {
  transform: scale(1.02);
}

/* Boutons d'interaction améliorés style Instagram */
.instagram-style-actions {
  position: absolute;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px; /* Réduit l'espacement entre les boutons */
  z-index: 9999; /* Z-index très élevé pour être au-dessus de tout */
  pointer-events: none; /* Permet de cliquer à travers le conteneur */
  overflow: visible; /* Permet aux boutons de dépasser */
}

.instagram-style-actions .action-button,
.instagram-style-actions .action-count {
  pointer-events: auto; /* Réactive les clics sur les boutons */
  position: relative;
  z-index: 10000; /* Z-index encore plus élevé pour les boutons */
}

.action-button {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 36px; /* Réduit encore plus */
  height: 36px; /* Réduit encore plus */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px; /* Réduit encore plus */
  color: white;
}

.action-button:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.action-button:active {
  transform: scale(0.95);
  background: rgba(0, 0, 0, 0.7);
}

.action-count {
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 9px; /* Réduit encore plus */
  font-weight: 600;
  padding: 2px 5px; /* Réduit encore plus */
  border-radius: 8px; /* Réduit encore plus */
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 16px; /* Réduit encore plus */
  text-align: center;
}

/* Indicateur audio amélioré */
.audio-indicator {
  position: absolute;
  bottom: 30px;
  left: 30px;
  max-width: calc(100% - 60px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9998; /* Z-index élevé mais inférieur aux boutons */
}

.audio-cover {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* Points de navigation du carrousel */
.carousel-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 9998; /* Z-index élevé mais inférieur aux boutons */
  pointer-events: none;
  align-items: center; /* Centre verticalement */
  justify-content: center; /* Centre horizontalement */
  flex-wrap: nowrap; /* Empêche le retour à la ligne */
  width: auto; /* Largeur automatique */
  height: auto; /* Hauteur automatique */
}

.carousel-dot {
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.5) !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  min-width: 4px !important;
  min-height: 4px !important;
  max-width: 4px !important;
  max-height: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  font-size: 0 !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
}

.carousel-dot.active {
  background: white !important;
  transform: scale(1.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.8) !important;
  transform: scale(1.3);
}

/* Force la forme circulaire pour tous les points */
.carousel-dot,
.carousel-dot.active,
.carousel-dot:hover {
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  display: inline-block !important;
  box-sizing: border-box !important;
  position: relative !important;
}

/* Reset complet pour les points de navigation */
.carousel-dot * {
  display: none !important;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
  .post-image-container,
  .carousel-wrapper {
    height: 300px; /* Hauteur réduite sur mobile */
  }

  .instagram-style-actions {
    bottom: 20px;
    right: 20px;
    gap: 6px; /* Réduit encore plus sur mobile */
  }

  .action-button {
    width: 32px; /* Réduit encore plus sur mobile */
    height: 32px; /* Réduit encore plus sur mobile */
    font-size: 12px; /* Réduit encore plus sur mobile */
  }

  .action-count {
    font-size: 8px; /* Réduit encore plus sur mobile */
    padding: 1px 4px; /* Réduit encore plus sur mobile */
  }

  .audio-indicator {
    bottom: 20px;
    left: 20px;
    padding: 6px 10px;
    font-size: 11px;
  }

  .carousel-dots {
    bottom: 20px;
    gap: 5px;
  }

  .carousel-dot {
    width: 3px;
    height: 3px;
    min-width: 3px;
    min-height: 3px;
    max-width: 3px;
    max-height: 3px;
  }
}

/* Animation pour les boutons actifs */
.action-button.active {
  background: rgba(var(--okdak-accent-rgb), 0.8);
  border-color: rgba(var(--okdak-accent-rgb), 0.5);
}

.action-button.liked {
  background: rgba(255, 71, 87, 0.8);
  border-color: rgba(255, 71, 87, 0.5);
  animation: likePulse 0.6s ease;
}

@keyframes likePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

/* Styles pour les commentaires IA */
.ai-comment {
  border-left: 3px solid #10b981 !important;
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.1) 0%,
    rgba(16, 185, 129, 0.05) 100%
  ) !important;
}

.ai-comment .username {
  color: #10b981 !important;
  font-weight: bold !important;
}

.ai-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7em;
  margin-left: 6px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

/* Animation pour les nouveaux commentaires IA */
.ai-comment.new {
  animation: aiCommentSlideIn 0.5s ease-out;
}

@keyframes aiCommentSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Styles pour les contrôles IA */
.ai-controls {
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ai-controls h4 {
  color: var(--okdak-accent);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.ai-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bfcfff;
  font-size: 0.9rem;
  cursor: pointer;
}

.ai-controls input[type="checkbox"] {
  accent-color: var(--okdak-accent);
  transform: scale(1.1);
}

.ai-mode-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.ai-mode-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.ai-mode-btn.advanced {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.ai-mode-btn.advanced:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.ai-status {
  font-size: 0.8rem;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ai-status.active {
  color: #10b981;
}

.ai-status.advanced {
  color: #f59e0b;
}

.ai-status.disabled {
  color: #ef4444;
}

/* Styles pour la recherche de profils dans le feed */
#feedProfileSearchInput:focus {
  border-color: var(--okdak-accent);
  box-shadow: 0 0 0 3px rgba(var(--okdak-accent-rgb), 0.1);
}

.feed-search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #18181b;
  border-radius: 8px;
  margin-bottom: 6px;
  border: 1px solid #444;
  transition: all 0.3s ease;
  cursor: pointer;
  animation: fadeInUp 0.3s ease-out;
}

.feed-search-result-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--okdak-accent);
}

.feed-search-result-item:active {
  transform: translateY(0);
}

.feed-search-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--okdak-accent);
}

.feed-search-result-item .user-info {
  flex: 1;
  min-width: 0;
}

.feed-search-result-item .user-info h3 {
  margin: 0;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

.feed-search-result-item .user-info p {
  margin: 2px 0 0 0;
  color: #aaa;
  font-size: 0.8rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-search-result-item .user-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.feed-search-result-item .badge {
  font-size: 0.8em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.feed-search-result-item .badge.certified {
  color: #43a047;
  background: rgba(67, 160, 71, 0.1);
}

.feed-search-result-item .badge.pro {
  color: #09090b;
  background: var(--okdak-accent);
}

/* Responsive pour la recherche dans le feed */
@media (max-width: 600px) {
  .feed-search-result-item {
    padding: 8px;
    gap: 10px;
  }

  .feed-search-result-item img {
    width: 35px;
    height: 35px;
  }

  .feed-search-result-item .user-info h3 {
    font-size: 0.9rem;
  }

  .feed-search-result-item .user-info p {
    font-size: 0.75rem;
  }
}

/* Styles pour le formulaire discret */
#toggleFormBtn:hover {
  background: #333 !important;
  border-color: #555 !important;
}

#toggleFormBtn:active {
  transform: scale(0.98);
}

.modern-post-form input,
.modern-post-form textarea,
.modern-post-form select {
  background: #18181b !important;
  border: 1px solid #444 !important;
  color: #fff !important;
  border-radius: 6px !important;
}

.modern-post-form input:focus,
.modern-post-form textarea:focus,
.modern-post-form select:focus {
  border-color: var(--okdak-accent) !important;
  box-shadow: 0 0 0 2px rgba(var(--okdak-accent-rgb), 0.1) !important;
  outline: none !important;
}

html[data-okdak-theme="light"] .feed-search-result-item,
body.light-theme .feed-search-result-item {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

html[data-okdak-theme="light"] .modern-post-form input,
html[data-okdak-theme="light"] .modern-post-form textarea,
html[data-okdak-theme="light"] .modern-post-form select,
body.light-theme .modern-post-form input,
body.light-theme .modern-post-form textarea,
body.light-theme .modern-post-form select {
  background: #fafafa !important;
  color: #09090b !important;
  border-color: #d4d4d8 !important;
}

.modern-post-form input::placeholder,
.modern-post-form textarea::placeholder {
  color: #888 !important;
}

.button-modern {
  background: linear-gradient(135deg, var(--okdak-accent), var(--okdak-accent-deep)) !important;
  border: none !important;
  color: #09090b !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.button-modern:hover {
  background: linear-gradient(135deg, var(--okdak-accent-soft), var(--okdak-accent)) !important;
  transform: translateY(-1px) !important;
}

html[data-okdak-theme="light"] .button-modern,
body.light-theme .button-modern {
  background: var(--okdak-accent-muted) !important;
  color: #fff !important;
}

html[data-okdak-theme="light"] .button-modern:hover,
body.light-theme .button-modern:hover {
  background: #115e59 !important;
}

html[data-okdak-theme="light"] .button-modern,
body.light-theme .button-modern {
  background: var(--okdak-accent-muted) !important;
  color: #fff !important;
}

html[data-okdak-theme="light"] .button-modern:hover,
body.light-theme .button-modern:hover {
  background: #115e59 !important;
}

.button-modern:active {
  transform: translateY(0) !important;
}

/* Styles pour les Stories */
.stories-container {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-container::-webkit-scrollbar {
  display: none;
}

/* Styles pour les sections de catégories */
.category-stories-section {
  transition: all 0.3s ease;
}

.category-stories-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: var(--okdak-accent) !important;
}

.category-stories-section h4 {
  transition: color 0.3s ease;
}

.category-stories-section:hover h4 {
  color: var(--okdak-accent) !important;
}

/* Bouton d'actualisation des stories */
#refreshStoriesBtn:hover {
  background: #333 !important;
  border-color: #555 !important;
  transform: translateY(-1px);
}

/* Style pour les hashtags dans les descriptions */
.hashtag {
  color: var(--okdak-accent);
  font-weight: 600;
  text-decoration: none;
}

.hashtag:hover {
  color: var(--okdak-accent);
  text-decoration: underline;
}

#refreshStoriesBtn:active {
  transform: translateY(0);
}

#refreshStoriesBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Bouton de test des stories */
#createTestStoryBtn:hover {
  background: #3b6bc0 !important;
  border-color: #3b6bc0 !important;
  transform: translateY(-1px);
}

#createTestStoryBtn:active {
  transform: translateY(0);
}

.story-item {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.story-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(var(--okdak-accent-rgb), 0.4);
  transition: all 0.2s ease;
  opacity: 0.8;
}

.story-avatar:hover {
  transform: scale(1.05);
  opacity: 1;
  border-color: rgba(var(--okdak-accent-rgb), 0.8);
}

.story-avatar.has-story {
  border: 2px solid rgba(var(--okdak-accent-rgb), 0.6);
  box-shadow: 0 0 8px rgba(var(--okdak-accent-rgb), 0.3);
}

.story-avatar.viewed {
  border: 2px solid rgba(102, 102, 102, 0.3);
  opacity: 0.5;
}

.story-username {
  text-align: center;
  color: #999;
  font-size: 9px;
  margin-top: 2px;
  max-width: 40px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Styles pour le Story Viewer */
.story-viewer {
  background: #000;
  -webkit-user-select: none; /* Safari */
  user-select: none;
}

.story-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
  position: relative;
}

.story-progress-fill {
  height: 100%;
  background: white;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.story-progress-fill.active {
  animation: storyProgress 10s linear forwards;
}

.story-progress-fill.paused {
  animation-play-state: paused;
}

@keyframes storyProgress {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

.story-nav-left:hover,
.story-nav-right:hover {
  background: rgba(255, 255, 255, 0.1);
}

.story-controls button:hover {
  background: rgba(0, 0, 0, 0.7) !important;
  transform: scale(1.1);
}

.story-controls button:active {
  transform: scale(0.95);
}

/* Animation d'entrée pour le story viewer */
.story-viewer.show {
  animation: storyViewerFadeIn 0.3s ease-out;
}

@keyframes storyViewerFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive pour les stories */
@media (max-width: 768px) {
  .story-avatar {
    width: 50px;
    height: 50px;
  }

  .story-username {
    font-size: 11px;
    max-width: 50px;
  }

  .story-header {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 15px 15px !important;
  }

  .story-controls {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .story-controls button {
    width: 45px !important;
    height: 45px !important;
  }

  .story-controls i {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Améliorations pour desktop */
@media (min-width: 768px) {
  .module-controls {
    max-width: 800px !important;
    margin: 20px auto !important;
  }

  .profile-search-section {
    max-width: 800px !important;
    margin: 20px auto !important;
  }

  .feed-container {
    max-width: 800px !important;
    margin: 0 auto !important;
  }

  .stories-section {
    max-width: 800px !important;
    margin: 20px auto !important;
  }

  /* Amélioration des champs de formulaire sur desktop */
  .modern-post-form input,
  .modern-post-form textarea,
  .modern-post-form select {
    font-size: 1rem !important;
    padding: 12px 16px !important;
  }

  .modern-post-form textarea {
    min-height: 100px !important;
  }

  /* Bouton toggle plus grand sur desktop */
  #toggleFormBtn {
    font-size: 1.1rem !important;
    padding: 12px 20px !important;
  }

  /* Résultats de recherche plus grands sur desktop */
  .feed-search-result-item {
    padding: 15px !important;
    gap: 15px !important;
  }

  .feed-search-result-item img {
    width: 50px !important;
    height: 50px !important;
  }

  .feed-search-result-item .user-info h3 {
    font-size: 1.1rem !important;
  }

  .feed-search-result-item .user-info p {
    font-size: 0.9rem !important;
  }
}
/* --- Styles pour les boutons de mode --- */
#feed-mode-buttons {
  background: #18181b;
  border-radius: 10px;
  padding: 8px;
  margin: 12px 0;
  border: 1px solid #27272a;
  flex-direction: column;
  gap: 6px;
}

.mode-button:hover {
  background: #3f3f46 !important;
  transform: translateY(-1px);
}

/* --- Styles pour les boutons d'abonnement --- */
.subscription-button {
  transition: all 0.3s ease;
}

.subscription-button:hover {
  transform: scale(1.05);
}

/* --- Amélioration des actions TikTok style --- */
.tiktok-style-actions button {
  transition: all 0.2s ease;
  padding: 4px;
  min-width: auto;
}

.tiktok-style-actions button:hover {
  transform: scale(1.1);
}

.tiktok-style-actions span {
  font-size: 12px !important;
  color: #ccc;
  min-width: auto;
}

/* --- Indicateur de mode actif --- */
.mode-active {
  position: relative;
}

.mode-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--okdak-accent);
  border-radius: 1px;
}

/* --- Formulaire compact --- */
.modern-post-form {
  background: #18181b;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.13);
  padding: 1.1rem 1rem 0.7rem 1rem;
  margin: 1.2rem auto 1.2rem auto;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border: 1px solid #27272a;
}
.modern-post-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.modern-post-form label {
  font-weight: 500;
  color: #bfcfff;
  margin-bottom: 0.1rem;
  font-size: 0.97rem;
}
.modern-post-form input[type="text"],
.modern-post-form textarea,
.modern-post-form select {
  background: #09090b;
  color: #f3f3fa;
  border: 1px solid #27272a;
  border-radius: 6px;
  padding: 0.45rem 0.7rem;
  font-size: 0.97rem;
  transition: border 0.2s;
  outline: none;
  resize: vertical;
}
.modern-post-form input[type="text"]:focus,
.modern-post-form textarea:focus,
.modern-post-form select:focus {
  border-color: var(--okdak-accent);
}
.modern-post-form textarea {
  min-height: 38px;
  max-height: 120px;
}
.modern-post-form input[type="file"] {
  background: none;
  color: #bfcfff;
  border: none;
  padding: 0;
  font-size: 0.97rem;
}
#postImagesPreview img {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.13);
  max-width: 60px;
  max-height: 60px;
  object-fit: cover;
  border: 1px solid #27272a;
}
.button-modern {
  background: linear-gradient(90deg, var(--okdak-accent) 0%, var(--okdak-accent) 100%);
  color: #09090b;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.3rem;
  box-shadow: 0 1px 4px rgba(var(--okdak-accent-rgb), 0.06);
  transition: background 0.2s, transform 0.1s;
}
.button-modern:hover {
  background: linear-gradient(90deg, var(--okdak-accent) 0%, var(--okdak-accent) 100%);
  transform: translateY(-1px) scale(1.01);
}
@media (max-width: 600px) {
  .modern-post-form {
    padding: 0.7rem 0.3rem 0.5rem 0.3rem;
    max-width: 99vw;
  }

  .feed-mode-chip {
    flex: 1 1 calc(33% - 6px);
    min-width: 0;
    font-size: 0.78rem !important;
    padding: 8px 6px !important;
  }
}
/* Halo animé autour de la photo de profil si story active */
.story-halo {
  border: 3px solid var(--okdak-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--okdak-accent) 50%, transparent), 0 0 12px 6px color-mix(in srgb, var(--okdak-accent) 33%, transparent);
  pointer-events: none;
  opacity: 0.95;
}
.story-halo-anim {
  animation: storyPulse 1.2s infinite alternate;
}
@keyframes storyPulse {
  0% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--okdak-accent) 50%, transparent), 0 0 12px 6px color-mix(in srgb, var(--okdak-accent) 33%, transparent);
    border-color: var(--okdak-accent);
  }
  100% {
    box-shadow: 0 0 0 6px var(--okdak-accent), 0 0 24px 12px color-mix(in srgb, var(--okdak-accent) 50%, transparent);
    border-color: var(--okdak-accent);
  }
}
.story-halo-live {
  border: 3px solid #ff4757;
  box-shadow: 0 0 0 2px #ff475780, 0 0 12px 6px #ff475755;
  animation: livePulse 1.2s infinite alternate;
}
@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 2px #ff475780, 0 0 12px 6px #ff475755;
    border-color: #ff4757;
  }
  100% {
    box-shadow: 0 0 0 6px #ff4757, 0 0 24px 12px #ff475780;
    border-color: #ff4757;
  }
}
.badge-certif {
  background: rgba(76, 175, 80, 0.15);
  color: #43a047;
  padding: 1px 7px 1px 5px;
  border-radius: 8px;
  font-size: 0.82em;
  margin-left: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
  border: 1px solid #43a04722;
  box-shadow: 0 1px 4px rgba(67, 160, 71, 0.07);
  letter-spacing: 0.01em;
}
.badge-certif i {
  width: 15px !important;
  height: 15px !important;
  color: #43a047 !important;
  margin-right: 2px;
  vertical-align: middle;
}

/* NOTE: Le reste du bloc <style> original de feed.html était très volumineux et doit être migré ici si tu veux un retrait strict à 100% des styles inline. */

/* --- Navigation feed --- */
.feed-hero {
  text-align: center;
  padding: 56px 16px 0;
}

.feed-hero h1 {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  margin: 0;
}

.feed-hero__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #a1a1aa;
}

.page-feed .feed-studio {
  max-width: 800px;
  margin: 0 auto 1rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.35);
  background: rgba(24, 24, 27, 0.92);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}

.page-feed .feed-studio__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.page-feed .feed-studio__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e4e4e7;
}

.page-feed .feed-studio__hint {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #a1a1aa;
  line-height: 1.45;
}

.page-feed .feed-studio__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.page-feed .feed-onboarding-reopen {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.45);
  background: rgba(var(--okdak-accent-rgb), 0.12);
  color: #b8d0ff;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.page-feed .feed-status {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 159, 10, 0.15);
  color: #ffc46b;
  border: 1px solid rgba(255, 159, 10, 0.25);
}

.page-feed .feed-status.is-complete {
  background: rgba(52, 199, 89, 0.15);
  color: #7ddea0;
  border-color: rgba(52, 199, 89, 0.3);
}

.page-feed .feed-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.page-feed .feed-progress__track {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.page-feed .feed-progress__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--okdak-accent), var(--okdak-accent));
  transition: width 0.45s ease;
}

.page-feed .feed-progress__pct {
  font-size: 0.68rem;
  font-weight: 700;
  color: #b8d0ff;
  min-width: 2.5rem;
  text-align: right;
}

.page-feed .feed-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.page-feed .feed-flow__step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  box-sizing: border-box;
}

.page-feed .feed-flow__num {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
}

.page-feed .feed-flow__step.is-active {
  border-color: rgba(var(--okdak-accent-rgb), 0.55);
  background: rgba(var(--okdak-accent-rgb), 0.18);
  color: #99f6e4;
}

.page-feed .feed-flow__step.is-active .feed-flow__num {
  background: var(--okdak-accent);
  color: #09090b;
}

.page-feed .feed-flow__step.is-done {
  border-color: rgba(52, 199, 89, 0.35);
  color: #9edfb5;
}

.page-feed .feed-flow__step.is-done .feed-flow__num {
  background: rgba(52, 199, 89, 0.75);
  color: #fff;
}

.page-feed .feed-quick-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.3);
  background: linear-gradient(135deg, rgba(var(--okdak-accent-rgb), 0.08), rgba(127, 83, 255, 0.08));
}

.page-feed .feed-quick-start[hidden],
.page-feed .feed-success-banner[hidden] {
  display: none !important;
}

.page-feed .feed-quick-start__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--okdak-accent), var(--okdak-accent));
  color: #09090b;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.page-feed .feed-success-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 199, 89, 0.35);
  background: rgba(52, 199, 89, 0.12);
  font-size: 0.8rem;
  color: #c8f0d4;
}

.page-feed .feed-success-banner__close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.page-feed .feed-nav-shell {
  position: sticky;
  top: max(52px, env(safe-area-inset-top, 0px));
  z-index: 900;
  max-width: 800px;
  margin: 0 auto 0.75rem;
  padding: 0 12px;
  background: linear-gradient(180deg, rgba(15, 15, 28, 0.97) 0%, rgba(15, 15, 28, 0.88) 85%, transparent 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.page-feed .feed-nav-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.feed-nav {
  flex: 1;
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(9, 9, 11, 0.92);
  border: 1px solid #27272a;
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-feed .feed-nav__guide {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 3.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 12px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.45);
  background: rgba(var(--okdak-accent-rgb), 0.15);
  color: #99f6e4;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.page-feed .feed-nav__guide i {
  width: 1.1rem;
  height: 1.1rem;
}

.page-feed .feed-nav__context {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  color: #a1a1aa;
  text-align: center;
}

.feed-nav::-webkit-scrollbar {
  display: none;
}

.feed-nav__link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 8px;
  color: #a1a1aa;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.feed-nav__link i {
  width: 16px;
  height: 16px;
}

.feed-nav__link:hover {
  color: #d4d4d8;
  background: rgba(var(--okdak-accent-rgb), 0.12);
}

.feed-nav__link--active {
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--okdak-accent-rgb), 0.35), rgba(127, 83, 255, 0.25));
  box-shadow: inset 0 0 0 1px rgba(var(--okdak-accent-rgb), 0.4);
}

.feed-section {
  scroll-margin-top: 72px;
}

.feed-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 12px;
  margin-bottom: 14px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

.feed-toolbar__group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1;
}

.feed-toolbar__modes {
  flex: 2;
  min-width: 200px;
}

.feed-toolbar__label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717a;
}

.feed-toolbar__select,
.feed-mode-chip {
  padding: 8px 10px;
  font-size: 0.88rem;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
}

#feed-mode-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.feed-mode-chip {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.slider-item.feed-post--highlight {
  box-shadow: 0 0 0 2px rgba(var(--okdak-accent-rgb), 0.55), 0 0 24px rgba(var(--okdak-accent-rgb), 0.25);
  border-radius: 12px;
  transition: box-shadow 0.3s ease;
}

.slider-item.feed-post--active {
  box-shadow: inset 3px 0 0 var(--okdak-accent);
}

.slider-item.feed-post--filtered-out {
  display: none !important;
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s, transform 0.15s;
  pointer-events: auto;
}

.carousel-wrapper:hover .carousel-nav-btn,
.carousel-wrapper:focus-within .carousel-nav-btn {
  opacity: 1;
}

.carousel-nav-btn:hover {
  background: rgba(var(--okdak-accent-rgb), 0.85);
  transform: translateY(-50%) scale(1.08);
}

.carousel-nav-prev {
  left: 10px;
}

.carousel-nav-next {
  right: 10px;
}

.feed-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.5);
  border-radius: 50%;
  background: rgba(9, 9, 11, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--okdak-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, background 0.2s;
}

.feed-scroll-top:hover {
  background: var(--okdak-accent);
  color: #09090b;
  transform: translateY(-2px);
}

.feed-scroll-top i {
  width: 20px;
  height: 20px;
}

#back-to-feed-btn {
  top: auto !important;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border-radius: 24px !important;
  padding: 12px 20px !important;
  font-size: 0.9rem !important;
  box-shadow: 0 4px 20px rgba(var(--okdak-accent-rgb), 0.35) !important;
  z-index: 9995 !important;
}

/* --- Aperçu live des créations (feed) --- */
.post-has-preview .post-title {
  margin-bottom: 4px !important;
}

.post-has-preview .post-desc {
  margin-bottom: 10px !important;
  font-size: 0.92rem;
}

.post-code-preview {
  position: relative;
  margin: 14px 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #0d1117 0%, #161b33 100%);
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.35);
  box-shadow:
    0 0 0 1px rgba(127, 83, 255, 0.12),
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(var(--okdak-accent-rgb), 0.08);
}

.post-code-preview__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(24, 24, 27, 0.85);
  border-bottom: 1px solid rgba(var(--okdak-accent-rgb), 0.2);
}

.post-code-preview__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #d4d4d8;
  letter-spacing: 0.02em;
}

.post-code-preview__badge i {
  width: 16px;
  height: 16px;
  color: var(--okdak-accent);
}

.post-code-preview__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-code-preview__btn {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #09090b;
  color: #a1a1aa;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.post-code-preview__btn:hover {
  background: #18181b;
  border-color: var(--okdak-accent);
  color: #fff;
}

.post-code-preview__btn--accent {
  background: linear-gradient(135deg, var(--okdak-accent), var(--okdak-accent));
  border-color: transparent;
  color: #09090b;
}

.post-code-preview__btn--accent:hover {
  background: linear-gradient(135deg, var(--okdak-accent), var(--okdak-accent-deep));
  transform: translateY(-1px);
}

.post-code-preview__btn--muted {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
  border-style: dashed;
  background: transparent;
}

.post-code-preview__btn--link {
  display: inline-flex;
  align-items: center;
}

.post-code-preview__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  max-height: 420px;
  background: #09090b;
}

@supports not (aspect-ratio: 16 / 10) {
  .post-code-preview__frame {
    height: 280px;
  }
}

.post-code-preview__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

.post-has-preview .code-section {
  margin: 0 !important;
  padding: 12px;
  background: #18181b;
  border-top: 1px solid rgba(var(--okdak-accent-rgb), 0.2);
  max-height: 360px;
  overflow-y: auto;
}

.post-has-preview .code-section .code-block {
  margin-bottom: 12px;
}

.post-has-preview .code-section .code-block strong {
  display: block;
  color: var(--okdak-accent);
  font-size: 0.8rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-has-preview .code-section pre {
  margin: 0;
  padding: 10px 12px;
  background: #020617;
  border: 1px solid #18181b;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #d4d4d8;
}

.post-code-preview--fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--z-overlay, 10100) !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
}

.post-code-preview--fullscreen .post-code-preview__frame {
  flex: 1;
  aspect-ratio: unset;
  min-height: 0;
}

.post-code-preview__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.post-code-preview__close:hover {
  background: #ff4757;
}

.post-has-preview .carousel-wrapper {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .feed-hero {
    padding-top: 52px;
  }

  .page-feed .feed-nav-shell {
    top: max(48px, env(safe-area-inset-top, 0px));
  }

  .feed-nav {
    padding: 6px 8px;
  }

  .feed-nav__link span {
    font-size: 0.65rem;
  }

  .feed-toolbar__group,
  .feed-toolbar__modes {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .feed-main {
    padding: 0 8px;
  }

  .feed-main .slider-item {
    padding: 12px;
  }

  .post-code-preview__header {
    flex-direction: column;
    align-items: stretch;
  }

  .post-code-preview__actions {
    justify-content: flex-start;
  }

  .post-code-preview__frame {
    min-height: 200px;
    max-height: 300px;
  }

  .carousel-nav-btn {
    opacity: 1;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
  }
}

/* Carte démo + guide spotlight */
.page-feed .feed-card--demo {
  border-style: dashed !important;
  border-color: rgba(var(--okdak-accent-rgb), 0.45) !important;
  max-width: 800px;
  margin: 0 auto 16px;
}

.page-feed .feed-card--demo[hidden] {
  display: none !important;
}

.page-feed .feed-card__demo-badge {
  margin: 0 0 0.5rem;
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #b8d0ff;
  background: rgba(var(--okdak-accent-rgb), 0.2);
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.35);
}

.page-feed .feed-preview__demo-inner {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #a1a1aa;
}

.page-feed .feed-preview__demo-inner span {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.35rem;
}

.page-feed .feed-tour-target-pulse {
  animation: feed-pulse 1.2s ease infinite;
}

@keyframes feed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--okdak-accent-rgb), 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(var(--okdak-accent-rgb), 0); }
}

.page-feed .feed-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 13000;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.96);
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.45);
  color: #e4e4e7;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.page-feed .feed-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.page-feed .feed-btn {
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.page-feed .feed-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

.page-feed .feed-btn--primary {
  background: linear-gradient(135deg, var(--okdak-accent), var(--okdak-accent));
  color: #09090b;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body.page-feed.feed-onboarding-open {
  overflow: hidden;
}

.page-feed .feed-onboarding {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.page-feed .feed-onboarding[hidden] {
  display: none !important;
}

.page-feed .feed-onboarding__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.page-feed .feed-onboarding__card {
  position: relative;
  width: min(26rem, 100%);
  max-height: min(90dvh, 640px);
  overflow-y: auto;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.4);
  background: rgba(22, 26, 42, 0.98);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.page-feed .feed-onboarding__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.page-feed .feed-onboarding__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #99f6e4;
}

.page-feed .feed-onboarding__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.page-feed .feed-onboarding__lead {
  margin: 0;
  font-size: 0.88rem;
  color: #a1a1aa;
  line-height: 1.5;
}

.page-feed .feed-onboarding__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-feed .feed-onboarding__steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.page-feed .feed-onboarding__steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-feed .feed-onboarding__steps strong {
  display: block;
  font-size: 0.88rem;
  color: #e4e4e7;
  margin-bottom: 0.15rem;
}

.page-feed .feed-onboarding__steps p {
  margin: 0;
  font-size: 0.78rem;
  color: #a1a1aa;
  line-height: 1.4;
}

.page-feed .feed-onboarding__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-feed .feed-onboarding__icon--discover {
  background: rgba(var(--okdak-accent-rgb), 0.25);
  color: #b8d0ff;
}

.page-feed .feed-onboarding__icon--filter {
  background: rgba(255, 159, 10, 0.2);
  color: #ffc46b;
}

.page-feed .feed-onboarding__icon--interact {
  background: rgba(255, 71, 87, 0.2);
  color: #ff8a94;
}

.page-feed .feed-onboarding__icon--publish {
  background: rgba(52, 199, 89, 0.2);
  color: #7ddea0;
}

.page-feed .feed-onboarding__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-feed .feed-onboarding__skip {
  font-size: 0.78rem;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.page-feed .feed-onboarding__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

body.page-feed.feed-tour-open {
  overflow: hidden;
}

.page-feed .feed-tour {
  position: fixed;
  inset: 0;
  z-index: 12500;
  pointer-events: none;
}

.page-feed .feed-tour[hidden] {
  display: none !important;
}

.page-feed .feed-tour__highlight {
  position: fixed;
  border-radius: 10px;
  border: 2px solid var(--okdak-accent);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.68), 0 0 24px rgba(var(--okdak-accent-rgb), 0.35);
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.page-feed .feed-tour__card {
  position: fixed;
  z-index: 2;
  width: min(22rem, calc(100% - 24px));
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.4);
  background: rgba(18, 22, 36, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

.page-feed .feed-tour__progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.page-feed .feed-tour__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.page-feed .feed-tour__dot.is-active {
  background: var(--okdak-accent);
  transform: scale(1.2);
}

.page-feed .feed-tour__dot.is-done {
  background: rgba(52, 199, 89, 0.7);
}

.page-feed .feed-tour__kicker {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #99f6e4;
}

.page-feed .feed-tour__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.page-feed .feed-tour__text {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(210, 220, 245, 0.9);
}

.page-feed .feed-tour__hint {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #ffc46b;
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.22);
}

.page-feed .feed-tour__hint[hidden] {
  display: none !important;
}

.page-feed .feed-tour__action-btn {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.45);
  background: rgba(var(--okdak-accent-rgb), 0.2);
  color: #99f6e4;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.page-feed .feed-tour__action-btn[hidden] {
  display: none !important;
}

.page-feed .feed-tour__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-feed .feed-tour__skip {
  align-self: center;
  background: none;
  border: none;
  color: rgba(180, 190, 220, 0.7);
  font-size: 0.78rem;
  cursor: pointer;
  text-decoration: underline;
}

.page-feed .feed-tour__nav {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Chrome feed — surfaces atelier */
body.page-feed {
  background-color: var(--apple-bg-page) !important;
  background-image: var(--apple-page-bg-image) !important;
  padding-bottom: calc(168px + env(safe-area-inset-bottom, 0px));
}

.feed-main__title {
  font-family: var(--okdak-font-display, "Bricolage Grotesque", sans-serif);
  color: var(--apple-text) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}

.feed-main__subtitle {
  color: var(--apple-text-secondary) !important;
}

.feed-main .slider-item,
.feed-post,
.feed-empty-state {
  background: var(--okdak-surface-bg, rgba(24, 24, 27, 0.62)) !important;
  background-image: var(--apple-glass) !important;
  border-color: var(--apple-border) !important;
  color: var(--apple-text);
}

.feed-main .post-user-info strong,
.feed-main .post-title {
  color: var(--apple-text) !important;
}

/* --- Composer rapide (Insta / TikTok / Pinterest) --- */
.feed-quick-form.modern-post-form {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  gap: 0.85rem;
}

.feed-quick-drop {
  border: 1.5px dashed #3d4a66;
  border-radius: 14px;
  background: #18181b;
  min-height: 120px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.feed-quick-drop:hover,
.feed-quick-drop:focus-visible,
.feed-quick-drop.is-dragover {
  border-color: var(--okdak-accent);
  background: rgba(var(--okdak-accent-rgb), 0.08);
}

.feed-quick-drop__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px 16px;
  text-align: center;
  color: #a1a1aa;
}

.feed-quick-drop__lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.feed-quick-drop__lead i {
  width: 28px;
  height: 28px;
  color: var(--okdak-accent);
}

.feed-quick-drop__lead strong {
  color: #d4d4d8;
  font-size: 0.95rem;
}

.feed-quick-drop__lead span {
  font-size: 0.8rem;
}

.feed-quick-drop__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
}

.feed-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.feed-quick-chip i {
  width: 14px;
  height: 14px;
}

.feed-quick-chip:hover {
  border-color: var(--okdak-accent);
  color: #fff;
}

.feed-quick-preview {
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
}

.feed-quick-drop.has-media .feed-quick-drop__lead {
  display: none;
}

.feed-quick-drop.has-media .feed-quick-drop__inner {
  padding: 8px 12px 4px;
}

.feed-quick-thumb {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.feed-quick-thumb img,
.feed-quick-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-quick-thumb__audio {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  font-size: 0.68rem;
  color: #a1a1aa;
  text-align: center;
  word-break: break-word;
}

.feed-quick-thumb__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.feed-quick-caption textarea {
  min-height: 72px !important;
  max-height: 180px !important;
  width: 100%;
  resize: vertical;
}

.feed-quick-link input {
  width: 100%;
}

.feed-quick-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.feed-quick-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-quick-tool {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  color: #a1a1aa;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-quick-tool i {
  width: 18px;
  height: 18px;
}

.feed-quick-tool:hover {
  border-color: var(--okdak-accent);
  color: #fff;
}

.feed-quick-submit {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 120px;
  padding: 10px 22px !important;
  margin-top: 0 !important;
}

.feed-quick-status {
  margin: 0;
  font-size: 0.82rem;
  color: #a1a1aa;
}

.feed-quick-status[data-tone="error"] {
  color: #fca5a5;
}

.feed-quick-more {
  border: 1px solid #27272a;
  border-radius: 10px;
  background: #18181b;
  padding: 0 12px;
}

.feed-quick-more > summary {
  cursor: pointer;
  padding: 10px 0;
  color: #a1a1aa;
  font-size: 0.85rem;
}

.feed-quick-more__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 14px;
}

.feed-quick-picker {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px;
}

.feed-quick-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #a1a1aa;
  font-weight: 600;
}

.feed-quick-picker__head button {
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}

.feed-quick-picker__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.feed-quick-picker__tabs .feed-source-btn {
  flex: 1;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.feed-quick-picker__tabs .feed-source-btn--active {
  background: var(--okdak-accent);
  border: none;
  color: #09090b;
}

.feed-quick-picker__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-quick-picker__row select {
  flex: 1;
  min-width: 180px;
}

.feed-quick-picker__row button {
  background: var(--okdak-accent);
  border: none;
  color: #09090b;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}

#feedProjectPickerHint {
  margin-top: 8px;
  color: #a1a1aa;
  font-size: 0.85rem;
}

.feed-quick-music {
  position: relative;
}

.feed-quick-music input {
  width: 100%;
  padding-right: 40px !important;
}

.feed-quick-music i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #71717a;
  pointer-events: none;
}

.feed-quick-codebox {
  background: #09090b;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px;
}

.feed-quick-codebox label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #aaa;
  font-size: 0.9rem;
}

.feed-quick-codebox #feedCodeFields {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-clone-permission {
  background: #18181b;
  border: 1px solid rgba(var(--okdak-accent-rgb), 0.35);
  border-radius: 10px;
  padding: 14px 16px;
}

.feed-clone-permission label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: #e4e4e7;
  font-size: 0.95rem;
  line-height: 1.4;
}

.feed-clone-permission input {
  accent-color: var(--okdak-accent);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.feed-clone-permission strong {
  display: block;
  margin-bottom: 4px;
}

.feed-clone-permission span span {
  color: #a1a1aa;
  font-size: 0.85rem;
}

.feed-quick-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 148px;
  z-index: 9990;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--okdak-accent);
  color: #09090b;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(var(--okdak-accent-rgb), 0.4);
}

.feed-quick-fab.is-visible {
  display: flex;
}

.feed-quick-fab i {
  width: 24px;
  height: 24px;
}

.feed-quick-fab:hover {
  transform: scale(1.06);
}

.post-title--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.post-desc:empty {
  display: none;
}

.feed-link-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #18181b;
  color: #d4d4d8;
  text-decoration: none;
  font-size: 0.9rem;
}

.feed-link-card i {
  width: 16px;
  height: 16px;
  color: var(--okdak-accent);
}

.feed-link-card:hover {
  border-color: var(--okdak-accent);
}

.carousel-wrapper--video {
  height: min(70vh, 560px);
  background: #000;
}

.carousel-video {
  object-fit: contain;
  background: #000;
}

.carousel-audio {
  width: min(92%, 420px);
  margin: auto;
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .feed-quick-bar {
    flex-wrap: wrap;
  }

  .feed-quick-submit {
    width: 100% !important;
  }

  .feed-quick-fab {
    bottom: 132px;
  }
}

/* Overlays mobile : stories, commentaires, clavier, FAB */
#storyViewer.story-viewer {
  height: 100dvh !important;
  box-sizing: border-box;
  z-index: 10120 !important;
}

.story-header {
  padding-top: calc(20px + env(safe-area-inset-top, 0px)) !important;
}

.story-user-info {
  min-width: 0;
}

#storyUserName {
  max-width: min(42vw, 180px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-controls {
  bottom: calc(30px + env(safe-area-inset-bottom, 0px)) !important;
}

.feed-comments-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12040;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.feed-comments-backdrop[hidden] {
  display: none !important;
}

.page-feed .comment-modal {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  z-index: 12050 !important;
  bottom: var(--okdak-keyboard-inset, 0px) !important;
  max-height: min(72dvh, calc(100dvh - var(--okdak-keyboard-inset, 0px) - env(safe-area-inset-top, 0px) - 12px)) !important;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box;
  background: #1a1a1a;
  color: #fff;
}

.page-feed .comment-modal.is-open {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  overflow: hidden !important;
  min-height: 220px;
}

.page-feed .comment-modal.is-open .comment-list {
  flex: 1 1 auto;
  min-height: 96px;
  margin-top: 0 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page-feed .comment-modal.is-open > form {
  flex: 0 0 auto;
  margin-top: 0 !important;
}

.page-feed .comment-modal .comment-empty {
  margin: 8px 0 4px;
  color: #a1a1aa;
  font-size: 0.9rem;
}

.page-feed .comment-modal button:disabled,
.page-feed .comment-modal input:disabled {
  opacity: 0.55;
  cursor: progress;
}

body.feed-comments-open {
  overscroll-behavior: none;
}

body.feed-comments-open .feed-quick-fab,
body.feed-comments-open .feed-scroll-top,
body.feed-comments-open #back-to-feed-btn,
body.feed-comments-open .okdak-top-actions,
body.feed-comments-open #notifBellContainer {
  visibility: hidden;
  pointer-events: none;
}

body.page-feed:has(.post-code-preview--fullscreen) .dropdown-menu-container,
body.page-feed:has(.post-code-preview--fullscreen) .menu-overlay,
body.page-feed:has(.edit-post-modal) .dropdown-menu-container,
body.page-feed:has(.edit-post-modal) .menu-overlay {
  display: none !important;
}

.jamendo-track .track-title,
.jamendo-track .track-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-okdak-theme="light"] .feed-main .slider-item,
body.light-theme .feed-main .slider-item,
html[data-okdak-theme="light"] .feed-publish-panel__summary,
body.light-theme .feed-publish-panel__summary,
html[data-okdak-theme="light"] .feed-publish-panel__body,
body.light-theme .feed-publish-panel__body,
html[data-okdak-theme="light"] .feed-search-panel,
body.light-theme .feed-search-panel,
html[data-okdak-theme="light"] .feed-section.stories-section,
body.light-theme .feed-section.stories-section,
html[data-okdak-theme="light"] .page-feed .feed-studio,
body.light-theme .page-feed .feed-studio {
  background: #fff;
  border-color: rgba(9, 9, 11, 0.1);
  color: #09090b;
}

html[data-okdak-theme="light"] .feed-main__title,
body.light-theme .feed-main__title,
html[data-okdak-theme="light"] .feed-main .post-user-info strong,
body.light-theme .feed-main .post-user-info strong,
html[data-okdak-theme="light"] .feed-main .post-user-name,
body.light-theme .feed-main .post-user-name,
html[data-okdak-theme="light"] .page-feed .feed-studio__title,
body.light-theme .page-feed .feed-studio__title,
html[data-okdak-theme="light"] .page-feed .feed-onboarding__steps strong,
body.light-theme .page-feed .feed-onboarding__steps strong {
  color: #09090b;
}

html[data-okdak-theme="light"] .feed-main .post-title,
body.light-theme .feed-main .post-title {
  color: #09090b !important;
}

html[data-okdak-theme="light"] .page-feed .feed-toast,
body.light-theme .page-feed .feed-toast {
  background: rgba(244, 244, 245, 0.96);
  color: #09090b;
  border-color: rgba(var(--okdak-accent-rgb), 0.35);
}

html[data-okdak-theme="light"] .page-feed .feed-flow__step.is-active,
body.light-theme .page-feed .feed-flow__step.is-active,
html[data-okdak-theme="light"] .page-feed .feed-nav__guide,
body.light-theme .page-feed .feed-nav__guide,
html[data-okdak-theme="light"] .page-feed .feed-tour__action-btn,
body.light-theme .page-feed .feed-tour__action-btn,
html[data-okdak-theme="light"] .page-feed .feed-onboarding__kicker,
body.light-theme .page-feed .feed-onboarding__kicker,
html[data-okdak-theme="light"] .page-feed .feed-tour__kicker,
body.light-theme .page-feed .feed-tour__kicker {
  color: var(--okdak-accent-muted);
}

html[data-okdak-theme="light"] .feed-quick-picker__tabs .feed-source-btn:not(.feed-source-btn--active),
body.light-theme .feed-quick-picker__tabs .feed-source-btn:not(.feed-source-btn--active),
html[data-okdak-theme="light"] .feed-quick-picker__head button,
body.light-theme .feed-quick-picker__head button {
  background: #f4f4f5;
  border-color: #d4d4d8;
  color: #52525b;
}

html[data-okdak-theme="light"] .page-feed .feed-btn--primary,
body.light-theme .page-feed .feed-btn--primary,
html[data-okdak-theme="light"] .page-feed .feed-quick-start__btn,
body.light-theme .page-feed .feed-quick-start__btn,
html[data-okdak-theme="light"] .feed-quick-picker__tabs .feed-source-btn--active,
body.light-theme .feed-quick-picker__tabs .feed-source-btn--active,
html[data-okdak-theme="light"] .feed-quick-picker__row button,
body.light-theme .feed-quick-picker__row button,
html[data-okdak-theme="light"] .post-code-preview__btn--accent,
body.light-theme .post-code-preview__btn--accent,
html[data-okdak-theme="light"] .feed-scroll-top:hover,
body.light-theme .feed-scroll-top:hover {
  background: var(--okdak-accent-muted);
  color: #fff;
}

html[data-okdak-theme="light"] .page-feed .feed-btn--ghost,
body.light-theme .page-feed .feed-btn--ghost {
  background: #f4f4f5;
  border-color: rgba(9, 9, 11, 0.16);
  color: #09090b;
}

html[data-okdak-theme="light"] .feed-nav,
body.light-theme .feed-nav,
html[data-okdak-theme="light"] .feed-scroll-top,
body.light-theme .feed-scroll-top {
  background: rgba(244, 244, 245, 0.92);
}

html[data-okdak-theme="light"] .feed-clone-permission label,
body.light-theme .feed-clone-permission label {
  color: #09090b;
}

html[data-okdak-theme="light"] body.page-feed,
body.light-theme.page-feed {
  background: #f4f4f5;
}

html[data-okdak-theme="light"] .page-feed .feed-onboarding-reopen,
body.light-theme .page-feed .feed-onboarding-reopen {
  background: rgba(var(--okdak-accent-rgb), 0.1);
  border-color: rgba(var(--okdak-accent-rgb), 0.35);
  color: var(--okdak-accent-muted);
}

html[data-okdak-theme="light"] #feed-mode-buttons,
body.light-theme #feed-mode-buttons,
html[data-okdak-theme="light"] .ai-controls,
body.light-theme .ai-controls {
  background: #f4f4f5;
  border-color: rgba(9, 9, 11, 0.12);
  color: #09090b;
}

@media (max-width: 430px) {
  .jamendo-track__actions .track-preview {
    width: 100%;
    max-width: 100%;
  }
}

