/* ============================================================
   BASE.CSS - Navigation & Structure
   Version : V2.0 - Glass Ready
   ============================================================ */

/* ── Reset de base ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--bg-primary, #0a0a0f);
  color: var(--text-primary, #f5f5f5);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  overflow-x: hidden;
}

/* ── Nav globale ── */
.apt-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height, 60px);
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

/* ── Logo ── */
.nav-logo {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.1rem;
  cursor: pointer;
}

.ai-label {
  font-weight: 700;
  font-size: 1.2rem;
  background: linear-gradient(90deg, #6cf2c2, #4cc9f0, #9b5de5, #f15bb5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
  transition: var(--transition-base, 0.3s ease);
}

.ai-label:hover {
  background-position: 100% center;
  transform: scale(1.02);
}

.ai-after-title {
  font-weight: 600;
  font-size: 1rem;
  margin-left: 2px;
  background: linear-gradient(90deg, #6cf2c2, #4cc9f0, #9b5de5, #f15bb5);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  vertical-align: middle;
  transition: var(--transition-base, 0.3s ease);
}

.ai-after-title::before {
  content: " - ";
  color: #6cf2c2;
  -webkit-text-fill-color: #6cf2c2;
}

.ai-after-title:hover {
  transform: scale(1.05);
}

@media (max-width: 640px) {
  .ai-after-title {
    display: none;
  }
}

/* ── AI Core (boule au centre) ── */
.ai-core {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #6cf2c2, #2ecc71);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.8), 0 0 24px rgba(46, 204, 113, 0.4);
  animation: corePulse 4s infinite ease-in-out, coreRainbow 8s infinite linear;
  transition: var(--transition-base, 0.3s ease);
}

.ai-core:hover {
  transform: scale(1.3);
  box-shadow: 0 0 30px rgba(46, 204, 113, 1), 0 0 60px rgba(46, 204, 113, 0.6);
}

@keyframes corePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes coreRainbow {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ── Nav centre ── */
.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .ai-core {
    position: relative;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
  }
}

/* ── Nav droite ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: var(--transition-base, 0.3s ease);
  text-decoration: none;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.nav-btn:active {
  transform: scale(0.95);
}

.nav-btn i {
  font-size: 20px;
  transition: var(--transition-base, 0.3s ease);
}

.nav-btn:hover i {
  transform: translateY(-2px) scale(1.05);
}

/* ── Search button ── */
.search-btn:hover i {
  color: var(--neon-cyan, #06B6D4);
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* ── Notif button ── */
.notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition-base, 0.3s ease);
}

.notif-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-1px);
}

.notif-btn:hover i {
  color: var(--neon-green, #10B981);
}

#notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 2px 5px;
  background: linear-gradient(135deg, #ff3b3b, #ff0000);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  box-shadow: 0 0 0 2px #0a0a0f;
}

#notif-badge.pulse {
  display: flex;
  animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* ── Profile button ── */
.nav-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary, #fff);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: var(--transition-base, 0.3s ease);
  text-decoration: none;
}

.nav-profile:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav-profile:active {
  transform: scale(0.97);
}

.nav-profile img.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(139, 92, 246, 0.2);
  transition: var(--transition-base, 0.3s ease);
}

.nav-profile:hover img.nav-avatar {
  border-color: var(--neon-purple, #8B5CF6);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

/* ── Burger mobile ── */
.nav-burger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition-base, 0.3s ease);
}

.nav-burger:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* ── Responsive nav ── */
@media (max-width: 768px) {
  .nav-left {
    font-size: 0.75rem;
  }

  .nav-center {
    pointer-events: none;
  }

  .nav-burger {
    display: block;
  }

  .nav-right {
    position: fixed;
    top: var(--nav-height, 60px);
    right: 0;
    width: 220px;
    height: calc(100dvh - var(--nav-height, 60px));
    flex-direction: column;
    padding: 20px 16px;
    gap: 12px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
  }

  .nav-right.open {
    transform: translateX(0);
  }

  .nav-right .nav-btn {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 0.9rem;
  }

  .nav-profile {
    width: 100%;
    justify-content: center;
    padding: 8px 16px;
  }
}

/* ── Feed padding ── */
#feed {
  padding-top: var(--nav-height, 60px);
}

.snap-buffer {
  height: 1px;
  scroll-snap-align: start;
}

/* ── Texte cliquable ── */
#home-btn {
  cursor: pointer;
}