/* ============================================================
   FEED.CSS - Feed principal + Hero
   Version : V2.0 - Glass Ready
   ============================================================ */

/* ── Feed container ── */
#feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
}

#feed::-webkit-scrollbar {
  width: 0;
  height: 0;
}



/* ── Hero Section ── */
.hero {
  position: relative;
  height: calc(100dvh - var(--nav-height, 60px));
  scroll-snap-align: start;
  scroll-margin-top: var(--nav-height, 60px);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  text-align: center;
  background: var(--bg-primary, #0a0a0f);
  overflow: hidden;
}

/* ── Fond hero avec effet glass ── */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(139, 92, 246, 0.06), transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.06), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(236, 72, 153, 0.04), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

/* ── Hero badge ── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--neon-green, #10B981);
  border: 1px solid rgba(16, 185, 129, 0.15);
  animation: pulseGlow 3s ease-in-out infinite;
}

.hero-badge .badge-star {
  font-size: 10px;
  opacity: 0.6;
}

/* ── Hero titre ── */
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  max-width: 680px;
  background: linear-gradient(135deg, #ffffff, #6cf2c2, #4cc9f0, #9b5de5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero h1 .mobile-break {
  display: none;
}

@media (max-width: 640px) {
  .hero h1 .mobile-break {
    display: block;
  }
}

/* ── Hero line ── */
.hero-line {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 600;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* ── Hero sub ── */
.hero-sub {
  font-size: 0.85rem;
  opacity: 0.5;
  max-width: 480px;
  line-height: 1.6;
}

/* ── Hero actions ── */
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Hero buttons ── */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition-base, 0.3s ease);
}

.hero-btn.primary {
  background: linear-gradient(135deg, #6cf2c2, #2ecc71);
  color: #0a0a0f;
  box-shadow: 0 8px 32px rgba(46, 204, 113, 0.25);
}

.hero-btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(46, 204, 113, 0.35);
}

.hero-btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hero-btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

/* ── Hero scroll indicator ── */
.hero-scroll {
  background: none !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.4) !important;
  font-size: 0.85rem !important;
  animation: floatDown 2s infinite ease-in-out;
  cursor: pointer;
}

@keyframes floatDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Welcome button (connecté) ── */
.welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  transition: var(--transition-base, 0.3s ease);
}

.welcome-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.welcome-btn .hero-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.2);
}

/* ── Feed cards grid ── */
#feed-cards {
  padding: 16px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Feed end ── */
.feed-end {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}

.feed-separator {
  height: 1px;
  width: 60%;
  margin: 0 auto 40px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.end-message {
  padding: 40px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg, 24px);
}

.end-icon i {
  font-size: 36px;
  background: linear-gradient(135deg, #6cf2c2, #4cc9f0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.end-message h2 {
  font-size: 1.3rem;
  margin: 16px 0 12px;
  color: #fff;
}

.end-message p {
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  font-size: 0.9rem;
  max-width: 480px;
  margin: 0 auto;
}

.end-quote {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--neon-cyan, #06B6D4);
  font-weight: 600;
  font-size: 0.85rem;
}

/* ── Footer contact ── */
.footer-contact {
  position: relative;
  margin-top: 40px;
  padding: 30px 20px;
  border-radius: var(--radius-lg, 24px);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.footer-contact > * {
  position: relative;
  z-index: 2;
}

.footer-contact h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #fff;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

.chat-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, #6cf2c2, #2ecc71);
  color: #0a0a0f;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-base, 0.3s ease);
}

.chat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(46, 204, 113, 0.2);
}

/* ── Footer AI background ── */
.footer-ai-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.footer-ai {
  position: absolute;
  width: 30px;
  height: 30px;
  opacity: 0.05;
  filter: grayscale(1);
  transition: var(--transition-base, 0.3s ease);
}

.footer-ai img {
  width: 100%;
  border-radius: 50%;
}

.footer-contact:hover .footer-ai {
  opacity: 0.08;
}

/* ── Social button ── */
.social-btn-outside {
  display: flex;
  justify-content: center;
  margin: 16px 0 30px;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.3);
  transition: var(--transition-base, 0.3s ease);
}

.social-btn-outside:hover {
  color: #fff;
  transform: scale(1.1);
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* ── Hero AI stars ── */
.hero-all-ai {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-ai {
  position: absolute;
  width: 40px;
  height: 40px;
  pointer-events: auto;
  cursor: pointer;
  transition: var(--transition-base, 0.3s ease);
}

.hero-ai img {
  width: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-ai.dim {
  filter: grayscale(1) brightness(0.3);
  opacity: 0.3;
}

.hero-ai.glow {
  filter: none;
  opacity: 1;
  transform: scale(1.15);
}

.hero-ai:hover {
  transform: scale(1.3) !important;
  filter: none !important;
  opacity: 1 !important;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero {
    padding: 12px 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 4px 12px;
  }

  .end-message {
    padding: 24px 16px;
  }

  .end-message h2 {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  #feed {
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
  }

  .feed-end {
    display: none !important;
  }

  .hero-ai {
    width: 32px;
    height: 32px;
  }
}

@media (min-width: 769px) {
  #feed {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  html, body {
    height: auto;
    overflow-y: auto;
  }

  .hero {
    height: calc(100vh - var(--nav-height, 60px));
    min-height: 500px;
  }
}