/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  color: #333;
  background: #f7faf9;
}

/* =========================
   HERO
========================= */
.media-hero {
  height: 45vh;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.media-hero h1 {
  font-size: 3rem;
  color: #1b5e20;
  font-weight: 900;
}

.media-hero p {
  margin-top: 16px;
  font-size: 1.2rem;
  color: #2e7d32;
}

/* =========================
   FILTRES
========================= */
.media-filters {
  padding: 40px;
  text-align: center;
}

.filter-btn {
  background: transparent;
  border: 2px solid #1b5e20;
  color: #1b5e20;
  padding: 10px 22px;
  margin: 6px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #1b5e20;
  color: #fff;
}

/* =========================
   GALERIE
========================= */
.media-gallery {
  max-width: 1300px;
  margin: auto;
  padding: 40px 60px 100px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* CARTE COMMUNE */
.media-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  transition: transform 0.4s ease;
}

.media-card:hover {
  transform: translateY(-10px);
}

/* PHOTO */
.media-card img,
.media-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card video {
  height: 260px;
}

/* OVERLAY */
.media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27,94,32,0.65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.media-card:hover .media-overlay {
  opacity: 1;
}

/* DOCUMENT */
.media-card.document {
  padding: 40px;
  text-align: center;
}

.doc-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.media-card.document h3 {
  margin-bottom: 20px;
  color: #1b5e20;
}

.doc-btn {
  display: inline-block;
  background: #1b5e20;
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .media-gallery {
    padding: 40px 20px 80px;
  }

  .media-hero h1 {
    font-size: 2.2rem;
  }
}
