/* ======== RESET & BASE ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body {
  background-color: #f9fff9;
  color: #333;
  line-height: 1.6;
}

/* ======== HEADER ======== */
header {
  background-color: #0b6623;
  color: white;
  padding: 15px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 24px;
  font-weight: bold;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

nav a:hover {
  color: #a5d6a7;
}

/* ======== HERO SECTION ======== */
.hero {
  background: url('../img/hero.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 120px 20px;
}

.hero h2 {
  font-size: 40px;
  margin-bottom: 15px;
  text-shadow: 1px 1px 2px #000;
}

.hero p {
   color: #ff0000;
  font-size: 30px;
  margin-bottom: 25px;
}

.hero .btn {
  background-color: #43a047;
  color: white;
  padding: 10px 25px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.hero .btn:hover {
  background-color: #2e7d32;
}

/* ======== SECTIONS ======== */
section {
  padding: 60px 10%;
  text-align: center;
}

section h2 {
  color: #2e7d32;
  margin-bottom: 20px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.card h3 {
  color: #0b6623;
  margin-bottom: 10px;
}

/* ======== FORMULAIRE ======== */
form {
  max-width: 500px;
  margin: auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

input, textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  background-color: #0b6623;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background-color: #43a047;
}

/* ======== FOOTER ======== */
footer {
  background-color: #0b6623;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 14px;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
}
.card iframe {
  width: 100%;
  height: 300px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.card img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}
/* === Animation d’arrière-plan défilant === */
@keyframes bg-slide {
  0%   { background-image: url('img/tri.jpg'); }
  25%  { background-image: url('img/vidange.jpg'); }
  50%  { background-image: url('img/exploi.jpg'); }
  75%  { background-image: url('img/collecte.jpg'); }
  100% { background-image: url('img/elevage.jpg'); }
}

.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  animation: bg-slide 20s infinite ease-in-out;
  transition: background-image 1s ease-in-out;
}
#informations, #actualites {
  padding: 30px 10%;  /* ↓ Réduit l’espace vertical (avant 60px) */
  text-align: center;
}

/* Spécifiquement pour la section informations */
#informations {
  max-height: 300px;   /* ✅ limite la hauteur totale visible */
  overflow: hidden;    /* ✅ cache le reste s’il dépasse */
}

#informations .cards {
  max-height: 220px;   /* ✅ espace disponible pour les cartes */
  overflow-y: auto;    /* ✅ permet le défilement manuel si trop de contenu */
  scrollbar-width: thin; /* ✅ barre discrète (Firefox) */
}

/* Apparence des cartes */
#informations .card, #actualites .card {
  background: white;
  border-radius: 10px;
  padding: 15px; /* ↓ réduit un peu la marge intérieure */
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

#informations .card:hover, #actualites .card:hover {
  transform: translateY(-5px);
}

/* Image des actualités */
#actualites .card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

