/* --------------------------------------------------------
   MENU ORBITAL 
--------------------------------------------------------- */

/* root sizing */
:root {
  --ks-size: 760px; /* base art world size (desktop) */
  --ks-center: calc(var(--ks-size) / 2);
  --ks-planet-size: 86px;
  --ks-planet-small: 70px;
  --ks-planet-icon-size: 50px;
  --ks-accent: #f7c67a;
  --ks-text: #1b2740;
}

.menu-open {
  display: none !important;
}

.ks-circle-hero.hidden {
  display: none;
}

#ks-circle-menu-title {
  width: 100%;
  text-align: center;
  position: absolute;
  top: 5%;
  background: linear-gradient(135deg, #ffffff, #a3a3a3, #ffffff);
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: shimmer 10s linear infinite;
  font-size: 42px;
  height: 50px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* container is centered fixed */
.ks-circle-hero {
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* planets will override */
  background: #fff;
  z-index: 10050;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background-size: 100% 100%;
}

/* SVG orbits fills the background */
.ks-orbits {
  position: absolute;
  width: var(--ks-size);
  height: var(--ks-size);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 12px 30px rgba(12, 20, 40, 0.12));
  pointer-events: none;
}

/* central wrapper */
.ks-center {
  position: absolute;
  width: 240px;
  height: 240px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: auto;
  cursor: pointer;
}

.ks-center::after {
  content: "\00d7";
  position: absolute;
  top: 0px;
  right: 45px;
  background-color: rgb(197, 64, 47);
  color: white;
  font-size: 1.6rem;
  font-weight: bold;
  width: 2rem;
  height: 2rem;
  display: flex;
  justify-content: center;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px;
  border-radius: 50%;
}

/* avatar circle */
.ks-central-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.06)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(20, 30, 60, 0.18),
    inset 0 2px 8px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ks-central-avatar img {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

/* name + brush badge */
.ks-name-wrap {
  margin-top: 14px;
  pointer-events: none;
}
.ks-pseudo {
  font-size: 1.8rem;
  color: var(--ks-text);
  font-weight: 700;
  margin-bottom: 8px;
}

/* brush + badge container layout */
.ks-points-wrap {
  position: relative;
  display: inline-block;
  width: 260px;
  height: 60px;
  vertical-align: middle;
  background-image: url("../img/yellow-brush.png");
  background-size: 100% 100%;
}

.ks-brush {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 56px;
  pointer-events: none;
  opacity: 0.98;
}
.ks-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ks-grade-text {
  font-size: 1.1rem;
  color: #2b2b2b;
  font-weight: 700;
}
.ks-points {
  font-size: 1.05rem;
  color: rgba(35, 35, 35, 0.9);
  font-weight: 600;
}

/* planets wrapper */
.ks-planets {
  position: absolute;
  width: var(--ks-size);
  height: var(--ks-size);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

/* common planet style */
.ks-planet {
  position: absolute;
  width: var(--ks-planet-size);
  height: var(--ks-planet-size);
  border-radius: 50%;
  border: 0px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(14, 30, 80, 0.18),
    inset 0 -6px 18px rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  -webkit-transition: -webkit-transform ease-out 200ms;
  transition: -webkit-transform ease-out 200ms;
  transition: transform ease-out 200ms;
  transition: transform ease-out 200ms, -webkit-transform ease-out 200ms;
}

/* icons inside planets */
.ks-planet-icon {
  width: var(--ks-planet-icon-size);
  height: var(--ks-planet-icon-size);
  color: white;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.25));
  font-size: var(--ks-planet-icon-size);
}

/* label under each planet */
.ks-planet-label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--ks-text);
  font-weight: 600;
  font-size: 1rem;
  pointer-events: none;
}

/* individual planet colors to match pastel image */

#menu-open:checked ~ #ks-planets .ks-planet {
  -webkit-transition-timing-function: cubic-bezier(0.935, 0, 0.34, 1.33);
  transition-timing-function: cubic-bezier(0.935, 0, 0.34, 1.33);
}

.ks-planet {
  transform: translate3d(0, 0, 0);
  transition: transform ease-out 200ms;
}

.ks-planet-logout {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 20% 20%,
    #eb8080 0%,
    #f53d3d 40%,
    #f11616 100%
  );
}

.ks-planet-dash {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 20% 20%,
    #9ad8ff 0%,
    #5fb2ff 40%,
    #3b8fff 100%
  );
}
.ks-planet-missions {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 30% 30%,
    #bfe8c9 0%,
    #7dd871 50%,
    #29bb55 100%
  );
}
.ks-planet-msg {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 30% 20%,
    #ffd1c3 0%,
    #ff9b78 50%,
    #ff7b5c 100%
  );
}
.ks-planet-profile {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 20% 20%,
    #c3d7ff 0%,
    #7ea8ff 50%,
    #5b8dff 100%
  );
}
.ks-planet-agenda {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 20% 25%,
    #ffd9b3 0%,
    #ffc08a 50%,
    #ffb16d 100%
  );
}
.ks-planet-agenda2 {
  -webkit-transition-duration: 180ms;
  transition-duration: 180ms;
  background: radial-gradient(
    circle at 20% 20%,
    #bfe1ff 0%,
    #89c8ff 50%,
    #57b0ff 100%
  );
}

/* hover lifts */
.ks-planet:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 28px 60px rgba(12, 28, 60, 0.28);
}

/* POSITIONS DES ORBITES*/
#menu-open:checked ~ #ks-planets .ks-planet-logout {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(0px, -210px, 0);
  transform: translate3d(0px, -210px, 0);
}

.ks-planet-logout {
  left: calc(44%);
  top: calc(36%);
}

#menu-open:checked ~ #ks-planets .ks-planet-dash {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(-270px, 50px, 0);
  transform: translate3d(-270px, 50px, 0);
}

.ks-planet-dash {
  left: calc(44%);
  top: calc(36%);
}

/* Missions upper-left */

#menu-open:checked ~ #ks-planets .ks-planet-missions {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(-180px, -110px, 0);
  transform: translate3d(-180px, -110px, 0);
}

.ks-planet-missions {
  left: calc(44%);
  top: calc(36%);
}

/* Messages upper-right */
#menu-open:checked ~ #ks-planets .ks-planet-msg {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(180px, -110px, 0);
  transform: translate3d(180px, -110px, 0);
}

.ks-planet-msg {
  left: calc(44%);
  top: calc(36%);
}

/* Profile right */

#menu-open:checked ~ #ks-planets .ks-planet-profile {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(270px, 50px, 0);
  transform: translate3d(270px, 50px, 0);
}

.ks-planet-profile {
  left: calc(44%);
  top: calc(36%);
}

/* Agenda lower-left */
#menu-open:checked ~ #ks-planets .ks-planet-agenda {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(-150px, 260px, 0);
  transform: translate3d(-150px, 260px, 0);
}

.ks-planet-agenda {
  left: calc(44%);
  top: calc(36%);
}

/* Agenda 2 lower (bottom center-ish) */
#menu-open:checked ~ #ks-planets .ks-planet-agenda2 {
  transition-duration: 180ms;
  -webkit-transition-duration: 180ms;
  -webkit-transform: translate3d(150px, 260px, 0);
  transform: translate3d(150px, 260px, 0);
}

.ks-planet-agenda2 {
  left: calc(44%);
  top: calc(36%);
}

/* small screens: scale down everything and reposition */
@media (max-width: 1000px) {
  :root {
    --ks-size: 450px;
    --ks-planet-size: 60px;
    --ks-planet-small: 50px;
    --ks-planet-icon-size: 30px;
  }

  #ks-circle-menu-title {
    top: 18%;
    font-size: 35px;
    height: 50px;
  }

  .ks-planet-icon {
    width: var(--ks-planet-icon-size);
    height: var(--ks-planet-icon-size);
    font-size: var(--ks-planet-icon-size);
  }

  .ks-orbits {
    width: var(--ks-size);
    height: var(--ks-size);
  }

  .ks-center {
    top: 53%;
  }
  .ks-central-avatar {
    width: 100px;
    height: 100px;
  }
  .ks-central-avatar img {
    width: 86px;
    height: 86px;
  }
  .ks-name-wrap .ks-pseudo {
    font-size: 1rem;
  }

  .ks-points-wrap {
    font-size: 1.1rem;
    height: 40px;
  }

  .ks-grade-text,
  .ks-points {
    font-size: 0.8rem;
  }

  .ks-planet-label {
    font-size: 0.9rem;
  }
  /* positions reduce distances */
  #menu-open:checked ~ #ks-planets .ks-planet-logout {
    -webkit-transform: translate3d(0px, -160px, 0);
    transform: translate3d(0px, -160px, 0);
  }
  #menu-open:checked ~ #ks-planets .ks-planet-dash {
    -webkit-transform: translate3d(-150px, 30px, 0);
    transform: translate3d(-150px, 30px, 0);
  }
  #menu-open:checked ~ #ks-planets .ks-planet-profile {
    -webkit-transform: translate3d(150px, 30px, 0);
    transform: translate3d(150px, 30px, 0);
  }

  #menu-open:checked ~ #ks-planets .ks-planet-missions {
    -webkit-transform: translate3d(-120px, -80px, 0);
    transform: translate3d(-120px, -80px, 0);
  }

  #menu-open:checked ~ #ks-planets .ks-planet-msg {
    -webkit-transform: translate3d(120px, -80px, 0);
    transform: translate3d(120px, -80px, 0);
  }

  #menu-open:checked ~ #ks-planets .ks-planet-agenda {
    -webkit-transform: translate3d(-70px, 180px, 0);
    transform: translate3d(-70px, 180px, 0);
  }

  #menu-open:checked ~ #ks-planets .ks-planet-agenda2 {
    -webkit-transform: translate3d(70px, 180px, 0);
    transform: translate3d(70px, 180px, 0);
  }

  .ks-planet-logout,
  .ks-planet-dash,
  .ks-planet-missions,
  .ks-planet-msg,
  .ks-planet-profile,
  .ks-planet-agenda,
  .ks-planet-agenda2 {
    left: calc(44%);
    top: calc(36%);
  }
}

/* mobile: hide the big galaxy and show a compact version (optional) */
@media (max-width: 600px) {
}

/* --------------------------------------------------------
   SIDEBAR NAV —  DESKTOP
--------------------------------------------------------- */
/* Sidebar Desktop */
.ks-desktop-sidebar {
  position: fixed;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  backdrop-filter: blur(12px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
  max-width: 80px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-radius: 0 10px 10px 0px;
}

/* Sidebar Navigation Buttons */
.ks-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.ks-sidebar-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px 12px;
  background: transparent;
  color: #555555;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
  border: none;
  border-radius: 0px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ks-sidebar-item i {
  font-size: 22px;
  margin-bottom: 4px;
}

/* Hover Effect */

.ks-sidebar-item:hover {
  color: #555555;
  transform: translateX(10px); /* décalage à droite + légère augmentation */
  background: #faf9f7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* léger relief */
}

/* Responsive adjustments (optional) */
@media (max-width: 1024px) {
  .ks-desktop-sidebar {
    left: 10px;
    max-width: 60px;
    padding: 8px 6px;
  }

  .ks-sidebar-item i {
    font-size: 20px;
  }

  .ks-sidebar-item {
    font-size: 0.7rem;
    padding: 8px 10px;
  }
}

/* --------------------------------------------------------
   MOBILE NAV —  AIRBNB STYLE
--------------------------------------------------------- */

.ks-mobile-nav {
  position: fixed;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  height: 70px;

  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

  display: flex;
  justify-content: space-around;
  align-items: center;

  padding: 0 12px;
  z-index: 99999;

  transition: all 0.3s ease-in-out;
}

/* Mobile hidden state if needed later */
.ks-mobile-nav.is-hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}

/* --------------------------------------------------------
   NAV ITEMS
--------------------------------------------------------- */

.ks-mobile-item {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  color: #555555;
  font-size: 0.75rem;
  font-weight: 500;

  gap: 3px;
  transition: transform 0.15s ease, opacity 0.2s;
}

.ks-mobile-item i {
  font-size: 1.4rem;
}

/* Hover (mobile safe: only affects desktop inspector) */
.ks-mobile-item:hover {
  color: #555555;
  transform: scale(1.08);
}

/* Active click */
.ks-mobile-item:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------
   SMALLER SCREENS COMPATIBILITY
--------------------------------------------------------- */

@media (max-width: 420px) {
  .ks-mobile-nav {
    height: 62px;
    width: 100%;
  }

  .ks-mobile-item i {
    font-size: 1.25rem;
  }

  .ks-mobile-item span {
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  .ks-mobile-nav {
    height: 60px;
    gap: 4px;
    padding: 0 6px;
  }

  .ks-mobile-item span {
    display: none; /* icons only for very small screens */
  }
}
