body {
  margin: 0;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* reset toute les ul */
#mainNav ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

/* nav ROOT  -*/
#mainNav {
  position: relative;
  overflow: hidden;
  font-family: "Syncopate";
}

.elementor-icon {
  cursor: pointer;
}

#mainNav-toggle .mainNav-close {
  font-style: normal;
  display: none;
}
.mainNav-opened {
  overflow: hidden;
}
.mainNav-opened .elementor-icon .fas:after {
  content: "";
  font-weight: normal;
  width: 35px;
  height: 30px;
  display: inline-block;
  background-image: url("https://www.hozzeo.com/wp-content/themes/hello-elementor/assets/images/close.png");
  background-size: cover;
}
.mainNav-opened .elementor-icon .fas::before {
  display: none;
}

.mainNav-opened #mainNav-toggle .mainNav-close {
  display: inline;
}
.mainNav-opened #mainNav-toggle .mainNav-open {
  display: none;
}

body > *:not(#mainNav) {
  opacity: 1;
  transition: opacity 2s;
}
.mainNav-opened #mainNav{
  z-index: 10;
}
.mainNav-opened #mainNav > ul {
  opacity: 1 !important;
}
/* @todo pourquoi wp_footer est wrapper dans un b ??? */
.mainNav-opened
  body
  > *:not(#mainNav):not(.elementor-location-header):not(#galaxy) {
  opacity: 0 !important;
}

.elementor-location-header {
  position: relative;
  z-index: 20;
}



/* nav ROOT - Nav lvl 1 (axe) */
/* le premier niveau de la liste regroupe les lien par "axe" */

@media screen and (min-width: 950px) {
  #mainNav > ul {
    position: fixed;
    width: 850px;
    height: 100vh;
    aspect-ratio: 1 / 1;
    left: calc(100vw / 2 - 850px / 2);
    top: -110px;
    margin: 0 auto;
    /* overflow: hidden; */
    transition: all 2s;
    transform: scale(1) rotate(0deg) translate3d(0, 0, 0);
    opacity: 0;
  }
  #mainNav > ul > li {
    height: 100vh;
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  #mainNav .axeWrapper {
    transform-style: preserve-3d;
    position: absolute;
    inset: 0;
    transform-origin: center;
    aspect-ratio: 1 / 1;
  }

  /* nav ROOT - Nav lvl 1 -- axe svg */
  #mainNav svg {
    position: relative;
    pointer-events: none;
    width: 90%;
    left: 5%;
    top: 5%;
    transition: opacity 1s;
  }
  #mainNav svg {
    animation: rotation 15s linear infinite;
  }

  /* nav ROOT - Nav lvl 1 -- link list */
  .mainNav--lvl1 {
    transform-style: preserve-3d;
    position: absolute;
    inset: 0;
    aspect-ratio: 1 / 1;
    width: 90%;
    left: 5%;
    top: 5%;
  }
  .mainNav--lvl1 > li {
    position: absolute;
    height: 0;
    transform-origin: center left;
    border: 1px solid green;
  }

  .mainNav--lvl1 > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    color: white;
    font-size: 1.3rem;
    text-transform: uppercase;
    position: absolute;
  }

  .mainNav--lvl1 > li > a .planete {
    /* planête */
    display: flex;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.5s;
    position: relative;
    left: -10px;
    top: -10px;
  }
  .mainNav--lvl1 > li > a .lib {
    white-space: nowrap;
  }
  /* planete over et zoomer / open */
  .mainNav--lvl1 > li:hover .planete {
    transform: scale(2);
  }
  .mainNav--lvl1 > li.isOpen .planete {
    transform: scale(5);
  }
  .mainNav--lvl1 > li.isOpen .planete:before,
  .mainNav--lvl1 > li:hover .planete:before {
    content: "";
    position: absolute;
    border: 1px solid white;
    width: 30px;
    height: 30px;
    left: -5px;
    top: -5px;
    border-radius: 50%;
  }

  .mainNav-lvl2-opened :not(.isOpen) svg {
    opacity: 0;
  }

  .mainNav--lvl1 > li.isOpen .lib {
    opacity: 0;
  }

  svg.keepVisible {
    opacity: 1 !important;
  }

  /* nav ROOT - Nav lvl 2 */
  .mainNav--lvl2 {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    opacity: 0;
    transition: all 1s 1s;
  }
  li.isClosing .mainNav--lvl2 {
    transition: all 1s !important;
  }
  li.isOpen .mainNav--lvl2 {
    opacity: 1;
  }
  .mainNav--lvl2 > li {
    position: absolute;
    display: flex;
    gap: 15px;
    align-items: center;

    --angle: 360deg / var(--ln) * var(--i) - 8deg;
    left: calc(200px * cos(var(--angle)));
    top: calc(200px * sin(var(--angle)));
  }

  .mainNav--lvl2 > li a {
    text-transform: none;
    white-space: nowrap;
    color: white;
    gap: 10px;
    display: flex;
    pointer-events: auto;
  }

  .orig-left {
    transform-origin: center left;
  }
  .orig-right {
    transform-origin: center right;
  }
  .orig-center {
    transform-origin: center center;
  }

  .mainNav--lvl2 > li a:before {
    content: "";
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: red;
  }

  .mainNav--lvl2 .txt-blue a:before {
    background: #3D5D9C;
  }
  .mainNav--lvl2 .txt-orange a:before {
    background: #BD7513;
  }
  .mainNav--lvl2 .txt-purple a:before {
    background: #50368C;
  }
  .mainNav--lvl2 .txt-gray a:before {
    background: #A6A6A6;
  }
  .mainNav--lvl2 .txt-red a:before {
    background: #AA1917;
  }

  #mainNav .txt-right > a {
    display: flex;
    align-items: center;
  }
  #mainNav .txt-left > a {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    margin-left: -100%;
  }
  #mainNav .txt-bottom > a {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-left: -50%;
  }
  #mainNav .txt-top > a {
    display: flex;
    align-items: center;
    flex-direction: column-reverse;
    margin-left: -50%;
    bottom: 0;
  }

  #mainNav .txt-top-right > a {
    display: flex;
    align-items: start;
    flex-direction: column-reverse;
    bottom: 0;
    transform-origin: bottom left;
  }
  #mainNav .txt-top-right > a .planete {
    top: 10px;
  }

  #mainNav .txt-bottom-left > a {
    display: flex;
    align-items: end;
    flex-direction: column;
    /* top: 50%; */
    right: 0;
  }
  #mainNav .txt-bottom-left > a .planete {
    left: 10px;
  }

  #mainNav .txt-bottom-right > a {
    display: flex;
    align-items: start;
    flex-direction: column;
    /* top: 50%; */
    /* left: -100%; */
  }

  #mainNav .txt-top-left > a {
    display: flex;
    align-items: end;
    flex-direction: column-reverse;
    right: 0;
    bottom: 0;
  }
  #mainNav .txt-top-left > a .planete {
    left: 10px;
    top: 10px;
  }
  .mobile-caret {
    display: none;
  }
}


@media screen and (max-width:949px){
  #mainNav > ul {
    position: fixed;
    width: 300px;
    height: calc(100vh);
    left: calc(50% - 150px);
    top: 0;
    margin: 0 auto;
    /* overflow: hidden; */
    transition: all 2s;
    transform: scale(1) rotate(0deg) translate3d(0, 0, 0);
    opacity: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #mainNav svg{
    display: none;
  }

  #mainNav ul ul ul{
    display: none;
    border-left: 1px solid white;
    padding-left: 20px;
    margin: 10px;
  }
  #mainNav ul ul > li {
    padding: 10px 0;
  }
  #mainNav ul ul > li  > a{
    color: white;
  }

  #mainNav .isOpenMobile ul{
    display: block;
  }
  .mobile-caret {
    margin:10px
  }
}
