/* Plugin: gui — bureau d'icônes EdenALOS (v0.2 : drag & drop + ctxmenu) */

.gui-desktop {
  position: fixed;
  inset: 0;             /* couvre tout le viewport */
  z-index: 50;          /* sous les fenêtres flottantes (200+) */
  pointer-events: auto; /* capture les right-clicks dans la zone vide */
  user-select: none;
  background: transparent;
}

.gui-icon {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 84px;
  padding: 8px 6px 6px;
  border-radius: 8px;
  cursor: grab;
  border: 1px solid transparent;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
  outline: none;
}
.gui-icon:hover {
  background: rgba(88, 200, 255, 0.10);
  border-color: rgba(88, 200, 255, 0.22);
}
.gui-icon:focus-visible {
  background: rgba(88, 200, 255, 0.14);
  border-color: rgba(88, 200, 255, 0.40);
}
.gui-icon:active { transform: scale(0.97); }
.gui-icon.dragging {
  cursor: grabbing;
  opacity: 0.85;
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  background: rgba(88, 200, 255, 0.16);
  border-color: rgba(88, 200, 255, 0.55);
  z-index: 100;
}

.gui-icon-glyph {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  /* Pour les SVG (EdenIcons) : currentColor inherits this. Pour les emojis,
     color est ignoré (les emojis ont leur propre rendu coloré). */
  color: var(--fg, #e8edf3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

.gui-icon-label {
  font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg, #e8edf3);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

/* Context menu (icône + bureau) */
.gui-ctxmenu {
  position: fixed;
  z-index: 999999;
  background: rgba(17, 21, 28, 0.97);
  border: 1px solid #2a3140;
  border-radius: 8px;
  padding: 4px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  user-select: none;
}
.gui-ctx-item {
  padding: 7px 12px;
  font-size: 12px;
  color: #e8edf3;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}
.gui-ctx-item svg { flex-shrink: 0; opacity: 0.85; }
.gui-ctx-item:hover svg { opacity: 1; }
.gui-ctx-item:hover {
  background: rgba(88, 200, 255, 0.10);
  color: #58c8ff;
}
.gui-ctx-sep {
  height: 1px;
  background: #2a3140;
  margin: 4px 0;
}
