body {
  background-color: black;
  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;
  height: 100vh;
  overflow: hidden;
  font-family: "Syncopate";
}
#mainNav .logo {
  width: 200px;
  position: absolute;
  top: 20px;
  left: calc(100vw / 4 - 200px / 2);
}
#mainNav-toggle {
  position: absolute;
  top: 20px;
  right: calc(100vw / 4 - 200px / 2);
  color: white;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
}
#mainNav-toggle .mainNav-close {
  font-style: normal;
  display: none;
}

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

#mainNav > ul {
  position: absolute;
  width: 1024px;
  height: 100vh;
  aspect-ratio: 1 / 1;
  left: calc(100vw / 2 - 1024px / 2);
  top: 0;
  margin: 0 auto;
  /* overflow: hidden; */
  transition: all 2s;
  transform: scale(1) rotate(0deg) translate3d(0, 0, 0);
  opacity: 0;
}
.mainNav-opened > ul {
  opacity: 1 !important;
}
/* nav ROOT - Nav lvl 1 (axe) */
/* le premier niveau de la liste regroupe les lien par "axe" */
#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.1rem;
  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(7);
}
.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);
  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: 10px;
  height: 10px;
  border-radius: 50%;
  background: red;
}

#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;
}
