/* ═══════════════════════════════════════════════════════════════
   Panneau latéral (Boucles)
   ═══════════════════════════════════════════════════════════════ */

/* Zone principale */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ─── Panel gauche — Boucles ─── */
.panel-left {
  width: 240px;
  background: var(--bg1);
  border-right: 1px solid var(--bdr);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width .25s ease;
  overflow: hidden;
  min-width: 0;
  position: relative;
}
.panel-left.collapsed { width: 0; border-right: none; }

.panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tx);
  font-weight: 700;
}

.pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: linear-gradient(180deg, var(--plhead-bg1) 0%, var(--plhead-bg2) 100%);
  border-bottom: 1px solid var(--bdr);
  flex-shrink: 0;
}

.pl-close {
  background: var(--bg3);
  border: 1px solid var(--bdr);
  border-right: none;
  color: var(--tx3);
  cursor: pointer;
  font-size: 10px;
  padding: 0;
  border-radius: 5px 0 0 5px;
  transition: all .15s;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.pl-close:hover { background: var(--bg4); color: var(--tx); }

.pl-body { flex: 1; overflow-y: auto; padding: 4px 6px; }

/* Emplacements de boucles */
.li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 3px;
  font-size: 14px;
  transition: background .15s, border-color .15s;
  border: 1px solid transparent;
}
.li:hover { background: var(--bg3); }
.li.active { background: var(--acc2); border-color: var(--acc); }
.li.drag-over-top { border-top: 2px solid var(--acc); }
.li.drag-over-bottom { border-bottom: 2px solid var(--acc); }
.li.dragging { opacity: .4; }

.ldot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255, 255, 255, .15);
  cursor: pointer;
}

.ldrag {
  cursor: grab;
  color: var(--tx3);
  font-size: 15px;
  flex-shrink: 0;
  padding: 0 2px;
  line-height: 1;
}
.ldrag:active { cursor: grabbing; }

.lname {
  flex: 1;
  color: var(--tx);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lname.empty { color: var(--tx3); font-style: italic; }

.lmenu-btn {
  background: none;
  border: 1px solid var(--bdr);
  color: var(--tx3);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
}
.lmenu-btn:hover { background: var(--bg4); border-color: var(--acc); color: var(--acc); }

/* Menu contextuel des emplacements */
.slot-ctx {
  position: absolute;
  z-index: 100;
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  display: none;
}
.slot-ctx.open { display: block; }

.slot-ctx-item {
  padding: 9px 16px;
  font-size: 14px;
  color: var(--tx);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background .1s;
}
.slot-ctx-item:hover { background: var(--bg4); }

.slot-ctx-item .ctx-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.slot-ctx-sep { height: 1px; background: var(--bdr); margin: 4px 12px; }

/* Poignée de redimensionnement gauche */
.pl-resize {
  width: 5px;
  background: transparent;
  cursor: col-resize;
  flex-shrink: 0;
  border-right: 1px solid var(--bdr);
  transition: background .15s;
}
.pl-resize:hover { background: var(--acc2); }

/* ─── Onglet d'expansion ─── */

/* ─── Onglet d'expansion ─── */
.expand-tab {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 48px;
  background: var(--bg3);
  border: 1px solid var(--bdr);
  color: var(--tx3);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  z-index: 10;
  transition: all .15s;
}
.expand-tab:hover { background: var(--bg4); color: var(--tx); }
.expand-left { left: 0; border-radius: 0 5px 5px 0; border-left: none; }
