.logo {
  aspect-ratio: auto 300/90.78; 
  display: block;
  margin: 8px;
  width: 300px;
  height: auto;
  z-index: 5;
  position: relative;
}

#icon_burger {
  margin: auto;
}
/* bouton contact header */
.contact {
  font-family: "Kodchasan";
  font-size: 1.2em;
  text-decoration: none;
  color: white;
  background-color: #c1191a;
  display: block;
  padding: 30px;
  border-radius: 0px 0px 25px 25px;
}

.contact:hover {
  color: #c1191a;
  background-color: white;
}

#contact_menu {
  /*padding-right: 150px;*/
  z-index: 4;
  position: relative;
  display: flex;
  flex-direction: row;
  /*margin-right: 40px;*/
  margin-top: -107px;
  max-width: 160px;
  left: 80%;
  justify-content: flex-end;
}

/* burger menu */
#menu-icon[type="checkbox"]:checked,
#menu-icon[type="checkbox"]:not(:checked) {
  position: absolute;
  left: -9999px;
}
.menu-icon:checked + label,
.menu-icon:not(:checked) + label {
  position: fixed;
  top: 38px;
  right: 75px;
  display: block;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 10;
}
.menu-icon:checked + label:before,
.menu-icon:not(:checked) + label:before {
  position: absolute;
  content: "";
  display: block;
  width: 30px;
  height: 20px;
  z-index: 20;
  top: 0;
  left: 0;
  border-top: 2px solid #ececee;
  border-bottom: 2px solid #ececee;
  transition: border-width 100ms 1500ms ease,
    top 100ms 1600ms
      cubic-bezier(0.23, 1, 0.32, 1),
    height 100ms 1600ms
      cubic-bezier(0.23, 1, 0.32, 1),
    background-color 200ms ease,
    transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.menu-icon:checked + label:after,
.menu-icon:not(:checked) + label:after {
  position: absolute;
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  z-index: 20;
  top: 10px;
  right: 4px;
  background-color: #ececee;
  margin-top: -1px;
  transition: width 100ms 1750ms ease,
    right 100ms 1750ms ease, margin-top 100ms ease,
    transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.menu-icon:checked + label:before {
  top: 10px;
  transform: rotate(45deg);
  height: 2px;
  background-color: #ececee;
  border-width: 0;
  transition: border-width 100ms 340ms ease,
    top 100ms 300ms cubic-bezier(0.23, 1, 0.32, 1),
    height 100ms 300ms
      cubic-bezier(0.23, 1, 0.32, 1),
    background-color 200ms 500ms ease,
    transform 200ms 1700ms
      cubic-bezier(0.23, 1, 0.32, 1);
}
.menu-icon:checked + label:after {
  width: 30px;
  margin-top: 0;
  right: 0;
  transform: rotate(-45deg);
  transition: width 100ms ease, right 100ms ease,
    margin-top 100ms 500ms ease,
    transform 200ms 1700ms
      cubic-bezier(0.23, 1, 0.32, 1);
}

.nav {
  position: fixed;
  top: 10px;
  right: 50px;
  display: block;
  width: 80px;
  height: 80px;
  padding: 0;
  margin: 0;
  z-index: 9;
  overflow: hidden;
  box-shadow: 0 8px 30px 0 rgba(0, 0, 0, 0.055);
  background-color: #c1191a;
  border: white solid 1px;
  animation: border-transform 7s linear infinite;
  transition: top 350ms 1100ms
      cubic-bezier(0.23, 1, 0.32, 1),
    right 350ms 1100ms
      cubic-bezier(0.23, 1, 0.32, 1),
    transform 250ms 1100ms ease,
    width 650ms 400ms
      cubic-bezier(0.23, 1, 0.32, 1),
    height 650ms 400ms
      cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes border-transform {
  0%,
  100% {
    border-radius: 63% 37% 54% 46% / 55% 48% 52%
      45%;
  }
  14% {
    border-radius: 40% 60% 54% 46% / 49% 60% 40%
      51%;
  }
  28% {
    border-radius: 54% 46% 38% 62% / 49% 70% 30%
      51%;
  }
  42% {
    border-radius: 61% 39% 55% 45% / 61% 38% 62%
      39%;
  }
  56% {
    border-radius: 61% 39% 67% 33% / 70% 50% 50%
      30%;
  }
  70% {
    border-radius: 50% 50% 34% 66% / 56% 68% 32%
      44%;
  }
  84% {
    border-radius: 46% 54% 50% 50% / 35% 61% 39%
      65%;
  }
}

.menu-icon:checked ~ .nav {
  animation-play-state: paused;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  width: 200%;
  height: 200%;
  transition: top 350ms 700ms
      cubic-bezier(0.23, 1, 0.32, 1),
    right 350ms 700ms
      cubic-bezier(0.23, 1, 0.32, 1),
    transform 250ms 700ms ease,
    width 750ms 1000ms
      cubic-bezier(0.23, 1, 0.32, 1),
    height 750ms 1000ms
      cubic-bezier(0.23, 1, 0.32, 1);
}

.nav ul {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  z-index: 6;
  text-align: center;
  transform: translateY(-50%);
  list-style: none;
}
.nav ul li {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 10px 0;
  text-align: center;
  list-style: none;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: all 250ms linear;
}
.nav ul li:nth-child(1) {
  transition-delay: 200ms;
}
.nav ul li:nth-child(2) {
  transition-delay: 150ms;
}
.nav ul li:nth-child(3) {
  transition-delay: 100ms;
}
.nav ul li:nth-child(4) {
  transition-delay: 50ms;
}
.nav ul li a {
  font-family: "Kodchasan", sans-serif;
  font-size: 9vh;
  text-transform: uppercase;
  line-height: 1.2;
  font-weight: 800;
  display: inline-block;
  position: relative;
  color: #ececee;
  transition: all 250ms linear;
  text-decoration: none;
  text-transform: uppercase;
}
.nav ul li a:hover {
  text-decoration: none;
  color: black;
}
.nav ul li a:after {
  display: block;
  position: absolute;
  top: 50%;
  content: "";
  height: 2vh;
  margin-top: -1vh;
  width: 0;
  left: 0;
  background-color: #c1191a;
  opacity: 0.7;
  transition: width 250ms linear;
}
.nav ul li a:hover:after {
  width: 100%;
}

.menu-icon:checked ~ .nav ul li {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 350ms ease,
    transform 250ms ease;
}
.menu-icon:checked ~ .nav ul li:nth-child(1) {
  transition-delay: 1400ms;
}
.menu-icon:checked ~ .nav ul li:nth-child(2) {
  transition-delay: 1480ms;
}
.menu-icon:checked ~ .nav ul li:nth-child(3) {
  transition-delay: 1560ms;
}
.menu-icon:checked ~ .nav ul li:nth-child(4) {
  transition-delay: 1640ms;
}

@media screen and (max-width: 1540px) {
  #contact_menu {
    left: 78%;
  }
}

@media screen and (max-width: 1380px) {
  #contact_menu {
    left: 76%;
  }
}
@media screen and (max-width: 1280px) {
  #contact_menu {
    left: 72%;
  }
}

@media screen and (max-width: 1080px) {
  .nav ul li a {
    font-size: 6vh;
  }
  
  .logo {
    width: 220px;
    margin: 10px auto auto 15px;
  }
  
   #contact_menu {
    margin-top: -77px;
    left: 70%;
  }
  
  .contact {
    font-size: 1.2rem;
    padding: 22px;
  }

  .menu-icon:checked + label,
  .menu-icon:not(:checked) + label {
    right: 47px;
    top: 30px;
  }

  .nav {
    width: 60px;
    height: 60px;
    right: 30px;
  }
  
  .menu-icon:checked ~ .nav {
    top: 50%;
  }
}

@media screen and (max-width: 992px) {
  /* menu icon burger */
  .nav {
    right: 30px;
  }

  .nav ul li a {
    font-size: 5vh;
  }
  
   #contact_menu {
    left: 67%;
  }

  .menu-icon:checked ~ .nav {
    top: 50%;
  }
}

@media all and (max-width: 885px) {
  .nav ul li a {
    font-size: 5vh;
  }

  .menu-icon:checked ~ .nav {
    top: 50%;
  }
  
    #contact_menu {
    left: 64%;
  }
}

@media all and (max-width: 768px) {
  .nav ul li a {
    font-size: 6vh;
  }

    #contact_menu {
    left: 61%;
  }
}

@media all and (max-width: 680px) {
  .nav ul li a {
    font-size: 5vh;
  }

  .menu-icon:checked ~ .nav {
    top: 50%;
  }

  .logo {
    width: 200px;
  }

  #contact_menu {
    left: 59%;
    margin-top: -72px;
  }
}

@media all and (max-width: 576px) {
  .nav ul li a {
    font-size: 4vh;
  }
  
  #contact_menu {
    display: none;
  }

  .menu-icon:checked ~ .nav {
    top: 50%;
  }

  .logo {
    width: 180px;
  }
  
  .toggle {
    font-size: 1.4rem;
  }
}

@media all and (max-width: 450px) {
  .nav ul li a {
    font-size: 3vh;
  }

  .menu-icon:checked ~ .nav {
    top: 50%;
  }

  .menu-icon:not(:checked) + label {
    right: 41px;
  }

  .nav {
    right: 25px;
  }
  
  .logo {
  width: 170px;
  }
}

@media all and (max-width: 380px) {
  .menu-icon:checked ~ .nav {
    top: 50%;
  }
  
  .logo {
   width: 160px;
   margin-left: 10px;
  }
}
