/*-----------------------------------------------------------galerie_photo.php-----------------------------------------------------------*/
@import url("https://fonts.googleapis.com/css?family=Heebo:400,700|Open+Sans:400,700");

:root {
  --color: #3c3163;
  --transition-time: 0.5s;
}

h1 {
  color: white;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fafafa;
}

a {
  color: inherit;
  text-decoration: none;
}

.galcontent {
  min-height: calc(300vh); /* Adjust the value as needed */
}

.galcards-wrapper {
  display: grid;
  justify-content: center;
  align-items: stretch;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 4rem;
  padding: 4rem;
  margin: 0 auto;
  width: 100%; /* Remplacez max-content par 100% */
  max-width: 1800px; /* Ajoutez une largeur maximale pour les cartes */
}

.galcard {
  --bg-filter-opacity: 0.5;
  background-image: linear-gradient(
      rgba(0, 0, 0, var(--bg-filter-opacity)),
      rgba(0, 0, 0, var(--bg-filter-opacity))
    ),
    var(--bg-img);
  width: 100%;
  font-size: 1em;
  height: 100%;
  color: white;
  border-radius: 2em;
  padding: 1em;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 5em -1em black;
  transition: all, var(--transition-time);
  position: relative;
  overflow: hidden;
  border: 10px solid #ccc;
  text-decoration: none;
}

.galcard:hover {
  transform: rotate(0);
}

.galcard h1 {
  margin: 50px;
  font-size: 1.2em;
  line-height: 1.2em;
}

.galcard p {
  font-size: 0.75em;
  margin-top: 0.5em;
  line-height: 2em;
}

.galcard .galtags {
  display: flex;
}

.galcard .galtags .galtag {
  font-size: 0.75em;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0.3rem;
  padding: 0 0.5em;
  margin-right: 0.5em;
  line-height: 1.5em;
  transition: all, var(--transition-time);
}

.galcard:hover .galtags .galtag {
  background: var(--color);
  color: white;
}

.galcard .galdate {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.75em;
  padding: 1em;
  line-height: 1em;
  opacity: 0.8;
}

.galcard:before,
.galcard:after {
  content: "";
  transform: scale(0);
  transform-origin: top left;
  border-radius: 50%;
  position: absolute;
  left: -50%;
  top: -50%;
  z-index: -5;
  transition: all, var(--transition-time);
  transition-timing-function: ease-in-out;
}

.galcard:before {
  background: #ddd;
  width: 250%;
  height: 250%;
}

.galcard:after {
  background: white;
  width: 200%;
  height: 200%;
}

.galcard:hover {
  color: var(--color);
}

.galcard:hover:before,
.galcard:hover:after {
  transform: scale(1);
}

/* Ajoutez cette règle pour changer la couleur du titre en noir au survol */
.galcard:hover h1 {
  color: black;
}

/* MEDIA QUERIES */
@media screen and (max-width: 1285px) {
  .galcards-wrapper {
    grid-template-columns: 1fr 1fr;
  }
  .galcard {
    max-width: calc(100vw - 4rem);
  }
}

@media screen and (max-width: 900px) {
  .galcards-wrapper {
    grid-template-columns: 1fr;
  }
  .galinfo {
    justify-content: center;
  }
  .galcard-grid-space .galnum {
    margin-left: 0;
    text-align: center;
  }
}

@media screen and (max-width: 500px) {
  .galcards-wrapper {
    padding: 4rem 2rem;
  }
  .galcard {
    max-width: calc(100vw - 4rem);
  }
}

@media screen and (max-width: 450px) {
  .galinfo {
    display: block;
    text-align: center;
  }
  .galinfo h1 {
    margin: 0;
  }
}

.galcard-button {
  font-size: 0.75em;
  background: transparent; /* Modifier la couleur de fond en transparent */
  border-radius: 0.3rem;
  padding: 0.3em 0.5em;
  margin-right: 0.5em;
  line-height: 1.5em;
  color: white;
  border: none;
  cursor: pointer;
  transition: all, var(--transition-time);
}
.galfooter {
  position: bottom;
}
