/*
Theme Name: Fertemis Theme Complet
Version: 1.2
Description: Thème WordPress moderne et aéré pour Fertemis, avec menu simplifié et carrousel rétabli
*/

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  color: #333;
  line-height: 1.6;
}

a {
  color: #4a772f;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

main {
  padding: 0 0 3rem;
}

.section-container {
  max-width: 1200px;

}

.site-header {
  position: relative;
  min-height: 500px;
  padding: 3rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--fertemis-header-bg, #1d3f25) center top / cover no-repeat;
  overflow: hidden;
  text-align: center;
}

.header-overlay {
  position: relative;
  z-index: 3;
  width: 100%;
}

.logo-container img {
  width: 400px;
  max-width: 100%;
  height: auto;
}

.site-tagline {
  margin-top: 1rem;
  font-style: italic;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 500;
}

.primary-nav {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.menu-panel {
  display: flex;
  justify-content: center;
  width: 100%;
}

.menu-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.2rem;
  text-transform: uppercase;
}

.menu-nav li a {
  color: white;
  font-weight: bold;
  position: relative;
  text-decoration: none;
  padding-bottom: 2px;
}

.menu-nav li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: white;
  transition: width 0.3s, bottom 0.3s;
}

.menu-nav li a:hover::after,
.menu-nav li.current-menu-item a::after {
  width: 100%;
  bottom: 0;
}

.menu-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: none;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.menu-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.menu-toggle-box {
  position: relative;
  width: 26px;
  height: 18px;
}

.menu-toggle-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
  border-radius: 999px;
  transition: transform 0.32s ease, opacity 0.24s ease;
}

.menu-toggle-line:nth-child(1) { top: 0; }
.menu-toggle-line:nth-child(2) { top: 8px; }
.menu-toggle-line:nth-child(3) { top: 16px; }

.menu-toggle-label {
  display: none;
  font-size: 0.75rem;
}

.menu-toggle.is-open .menu-toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.menu-toggle.is-open {
  background: rgba(255, 255, 255, 0.94);
  color: #14321d;
  border-color: rgba(20, 50, 29, 0.25);
  box-shadow: 0 12px 28px rgba(12, 36, 18, 0.15);
}

body.mobile-menu-open {
  overflow: hidden;
}

.svg-curve {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 160px;
  z-index: 2;
  pointer-events: none;
}


.intro-section {
  max-width: 1200px;
  margin: 3rem auto 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.intro-text {
  flex: 1 1 50%;
  padding-right: 2rem;
  min-width: 300px;
}

.intro-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.intro-copy {
  font-size: 1.09rem;
  color: #254528;
  line-height: 1.65;
  white-space: pre-line;
  margin-bottom: 0.5rem;
}

.carousel-produits-wrapper {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  position: relative;
}

.carousel-produits {
  overflow: hidden;
}


.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none; 
}
.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-track img {
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s cubic-bezier(.4,0,.2,1);
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 3 / 4;
  background: #fff;
}

.carousel-track a {
  flex-shrink: 0;
  width: 100%;
  max-width: 290px;
}

.carousel-track a:hover img {
  transform: scale(1.025);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #7ca742;
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 4px 18px;
  border-radius: 8px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }


.banner-vignette {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 3rem;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.10);
  background: #fff;
  overflow: hidden;
  display: block;
  padding: 0;
  transition: box-shadow 0.3s;
}

.banner-vignette img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.banner-overlay {
  pointer-events: none;
  opacity: 0;
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(24,44,12,0.20);
  backdrop-filter: blur(2px);
  transition: opacity 0.28s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-btn {
  pointer-events: auto;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.32s cubic-bezier(.4,0,.2,1), transform 0.32s cubic-bezier(.4,0,.2,1);
  background: #7ca742;
  color: #fff;
  padding: 0.85rem 2.1rem;
  border-radius: 8px;
  border: none;
  font-size: 1.15rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.14);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.banner-vignette:hover .banner-overlay {
  opacity: 1;
  pointer-events: auto;
}

.banner-vignette:hover .banner-btn {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.intro-after-carousel,
.ou-trouver-title {
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
  font-size: 1.15rem;
  color: #193a22;
  text-align: center;
}

.intro-after-carousel strong,
.intro-after-carousel a,
.ou-trouver-title strong,
.ou-trouver-title a {
  color: #278d4f;
  font-weight: 500;
  font-size: 1.17em;
  text-decoration: none;
}

.ou-trouver {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.ou-trouver-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
}

.ou-trouver-card {
  flex: 1 1 45%;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.ou-trouver-card h3 {
  color: #3c763d;
  font-size: 1rem;
}

.revendeurs {
  text-align: center;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.revendeurs-inner {
  max-width: 1200px;
  margin: auto;
}

#map {
  height: clamp(340px, 60vh, 600px);
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
  touch-action: pan-x pan-y;
}


footer {
  padding: 0;
  background: transparent;
  border: none;
}

.footer-grass-container {
  width: 100%;
  height: auto;
  position: relative;
}

.footer-grass-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 70px;
}

.footer-legal-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #8fb307;
  padding: 1rem 0;
  text-align: center;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.footer-legal-text {
  color: #fff;
  margin: 0;
  font-size: 0.9rem;
}

.footer-legal-text a {
  color: #fff;
  text-decoration: underline;
}

@media screen and (max-width: 1024px) {
  .logo-container img {
    width: 320px;
  }
}

@media screen and (max-width: 768px) {
  .logo-container img { width: 250px; }
  .site-tagline { font-size: 1.1rem; }
  .site-header { min-height: 420px; padding: 2rem 1rem 1rem; }

  .menu-toggle {
    display: inline-flex;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 120;
  }

  .primary-nav {
    width: 100%;
    justify-content: center;
  }

  .menu-toggle-label {
    display: inline-block;
  }

  .menu-panel {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: calc(4.5rem + env(safe-area-inset-top, 0px)) 1.25rem 2.75rem;
    pointer-events: none;
    transition: opacity 0.28s ease;
    opacity: 0;
    visibility: hidden;
  }

  .menu-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(13, 33, 18, 0.75);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .menu-panel.open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
  }

  .menu-panel.open::before {
    opacity: 1;
  }

  .menu-panel .menu-nav {
    position: relative;
    width: min(92vw, 420px);
    margin: 0;
    padding: 2rem 1.75rem 2.4rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 60px rgba(7, 25, 12, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-6%);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
  }

  .menu-panel.open .menu-nav {
    transform: translateY(0);
    opacity: 1;
  }

  .menu-panel .menu-nav li a {
    color: #0f2415 !important;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-align: center;
  }

  .menu-panel .menu-nav li a::after {
    display: none;
  }

  .menu-panel .menu-nav li {
    padding: 0.25rem 0;
  }

  .menu-panel .menu-nav li + li {
    border-top: 1px solid rgba(9, 34, 16, 0.12);
  }

  .intro-section {
    flex-direction: column;
    align-items: flex-start;
    margin: 1.8rem auto 0.8rem;
    padding: 0 1.25rem;
  }

  .intro-text {
    padding-right: 0;
    min-width: 100%;
  }

  .intro-text h1 {
    font-size: 1.45rem;
    line-height: 1.3;
    margin-bottom: 0.85rem;
  }

  .intro-copy {
    font-size: 1rem;
    white-space: normal;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 10px 26px rgba(12, 35, 18, 0.12);
  }

  .carousel-track {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0.75rem !important;
    padding: 0 1rem 1.5rem !important;
  }

  .carousel-track a {
    flex-shrink: 0;
    width: 68%;
    max-width: 260px;
    scroll-snap-align: center;
    padding-bottom: 0.15rem;
  }

  .carousel-track a img {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: 0 10px 26px rgba(11, 28, 17, 0.18);
  }

  .carousel-btn {
    display: none !important;
  }

  .carousel-produits-wrapper {
    padding: 0 0.25rem !important;
    margin-bottom: 2.5rem !important;
  }

  .intro-after-carousel,
  .ou-trouver-title {
    padding: 0 1.1rem !important;
    font-size: 1rem !important;
  }

  .banner-vignette {
    margin: 0 auto 2.2rem;
    width: min(420px, calc(100% - 2rem));
    border-radius: 18px;
  }

  .banner-vignette img {
    border-radius: 18px;
    width: 100%;
    object-fit: cover;
    object-position: center top;
  }

  .banner-overlay {
    align-items: center;
    padding: 0 1.4rem;
  }

  .banner-btn {
    width: 100%;
    text-align: center;
  }

  .ou-trouver-grid {
    flex-direction: column;
    gap: 1.2rem !important;
  }

  .ou-trouver-card {
    flex: 1 1 100% !important;
    margin-bottom: 0 !important;
  }

  #map {
    height: 320px !important;
    margin-top: 1rem;
  }

}

@media screen and (max-width: 500px) {
  .site-header {
    min-height: 360px;
  }
}
