.blocks figure {
  position: relative;
  overflow: hidden;
  display: inline-block;
  overflow: hidden;
  visibility: hidden;
  margin: 0 10px;
  width: 250px;
  height: 358px;
  background: #ffffff;
}

.blocks figure img {
  position: relative;
  display: block;
  width: 100%;
  opacity: 0.7;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.blocks figcaption {
  position: absolute;
  top: 0;
  z-index: 11;
  padding: 10px;
  width: 100%;
  height: 100%;
  text-align: center;
}

.blocks figcaption img {
  display: inline-block;
  width: 80px;
  opacity: 1;
  -webkit-transform: translateY(15px);
  transform: translateY(15px);
  -webkit-transition-timing-function: cubic-bezier(0.25, 0.25, 0.115, 1);
  -webkit-transition-timing-function: cubic-bezier(0.25, 0.25, 0.115, 1.445);
  timing-function: cubic-bezier(0.25, 0.25, 0.115, 1.445);
  -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
  transition: opacity 0.3s, transform 0.3s;
  -webkit-transition-delay: 0.05s;
  transition-delay: 0.05s;
}

.blocks figcaption h2 {
  margin: 0 0 20px 0;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 20px;
  -webkit-transition: -webkit-transform 0.3s;
  transition: transform 0.3s;
}

.blocks figcaption h2.long {
  font-size: 130%;
}

.blocks figcaption p {
  padding: 0 20px;
  color: #fff;
  font-weight: 400;
  opacity: 0.8;
  -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
  transition: opacity 0.3s, transform 0.3s;
  -webkit-transition-delay: 0.05s;
  transition-delay: 0.05s;
}

.blocks figcaption h2,
.blocks figcaption p {
  -webkit-transform: translateY(40px);
  transform: translateY(40px);
  -webkit-transition-timing-function: cubic-bezier(0.25, 0.25, 0.115, 1);
  -webkit-transition-timing-function: cubic-bezier(0.25, 0.25, 0.115, 1.445);
  timing-function: cubic-bezier(0.25, 0.25, 0.115, 1.445);
}

.blocks figure button {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 15px;
  width: 100%;
  background: #eb2f30;
  border: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 300;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  -webkit-transition: opacity 0.3s, -webkit-transform 0.3s;
  transition: opacity 0.3s, transform 0.3s;
}

.blocks figcaption,
.blocks figcaption h2,
.blocks figcaption p,
.blocks figure button {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Style for SVG */

.blocks svg {
  position: absolute;
  top: -1px;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
}

.blocks svg path {
  fill: #eb2f30;
}

/* Hover effects */

.blocks a:hover figure img {
  opacity: 1;
}

.blocks a:hover figcaption img {
  opacity: 0;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
  -webkit-transition-duration: 0.1s;
  transition-duration: 0.1s;
}

.blocks a:hover figcaption h2 {
  -webkit-transform: translateY(-30px);
  transform: translateY(-30px);
}

.blocks a:hover figcaption h2.long {
  font-size: 100%;
}

.blocks a:hover figcaption p {
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.blocks a:hover figcaption p {
  opacity: 0;
  -webkit-transition-delay: 0s;
  transition-delay: 0s;
  -webkit-transition-duration: 0.1s;
  transition-duration: 0.1s;
}

.blocks a:hover figure button {
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

/* ecole */
.blocks figure.block-1 svg path {
  fill: #11362c;
}

.blocks figure.block-1 button {
  background: #11362c;
}

/* voice */
.blocks figure.block-2 svg path {
  fill: #d50063;
}

.blocks figure.block-2 button {
  background: #d50063;
}

/* media queries */

@media (max-width: 768px) {
  .blocks figure {
    margin: 5px 0;
    width: 100%;
    height: 120px;
    background: #282828;
  }

  .blocks figure img {
    display: none;
  }

  .blocks figcaption img {
    display: inline-block;
  }

  .blocks figcaption h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 22px;
  }

  .blocks figcaption h2.long {
    font-size: 20px;
  }

  .blocks figcaption p {
    display: none;
  }

  .blocks a:hover figcaption h2 {
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px);
  }

  .blocks a:hover figcaption h2.long {
    font-size: 130%;
  }
}
