input[type=checkbox]{
  height: 0;
  width: 0;
  visibility: hidden;
}

#label1 {
  cursor: pointer;
  text-indent: -9999px;
  width: 50px;
  height: 20px;
  background: #d8d8d8;
  background-image: url('../cap/non.png');
  background-repeat: no-repeat;
  background-position: right; 
  display: block;
  border-radius: 100px;
  position: relative;
}

#label1:after {
  content: '';
  position: absolute;
  top: 0px;
  left: 5px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 90px;
  transition: 0.3s;
  background-image: url('../cap/point.png');
  background-repeat: no-repeat;

}

input:checked + #label1 {
  background: #66cf91;
  background-image: url('../cap/oui.png');
  background-repeat: no-repeat;

}

input:checked + #label1:after {
  left: calc(100% - 5px);
  transform: translateX(-100%);
}

#label1:active:after {
  width: 130px;
}

// centering
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}