:root {
  --gold: #b8901c;
  --gold-lt: #e8b84b;
  --dark-bg: #0f0f11;
  --card-bg: #18181b;
  --border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   STYLE MOBILE (Par défaut)
   ========================================================================== */
.feed-shell {
  --nav-top: 64px;
  --nav-bottom: 64px;
  position: relative;
  background: #000;
}

.feed-viewport {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: calc(100dvh - var(--nav-top) - var(--nav-bottom));
  min-height: 420px;
  background: #000;
  overflow: hidden;
}

/* Cache la marque en mobile */
.sidebar-brand { display: none; }

/* Filtres horizontaux en Mobile */
.feed-sidebar {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 10;
}

.feed-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 4px;
  scrollbar-width: none;
}
.feed-filters::-webkit-scrollbar { display: none; }

.cat-btn {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-btn.active, .cat-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* Zone de contenu principal */
.feed-main-content {
  width: 100%;
  height: 100%;
  position: relative;
}

.feed-scroll {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.feed-scroll::-webkit-scrollbar { display: none; }

.feed-slide {
  position: relative;
  height: 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: flex-end;
}

/* Médias & Overlay Mobile */
.feed-media { position: absolute; inset: 0; z-index: 0; background: #000; }
.feed-media img, .feed-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-media-embed iframe { width: 100%; height: 100%; border: 0; }

.feed-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.4) 35%, rgba(0,0,0,0) 60%);
}

.feed-caption {
  position: relative; z-index: 2; width: 100%; box-sizing: border-box;
  padding: 0 78px 28px 18px; color: #fff;
}
.feed-type {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(184,144,28,.25); border: 1px solid rgba(232,184,75,.55);
  color: var(--gold-lt); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 8px;
}
.feed-important {
  display: inline-flex; align-items: center; gap: 5px; margin-left: 6px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
}
.feed-title {
  font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.25rem; line-height: 1.3;
  margin: 0 0 6px;
}
.feed-excerpt { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.8); margin: 0 0 10px; }
.feed-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: rgba(255,255,255,.6); margin-bottom: 12px; }
.feed-meta span { display: inline-flex; align-items: center; gap: 4px; }
.feed-meta i { color: var(--gold-lt); }
.feed-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-lt)); color: #fff;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 8px 18px; border-radius: 20px; text-decoration: none;
}

/* Actions latérales Mobile */
.feed-rail {
  position: absolute; right: 10px; bottom: 100px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.feed-rail .rail-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-lt)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  border: 2px solid #fff;
}
.rail-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  backdrop-filter: blur(4px); cursor: pointer; transition: all .2s;
}

.feed-progress {
  position: absolute; z-index: 3; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 4px;
}
.feed-progress i { width: 3px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.3); transition: all .2s; }
.feed-progress i.on { background: var(--gold-lt); height: 18px; }

.feed-loading, .empty-state, .error-state {
  height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column;
  text-align: center; padding: 40px 24px; color: rgba(255,255,255,.65);
}


/* ==========================================================================
   MODE DESKTOP (≥ 992px) : MENU LATÉRAL SÉPARÉ PROFESSIONNEL
   ========================================================================== */
@media (min-width: 992px) {
  .feed-shell {
    padding: 30px 0;
    background: var(--dark-bg);
  }

  /* Conteneur App Pro */
  .feed-viewport {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: min(680px, calc(100dvh - 120px));
    border-radius: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    display: grid;
    grid-template-columns: 220px 1fr; /* Sidebar 220px + Zone Contenu */
  }

  /* 1. Sidebar Menu Latéral */
  .feed-sidebar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: 100%;
    background: #121214;
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-lt);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding-left: 10px;
    margin-bottom: 8px;
  }

  .feed-filters {
    flex-direction: column;
    padding: 0;
    gap: 6px;
    overflow-x: visible;
  }

  .cat-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
  }

  .cat-btn i {
    font-size: 14px;
    width: 20px;
  }

  .cat-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
  }

  .cat-btn.active {
    background: linear-gradient(135deg, rgba(184,144,28,0.2), rgba(232,184,75,0.1));
    border-color: rgba(232, 184, 75, 0.3);
    color: var(--gold-lt);
  }

  /* 2. Main Content Split (Vidéo à gauche, Texte à droite) */
  .feed-main-content {
    height: 100%;
    overflow: hidden;
  }

  .feed-slide {
    display: grid;
    grid-template-columns: 480px 1fr;
    align-items: stretch;
    background: var(--card-bg);
  }

  .feed-media {
    position: relative;
    grid-column: 1;
    height: 100%;
    border-right: 1px solid var(--border-color);
  }

  .feed-scrim { display: none; }

  /* Légende & Panneau d'information */
  .feed-caption {
    grid-column: 2;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-bg);
    height: 100%;
  }

  .feed-title {
    font-size: 1.6rem;
    color: #fff;
    margin-top: 10px;
  }

  .feed-excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
  }

  /* Actions sous forme de boutons d'outils */
  .feed-rail {
    position: relative;
    right: auto;
    bottom: auto;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .rail-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
  }
  .rail-btn:hover {
    background: rgba(255, 255, 255, 0.12);
  }
}