/* ==========================================
   NAVBAR.CSS - Navigation globale KarimBuilds
   Styles pour la navbar sur toutes les pages
   ========================================== */

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(43, 127, 217, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-bottom-color: rgba(43, 127, 217, 0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  position: relative;
}

/* ===== BRAND ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: all 0.3s;
}

.brand-logo {
  width: 42px;
  height: 42px;
  transition: transform 0.3s;
}

.brand:hover .brand-logo {
  transform: scale(1.05) rotate(-5deg);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2b7fd9 0%, #5b4fb8 50%, #1dd3c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

/* ===== NAVIGATION ===== */
.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background: linear-gradient(135deg, #2b7fd9 0%, #5b4fb8 100%);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(43, 127, 217, 0.05);
}

.nav-link:hover::before {
  transform: scaleX(1);
}

.nav-link.active {
  color: var(--color-primary);
  background: rgba(43, 127, 217, 0.1);
}

.nav-link.active::before {
  transform: scaleX(1);
}

/* ===== CTA LINK ===== */

.nav-link-cta {
  background: linear-gradient(135deg, #2b7fd9 0%, #5b4fb8 100%) !important;
  color: white !important;
  font-weight: 700;
  padding: 0.625rem 1.5rem;
  box-shadow: 0 4px 12px rgba(43, 127, 217, 0.25);
}

.nav-link-cta::before {
  display: none;
}

.nav-link-cta:hover {
  background: linear-gradient(135deg, #2370c4 0%, #4a3fa0 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(43, 127, 217, 0.35);
  color: white !important;
}

/* ===== MOBILE TOGGLE ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.nav-toggle:hover {
  background: rgba(43, 127, 217, 0.1);
}

.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .site-nav {
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
  }
  
  .site-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
  }
  
  .nav-link {
    padding: 1rem 1.25rem;
    text-align: center;
    font-size: 1rem;
  }
  
  .nav-link::before {
    display: none;
  }
  
  .nav-link-cta {
    margin-top: 0.5rem;
  }
  
  .brand-text {
    display: none;
  }
  
  .brand-logo {
    width: 38px;
    height: 38px;
  }
}

/* ===== RESPONSIVE - TABLET ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-list {
    gap: 0.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .brand-text {
    font-size: 1.1rem;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== ACCESSIBILITY ===== */
.nav-toggle:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}