/* ============================
   HCJINATOR — Shell Layout
   Toggle button + Panel coulissant
   ============================ */

/* --- Toggle button (fixed, bottom-right) --- */
.universe-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #C8CCD4;
  background: #0A0E14;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(200, 204, 212, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: toggle-pulse 2.5s ease-in-out infinite;
}

.universe-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 0 24px rgba(200, 204, 212, 0.3), 0 4px 16px rgba(0, 0, 0, 0.5);
}

.universe-toggle.is-open {
  border-color: #c786b9;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(199, 134, 185, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: none;
}

.universe-toggle.is-open:hover {
  box-shadow: 0 0 30px rgba(199, 134, 185, 0.5), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.toggle-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

@keyframes toggle-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(200, 204, 212, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 28px rgba(200, 204, 212, 0.35), 0 4px 16px rgba(0, 0, 0, 0.5); }
}

/* --- Main content wrapper (shifts when panel opens) --- */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: margin-left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content-wrapper.pushed {
  margin-left: 400px;
}

/* Login wrapper: center the card in remaining space */
.main-content-wrapper.login-wrapper {
  align-items: center;
  justify-content: center;
  background: var(--ge-beige, #f0e6d6);
}

/* Override pages to not conflict with wrapper */
body.webmail-page {
  display: block;
  overflow: hidden;
  height: 100vh;
}

body.login-page {
  display: block;
  min-height: 100vh;
}

body.login-page .login-container {
  padding: 20px;
  max-width: 420px;
  width: 100%;
}

/* --- Fuitoscope panel (slides from left) --- */
.fuitoscope-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 100vh;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.fuitoscope-panel.open {
  transform: translateX(0);
}

/* --- Responsive: overlay on small screens --- */
@media (max-width: 900px) {
  .fuitoscope-panel {
    width: 100vw;
  }

  .main-content-wrapper.pushed {
    margin-left: 0;
  }

  /* Backdrop overlay */
  .fuitoscope-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .fuitoscope-backdrop.visible {
    display: block;
  }
}

/* --- Accessibilite : prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  .universe-toggle,
  .main-content-wrapper,
  .fuitoscope-panel {
    transition: none !important;
    animation: none !important;
  }
  .universe-toggle:hover {
    transform: none;
  }
}
