* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  width: 100vw;
  padding: 20px;
  background-color: #121212;
  position: relative;
  overflow: hidden;
}

#grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  grid-auto-rows: 350px;
  gap: 10px;
  height: 100vh;
  overflow-y: scroll;
  padding-right: 10px;
  grid-auto-flow: dense;
}

#grid::-webkit-scrollbar {
  background-color: #dedede;
  width: 10px;
}

#grid::-webkit-scrollbar-thumb {
  background-color: #757575;
}

.grid-item {
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.grid-titre {
display: flex;
justify-content: center;
align-items: center;
}

.grid-titre-txt{
	font-family: 'Montserrat', sans-serif;
	padding:20px;
	font-size:30px;
	color:#fff;
	text-transform: uppercase;
	transition: all 0.4s;
}

.grid-titre-txt:link{
	color:#fff;
	transition: color 0.4s;
	text-decoration: none;
}

.grid-titre-txt:hover{
	color:#999999;
	transition: color 0.4s;
	text-decoration: none;
}

strong{
	font-weight: 700;
}




.grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.grid-item:hover {
  transform: scale(0.95);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  z-index: 2; /*bug correction */
}

.grid-img:hover {
  transform: scale(0.95);
	opacity:0.5;
	transition: opacity 0.2s ease-in-out;
}

#reportage-1,
#reportage-6,
#reportage-9,
#reportage-11,
#reportage-14,
#reportage-15,
#reportage-20,
#reportage-21,
#reportage-23 {
  grid-column: span 2;
}

#reportage-3,
#reportage-4,
#reportage-16,
#reportage-17,
#reportage-18,
#reportage-25 {
  grid-row: span 2;
}

#reportage-19 {
  grid-column: span 4;
}

#popup-bg {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 3;
  justify-content: center;
  align-items: center;
}

#popup-bg.active {
  display: flex;
}

#popup-content {
  max-height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#popup-img {
  max-width: 100vw;
  max-height: 100vh;
}

#popup-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#popup-close:hover {
  background-color: #ddd;
}

/* Page */
@media screen and (max-width:1200px){
	
	#grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
  grid-auto-rows: 350px;
}
	
	.grid-item {
  grid-column: 1/-1;
}
}