/* ========================================
   RESET & BASE
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  color: #333;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ========================================
   SIDEBAR STRUCTURE
   ======================================== */
.jupiterx-with-sidebar {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.jupiterx-main-content {
  flex: 1;
  margin-left: 280px;
  width: calc(100% - 280px);
  transition: margin-left 0.3s ease;
}

/* ========================================
   SIDEBAR PRINCIPALE
   ======================================== */
.jupiterx-sidebar {
  width: 280px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #082548, #082548) !important;
  color: #ffffff !important;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
  transform: translateX(0);
  transition: transform 0.3s ease;
}

/* Mobile Portrait - Cacher la sidebar */
@media (max-width: 768px) {
  .jupiterx-sidebar {
    transform: translateX(-100%) !important;
  }

  .jupiterx-sidebar.active {
    transform: translateX(0) !important;
  }

  .jupiterx-main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Ajuster le layout */
  .jupiterx-with-sidebar {
    flex-direction: row;
  }

  /* Responsive widgets */
  .widget {
    padding: 15px;
  }

  .widget-title {
    font-size: 15px;
  }

  .sidebar-menu a,
  .menu a {
    font-size: 13px;
    padding: 10px 15px;
  }

  /* Ajuster logo */
  .sidebar-logo h2 {
    font-size: 16px;
  }

  .sidebar-logo p {
    font-size: 11px;
  }
}

/* État caché sur mobile */
.jupiterx-sidebar.hidden {
  transform: translateX(-100%);
}

/* ========================================
   HEADER SIDEBAR
   ======================================== */
.sidebar-header {
  padding: 25px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, #082548, #082548) !important;
}

.sidebar-logo-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.sidebar-logo h2 {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  margin: 10px 0 5px;
  line-height: 1.3;
}

.sidebar-logo p {
  font-size: 12px;
  color: #ecf0f1;
  font-style: italic;
  line-height: 1.4;
}

/* ========================================
   CORPS DE LA SIDEBAR
   ======================================== */
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.widget {
  background: #082548;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 107, 71, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 71, 0.2);
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff !important;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 3px solid #ff6b47 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 28px;
  height: 3px;
  background: linear-gradient(90deg, #ff6b47, #082548) !important;
  border-radius: 2px;
}

/* ========================================
   MENU LIENS
   ======================================== */
.sidebar-menu,
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li,
.menu li {
  margin-bottom: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sidebar-menu li:hover,
.menu li:hover {
  transform: translateX(5px);
}

.sidebar-menu a,
.menu a {
  display: block;
  padding: 12px 18px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar-menu a:hover,
.menu a:hover {
  color: #ff6b47 !important;
  background: rgba(255, 107, 71, 0.1) !important;
  border-left-color: #ff6b47 !important;
  padding-left: 22px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.sidebar-menu a::before,
.menu a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 107, 71, 0.15), transparent);
  border-radius: 8px;
  transition: width 0.3s ease;
}

.sidebar-menu a:hover::before,
.menu a:hover::before {
  width: 100%;
}

/* Animation d'apparition */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.widget {
  animation: fadeInUp 0.4s ease-out forwards;
}

.widget:nth-child(1) { animation-delay: 0.1s; }
.widget:nth-child(2) { animation-delay: 0.2s; }
.widget:nth-child(3) { animation-delay: 0.3s; }
.widget:nth-child(4) { animation-delay: 0.4s; }

/* ========================================
   FOOTER SIDEBAR
   ======================================== */
.sidebar-footer {
  padding: 15px 20px;
  background: linear-gradient(135deg, #082548, #082548);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  text-align: center;
}

.sidebar-footer p {
  color: #ecf0f1;
  margin: 5px 0;
}

/* ========================================
   JUPITERX & GLOBAL FIXES
   ======================================== */
.jupiterx-main,
.jupiterx-content,
.content-area {
  padding: 0 !important;
  margin: 0 auto;
  max-width: 100%;
}

/* Empêcher le scroll horizontal */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ========================================
   OVERRIDE FINAL - COULEURS CAT FORCÉES
   ======================================== */
/* Force les couleurs CAT sur tous les éléments de la sidebar */
.jupiterx-sidebar,
.sidebar-header,
.sidebar-footer {
  background: linear-gradient(135deg, #082548, #082548) !important;
}

.widget-title {
  border-bottom-color: #ff6b47 !important;
  color: #ffffff !important;
}

.widget-title::after {
  background: linear-gradient(90deg, #ff6b47, #082548) !important;
}

.sidebar-menu a:hover,
.menu a:hover,
.jupiterx-sidebar a:hover {
  color: #ff6b47 !important;
  border-left-color: #ff6b47 !important;
  background: rgba(255, 107, 71, 0.1) !important;
}

.widget {
  border-color: rgba(255, 107, 71, 0.3) !important;
}

.widget:hover {
  box-shadow: 0 8px 20px rgba(255, 107, 71, 0.2) !important;
}

