/* ===== AGRISIGNAL — Shared Header / Nav Component ===== */

/* CSS variables — identical across all page CSS files, defined here
   so the header works even before page-specific CSS is parsed.       */
:root {
  --primary-green:    #1a5d3e;
  --secondary-green:  #2e7d5e;
  --neutral-dark:     #1a2c24;
  --neutral-medium:   #5a7266;
  --neutral-border:   #e0e8e3;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ===== HEADER SHELL ===== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  min-height: auto;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-border);
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== LOGO ===== */
.header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding-right: 0;
  border-right: none;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-primary {
  font-family: 'Source Serif 4', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-green);
  line-height: 1;
}

.logo-secondary {
  font-size: 0.8rem;
  color: var(--neutral-medium);
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* ===== DESKTOP NAV ===== */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--neutral-dark);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-desktop a:hover {
  color: var(--primary-green);
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: width 0.3s ease;
}

.nav-desktop a:hover::after {
  width: 100%;
}

/* ===== CTA BUTTON — "Inscription" in nav ===== */
.nav-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-green);
  color: white !important;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.nav-btn-primary:hover {
  background: var(--secondary-green);
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(26, 93, 62, 0.25);
}

/* No underline animation on the CTA button */
.nav-btn-primary::after {
  display: none !important;
}

/* ===== HAMBURGER TOGGLE ===== */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--neutral-dark);
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.menu-toggle:hover {
  color: var(--primary-green);
}

/* ===== MOBILE NAV PANEL ===== */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: white;
  padding: 100px 24px 40px;
  display: none;
  flex-direction: column;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
  overflow-y: auto;
}

.mobile-nav.active {
  display: flex;
  transform: translateX(0);
}

.mobile-nav a {
  padding: 18px 0;
  text-decoration: none;
  color: var(--neutral-dark);
  font-weight: 500;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--neutral-border);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition-smooth);
}

.mobile-nav a:hover {
  color: var(--primary-green);
  padding-left: 10px;
}

/* CTA button inside mobile nav */
.mobile-nav .nav-btn-primary {
  margin-top: 20px;
  padding: 14px 24px;
  font-size: 1.1rem;
  border-bottom: none;
  border-radius: 8px;
  width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-container {
    padding: 0 20px;
  }
}
