 
/* Figcaption */
figure {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

figcaption {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;        /* ← empêche le débordement */
    right: 0;       /* ← assure que ça colle aux bords */
    bottom: -100%;
    cursor: pointer;
    transition: all .6s;
    text-align: center;
    vertical-align: text-bottom;
    color: #fff;
    background-color: rgba(0,51,0,0.6);
  font-family: 'Montserrat Ultra', sans-serif;
}

figcaption strong {
  display: block;        /* important pour que la marge fonctionne */
  margin-top: 1rem;      /* ← ICI */
}

figure:hover figcaption {
    bottom: 0;
}

figure:focus-within figcaption {
  bottom: 0;
}


/* Grid */
.grid {
	position: relative;
	margin: 0 auto;
	margin-top: 30px;

}

.js .grid::after {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	background: #252323 url(../img/loading.svg) no-repeat 50% 75px;
	background-size: 60px auto;
display: flex;
transition: transform 0.3s, opacity 0.3s;
}

.js .grid--loaded::after {
	opacity: 0;
}

.grid__item {
	width: 270px;
	padding: 10px;
}

.grid__item--current {
	opacity: 0 !important;
}

.img-wrap {
	display: block;
  position: relative;
}

.img-wrap:focus,
.img-wrap:hover {
	outline: none;
}

.img-wrap img {
	display: block;
	max-width: 100%;

}

.preview {
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;

  display: flex;
  justify-content: center;
  align-content: center;
  align-items: flex-start;

  width: 100%;
  height: 75%;
  pointer-events: none;
  font-size: 1em;
}


.preview::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	opacity: 0;
	background: #1f1d1d;
	transition: opacity 0.6s;
}

.preview--open {
	pointer-events: auto;
}

.preview--open::before {
	opacity: 1;
}

.description h3 {
  font-family: 'Montserrat Ultra', sans-serif; /* pas "Ultra" */
  font-weight: 800;
  font-size: 3rem; /* ← ICI */
		color: #fff;

}
.clone {
  position: fixed;
  z-index: 110;
  display: flex;
  transition: transform 0.5s;
  backface-visibility: hidden;
}

.original {
  position: relative;
  z-index: 120;
  display: block;
  margin: auto 0;
  object-fit: contain;
  transition: transform 0.3s, opacity 0.2s;
  backface-visibility: hidden;
}


.preview--open .animate {
  display: flex;
  transition: transform 0.6s, opacity 0.2s;
}
.animate {
  transition: transform 0.3s, opacity 0.2s;
}


.js .description--grid {
	display: none;
}
.description--preview {
  font-size: 1.5em;
  position: absolute;
  top: 90%;
  left: 0;
  z-index: 140;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 25vh;
  text-align: center;
  padding: 1em 3vw;
  opacity: 0;

  transition: opacity 0.8s, transform 0.8s;
  transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
  transform: translate3d(100px, 0, 0);
}


.preview--open .description--preview {
  opacity: 1;
  transition-delay: 0.2s;
  transform: translate3d(0, 0, 0);

}


/* Close button */

.action {
	font-size: 3em;
	margin: 0;
	padding: 0;
	cursor: pointer;
	vertical-align: top;
	color: white;
	border: none;
	background: none;
}

.action:hover,
.action:focus {
	color: white;
	outline: none;
}

.action--close {
	position: fixed;
  z-index: 3100;
	top: 0;
	right: 0;
	padding-right: 0.5em;
	padding-top: 0.4em;
	opacity: 0;
display: flex;
justify-content: center;
align-items: flex-start;
transition: opacity 0.6s;
	transform: scale3d(0.6, 0.6, 1);
}

.preview--image-loaded .action--close {
  opacity: 1;
  transform: scale3d(1, 1, 1);
}


.text-hidden {
	position: absolute;
	display: block;
	overflow: hidden;
	width: 0;
	height: 0;
	color: transparent;
}

.button {
	font-size: 0.5em;
	font-weight: bold;
	margin: 0;
	padding: 1em 2em;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 2em;
	background: none;
}

.button--view {
	margin-top: 2em;
}

