/* ========== AGRILIFT - Variables & Base ========== */
:root {
  /* Palette identité visuelle [76, 78] */
  --agri-deep: #1b5e3e;      /* Vert agricole profond */
  --agri-medium: #2e7d57;    /* Vert intermédiaire */
  --agri-light: #66bb6a;     /* Vert feuillage clair */
  --agri-pale: #c8e6c9;      /* Vert très clair */
  --white: #ffffff;
  --gray-technical: #546e7a; /* Gris technique */
  --gray-100: #f5f5f5;
  --gray-200: #eeeeee;
  --gray-600: #757575;
  --gray-800: #424242;
  --gray-900: #212121;
}

/* Tailwind overrides for brand colors */
.text-agri-deep { color: var(--agri-deep); }
.bg-agri-deep { background-color: var(--agri-deep); }
.bg-agri-medium { background-color: var(--agri-medium); }
.bg-agri-light { background-color: var(--agri-light); }
.text-agri-light { color: var(--agri-light); }
.border-agri-light { border-color: var(--agri-light); }
.hover\:bg-agri-deep:hover { background-color: var(--agri-deep); }
.hover\:bg-agri-medium:hover { background-color: var(--agri-medium); }
.shadow-agri-deep\/30 { box-shadow: 0 10px 40px rgba(27, 94, 62, 0.3); }

/* Section spacing */
.section-py {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .section-py {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

/* Typography - Plus Jakarta Sans */
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Skip link - Accessibilité */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.75rem 1.5rem;
  background: var(--agri-deep);
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* ========== Header / Navbar - Toujours visible ========== */
.header-nav {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
#header.scrolled .header-nav {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}
/* Liens de navigation : contraste fort sur fond blanc */
.header-nav .nav-link {
  color: #1f2937;
}
.header-nav .nav-link:hover {
  color: var(--agri-deep);
}
.header-nav .logo-text,
.header-nav .logo-svg {
  color: var(--agri-deep) !important;
}
.header-nav .menu-toggle-btn {
  color: var(--agri-deep);
}
.header-nav .menu-toggle-btn:hover {
  background: rgba(102, 187, 106, 0.25);
}

/* Logo - Feuilles (animation GSAP dans JS) */
.logo-mark .leaf {
  transform-origin: 24px 24px;
  opacity: 0;
}

/* ========== Hero ========== */
.hero {
  background-color: var(--agri-deep);
}
.hero-bg {
  z-index: 0;
}
.hero-content {
  z-index: 2;
}
.parallax-bg {
  will-change: transform;
}

/* ========== Reveal animations (GSAP) ========== */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transform: translateY(40px);
}
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

/* ========== Product cards hover ========== */
.product-card {
  will-change: transform;
}
.product-card:focus-within {
  outline: 2px solid var(--agri-deep);
  outline-offset: 2px;
}

/* ========== Service cards ========== */
.service-card {
  will-change: box-shadow, border-color;
}

/* ========== Buttons ========== */
.btn-wow {
  position: relative;
  overflow: hidden;
}
.btn-wow::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.btn-wow:hover::after {
  transform: translateX(100%);
}

.cta-btn {
  position: relative;
  overflow: hidden;
}
.cta-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(27, 94, 62, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s;
}
.cta-btn:hover::after {
  transform: translateX(100%);
}

/* ========== Lazy loading images ========== */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.4s;
}
img[loading="lazy"].loaded {
  opacity: 1;
}

/* ========== Form ========== */
#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
}

/* ========== WhatsApp float ========== */
.whatsapp-float {
  background-color: #25D366 !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
}
.whatsapp-float:hover {
  background-color: #20bd5a !important;
}
.whatsapp-float svg {
  flex-shrink: 0;
}

/* ========== Section Nos avantages ========== */
.advantages-section {
  position: relative;
  background: linear-gradient(160deg, var(--agri-deep) 0%, #164a32 50%, var(--agri-deep) 100%);
  color: #fff;
  overflow: hidden;
}
.advantages-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(102, 187, 106, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(102, 187, 106, 0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5 L35 25 L30 20 L25 25 Z' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
.advantages-subtitle {
  display: inline-block;
  color: var(--agri-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.advantages-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0;
}
.advantages-lead {
  font-size: 1rem;
  line-height: 1.5;
}
.advantages-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 640px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .advantages-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
  }
}
.advantage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}
.advantage-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(102, 187, 106, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.advantage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  background: rgba(102, 187, 106, 0.25);
  color: var(--agri-light);
  border-radius: 0.75rem;
  transition: transform 0.35s ease, background 0.35s ease;
}
.advantage-card:hover .advantage-icon {
  transform: scale(1.1);
  background: rgba(102, 187, 106, 0.4);
}
.advantage-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #fff;
  line-height: 1.3;
}
.advantage-card-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
}
@media (prefers-reduced-motion: reduce) {
  .advantage-card,
  .advantage-card:hover,
  .advantage-icon,
  .advantage-card:hover .advantage-icon {
    transition: none;
    transform: none;
  }
}

/* ========== Mobile ========== */
@media (max-width: 1023px) {
  .hero-title {
    font-size: 2rem;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .parallax-bg,
  .product-card,
  .service-card,
  .reveal-up,
  .reveal-left,
  .reveal-right {
    transition: none !important;
  }
  .btn-wow::after,
  .cta-btn::after {
    display: none;
  }
}
