* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #F8FAFC; /* Fond presque blanc (gris très pâle anti-éblouissement) */
  color: #0F172A;
  user-select: none;
}

/* Barre d'outils supérieure */
.toolbar {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  height: 52px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.toolbar-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  color: #0284C7;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hint {
  font-size: 12px;
  color: #64748B;
  margin-right: 8px;
}

.hint strong {
  color: #1E293B;
}

.toolbar-actions button {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.toolbar-actions button:hover {
  background: #F1F5F9;
  border-color: #0284C7;
  color: #0284C7;
}

/* Zone d'affichage plein écran */
#viewport-container {
  width: 100vw;
  height: 100vh;
  cursor: default;
  overflow: hidden;
  position: relative;
}

#viewport-container.space-mode {
  cursor: grab !important;
}

#viewport-container.dragging {
  cursor: grabbing !important;
}

/* Rendu SVG vectoriel */
#diagram-canvas {
  width: 100%;
  height: 100%;
}

#diagram-canvas svg {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
}