/* ====== AGROCIBIO - SERVICES.CSS (spécifique à services.html) ====== */

/* Variables spécifiques */
:root {
  --green-primary: #7DC242;
  --green-light: #c7e6b2;
  --header-bg: #81aca6;
  --text-dark: #2d2d2d;
  --bg-light: #f8f8f8;
  --card-radius: 1rem;
  --card-shadow: 0 4px 10px rgba(0,0,0,0.1);
  --card-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* === Scoped uniquement à la page services === */
body.services {
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  background-color: white;
  line-height: 1.6;
}

body.services header {
  background-color: var(--header-bg);
  padding: 1rem 0;
}

body.services nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

body.services .logo {
  height: 50px;
}

body.services nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

body.services nav a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1rem;
}

body.services nav a.active {
  text-decoration: underline;
}

body.services .hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background-color: var(--green-light);
}

body.services h1.main-title {
  color: var(--green-primary);
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}

body.services .cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background-color: #fff;
}

body.services .card {
  background-color: var(--bg-light);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.services .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
}

body.services .card h2 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  gap: 0.75rem;
  color: var(--green-primary);
}

body.services .card h2 img {
  width: 32px;
  height: 32px;
}

body.services .card p a {
  color: var(--green-primary);
  font-weight: bold;
  text-decoration: underline;
}

body.services .mascotte-img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

.mascotte-404 {
  max-width: 300px;
  width: 90%;
  margin-top: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  height: auto;
  object-fit: contain;
}

body.services .media-wrapper iframe {
  width: 100%;
  height: 400px;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  border: none;
}

body.services footer {
  background-color: var(--bg-light);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #666;
}

body.services .actualites-carousel {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  margin-bottom: 2rem;
}

body.services .actualites-carousel .slides {
  position: relative;
  width: 100%;
  height: 100%;
}

body.services .actualites-carousel .slides img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fadeSlider 98s infinite;
  animation-fill-mode: both;
}

body.services .actualites-carousel .slides img:nth-child(1) { animation-delay: 0s; }
body.services .actualites-carousel .slides img:nth-child(2) { animation-delay: 7s; }
body.services .actualites-carousel .slides img:nth-child(3) { animation-delay: 14s; }
body.services .actualites-carousel .slides img:nth-child(4) { animation-delay: 21s; }
body.services .actualites-carousel .slides img:nth-child(5) { animation-delay: 28s; }
body.services .actualites-carousel .slides img:nth-child(6) { animation-delay: 35s; }
body.services .actualites-carousel .slides img:nth-child(7) { animation-delay: 42s; }
body.services .actualites-carousel .slides img:nth-child(8) { animation-delay: 49s; }
body.services .actualites-carousel .slides img:nth-child(9) { animation-delay: 56s; }
body.services .actualites-carousel .slides img:nth-child(10) { animation-delay: 63s; }
body.services .actualites-carousel .slides img:nth-child(11) { animation-delay: 70s; }
body.services .actualites-carousel .slides img:nth-child(12) { animation-delay: 77s; }
body.services .actualites-carousel .slides img:nth-child(13) { animation-delay: 84s; }
body.services .actualites-carousel .slides img:nth-child(14) { animation-delay: 91s; }
body.services .actualites-carousel .slides img:nth-child(15) { animation-delay: 98s; }

@keyframes fadeSlider {
  0% { opacity: 0; }
  5% { opacity: 1; }
  20% { opacity: 1; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

@media screen and (max-width: 600px) {
  body.services h1.main-title {
    font-size: 1.8rem;
  }

  body.services .card h2 {
    font-size: 1.2rem;
  }

  body.services nav {
    flex-direction: column;
    gap: 1rem;
  }

  body.services nav ul {
    flex-direction: column;
    align-items: center;
  }
}

@media screen and (max-width: 600px) {
  .cards-container {
    padding: 1rem;
    grid-template-columns: 1fr !important;
  }

  h1.main-title {
    font-size: 1.8rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .card {
    padding: 1rem;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  nav a {
    font-size: 0.95rem;
  }

  video, iframe {
    height: auto !important;
    min-height: 240px !important;
  }

  .actualites-carousel {
    height: 240px !important;
  }
}


