/* ============================================================
   StartBox Labs — App Shell (header fixe + sidebar accordeon)
   Repris du pattern TradeGuru (global.css), theme dore StartBox
   ============================================================ */

:root{
  --header-height: 72px;
  --sidebar-width: 300px;
}

body{ padding-top: var(--header-height); }

/* ---------- Header fixe ---------- */
.top-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(11, 15, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-line);
  z-index: 1000;
}
.header-container{
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ---------- Bouton sidebar (toujours visible) ---------- */
.sidebar-toggle{
  background: var(--panel);
  border: 1px solid var(--panel-line);
  color: var(--paper);
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.sidebar-toggle:hover{ border-color: var(--gold-light); transform: scale(1.04); }

/* ---------- Logo centre ---------- */
.logo-section{
  position: absolute;
  left: 50%;
  top: 0;
  height: 100%;
  transform: translateX(-50%);
  z-index: 5;
}
.logo-section .brand{
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
  padding-left: 116px;
}
.logo-section .cube{
  position: absolute;
  left: 0; top: 65%;
  transform: translateY(-50%);
  width: 100px; height: 100px;
  display: block;


}
.logo-section .brand-name{
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--paper);
}

/* ---------- Boutons (utilises partout : header, hero, etc.) ---------- */
.btn{ padding:10px 20px; border-radius:8px; font-weight:600; font-size:14px; text-decoration:none; display:inline-block; white-space:nowrap; }
.btn-primary{ background:var(--gold-light); color:#2A2005; }
.btn-secondary{ border:1px solid rgba(255,255,255,0.2); color:#fff; }

/* ---------- Actions droite ---------- */
.header-actions{ display:flex; align-items:center; gap:10px; }

/* ---------- Sidebar accordeon ---------- */
.sidebar-menu{
  position: fixed;
  top: 0; left: calc(-1 * var(--sidebar-width));
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--panel);
  border-right: 1px solid var(--panel-line);
  z-index: 1100;
  overflow-y: auto;
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 10px 0 30px rgba(0,0,0,0.4);
}
.sidebar-menu.active{ left: 0; }

.sidebar-header{
  padding: 18px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--panel-line);
}
.sidebar-header .cube{ width:34px; height:34px; }
.sidebar-title{ font-family:'Barlow Condensed', sans-serif; font-size:17px; font-weight:600; flex:1; }
.sidebar-close{
  background: none; border: none; color: var(--muted);
  font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.sidebar-close:hover{ background: rgba(255,255,255,0.06); color: var(--paper); }

.sidebar-content{ padding: 10px 0 30px; }

.menu-item{
  width: 100%;
  background: none; border: none;
  color: var(--paper);
  padding: 13px 20px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, padding 0.15s ease;
}
.menu-item:hover{ background: rgba(241,221,160,0.08); }
.menu-item .accordion-arrow{ margin-left: auto; font-size: 11px; color: var(--muted); transition: transform 0.25s ease; }
.menu-item.active .accordion-arrow{ transform: rotate(180deg); }

.submenu{
  max-height: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.18);
  transition: max-height 0.3s ease;
}
.submenu.active{ max-height: 600px; }
.submenu-item{
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
}
.submenu-item:hover{ color: var(--gold-light); background: rgba(241,221,160,0.06); }

.sidebar-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1050;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.active{ opacity: 1; visibility: visible; }

@media (max-width: 640px){
  :root{ --sidebar-width: 260px; }
  .logo-section .brand-name{ display:none; }
  .logo-section .brand{ padding-left: 0; }
  .logo-section .cube{ position:static; transform:none; width:56px; height:56px; }
}
