

html.modal-active, body.modal-active {
  overflow: hidden;
}

.modal-container {
  position: fixed;
  display: table;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  top: 0;
  left: 0;
  transform: scale(0);
  z-index: 1;
}

.modal-container.one {
  transform: scaleY(0.01) scaleX(0);
  animation: unfoldIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.one .modal-background .modal {
  transform: scale(0);
  animation: zoomIn 0.5s .8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.one.out {
  transform: scale(1);
  animation: unfoldOut 1s 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.one.out .modal-background .modal {
  animation: zoomOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}








.modal-container.two {
  transform: scale(1);
}
.modal-container.two .modal-background {
  background: rgba(0, 0, 0, 0);
  animation: fadeIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two .modal-background .modal {
  opacity: 0;
  animation: scaleUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two + .content {
  animation: scaleBack 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two.out {
  animation: quickScaleDown 0s 0.5s linear forwards;
}
.modal-container.two.out .modal-background {
  animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two.out .modal-background .modal {
  animation: scaleDown 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two.out + .content {
  animation: scaleForward 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* -------------- Semi-fermé -------------- */

.modal-container.two.semi .modal-background .modal {
  animation: scaleDown 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* -------------- Fermé -------------- */

.modal-container.two.ferme {
  animation: quickScaleDown 0s 0.5s linear forwards;
}

.modal-container.two.ferme .modal-background {
  animation: fadeOut 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
.modal-container.two.ferme + .content {
  animation: scaleForward 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}



.modal-container .modal-background {
    display: table-cell;
    background: rgba(30, 30, 30, 0.8);
    text-align: center;
    vertical-align: middle;
}

.modal-container .modal-background .modal {
    background: white;
    padding: 20px;
    display: inline-block;
    border-radius: 10px;
    font-weight: 300;
    position: relative;
    max-width: 70vw;
}

.modal-container .modal-background .modal h2 {
    color: black;
    font-size: 25px;
    line-height: 25px;
    margin-bottom: 15px;
}

.modal-container .modal-background .modal p {
    color: black;
    font-size: 18px;
    line-height: 22px;
}

.content {
    background: none;
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 0;
}

.content-demo h1 {
  padding: 75px 0 30px 0;
  text-align: center;
  font-size: 30px;
  line-height: 30px;
}
.content-demo .buttons {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}
.content-demo .buttons .button {
  display: inline-block;
  text-align: center;
  padding: 10px 15px;
  margin: 10px;
  background: red;
  font-size: 18px;
  background-color: #efefef;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.content-demo .buttons .button:hover {
  color: white;
  background: #009bd5;
}


.modal button {
    border-radius:25px;
    display:inline-block;
    cursor:pointer;
    color:#ffffff;
    font-family:Arial;
    font-size:17px;
    padding:7px 22px;
    text-decoration:none;
    border:0 none;
    outline:none;
}

.modal button.ok {
    background-color:#44c767;
}
.modal button.ok:hover {
    background-color:#5cbf2a;
}

.modal button.annuler {
    background-color:#c62d1f;
}
.modal button.annuler:hover {
    background-color:#f24437;
}

.modal button.fermer {
    background-color:grey;
}
.modal button.fermer:hover {
    background-color:darkgrey;
}
.modal button:active {
    position:relative;
    top:1px;
}

.modal-container.erreur .modal,
.modal-container.erreur .modal h2,
.modal-container.erreur .modal p {
    background: red;
    color: white;
}

.modal-container.erreur .modal button.fermer,
.modal-container.erreur .modal button.fermer:hover {
    background: white;
    color: red;
}

.modal-container.contremarque .modal, 
.modal-container.contremarque .modal h2, 
.modal-container.contremarque .modal p {
	background: green;
	color: white;
}

.modal-container.contremarque .modal button.fermer,
.modal-container.contremarque .modal button.fermer:hover {
    background: white;
    color: green;
}

@keyframes unfoldIn {
  0% {
    transform: scaleY(0.005) scaleX(0);
  }
  50% {
    transform: scaleY(0.005) scaleX(1);
  }
  100% {
    transform: scaleY(1) scaleX(1);
  }
}
@keyframes unfoldOut {
  0% {
    transform: scaleY(1) scaleX(1);
  }
  50% {
    transform: scaleY(0.005) scaleX(1);
  }
  100% {
    transform: scaleY(0.005) scaleX(0);
  }
}
@keyframes zoomIn {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes zoomOut {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes fadeIn {
  0% {
    background: rgba(0, 0, 0, 0);
  }
  100% {
    background: rgba(0, 0, 0, 0.7);
  }
}
@keyframes fadeOut {
  0% {
    background: rgba(0, 0, 0, 0.7);
  }
  100% {
    background: rgba(0, 0, 0, 0);
  }
}
@keyframes scaleUp {
  0% {
    transform: scale(0.8) translateY(1000px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0px);
    opacity: 1;
  }
}
@keyframes scaleDown {
  0% {
    transform: scale(1) translateY(0px);
    opacity: 1;
  }
  100% {
    transform: scale(0.8) translateY(1000px);
    opacity: 0;
  }
}
@keyframes scaleBack {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0.85);
  }
}
@keyframes scaleForward {
  0% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes quickScaleDown {
  0% {
    transform: scale(1);
  }
  99.9% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
