
/* Reset de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.5;
}
 h1, h2, h3, h4, h5, h6 {
  text-align: center !important;
}
main, header, footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

#top-bar {
  position: sticky;
  top: 0;
  background-color: #000;
  text-align: center;
  padding: 10px 0;
  z-index: 1000;
}
#top-bar img {
  height: 112px;
  max-height: 112px;
  width: auto;
  display: block;
  margin: 0 auto;
  max-width: unset !important; /* Ajout */
  width: auto !important;      /* Ajout */
}

.hamburger {
  display: none;
  font-size: 2em;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 15px;
  z-index: 1100;
}
#main-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background-color: #222;
  padding: 10px 0;
  width: 100%;
}
#main-menu a {
  padding: 8px 12px;
  color: white;
  text-decoration: none;
  font-size: 0.95em;
  border-right: 1px solid #444;
}
#main-menu a:last-child {
  border-right: none;
}
#main-menu a, .dropbtn {
  align-self: center;
}
#main-menu > * {
  align-self: center;
}
.dropdown {
  position: relative;
}
.dropbtn {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px 12px;
  font-size: 0.95em;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.dropbtn::after {
  content: " ▼";
  float: right;
  transition: transform 0.3s ease;
}
.dropdown.active .dropbtn::after {
  transform: rotate(180deg);
}
.dropdown-content {
   position: absolute;
  top: 100%;
  left: 0;
  background-color: #333;
  display: none;
  z-index: 1000;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  max-height: 300px;
  overflow-y: auto;
}
.dropdown.active .dropdown-content {
  display: flex;
}
.dropdown-content a {
  color: white;
  padding: 6px 8px;
  text-decoration: none;
  display: block;
  font-size: 0.9em;
}
.dropdown-content a:hover {
  background-color: #575757;
}
.column {
  display: flex;
  flex-direction: column;
  margin-right: 30px;
  min-width: 180px;
}
footer {
  background-color: #f0f0f0;
  text-align: center;
  font-size: 0.85em;
  padding: 10px;
}

/* Galerie d'accueil */
.accueil-gallery {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}
.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 1em;
}

/* Responsive */
@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .hamburger {
    display: block;
  }
  #main-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  #main-menu.open {
    display: flex;
  }
  #main-menu a {
    border: none;
    border-bottom: 1px solid #444;
  }
  .dropdown-content {
    flex-direction: column;
  }
  .column {
    margin-right: 0;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
 
 /* Bloc noir avec logo */
#top-bar {
  background-color: #000;
  padding: 22px 0;
  text-align: center;
}

#top-bar img {
  height: 112px;
  display: block;
  margin: 0 auto;
}

/* Menu principal comme dans galerie/bonsplans */
#main-menu {
  background-color: #222;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

#main-menu a {
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  border-right: 1px solid #444;
}

#main-menu a:last-child {
  border-right: none;
}
/* Centre les filtres */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px auto;
  max-width: 1000px;
}

/* Galerie */
.gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: auto;
  padding: 10px;
  box-sizing: border-box;
}

/* Image principale */
.main-image {
  display: none;
  width: 100%;
  max-width: 800px;
  height: auto;
  background: #eaeaea;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

/* Bande grise du footer pleine largeur */
footer {
  background: #d3d3d3;
  width: 100%;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
}

/* Corrections spécifiques galerie */

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px auto;
  max-width: 1000px;
  padding: 0 10px;
  box-sizing: border-box;
}

.filters select,
.filters input[type="text"] {
  padding: 10px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 220px;
}

/* Galerie centrée */
.gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  margin: auto;
  padding: 10px;
  box-sizing: border-box;
}

/* Images bien dimensionnées */
.thumbnails img,
.main-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Caption bien visible */
.caption {
  font-size: 16px;
  color: #333;
  text-align: center;
  margin: 10px auto;
  max-width: 800px;
}

/* Bande grise du footer pleine largeur */
footer {
  background: #d3d3d3;
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
  text-align: center;
  font-size: 14px;
  margin-top: 30px;
}
/* HEADER & MENU UNIFORMES */
#top-bar {
  background-color: #000;
  padding: 22px 0;
  text-align: center;
}

#top-bar img {
  height: 112px;
  display: block;
  margin: 0 auto;
}

#main-menu {
  background-color: #222;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  width: 100%;
}

#main-menu a {
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  border-right: 1px solid #444;
}

#main-menu a:last-child {
  border-right: none;
}

#main-menu a.active {
  background-color: #444;
}

/* MOBILE : même menu déroulant que les autres pages */
@media (max-width: 768px) {
  #main-menu {
    flex-direction: column;
    align-items: stretch;
  }

  #main-menu a {
    display: block;
    padding: 16px 20px;
    font-size: 16px;
    border-bottom: 1px solid #444;
    text-align: center;
  }

  #main-menu a:last-child {
    border-bottom: none;
  }

}
#top-bar {
  background-color: #000;
  padding: 22px 0;
  text-align: center;
}

#top-bar img {
  height: 112px;
  display: block;
  margin: 0 auto;
}

#main-menu {
  background-color: #222;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

#main-menu a {
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  border-right: 1px solid #444;
}

#main-menu a:last-child {
  border-right: none;
}

@media (max-width: 768px) {
  #main-menu {
    flex-direction: column;
    align-items: stretch;
  }

  #main-menu a {
    text-align: center;
    border-bottom: 1px solid #444;
    border-right: none;
  }

  #main-menu a:last-child {
    border-bottom: none;
  }
}
.btn-filtre.actif {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}
